Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to obtain trace for php application running on apache httpd #95

Open
ankitjain235 opened this issue Jun 12, 2018 · 3 comments
Open

Comments

@ankitjain235
Copy link

Hi, I was trying to get trace for php applications running on apache httpd server but could not obtain any trace for such case.
I have added following to the /etc/php.ini
extension=trace.so
enable-dtrace=1

I have the application running properly.
Apache is also picking up the same /etc/php.ini file

Although I do obtain following
image

Here it says Dtrace support is available but disabled. It this why it's not working or does phptrace does not support trace for such case?

Please help me on this.

@ankitjain235
Copy link
Author

ankitjain235 commented Jun 12, 2018

Also on adding the phptrace "so" file to httpd modules and restarting the httpd service, obtained following error:
$ sudo systemctl status httpd

● httpd.service - The Apache HTTP Server
Loaded: loaded (/usr/lib/systemd/system/httpd.service; enabled; vendor preset: disabled)
Drop-In: /usr/lib/systemd/system/httpd.service.d
└─php-fpm.conf
Active: failed (Result: exit-code) since Tue 2018-06-12 08:49:02 UTC; 1min 22s ago
Docs: man:httpd.service(8)
Process: 13941 ExecStart=/usr/sbin/httpd $OPTIONS -DFOREGROUND (code=exited, status=1/FAILURE)
Main PID: 13941 (code=exited, status=1/FAILURE)
CPU: 13ms

Jun 12 08:49:02 ip-172-31-0-210.us-west-1.compute.internal systemd[1]: Starting The Apache HTTP Server...
Jun 12 08:49:02 ip-172-31-0-210.us-west-1.compute.internal httpd[13941]: httpd: Syntax error on line 56 of /etc/httpd/conf/httpd.conf: Cannot load modules/mod_trace.so into server: /etc/httpd/modules/mod_trace.so: undefined symbol: OnUpdateBool
Jun 12 08:49:02 ip-172-31-0-210.us-west-1.compute.internal systemd[1]: httpd.service: Main process exited, code=exited, status=1/FAILURE
Jun 12 08:49:02 ip-172-31-0-210.us-west-1.compute.internal systemd[1]: Failed to start The Apache HTTP Server.

On looking into source code, found
STD_PHP_INI_ENTRY("trace.enable", "1", PHP_INI_SYSTEM, OnUpdateBool, enable, zend_trace_globals, trace_globals)

@strictlymike
Copy link

I am having the same problem on an Ubuntu 18.04 LTS system with PHP 7.2.24.

I don't think the disposition of PHP's DTrace Support is relevant.

On an Ubuntu 16.04 LTS system with PHP 7.0, where DTrace Support is likewise available, disabled, I find that phptrace works.

@rahmatrh199
Copy link

@ankitjain235
Hi
Dear
Did you solve this problem, I am facing the same issue. If you got the solution then please help me out

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants