NuSphere Forums Forum Index
NuSphere Forums
Reply to topic
How do I get PhpED 19.2 to work with Centos 7 & glibc-2.


Joined: 27 Nov 2009
Posts: 98
Reply with quote
I had been running Centos7 with PHP 7.3, Apache 2.4, php-fpm, and NuSphere PhpED 19.1 Professional for Windows (Build 19116) and all was working fine.

I just upgraded to PHP 7.4.1 (using remi's repository) and NuSphere PhpED 19.2 Professional for Windows (Build 19210) but now the wizard shows the following error when Checking debugger in HTTP (web server) mode step:

Code:
Warning: (-23) platform is Linux-glibc-2.17/x86_64, it's probably not supported (Php version 7.4.1 is not supported by this product. Please check for the product updates at https://shop.nusphere.com/), please consult with list of supported platforms on this page


The Nusphere documentation states PHP7.4 is supported and that glibc must be equal to or greater than 2.3, however, my glibc version is 2.17 so why is this an issue? Additional details as follows:

Thank you!

php.ini is set up as follows:

Code:
zend_extension="/usr/lib64/php/modules/dbg-php-7.4.so"
[debugger]
debugger.enabled=on
debugger.profiler_enabled=on
debugger.hosts_allow=localhost
debugger.hosts_deny=ALL
debugger.ports=7869, 10000/16


Specific details from the wizard are as follows:
Code:
 .php file extension is associated with PHP
 dbg-wizard script was recently updated, file version is 3.9.3914
 uploaded dbg-wizard.php to [SFTP:1and1] /public/
 SSL certificate [/O=Digital Signature Trust Co./CN=DST Root CA X3] checked
 SSL certificate [/C=US/O=Let's Encrypt/CN=Let's Encrypt Authority X3] checked
 dbg-wizard version is 3.9.3914
 client outbound IP=12.34.56.78, another network
 Warning: (-23) platform is Linux-glibc-2.17/x86_64, it's probably not supported (Php version 7.4.1 is not supported by this product. Please check for the product updates at https://shop.nusphere.com/), please consult with list of supported platforms on this page
 php version 7.4.1, ts: 0, sapi: fpm-fcgi
 php.ini file is /etc/php.ini
 php extension_dir /usr/lib64/php/modules
 document root /var/www/public
 debugger version 9.2.4, enabled
 Info: Zend OPcache is loaded. This extension may interfere with php debugger
 please make screenshots of all of the wizard pages and contact NuSphere support http://shop.nusphere.com/contact_us/
 if your experience any problems with debugger or with functions like step-in/step-out/breakpoints etc, please comment out or disable Zend OPcache extension in /etc/php.ini
 please proceed with [Next >>] button


Step 2...
Quote:
dbglistener is listening on: all addresses, port: 7869, upnp: 0
SSH tunnel status: successfully established, ok
SSL certificate [/O=Digital Signature Trust Co./CN=DST Root CA X3] checked
SSL certificate [/C=US/O=Let's Encrypt/CN=Let's Encrypt Authority X3] checked
debug session is started
stepped into dbg-sample.php(7) line
breakpoint triggered at dbg-sample.php(3) line
Info: Log: Debug session terminated
Info: Log: Debug session unexpectedly terminated
Error: (-125) failed to evaluate "$arg1", error:
Error: (-131) https://myserver.com/dbg-sample.php web server failed: HTTP/1.1 503 Service Unavailable
make sure that web server is accessible and can serve HTTP requests
fix the problem(s), then click [<< Back] button and repeat the tests


According to http://www.nusphere.com/products/debugging_php.htm

Code:
Operating System   Bitness and CPU   Requirements   Archive or Location   Directory inside   Comments
Linux   x86, 64   glibc >= 2.3   dbg-5.0.9-Linux.tar.gz   x86_64   7


phpinfo() provides the following:
Code:
PHP Version 7.4.1
System   Linux myserver.com 3.10.0-1062.4.3.el7.x86_64 #1 SMP Wed Nov 13 23:58:53 UTC 2019 x86_64
Build Date   Dec 17 2019 16:35:58
Server API   FPM/FastCGI
Virtual Directory Support   disabled
Configuration File (php.ini) Path   /etc
Loaded Configuration File   /etc/php.ini
Scan this dir for additional .ini files   /etc/php.d
Additional .ini files parsed   /etc/php.d/10-opcache.ini, /etc/php.d/20-bz2.ini, /etc/php.d/20-calendar.ini, /etc/php.d/20-ctype.ini, /etc/php.d/20-curl.ini, /etc/php.d/20-dom.ini, /etc/php.d/20-exif.ini, /etc/php.d/20-fileinfo.ini, /etc/php.d/20-ftp.ini, /etc/php.d/20-gd.ini, /etc/php.d/20-gettext.ini, /etc/php.d/20-iconv.ini, /etc/php.d/20-json.ini, /etc/php.d/20-mbstring.ini, /etc/php.d/20-mysqlnd.ini, /etc/php.d/20-pdo.ini, /etc/php.d/20-phar.ini, /etc/php.d/20-simplexml.ini, /etc/php.d/20-sockets.ini, /etc/php.d/20-sqlite3.ini, /etc/php.d/20-tokenizer.ini, /etc/php.d/20-xml.ini, /etc/php.d/20-xmlwriter.ini, /etc/php.d/20-xsl.ini, /etc/php.d/30-mcrypt.ini, /etc/php.d/30-mysqli.ini, /etc/php.d/30-pdo_mysql.ini, /etc/php.d/30-pdo_sqlite.ini, /etc/php.d/30-xmlreader.ini, /etc/php.d/30-xmlrpc.ini, /etc/php.d/40-ds.ini, /etc/php.d/40-zip.ini
PHP API   20190902
PHP Extension   20190902
Zend Extension   320190902
Zend Extension Build   API320190902,NTS
PHP Extension Build   API20190902,NTS
Debug Build   no
Thread Safety   disabled
Zend Signal Handling   enabled
Zend Memory Manager   enabled
Zend Multibyte Support   provided by mbstring
IPv6 Support   enabled
DTrace Support   available, disabled
Registered PHP Streams   https, ftps, compress.zlib, php, file, glob, data, http, ftp, compress.bzip2, phar, zip
Registered Stream Socket Transports   tcp, udp, unix, udg, ssl, sslv3, tls, tlsv1.0, tlsv1.1, tlsv1.2
Registered Stream Filters   zlib.*, string.rot13, string.toupper, string.tolower, string.strip_tags, convert.*, consumed, dechunk, bzip2.*, convert.iconv.*, mcrypt.*, mdecrypt.*
Zend logoThis program makes use of the Zend Scripting Language Engine:
Zend Engine v3.4.0, Copyright (c) Zend Technologies
    with DBG v9.2.4, (C) 2000,2018, by Dmitri Dmitrienko
    with Zend OPcache v7.4.1, Copyright (c), by Zend Technologies



The only reference to glibc under phpinfo is:
Code:
iconv support   enabled
iconv implementation   glibc
iconv library version   2.17



glibc information is also found using the following:
Code:
[michael@myserver ~]$ yum list glibc
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * base: mirror.us.oneandone.net
 * epel: mirror.compevo.com
 * extras: repos-tx.psychz.net
 * remi-php74: mirror.bebout.net
 * remi-safe: mirror.bebout.net
 * updates: mirror.hackingand.coffee
Installed Packages
glibc.i686                                                                                                          2.17-292.el7                                                                                                        @base
glibc.x86_64                                                                                                        2.17-292.el7                                                                                                        @base

[michael@myserver ~]$ yum list available | grep glibc
compat-glibc.x86_64                     1:2.12-4.el7.centos            base
compat-glibc-headers.x86_64             1:2.12-4.el7.centos            base
glibc-devel.i686                        2.17-292.el7                   base
glibc-static.i686                       2.17-292.el7                   base
glibc-static.x86_64                     2.17-292.el7                   base
glibc-utils.x86_64                      2.17-292.el7                   base
View user's profileFind all posts by NotionCommotionSend private message
Site Admin

Joined: 13 Jul 2003
Posts: 8342
Reply with quote
- dbg-wizard script should and will be updated (ETA - in 2h)
- http://www.nusphere.com/products/debugging_php.htm -- should and will be updated (ETA - in 2h)
- Error: (-125) failed to evaluate "$arg1", error: -- I'm not sure what happened with it -- Please check server logs. There should be a reason for 503.

PS
Zend OPcache
^^^^^^^^^^
I'd highly recommend you to remove this guy from your development server

_________________
The PHP IDE team
View user's profileFind all posts by dmitriSend private messageVisit poster's website


Joined: 27 Nov 2009
Posts: 98
Reply with quote
dmitri wrote:
- dbg-wizard script should and will be updated (ETA - in 2h)
- http://www.nusphere.com/products/debugging_php.htm -- should and will be updated (ETA - in 2h)
- Error: (-125) failed to evaluate "$arg1", error: -- I'm not sure what happened with it -- Please check server logs. There should be a reason for 503.

PS
Zend OPcache
^^^^^^^^^^
I'd highly recommend you to remove this guy from your development server


Wow, That is the quickest turnaround I've ever experienced. Thanks!

I will check into the "arg1" error and post my findings

And yep, it has been on my list to remove Zend OPcache and will make it happen before the New Year.

Thanks again, Michael
View user's profileFind all posts by NotionCommotionSend private message


Joined: 27 Nov 2009
Posts: 98
Reply with quote
- Original issues with dbg-wizard. Fixed as you promised. Thanks!

- Zend OPcache. Removed as I promised.

- Error: (-125) failed to evaluate "$arg1", error

journalctl shows the following. Is this on my end or yours? PS. I don't know what those hex values mean but if I shouldn't be posting them public, please delete/change them from this post.

Code:
kernel: traps: php-fpm[1694] general protection ip:7fe2b5df1ab6 sp:7fff4be53e60 error:0 in dbg-php-7.4.so[7fe2b5dd8000+31000]
View user's profileFind all posts by NotionCommotionSend private message
Site Admin

Joined: 13 Jul 2003
Posts: 8342
Reply with quote
- check TS requirements of your php. If it is non-thread-safe, you have to use non-thread-safe debugger module
- check sha2 or md5 sum of the share library to make sure it wasn't corrupted when you transferred it to your server. Just for instance it's known that WinSCP corrupts binary files.
- if nothing helps, try to configure php to produce coredump to get full callstack. Then submit it in your ticket

PS under "share library" I mean shared object, .so file, the debugger binary that you copied to the server. It's shouldn't be an issue if you copy .tar.gz archive then unpack it on the server with verification. But if you unpack it locally and copy only .so file, it may be corrupted. It was the root cause in dozen cases.


Last edited by dmitri on Tue Dec 31, 2019 12:08 pm; edited 2 times in total

_________________
The PHP IDE team
View user's profileFind all posts by dmitriSend private messageVisit poster's website


Joined: 27 Nov 2009
Posts: 98
Reply with quote
dmitri wrote:
- check TS requirements of your php. If it is non-thread-safe, you have to use non-thread-safe debugger module
- check sha2 or md5 sum of the share library to make sure it wasn't corrupted when you transferred it to your server. Just for instance it's known that WinSCP corrupts binary files.
- if nothing helps, try to configure php to produce coredump to get full callstack. Then submit it in your ticket

I documented the following, but at the very end everything started working for unknown reasons. Just in case it helps you or others, I am still posting my results. Also, just for curiosity's sake (or just in case it happens again), any suggestions for probable cause would be appreciated. Thanks

I think I am using the correct non-thread safety debugger. Please see below.
I rarely use WinSCP. See below how I uploaded content to the server and if necessary please elaborate on what you mean by checking the share library.
See the steps I took regarding a coredump, however, nothing was saved in any of the \tmp directories.

----

I un-installed all instances of PhpED on my Windows PC and reinstalled full installation NuSphere-phped-19.2-x64.exe.

I copied the debugger to the server:
Code:
C:\Program Files (x86)\NuSphere\PhpED\debugger\server>pscp ./dbg-9.2.4-Linux.tar.gz michael@myserver.net:/home/michael/dbg-9.2.4-Linux.tar.gz
michael@myserver.net's password:
dbg-9.2.4-Linux.tar.gz    | 6986 kB | 1397.3 kB/s | ETA: 00:00:00 | 100%


lscpu reports: Architecture: x86_64 and CPU op-mode(s): 32-bit, 64-bit

I replaced the debugger with the new version:
Code:
[michael@myserver ~]$ sudo rm /usr/lib64/php/modules/dbg-php-7.4.so
[michael@myserver ~]$ sudo cp ~/dbg-9.2.4-Linux/x86_64/dbg-php-7.4.so /usr/lib64/php/modules

I changed php.ini to the following as it worked this way previously:
Code:
end_extension="/usr/lib64/php/modules/dbg-php-7.4.so"
[debugger]
debugger.hosts_allow=10.120.11.99, 127.0.0.1, localhost, ::1
debugger.hosts_deny=ALL
debugger.ports=7869


I restarted the server. Note that I am using php-fpm which previously worked fine.
Code:
[michael@myserver ~]$ sudo systemctl restart php-fpm
[michael@myserver ~]$ sudo systemctl restart httpd


I used the wizard to configure:

Code:
.php file extension is associated with PHP
 local version of dbg-wizard script is up to date, version 4.0.4001
 uploaded dbg-wizard.php to [SFTP:1and1] /public/
 SSL certificate [/O=Digital Signature Trust Co./CN=DST Root CA X3] checked
 SSL certificate [/C=US/O=Let's Encrypt/CN=Let's Encrypt Authority X3] checked
 dbg-wizard version is 4.0.4001
 client outbound IP=12.345.6.78, another network
 platform Linux-glibc-2.17/x86_64, supported
 php version 7.4.1, ts: 0, sapi: fpm-fcgi
 php.ini file is /etc/php.ini
 php extension_dir /usr/lib64/php/modules
 document root /var/www/public
 debugger version 9.2.4, enabled
 please proceed with [Next >>] button
 
 dbglistener is listening on: all addresses, port: 7869, upnp: 0
 SSH tunnel status: successfully established, ok
 SSL certificate [/O=Digital Signature Trust Co./CN=DST Root CA X3] checked
 SSL certificate [/C=US/O=Let's Encrypt/CN=Let's Encrypt Authority X3] checked
 debug session is started
 stepped into dbg-sample.php(7) line
 breakpoint triggered at dbg-sample.php(3) line
 Info: Log: Debug session terminated
 Info: Log: Debug session unexpectedly terminated
 Error: (-125) failed to evaluate "$arg1", error:
 Error: (-131) https://api.myserver.net/dbg-sample.php web server failed: HTTP/1.1 503 Service Unavailable
 make sure that web server is accessible and can serve HTTP requests
 fix the problem(s), then click [<< Back] button and repeat the tests


POP-UP 1: New debug session with //api.myserver.net:443/dbg-sample.php has started. But IDE could not find the project for the web debugging. Breakpoints and other features may fail to work.
POP-UP 2: Error: Debug session unexpectedly terminated.

Clicking api.myserver.net/dbg-sample.php displays:
Code:
array(2) { [0]=> string(8) "element1" ["a"]=> string(8) "element2" } hello world


journalctl logs: Dec 31 14:36:27 myserver.net kernel: traps: php-fpm[5328] general protection ip:7f48549ddab6 sp:7fff8e0423e0 error:0 in dbg-php-7.4.so[7f48549c4000+31000]


Steps to configure coredump:

Code:
[michael@myserver ~]$ su -
Password:
Last login: Fri Nov  9 16:12:42 UTC 2018 on pts/1
Last failed login: Tue Dec 31 15:10:14 UTC 2019 on pts/0
There were 126134 failed login attempts since the last successful login.
[root@myserver ~]# echo '/tmp/core-%e.%p' > /proc/sys/kernel/core_pattern
[root@myserver ~]# echo 0 > /proc/sys/kernel/core_uses_pid
[root@myserver ~]# ulimit -c unlimited
[root@myserver ~]# exit
logout
[michael@myserver ~]$ cat /etc/php-fpm.conf | grep core
; Set max core size rlimit for the master process.
;rlimit_core = 0
[michael@myserver ~]$ cat /etc/php-fpm.d/www.conf | grep core
[michael@myserver ~]$ sudo vi /etc/php-fpm.conf
[michael@myserver ~]$ sudo vi /etc/php-fpm.d/www.conf
[michael@myserver ~]$ cat /etc/php-fpm.conf | grep core
; Set max core size rlimit for the master process.
;rlimit_core = 0
rlimit_core = unlimited
[michael@myserver ~]$ cat /etc/php-fpm.d/www.conf | grep core
rlimit_core = unlimited

[michael@myserver ~]$ sudo systemctl restart php-fpm
[michael@myserver ~]$ sudo systemctl restart httpd

I repeated the wizard and journalctl reported the same error . I expected some content in the /tmp directory but there was none. I even changed the folders to 0777 but still none.

Code:
[root@myserver tmp]# ls -l
total 24
drwx------ 3 root root    16 Dec 31 15:16 systemd-private-9426b6fe2d5d467dbc2395eff9fc451d-httpd.service-N5tv94
drwx------ 3 root root    16 Dec 31 01:46 systemd-private-9426b6fe2d5d467dbc2395eff9fc451d-php56-php-fpm.service-dC4BLv
drwx------ 3 root root    16 Dec 31 15:23 systemd-private-9426b6fe2d5d467dbc2395eff9fc451d-php-fpm.service-4JXfJh
-rw------- 1 root root   763 Dec 30 17:59 tmpzoiUiE
...
[root@myserver tmp]# ls -l systemd*
systemd-private-9426b6fe2d5d467dbc2395eff9fc451d-httpd.service-HaOr8p:
total 0
drwxrwxrwt 2 root root 6 Dec 31 15:35 tmp
systemd-private-9426b6fe2d5d467dbc2395eff9fc451d-ntpd.service-hE3nMk:
total 0
drwxrwxrwt 2 root root 6 Dec 31 01:46 tmp
systemd-private-9426b6fe2d5d467dbc2395eff9fc451d-php56-php-fpm.service-dC4BLv:
total 0
drwxrwxrwt 2 root root 6 Dec 31 01:46 tmp
systemd-private-9426b6fe2d5d467dbc2395eff9fc451d-php-fpm.service-HiCPVE:
total 0
drwxrwxrwt 2 root root 6 Dec 31 15:35 tmp
[root@myserver tmp]# ls -l systemd*/tmp
systemd-private-9426b6fe2d5d467dbc2395eff9fc451d-httpd.service-HaOr8p/tmp:
total 0
systemd-private-9426b6fe2d5d467dbc2395eff9fc451d-ntpd.service-hE3nMk/tmp:
total 0
systemd-private-9426b6fe2d5d467dbc2395eff9fc451d-php56-php-fpm.service-dC4BLv/tmp:
total 0
systemd-private-9426b6fe2d5d467dbc2395eff9fc451d-php-fpm.service-HiCPVE/tmp:
total 0


For some odd reason, the PhpED project I was working with lost all its settings. I reentered them, but PhpED said the ssh file couldn't be found. I rebooted PhpED, and now all is good Smile

I returned the php-fpm config files to their original state and rebooted the server. I still need to figure out how to reverse the following and will figure it out, but would still appreciate any help you can provide.

Code:
[root@myserver ~]# echo '/tmp/core-%e.%p' > /proc/sys/kernel/core_pattern
[root@myserver ~]# echo 0 > /proc/sys/kernel/core_uses_pid
[root@myserver ~]# ulimit -c unlimited
View user's profileFind all posts by NotionCommotionSend private message
Site Admin

Joined: 13 Jul 2003
Posts: 8342
Reply with quote
In case if problem is still there, do not disable coredumps for a while. If you get anything like "503" or "Debug session unexpectedly terminated", check core directory grab callstack if core is creted. Try to reproduce too.

As of "New debug session with //api.myserver.net:443/dbg-sample.php has started But IDE could not find the project", it's weird. I'll try to reproduce it in our premises.

_________________
The PHP IDE team
View user's profileFind all posts by dmitriSend private messageVisit poster's website


Joined: 27 Nov 2009
Posts: 98
Reply with quote
Thanks again dmitri, If the problem resurfaces, I will post the results, else looks like I am good to go. Happy New Year!
View user's profileFind all posts by NotionCommotionSend private message
Site Admin

Joined: 13 Jul 2003
Posts: 8342
Reply with quote
Problem was reproduced and a workaround found. Dbg-9.2.8 is available as a component of PhpED 19212

_________________
The PHP IDE team
View user's profileFind all posts by dmitriSend private messageVisit poster's website


Joined: 27 Nov 2009
Posts: 98
Reply with quote
Good timing. Problem just came back today and came back to this post for reference and saw that you got it fixed. All working!

Side topic. For these updates, do I need to reinstall PhpED or just the debugger?

Also, sometimes it seems to install in C:\Program Files\NuSphere and other times in C:\Program Files (x86)\NuSphere. Which one should it be located in?

Thanks
View user's profileFind all posts by NotionCommotionSend private message
Site Admin

Joined: 13 Jul 2003
Posts: 8342
Reply with quote
1 -- yes you'd better install
2 -- (x86) is for 32bit software on 64bit OS. You don't have a reason to do that, right?

_________________
The PHP IDE team
View user's profileFind all posts by dmitriSend private messageVisit poster's website
How do I get PhpED 19.2 to work with Centos 7 & glibc-2.
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
All times are GMT - 5 Hours  
Page 1 of 1  

  
  
 Reply to topic