NuSphere Forums Forum Index
NuSphere Forums
Reply to topic
Debugging remotely module no in Apache but shows for cli


Joined: 17 Feb 2009
Posts: 5
Reply with quote
Hi,
First time trying to debug remotely on a linux box with Apache/2.4.39 (Fedora)
I uploaded the .so and added the call to /etc/php.ini
I installed dbg-php-7.2.so in /usr/lib64/php/modules

Added these lines to /etc/php.ini
zend_extension="/usr/lib64/php/modules/dbg-php-7.2.so"

[debugger]
debugger.hosts_allow=192.xx.xx.xx, 127.0.0.1, localhost,::1
debugger.hosts_deny=ALL
debugger.ports=7869

When i run phpinfo() I don't see the DBG message, but when i run php -v from the command line I get
Zend Engine v3.2.0, Copyright (c) 1998-2018 Zend Technologies
with DBG v9.1.5, (C) 2000,2018, by Dmitri Dmitrienko
with Zend OPcache v7.2.18, Copyright (c) 1999-2018, by Zend Technologies

They seem to be the same php.ini file from what i see in phpinfo().

Any other ideas?
Thanks.

-Don-
View user's profileFind all posts by don1oneSend private message
Site Admin

Joined: 13 Jul 2003
Posts: 8342
Reply with quote
Sounds like you either didn't restart Apache or you didn't restart fcgi parent process (if you're using standalone process handling php as fcgi)

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


Joined: 17 Feb 2009
Posts: 5
Reply with quote
Looks like the FastCGI was it. I'd been restarting Apache with systemctl but I rebooted the whole server and it showed up.

Hadn't heard of that one before.

Thanks.
-Don-
View user's profileFind all posts by don1oneSend private message
Site Admin

Joined: 13 Jul 2003
Posts: 8342
Reply with quote
You can figure it out easily -- print getmypid() in a script that serves a web page, then use ps command to check relationship between this pid and httpd's pid. There are three possible cases: printed pid is httpd's pid, printed pid is a child process for httpd and finally printed pid has no relation to httpd. In latter case restarting HTTPD would not restart PHP and you have another service that you have to restart in order to restart PHP.
As of systemctl -- if you reload httpd with it, apache configuration will be refreshed but not necessarily php configuration. You need stop followed by start if reload didn't help.

_________________
The PHP IDE team
View user's profileFind all posts by dmitriSend private messageVisit poster's website
Debugging remotely module no in Apache but shows for cli
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