Zend Debugger: Cannot read a valid value of zend_debugger.httpd_uid

If you happen to have setup Zend Debugger for debugging your PHP code and you encounter the following error in the webserver error log:

Zend Debugger: Cannot read a valid value of zend_debugger.httpd_uid or zend.httpd_uid, will not perform dropping of privileges

then your setup will fail when you try to debug over a tunnel. This is caused by the debugger not being aware of the uid of the process which runs the web server.

To fix this, we need to find the user ID of the httpd process that runs the Zend Debugger. One way of finding the UID is by opening up the /etc/passwd file. You should see something similar to:

_www:*:70:70:World Wide Web Server:/Library/WebServer:/usr/bin/false

Now to fix the problem, we update the zend config in the php.ini file and restart the webserver. Here is my complete zend debugger configuration:

[zend]
zend_extension=/opt/local/lib/php/extensions/no-debug-non-zts-20090626/ZendDebugger.so
zend_debugger.allow_hosts=127.0.0.1,10.1.1.2,10.1.1.3,10.0.1.149,10.0.1.123,10.0.1.124
zend_debugger.expose_remotely=always
zend_debugger.httpd_uid=70

Now for some real debugging :).

This entry was posted in Debugger, Macintosh, Zend. Bookmark the permalink.

3 Responses to Zend Debugger: Cannot read a valid value of zend_debugger.httpd_uid

  1. Dmitry says:

    Hello, Jeffery

    Please tell – will you continue to work together with qbittorrent team again?

  2. Anh Nguyen says:

    Awesome! Thank you so much :)

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>