Unablle to reload php.ini changes

ericovk

Verified User
Joined
Apr 17, 2012
Messages
229
Location
Rotterdam, Netherlands
I want to enable / disable xdebug. My custombuild 2.0 server has php 5.6 and php 7.0 installed, both in php-fpm mode.

To make sure I had the right php.ini, I echoed phpinfo. It says the php.ini file is in:
Code:
/usr/local/php56/lib/php.ini
(Loaded Configuration File)

I added xdebug.so location and added some values to enable it. After that I reloaded php5.6 and restarted httpd.
Code:
/etc/init.d/php-fpm56 reload
service httpd restart

No changes visible?? After rebooting the server my changes are visible and xDebug is enabled/disabled. Did I reload the wrong file?
 
Hello,

Here is what official docs say:

Configure PHP to Use Xdebug


  1. add the following line to php.ini: zend_extension="/wherever/you/put/it/xdebug.so". For PHP versions earlier than 5.3 and threaded usage of PHP (Apache 2 worker MPM or the ISAPI module), add: zend_extension_ts="/wherever/you/put/it/xdebug.so" instead. Note: In case you compiled PHP yourself and used --enable-debug you would have to use zend_extension_debug=. From PHP 5.3 onwards, you always need to use the zend_extension PHP.ini setting name, and not zend_extension_ts, nor zend_extension_debug. However, your compile options (ZTS/normal build; debug/non-debug) still need to match with what PHP is using.
  2. Restart your webserver.
  3. Write a PHP page that calls 'phpinfo()' Load it in a browser and look for the info on the Xdebug module. If you see it next to the Zend logo, you have been successful! You can also use 'php -m' if you have a command line version of PHP, it lists all loaded modules. Xdebug should appear twice there (once under 'PHP Modules' and once under 'Zend Modules').
Compatibility

Xdebug does not work together with the Zend Optimizer or any other extension that deals with PHP's internals (DBG, APD, ioncube etc). This is due to compatibility problems with those modules.

https://xdebug.org/docs/install


So,

1. Make sure to disable Zend,
ioncube
2. Make sure you use correct directive
zend_extension
 
Back
Top