PhpDebugger: Unterschied zwischen den Versionen

Aus Info-Theke
Zur Navigation springen Zur Suche springen
Zeile 12: Zeile 12:
; Alternativ: remote-Adresse selber ermitteln:
; Alternativ: remote-Adresse selber ermitteln:
;xdebug.remote_connect_back=On
;xdebug.remote_connect_back=On
xdebug.remote_log=/var/log/xdebug.log
xdebug.remote_log=/var/log/php/xdebug.log
xdebug.remote_autostart=1
xdebug.remote_autostart=1
</pre>
</pre>

Version vom 18. September 2018, 09:38 Uhr

XDebug

Installation debian

apt-get install php-xdebug
  • /etc/php5/fpm/php.ini
[XDebug]
; Ist normalerweise in xdebug-spezifischer Konfiguration, z.B. mods.d/20-xdebug
;zend_extension="/usr/lib/php/20160303/xdebug.so"
xdebug.remote_port=9000
xdebug.remote_enable=On
xdebug.remote_host=192.168.100.100
; Alternativ: remote-Adresse selber ermitteln:
;xdebug.remote_connect_back=On
xdebug.remote_log=/var/log/php/xdebug.log
xdebug.remote_autostart=1
  • gelöscht: /etc/php5/fpm/conf.d/20-xdebug.ini, sonst "Module 'xdebug' already loaded in Unknown on line 0"
  • Exlipse: Debug Configuration:
    • Server Debugger: XDebug [Configure]: Port: 9000
  • Eclipse ist Server mit Port 9000, muss also vom PHP-Server erreichbar sein. Test: auf Webserver: telnet <remote_host> <remote_port>

Installation centos7

yum install epel-release -y
rpm -Uvh https://centos7.iuscommunity.org/ius-release.rpm
yum install php70w-fpm php70w-pear php70w-pdo php70w-mysql php70w-pecl-xdebug php70w-xml
  • Konfiguration in /etc/php.ini (nicht /etc/php-fpm.conf)
  • /etc/php-fpm.d/www.conf:
    • listen = 127.0.0.1:9001;
  • Virtueller Host:
    • fastcgi_pass = 127.0.0.1:9001;

Installation Zend-Server

  • in Profile einfügen:
PATH=$PATH:/usr/local/zend/bin
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/zend/lib
apt-get install php-5.3-extra-extensions-zend-server


Installation Zend Debugger

cd $DOCUMENT_ROOT
cp /usr/local/zend/share/dist/dummy.php .

Eclipse-Einstellungen

PHP Script Debugging

  • Preferences - PHP - PHP-Executables
    • Name: php5
    • Executable path: /usr/local/zend/bin/php
    • PHP ini file: /usr/local/zend/etc/php.ini
    • SAPI Type: CGI
    • PHP debugger: Zend Debugger

Remote Debugging