NuSphere Forums Forum Index
NuSphere Forums
Reply to topic
Issues with PHP 8 with PhpED 19.5


Joined: 27 Nov 2009
Posts: 98
Reply with quote
PhpED 19.3 on local Windows PC was working with PHP 7.4 on remote Centos 7, however, having issues after upgrading to PhpED 19.5 and PHP 8.

Linux user "michael" use public keys on the windows PC instead of a password, and user "password_user" uses a password. I am currently logged via putty using michael account and the public key. My windows PC IP is 11.22.33.44 and my server's IP is 44.33.22.11.

I get different results when using using either Linux user michael or password_user as the Tunnel (SSH) account, and even more strange get different results if I delete the michael account from PHPed and then use the password_user account. Potentially, also related to which account is used for the Terminal account, but not sure.

On Run targets dialog, both HTTP and CLI is checked. Starting off both the Terminal Account and Tunnel (SSH) account is both michael which uses keys instead of a password.

Code:
Checking php installation in HTTP (web server) mode executes without errors:

 .php file extension is associated with PHP
 dbg-wizard script was recently updated, file version is 4.2.4201
 uploaded dbg-wizard.php to [SFTP:1and1] /testsite/public/
 SSL certificate [/O=Digital Signature Trust Co./CN=DST Root CA X3] checked
 SSL certificate [/C=US/O=Internet Security Research Group/CN=ISRG Root X1] checked
 SSL certificate [/C=US/O=Let's Encrypt/CN=R3] checked
 dbg-wizard version is 4.2.4201
 client outbound IP=11.22.33.44, another network
 platform Linux-glibc-2.17/x86_64, supported
 php version 8.0.8, ts: 0, sapi: fpm-fcgi
 php.ini file is /etc/php.ini
 php extension_dir /usr/lib64/php/modules
 document root /var/www/testsite/public
 debugger version 10.0.5, enabled
 please proceed with [Next >>] button


But Checking php installation in CLI (console) mode hangs at the "running remote php-cli" step, and the detail tab just repeats for hours.

Code:
 .php file extension is associated with PHP
 dbg-wizard script was recently updated, file version is 4.2.4201
 uploaded dbg-wizard.php to [SFTP:1and1] /testsite/public/
 running remote php-cli
 ... hanges...

The Details tab:
Code:
   Connecting to 44.33.22.11.
   Connected.
   Last login: Wed Jun 30 13:45:38 2021 from c-67-160-8-61.hsd1.wa.comcast.net
   -bash-4.2$
   -bash-4.2$
   -bash-4.2$
   ... repeats...


Clicked Next and skipped and got following error when Checking debugger installation in HTTP (web server) mode:
Code:

  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=Internet Security Research Group/CN=ISRG Root X1] checked
 SSL certificate [/C=US/O=Let's Encrypt/CN=R3] checked
 Error: (-134) debug session did not start (dbg error=-16)
 please check php installation, check your AV and firewall software, and make sure that PhpED is allowed to connect web server and send HTTP requests. Also make sure that the IDE (dbglistener.exe) is allowed to accept incoming connections on TCP/7869 port. Also make sure that SSH tunnel for debugger is configured to the server where you're about to run and debug php please re-run this wizard and make sure that everything is entered correctly; if nothing helps, please make screenshots of all of the wizard pages and contact NuSphere support http://shop.nusphere.com/contact_us/
 fix the problem(s), then click [<< Back] button and repeat the tests

And then when Checking debugger installation in CLI (console) mode, and I get the same hanging for hours when checking php-cli PHP installation.

Code:
 dbglistener is listening on: all addresses, port: 7869, upnp: 0
 SSH tunnel status: successfully established, ok
 running remote php-cli
 Error: (-102) wizard is cancelled
 fix the problem(s), then click [<< Back] button and repeat the tests


When using another user, I get SSH tunnel errors. Not positive, but appears that PHPed is also sending my michael user to the remote server.

Checking debugger installation in HTTP (web server) mode first shows a SSH tunnel failed error and then has the same error as when using user michael.

Code:
 dbglistener is listening on: all addresses, port: 7869, upnp: 0
 Error: (-102) SSH tunnel failed, last status:failed
 SSL certificate [/O=Digital Signature Trust Co./CN=DST Root CA X3] checked
 SSL certificate [/C=US/O=Internet Security Research Group/CN=ISRG Root X1] checked
 SSL certificate [/C=US/O=Let's Encrypt/CN=R3] checked
 Error: (-134) debug session did not start (dbg error=-16)
 Make sure that port selected for debugger (7869) is not in-use on your server. Each developer using SSH tunnel for debugger on the same remote host has to select unique port for debugger. Check SSH server logs for possible other reasons for tunnel to failure
 please check php installation, check your AV and firewall software, and make sure that PhpED is allowed to connect web server and send HTTP requests. Also make sure that the IDE (dbglistener.exe) is allowed to accept incoming connections on TCP/7869 port. Also make sure that SSH tunnel for debugger is configured to the server where you're about to run and debug php please re-run this wizard and make sure that everything is entered correctly; if nothing helps, please make screenshots of all of the wizard pages and contact NuSphere support http://shop.nusphere.com/contact_us/
 fix the problem(s), then click [<< Back] button and repeat the tests


And similarly checking debugger installation in CLI (console) mode first shows a SSH tunnel failed error and then has the same hanging as when using user michael.

Code:
 dbglistener is listening on: all addresses, port: 7869, upnp: 0
 Error: (-102) SSH tunnel failed, last status:failed
 running remote php-cli
 Error: (-102) wizard is cancelled
 Make sure that port selected for debugger (7869) is not in-use on your server. Each developer using SSH tunnel for debugger on the same remote host has to select unique port for debugger. Check SSH server logs for possible other reasons for tunnel to failure
 fix the problem(s), then click [<< Back] button and repeat the tests


And then if I delete user michael from PHPed, I think I get the same results when using michael.

The following is journalctl outputs for the various scenarios. Note that I sometimes get different results if I start when a service is using port 7869.

Code:
[michael@devserver ~]$ sudo lsof -i:7869
[michael@devserver ~]$

Terminal Account and Tunnel (SSH) account is both michael which uses keys instead of a password.

Jun 30 15:17:35 devserver.net sshd[26685]: Accepted publickey for michael from 11.22.33.44 port 64382 ssh2: RSA SHA256:lAiD9MeiXc+cwazK18zJSZOhisKLJnzD+op4sU7OOZk
Jun 30 15:17:35 devserver.net systemd[1]: Started Session 134 of user michael.
Jun 30 15:17:35 devserver.net systemd-logind[776]: New session 134 of user michael.
Jun 30 15:17:35 devserver.net sshd[26685]: pam_unix(sshd:session): session opened for user michael by (uid=0)
Jun 30 15:18:00 devserver.net sshd[26697]: Accepted publickey for michael from 11.22.33.44 port 56267 ssh2: RSA SHA256:lAiD9MeiXc+cwazK18zJSZOhisKLJnzD+op4sU7OOZk
Jun 30 15:18:00 devserver.net systemd[1]: Started Session 135 of user michael.
Jun 30 15:18:00 devserver.net systemd-logind[776]: New session 135 of user michael.
Jun 30 15:18:00 devserver.net sshd[26697]: pam_unix(sshd:session): session opened for user michael by (uid=0)
Jun 30 15:18:05 devserver.net sshd[26697]: pam_unix(sshd:session): session closed for user michael
Jun 30 15:18:05 devserver.net systemd-logind[776]: Removed session 135.
Jun 30 15:18:54 devserver.net sshd[26740]: Accepted publickey for michael from 11.22.33.44 port 62228 ssh2: RSA SHA256:lAiD9MeiXc+cwazK18zJSZOhisKLJnzD+op4sU7OOZk
Jun 30 15:18:54 devserver.net systemd-logind[776]: New session 136 of user michael.
Jun 30 15:18:54 devserver.net systemd[1]: Started Session 136 of user michael.
Jun 30 15:18:54 devserver.net sshd[26740]: pam_unix(sshd:session): session opened for user michael by (uid=0)
Jun 30 15:18:59 devserver.net sshd[26740]: pam_unix(sshd:session): session closed for user michael
Jun 30 15:18:59 devserver.net systemd-logind[776]: Removed session 136.

[michael@devserver ~]$ sudo lsof -i:7869
COMMAND   PID    USER   FD   TYPE DEVICE SIZE/OFF NODE NAME
sshd    26687 michael    9u  IPv4 545174      0t0  TCP localhost:mobileanalyzer (LISTEN)
sshd    26687 michael   10u  IPv6 545175      0t0  TCP localhost:mobileanalyzer (LISTEN)
[michael@devserver ~]$
[michael@devserver ~]$ sudo kill 26687


Terminal Account and Tunnel (SSH) account is both password_user which uses a password and the michael account which uses keys instead of a password is still in my list of PhpED accounts.

Code:
Jun 30 15:15:11 devserver.net sshd[26573]: Accepted password for password_user from 11.22.33.44 port 55612 ssh2
Jun 30 15:15:11 devserver.net systemd[1]: Created slice User Slice of password_user.
Jun 30 15:15:11 devserver.net systemd-logind[776]: New session 130 of user password_user.
Jun 30 15:15:11 devserver.net systemd[1]: Started Session 130 of user password_user.
Jun 30 15:15:11 devserver.net sshd[26573]: pam_unix(sshd:session): session opened for user password_user by (uid=0)
Jun 30 15:15:18 devserver.net sshd[26573]: pam_unix(sshd:session): session closed for user password_user
Jun 30 15:15:18 devserver.net systemd-logind[776]: Removed session 130.
Jun 30 15:15:18 devserver.net systemd[1]: Removed slice User Slice of password_user.
Jun 30 15:15:30 devserver.net sshd[26606]: Accepted password for password_user from 11.22.33.44 port 53955 ssh2
Jun 30 15:15:30 devserver.net systemd[1]: Created slice User Slice of password_user.
Jun 30 15:15:30 devserver.net systemd-logind[776]: New session 131 of user password_user.
Jun 30 15:15:30 devserver.net systemd[1]: Started Session 131 of user password_user.
Jun 30 15:15:30 devserver.net sshd[26606]: pam_unix(sshd:session): session opened for user password_user by (uid=0)
Jun 30 15:15:30 devserver.net sshd[26608]: error: bind: Address already in use
Jun 30 15:15:30 devserver.net sshd[26608]: error: channel_setup_fwd_listener_tcpip: cannot listen to port: 7869
Jun 30 15:15:31 devserver.net sshd[26608]: error: bind: Address already in use
Jun 30 15:15:31 devserver.net sshd[26608]: error: channel_setup_fwd_listener_tcpip: cannot listen to port: 7869
Jun 30 15:15:32 devserver.net sshd[26608]: error: bind: Address already in use
Jun 30 15:15:32 devserver.net sshd[26608]: error: channel_setup_fwd_listener_tcpip: cannot listen to port: 7869
Jun 30 15:15:32 devserver.net sshd[26608]: error: bind: Address already in use
Jun 30 15:15:32 devserver.net sshd[26608]: error: channel_setup_fwd_listener_tcpip: cannot listen to port: 7869
Jun 30 15:15:33 devserver.net sshd[26608]: error: bind: Address already in use
Jun 30 15:15:33 devserver.net sshd[26608]: error: channel_setup_fwd_listener_tcpip: cannot listen to port: 7869
Jun 30 15:15:33 devserver.net sshd[26608]: error: bind: Address already in use
Jun 30 15:15:33 devserver.net sshd[26608]: error: channel_setup_fwd_listener_tcpip: cannot listen to port: 7869
Jun 30 15:15:34 devserver.net sshd[26606]: pam_unix(sshd:session): session closed for user password_user
Jun 30 15:15:34 devserver.net systemd-logind[776]: Removed session 131.
Jun 30 15:15:34 devserver.net systemd[1]: Removed slice User Slice of password_user.
Jun 30 15:16:22 devserver.net sshd[26620]: Accepted password for password_user from 11.22.33.44 port 64412 ssh2
Jun 30 15:16:22 devserver.net systemd[1]: Created slice User Slice of password_user.
Jun 30 15:16:22 devserver.net systemd[1]: Started Session 132 of user password_user.
Jun 30 15:16:22 devserver.net systemd-logind[776]: New session 132 of user password_user.
Jun 30 15:16:22 devserver.net sshd[26620]: pam_unix(sshd:session): session opened for user password_user by (uid=0)
Jun 30 15:16:22 devserver.net sshd[26622]: error: bind: Address already in use
Jun 30 15:16:22 devserver.net sshd[26622]: error: channel_setup_fwd_listener_tcpip: cannot listen to port: 7869
Jun 30 15:16:22 devserver.net sshd[26622]: error: bind: Address already in use
Jun 30 15:16:22 devserver.net sshd[26622]: error: channel_setup_fwd_listener_tcpip: cannot listen to port: 7869
Jun 30 15:16:23 devserver.net sshd[26622]: error: bind: Address already in use
Jun 30 15:16:23 devserver.net sshd[26622]: error: channel_setup_fwd_listener_tcpip: cannot listen to port: 7869
Jun 30 15:16:24 devserver.net sshd[26622]: error: bind: Address already in use
Jun 30 15:16:24 devserver.net sshd[26622]: error: channel_setup_fwd_listener_tcpip: cannot listen to port: 7869
Jun 30 15:16:24 devserver.net sshd[26622]: error: bind: Address already in use
Jun 30 15:16:24 devserver.net sshd[26622]: error: channel_setup_fwd_listener_tcpip: cannot listen to port: 7869
Jun 30 15:16:25 devserver.net sshd[26622]: error: bind: Address already in use
Jun 30 15:16:25 devserver.net sshd[26622]: error: channel_setup_fwd_listener_tcpip: cannot listen to port: 7869
Jun 30 15:16:27 devserver.net sshd[26624]: Accepted password for password_user from 11.22.33.44 port 64413 ssh2
Jun 30 15:16:27 devserver.net systemd[1]: Started Session 133 of user password_user.
Jun 30 15:16:27 devserver.net systemd-logind[776]: New session 133 of user password_user.
Jun 30 15:16:27 devserver.net sshd[26624]: pam_unix(sshd:session): session opened for user password_user by (uid=0)
Jun 30 15:16:29 devserver.net sshd[26624]: pam_unix(sshd:session): session closed for user password_user
Jun 30 15:16:29 devserver.net systemd-logind[776]: Removed session 133.

[michael@devserver ~]$ sudo lsof -i:7869
COMMAND   PID    USER   FD   TYPE DEVICE SIZE/OFF NODE NAME
sshd    26566 michael    9u  IPv4 541458      0t0  TCP localhost:mobileanalyzer (LISTEN)
sshd    26566 michael   10u  IPv6 541459      0t0  TCP localhost:mobileanalyzer (LISTEN)
sshd    26566 michael   11u  IPv4 543323      0t0  TCP localhost:mobileanalyzer->localhost:33732 (CLOSE_WAIT)
sshd    26566 michael   12u  IPv6 543324      0t0  TCP localhost:mobileanalyzer->localhost:34498 (CLOSE_WAIT)
sshd    26566 michael   13u  IPv4 543425      0t0  TCP localhost:mobileanalyzer->localhost:33736 (CLOSE_WAIT)
sshd    26566 michael   14u  IPv6 543426      0t0  TCP localhost:mobileanalyzer->localhost:34502 (CLOSE_WAIT)
[michael@devserver ~]$ sudo kill 26566



Terminal Account and Tunnel (SSH) account is both password_user which uses a password, and I removed the michael account which uses keys instead of a password.

Code:
Jun 30 15:01:57 devserver.net sshd[26162]: Accepted password for password_user from 11.22.33.44 port 61159 ssh2
Jun 30 15:01:57 devserver.net systemd[1]: Created slice User Slice of password_user.
Jun 30 15:01:57 devserver.net systemd[1]: Started Session 120 of user password_user.
Jun 30 15:01:57 devserver.net systemd-logind[776]: New session 120 of user password_user.
Jun 30 15:01:57 devserver.net sshd[26162]: pam_unix(sshd:session): session opened for user password_user by (uid=0)
Jun 30 15:02:03 devserver.net sshd[26162]: pam_unix(sshd:session): session closed for user password_user
Jun 30 15:02:03 devserver.net systemd-logind[776]: Removed session 120.
Jun 30 15:02:03 devserver.net systemd[1]: Removed slice User Slice of password_user.
Jun 30 15:02:18 devserver.net sshd[26196]: Accepted publickey for password_user from 11.22.33.44 port 53631 ssh2: RSA SHA256:lAiD9MeiXc+cwazK18zJSZOhisKLJnzD+op4sU7OOZk
Jun 30 15:02:18 devserver.net systemd[1]: Created slice User Slice of password_user.
Jun 30 15:02:18 devserver.net systemd[1]: Started Session 121 of user password_user.
Jun 30 15:02:18 devserver.net systemd-logind[776]: New session 121 of user password_user.
Jun 30 15:02:18 devserver.net sshd[26196]: pam_unix(sshd:session): session opened for user password_user by (uid=0)
Jun 30 15:02:50 devserver.net sshd[26198]: channel 5: open failed: connect failed: open failed\nServer requests forwarding from unknown address "localhost:7869"
Jun 30 15:02:50 devserver.net sshd[26198]: channel 6: open failed: connect failed: open failed\nServer requests forwarding from unknown address "localhost:7869"
Jun 30 15:02:54 devserver.net sshd[26207]: Accepted password for password_user from 11.22.33.44 port 54423 ssh2
Jun 30 15:02:54 devserver.net systemd[1]: Created slice User Slice of password_user.
Jun 30 15:02:54 devserver.net systemd-logind[776]: New session 122 of user password_user.
Jun 30 15:02:54 devserver.net systemd[1]: Started Session 122 of user password_user.
Jun 30 15:02:54 devserver.net sshd[26207]: pam_unix(sshd:session): session opened for user password_user by (uid=0)
Jun 30 15:02:59 devserver.net sshd[26207]: pam_unix(sshd:session): session closed for user password_user
Jun 30 15:02:59 devserver.net systemd-logind[776]: Removed session 122.
Jun 30 15:02:59 devserver.net systemd[1]: Removed slice User Slice of password_user.

[michael@devserver ~]$ sudo lsof -i:7869
COMMAND   PID       USER   FD   TYPE DEVICE SIZE/OFF NODE NAME
sshd    26198 password_user   11u  IPv4 535498      0t0  TCP localhost:mobileanalyzer->localhost:33712 (CLOSE_WAIT)
sshd    26198 password_user   12u  IPv6 535499      0t0  TCP localhost:mobileanalyzer->localhost:34478 (CLOSE_WAIT)
[michael@devserver ~]$ sudo kill 26198



phpinfo() shows:

Code:
dbg
DBG   DBG php debugger, version 10.0.5, Copyright 2001, 2021 Dmitri Dmitrienko, http://www.nusphere.com/dbg

Version   10.0.5
Linked   as a shared library.
Dbg SSL   not available
Dbg ip security   enabled.
Profiler   enabled
Target PHP version   8.0.x
Server API   FPM/FastCGI
Extensions API   420200930
Modules API   20200930
PHP API   20200930
Directive   Local Value   Master Value
debugger.ccov_enabled   On   On
debugger.connect_retries   3   3
debugger.connect_timeout_seconds   5   5
debugger.enable_session_cookie   On   On
debugger.enabled   On   On
debugger.fail_silently   Off   Off
debugger.hosts_allow   protected value   protected value
debugger.hosts_deny   protected value   protected value
debugger.ignore_nops   Off   Off
debugger.IPv6_enabled   On   On
debugger.JIT.enabled   Off   Off
debugger.JIT.host   clienthost   clienthost
debugger.JIT.ignore_exceptions   no value   no value
debugger.JIT.port   7869   7869
debugger.JIT.trig_errors   no value   no value
debugger.JIT.trig_exceptions   Exception   Exception
debugger.net.chunksize   131072   131072
debugger.net.maxpacketsize   52428800   52428800
debugger.ports   protected value   protected value
debugger.profiler_enabled   On   On
debugger.session_nocache   On   On
debugger.timeout_seconds   300   300


Please provide any help. Thanks!!!
View user's profileFind all posts by NotionCommotionSend private message
Site Admin

Joined: 13 Jul 2003
Posts: 8344
Reply with quote
Quote:
Error: (-134) debug session did not start (dbg error=-16)

you may want to read this http://forum.nusphere.com/debugger-error-16-timeout-t10785.html


Quote:
dbglistener is listening on: all addresses, port: 7869, upnp: 0

if you're using ssh tunnel, no matter with password or public key, you have to use unique port -- because all these ports will open on the same server's interface with 127.0.0.1 address. Obviously the same debugger port won't open 2nd time.
Update Tools->Settings->Run & Debug / Settings -> Debugger port


Quote:
-bash-4.2$
-bash-4.2$
-bash-4.2$
... repeats...

Can you try to set standard Linux prompt in .profile / .bash_profile?[/quote]

_________________
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 dmitri but still not working.

dmitri wrote:
you may want to read this http://forum.nusphere.com/debugger-error-16-timeout-t10785.html

No, but just did (shown below)
dmitri wrote:
In case if you got debugger timeout error, try to adjust timeout in debugger settings. New debugger version supports debugger.connect_timeout_seconds config setting. By default it's 5 seconds and for some environments it looks a bit too aggressive.
I will update it to 30sec in next debugger update.


Where do I change debugger.connect_timeout_seconds? Is this the same thing as "Debugger startup timeout"? Note that the default value is 15 and not 5 (see below screenshot).

dmitri wrote:
if you're using ssh tunnel, no matter with password or public key, you have to use unique port -- because all these ports will open on the same server's interface with 127.0.0.1 address. Obviously the same debugger port won't open 2nd time.
Update Tools->Settings->Run & Debug / Settings -> Debugger port

Are you telling me to check "Listen on local host only" as shown on below screenshot?

On a related note, attempting to get things working, I opened port 7869 on my firewall. Even though it is being listened to, telenet and yougetsignal.com both say it is not opened. Doesn't really matter, but just making sure I don't need 7869 open.
Code:
sudo lsof -i:7869
COMMAND   PID    USER   FD   TYPE DEVICE SIZE/OFF NODE NAME
sshd    28341 michael    9u  IPv4 624209      0t0  TCP localhost:mobileanalyzer (LISTEN)
sshd    28341 michael   10u  IPv6 624210      0t0  TCP localhost:mobileanalyzer (LISTEN)


dmitri wrote:
Can you try to set standard Linux prompt in .profile / .bash_profile?

The previous post must have been when I was using a user without a home. Changing users, I get the following. Is this what you requested me do?
Code:
Connecting to 11.22.33.44.
Connected.
Last login: Fri Jul  2 14:21:05 2021 from c-44-33-22-11.hsd1.wa.comcast.net
[michael@devserver ~]$
[michael@devserver ~]$
[michael@devserver ~]$
[michael@devserver ~]$
[michael@devserver ~]$
...


Before making changes, settings were as follows:


Under Tools->Settings->Run & Debug / Settings, I changed Debugger startup timeout from 15 to 30, checked Listen on localhost only, unchecked Enable IPv6, but still shows the same. Then I created a brand new workplace, made setting changes, added a new project, and no change. Note that Settings do not seem to get propagated to even a new project (Debugger startup timeout still showed 15 and had to change it here as well) and I can't find were to change the other two settings under project. Also, not that it matters, but the debugger is still listening on all addresses and for IPV6.


So, per above, SSH tunnel as well as SSL is good, but the debug session did not start. What does this mean? Are we talking about a PHP session (storing data) and maybe they are not set up right? What type of checking is expected for the following (and what is AV?)?

  1. please check php installation,
  2. check your AV and firewall software,
  3. and make sure that PhpED is allowed to connect web server and send HTTP requests.
  4. Also make sure that the IDE (dbglistener.exe) is allowed to accept incoming connections on TCP/7869 port.
  5. Also make sure that SSH tunnel for debugger is configured to the server where you're about to run and debug php


Thanks!

EDIT Additional information - I don't know if it matters but maybe related to how PHP is configured? I am using php-fpm (remi distro) with Apache and use pools. Before updating to the new PhpED, I had PHP 7.4 as the default and it used /etc/httpd/conf.d/php.conf, /etc/php-fpm.d/*conf, and PHP 8 (or 7.3) use /etc/opt/remi/php80/php.ini, /etc/opt/remi/php80/php-fpm.d/*conf, etc). Note that it is also listening to a socket and not an IP. This configuration worked perfectly the earlier PhpED version. When I upgraded to PhpED to all PHP 8, I also made PHP_POOL_DEFAULT use PHP8, got rid of PHP80_POOL, and added PHP74_POOL

Code:
Define PHP_POOL_DEFAULT "proxy:unix:/run/php-fpm/www.sock|fcgi://localhost"
Define PHP80_POOL "proxy:unix:/run/php-fpm/php80.sock|fcgi://localhost"
Define PHP73_POOL "proxy:unix:/run/php-fpm/php73.sock|fcgi://localhost"
View user's profileFind all posts by NotionCommotionSend private message
Site Admin

Joined: 13 Jul 2003
Posts: 8344
Reply with quote
Quote:
Where do I change debugger.connect_timeout_seconds?

we're talking about debugger module, it's what connects back to the IDE, so it's in php.ini, on your 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:
we're talking about debugger module, it's what connects back to the IDE, so it's in php.ini, on your server

Ah, thank you. My php.ini currently shows the following. Note that the PhpED wizard told me to add slightly different content to php.ini, but after I got the errors, added a few lines that were on my previous build which worked. If anything looks bad, please let me know, otherwise I will give it a try when I get home today. Thanks

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

; I need to add the following:
debugger.connect_timeout_seconds = 30
View user's profileFind all posts by NotionCommotionSend private message
Site Admin

Joined: 13 Jul 2003
Posts: 8344
Reply with quote
Looks correct.

Short note about filters:
Quote:
debugger.hosts_allow=44.33.22.11, 127.0.0.1, localhost, ::1

You never need server's ip here. In case if you work with server through SSH tunnel(s) all you need is localhost and its numerical representation in IPv4 and IPv6 variants.
In case if you connect directly, you workstation IP address(es) should be added.

Quote:
debugger.ports=7869, 10000/16

If your team has 2 developers and you assigned two ports, you have to list them there, like
debugger.ports=7869, 7870
Note that 10000/16 allows range of ports from 10000 to 10015. It does NOT opens the ports on your server, it allows debugger module to use these ports when it connects to the client(s).

_________________
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
Thank you dmitri for the additional info regarding filters.

Changed debugger.connect_timeout_seconds to 30 but no change.

Any thoughts on my earlier post about what debug session did not start (dbg error =-16) means, whether having PHP listen to sockets has an impact, etc?
View user's profileFind all posts by NotionCommotionSend private message
Site Admin

Joined: 13 Jul 2003
Posts: 8344
Reply with quote
Sorry to hear the issue still not resolved.
Regarding your previous question:
Quote:
Are you telling me to check "Listen on local host only" as shown on below screenshot?

No I meant you have to use port A while you colleague should use port B, like 7867 for you and 7868 for him.
You'd do this on your client side (in the IDE), and on the server -- by allowing debugger to use these ports.
As of listen of local host only, yes, it's enough if tunnel is used and you don't need UPnp port mapping.

Quote:
On a related note, attempting to get things working, I opened port 7869 on my firewall. Even though it is being listened to, telenet and yougetsignal.com both say it is not opened

Debugger does not open any ports on your server. You don't need to open any ports on your server, except regular ssh and web ports if you're using web and ssh of course.

Debugger is listening on your development (client) computer. What makes port used on your server is ssh tunnel. With tunnel connections is established in the following way:

your sever:[php script, debugger module] => {localhost:7869, sshd} <===ssh communication===>
your client: <===ssh communication===> {localhost:7869, dbglistener.exe} <=> IDE

Without ssh tunnel it's connected in the following way:

your sever:[php script, debugger module] === public network ===>
your client: {public ip:7869} ==> {optionally nat port forwarding on your router} ===> {internal IP:7869, dbglistener.exe} <=> IDE

Quote:
The previous post must have been when I was using a user without a home. Changing users, I get the following. Is this what you requested me do?
Connecting to 11.22.33.44.
Connected.
Last login: Fri Jul 2 14:21:05 2021 from c-44-33-22-11.hsd1.wa.comcast.net
[michael@devserver ~]$
[michael@devserver ~]$
[michael@devserver ~]$
[michael@devserver ~]$
[michael@devserver ~]$


I managed to reproduce this issue with running debugger in remote terminal. Fix will be available soon.
But it has nothing to do with error -16 you reporter before.

_________________
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
Glad you reproduced the running debugger in remote terminal issue.

The part about ssh tunnels makes sense.

Note that I get errors such as the following after a tunnel using port 7869 has been established and then I change SSH accounts. This is to be expected and that I need to kill the process on the given port to make it available, right?

Code:
Jul 03 16:54:04 devserver.net sshd[61710]: error: bind: Address already in use
Jul 03 16:54:04 devserver.net sshd[61710]: error: channel_setup_fwd_listener_tcpip: cannot listen to port: 7869

Jul 03 16:54:16 devserver.net sshd[61697]: channel 5: open failed: connect failed: open failed\nServer requests forwarding from unknown address "localhost:7869"
Jul 03 16:54:16 devserver.net sshd[61697]: channel 6: open failed: connect failed: open failed\nServer requests forwarding from unknown address "localhost:7869"


I've tried different combinations of running php-fpm and apache as different users with no change. Obviously, no need to have the ssh account use any specific user, right? Also, terminal accounts are just for cli mode, right? Does the following look as expected? Note that there are two processes where php-fpm is using user apache.
Code:
[michael@devserver test]$ sudo lsof -i:7869
COMMAND   PID    USER   FD   TYPE  DEVICE SIZE/OFF NODE NAME
sshd    63137 michael    9u  IPv4 1341345      0t0  TCP localhost:mobileanalyzer (LISTEN)
sshd    63137 michael   10u  IPv6 1341346      0t0  TCP localhost:mobileanalyzer (LISTEN)
[michael@devserver test]$ sudo lsof -i:7869
COMMAND   PID    USER   FD   TYPE  DEVICE SIZE/OFF NODE NAME
sshd    63137 michael    9u  IPv4 1341345      0t0  TCP localhost:mobileanalyzer (LISTEN)
sshd    63137 michael   10u  IPv6 1341346      0t0  TCP localhost:mobileanalyzer (LISTEN)
sshd    63137 michael   11u  IPv4 1342794      0t0  TCP localhost:mobileanalyzer->localhost:36282 (CLOSE_WAIT)
sshd    63137 michael   12u  IPv6 1342795      0t0  TCP localhost:mobileanalyzer->localhost:42520 (ESTABLISHED)
php-fpm 63168  apache    4u  IPv6 1342792      0t0  TCP localhost:42520->localhost:mobileanalyzer (ESTABLISHED)
[michael@devserver test]$ sudo lsof -i:7869
COMMAND   PID    USER   FD   TYPE  DEVICE SIZE/OFF NODE NAME
sshd    63137 michael    9u  IPv4 1341345      0t0  TCP localhost:mobileanalyzer (LISTEN)
sshd    63137 michael   10u  IPv6 1341346      0t0  TCP localhost:mobileanalyzer (LISTEN)
sshd    63137 michael   11u  IPv4 1342794      0t0  TCP localhost:mobileanalyzer->localhost:36282 (CLOSE_WAIT)
sshd    63137 michael   12u  IPv6 1342795      0t0  TCP localhost:mobileanalyzer->localhost:42520 (CLOSE_WAIT)
sshd    63137 michael   13u  IPv4 1345595      0t0  TCP localhost:mobileanalyzer->localhost:36286 (CLOSE_WAIT)
sshd    63137 michael   14u  IPv6 1345596      0t0  TCP localhost:mobileanalyzer->localhost:42524 (CLOSE_WAIT)
[michael@devserver test]$


Just to make sure, you have tested using php-fpm and not just mod_php, right? Also, tested running PHP-FPM over an Unix Socket and not just a TCP/IP Socket, right?

What does Error: (-134) debug session did not start (dbg error=-16) mean? Am I able to access any logs or do any tests to determine why?

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

Joined: 13 Jul 2003
Posts: 8344
Reply with quote
Quote:
Jul 03 16:54:04 devserver.net sshd[61710]: error: bind: Address already in use
Jul 03 16:54:04 devserver.net sshd[61710]: error: channel_setup_fwd_listener_tcpip: cannot listen to port: 7869


I can think of two possible reasons for that. First is very obvious -- you and your colleague are using the same debugger port. As I mentioned above, you'd use different ports.
2nd reason is less obvious -- if ssh TCP connection died, but sshd hasn't recognized it yet and you're coming in with new session.
In this case you have two options:
* configure SSHD to run keep-alive (at L5 level). In this case it will eventually detect that session is dead and will terminate it
* kill sshd child process that is listening on the port.

Quote:
Obviously, no need to have the ssh account use any specific user, right?

no need from debugger perspectives, but might be better from security perspectives.

Quote:
Also, terminal accounts are just for cli mode, right?

yes, as long you want to run CLI remotely right in the IDE. You can do this manually at any time, like `DBGSESSID='1@localhost:7869;d=1' php myscript.php`. In this case you don't need terminal account in the IDE. Putty or secureCRT would be enogh and you can try it right away, no need any fixes from me and no need any prompt changes.

Quote:
sudo lsof -i:7869

perhaps -n option is needed -- it works somewhat faster then.

Quote:
Does the following look as expected? Note that there are two processes where php-fpm is using user apache.

if it's single-threaded (non-TS) module, you may need much more than just two, depending on web load.
if it's multi-threaded (TS) module, two looks ok.

Quote:
Just to make sure, you have tested using php-fpm and not just mod_php, right? Also, tested running PHP-FPM over an Unix Socket and not just a TCP/IP Socket, right?

it's irrelevant to -16 problem.

_________________
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
Thank you dmitri,

dmitri wrote:

Quote:
Note that I get errors such as the following after a tunnel using port 7869 has been established and then I change SSH accounts. This is to be expected and that I need to kill the process on the given port to make it available, right?

I can think of two possible reasons for that. First is very obvious -- you and your colleague are using the same debugger port. As I mentioned above, you'd use different ports.
2nd reason is less obvious -- if ssh TCP connection died, but sshd hasn't recognized it yet and you're coming in with new session.
In this case you have two options:
* configure SSHD to run keep-alive (at L5 level). In this case it will eventually detect that session is dead and will terminate it
* kill sshd child process that is listening on the port.

I am the only user and unless I have unknown colleagues (let me know if you have reasons to think I do!), this does not seem like an issue as it is expected to get this error if another service is already listening to a given port. BTW, the only time this comes up is if I change the ssh account in the wizard but if I change it on properties, the phped local client must tell the remote server to kill the connection and no error.

dmitri wrote:
Quote:
Just to make sure, you have tested using php-fpm and not just mod_php, right? Also, tested running PHP-FPM over an Unix Socket and not just a TCP/IP Socket, right?

it's irrelevant to -16 problem.

Just grasping at straws. But something needs to be relevant. Earlier version worked great. Maybe something dumb on my side, but I have checked multiple times and think/hope I am right. How can I get clues on what is causing the debug session not to start, and what does the "debug session" really mean?
View user's profileFind all posts by NotionCommotionSend private message


Joined: 27 Nov 2009
Posts: 98
Reply with quote
I removed the latest build of PhpED off my windows PC and installed the old 19.3 (Build 19334, 64 bit) version I still had in my downloads folder, and replaced dbg-php-7.4.so with the version used by 19.3, and all works again. I made zero other changes which makes me believe that my server is configured correctly.

I then upgraded to the last build of PhpED and updated dbg-php-7.4.so, and have the same error.

One think I noticed between these two attempts was my list of accounts were different, and I think the issue is somehow my data on the windows machine got corrupt and specifically it is related to accounts (when trying to get php8 working, phped prompted me that I couldn't delete a default account but allowed me to do so).

I then removed the new version, reinstalled old version, exported users, upgraded to new version, deleted all accounts, imported new accounts and still error.

I then removed the new version, deleted C:\Program Files\NuSphere and C:\Program Files (x86)\NuSphere, and made backup and then deleted C:\Users\michael\Documents\NuSphere, C:\Users\michael\AppData\Local\NuSphere, and C:\Users\michael\AppData\Roaming\NuSphere. I then reinstalled the new version and it says it can't find my last workspace (Evidently, I didn't delete all remnants of phped). I also noticed that Project Properties/Project/Content also still shows signs of an old account which shouldn't exist anymore. I copied my backed up copy of Documents\NuSphere\Projects (maybe a bad idea?). I've tried different options spanning from adding existing accounts or starting from fresh, but still the same errors.
View user's profileFind all posts by NotionCommotionSend private message
Issues with PHP 8 with PhpED 19.5
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 2  

  
  
 Reply to topic