PhpDebugger: Unterschied zwischen den Versionen

Aus Info-Theke
Zur Navigation springen Zur Suche springen
 
(6 dazwischenliegende Versionen von 2 Benutzern werden nicht angezeigt)
Zeile 1: Zeile 1:
== XDebug ==
== XDebug ==
=== Installation debian ===
=== Installation debian ===
<pre>apt-get install php-xdebug
<pre>apt-get install php8.2-xdebug
</pre>
</pre>
* /etc/php5/fpm/php.ini
* /etc/php5/fpm/php.ini
<pre>[XDebug]
<pre>
zend_extension="/usr/lib/php/20160303/xdebug.so"
[xdebug]
xdebug.mode = debug
xdebug.start_with_request = yes
xdebug.client_port=9082
xdebug.remote_client_host=127.0.0.1
</pre>
* Veraltet:
<pre>
[XDebug]
xdebug.remote_port=9000
xdebug.remote_port=9000
xdebug.remote_enable=On
xdebug.remote_enable=On
xdebug.remote_host=192.168.100.100
;xdebug.remote_host=192.168.100.100
xdebug.remote_connect_back=On
; Alternativ: remote-Adresse selber ermitteln:
xdebug.remote_log=/var/log/xdebug.log
;xdebug.remote_connect_back=On
;xdebug.remote_log=/var/log/php/xdebug.log
xdebug.remote_autostart=1
xdebug.remote_autostart=1
</pre>
</pre>
Zeile 17: Zeile 26:
** Server Debugger: XDebug <nowiki>[Configure]</nowiki>: Port: 9000
** Server Debugger: XDebug <nowiki>[Configure]</nowiki>: Port: 9000
* Eclipse ist Server mit Port 9000, muss also vom PHP-Server erreichbar sein. Test: auf Webserver: telnet <remote_host> <remote_port>
* Eclipse ist Server mit Port 9000, muss also vom PHP-Server erreichbar sein. Test: auf Webserver: telnet <remote_host> <remote_port>
* Eclipse: Bei "Installed PHPs": Button "Edit": [x] Use system default php.ini configuration


=== Installation centos7 ===
=== Installation centos7 ===
Zeile 24: Zeile 34:
</pre>
</pre>
* Konfiguration in /etc/php.ini (nicht /etc/php-fpm.conf)
* 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 ==
== Installation Zend-Server ==

Aktuelle Version vom 15. August 2023, 15:21 Uhr

XDebug[Bearbeiten]

Installation debian[Bearbeiten]

apt-get install php8.2-xdebug
  • /etc/php5/fpm/php.ini
[xdebug]
xdebug.mode = debug
xdebug.start_with_request = yes
xdebug.client_port=9082 
xdebug.remote_client_host=127.0.0.1
  • Veraltet:
[XDebug]
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>
  • Eclipse: Bei "Installed PHPs": Button "Edit": [x] Use system default php.ini configuration

Installation centos7[Bearbeiten]

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[Bearbeiten]

  • 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[Bearbeiten]

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

Eclipse-Einstellungen[Bearbeiten]

PHP Script Debugging[Bearbeiten]

  • 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[Bearbeiten]