Changes

From SME Server
Jump to navigationJump to search
Line 175: Line 175:  
=== Uninstall ===
 
=== Uninstall ===
 
  yum remove smeserver-php-scl
 
  yum remove smeserver-php-scl
 +
 +
 +
===Debug===
 +
 +
====Setup====
 +
 +
This demonstrates how to get xdebug going for a given version - in this case PHP 5.6
 +
 +
yum --enablerepo=remisafe install php56-php-pecl-xdebug
 +
 +
For OpenBaseDir errors add the pear path:
 +
 +
db accounts setprop myibay PHPBaseDir /home/e-smith/files/ibays/myibay/html/:/usr/share/pear/:/usr/share/pear-addons/:/tmp/:/opt/remi/php56/root/usr/share/pear/
 +
 +
signal-event php-update;signal-event ibay-modify
 +
 +
====Enable====
 +
 +
To enable the debugger:
 +
 +
Now edit the following file according to your needs:
 +
 +
/etc/e-smith/templates/opt/remi/php56/root/etc/php.ini
 +
 +
====Standard direct connection====
 +
 +
[Debugger]
 +
debugger.host                          = localhost
 +
debugger.port                          = 7869
 +
debugger.enabled                      = False
 +
 +
signal-event php-update
 +
 +
You should be able to connect with your debugger pointed to the correct port and IP address of the server, and using a URL like this:
 +
 +
https://test.myserver.com/TestFile.php?XDEBUG_SESSION_START
 +
 +
====Using pydbg proxy====
 +
 +
[Debugger]
 +
xdebug.remote_enable                  = true
 +
xdebug.remote_host                    = 127.0.0.1
 +
xdebug.remote_port                    = 9000
 +
xdebug.remote_handler                  = dbgp
 +
xdebug.remote_log                      = /var/log/xdebug.log
 +
xdebug.remote_mode                    = req
 +
xdebug.idekey                          = users
 +
 +
signal-event php-update
 +
 +
Then run the debug proxy with something like this
 +
 +
python /root/dbgp/bin/pydbgpproxy -d 127.0.0.1:9000 -i 192.168.10.1:9001 -l DEBUG
 +
 +
You should be able to connect with your debugger pointed to the correct port 9000 and IP address of your server, and using a URL like this:
 +
 +
https://test.myserver.com/TestFile.php?XDEBUG_SESSION_START=users
    
=== Bugs ===
 
=== Bugs ===

Navigation menu