Installation of PHP & Eclipse to debug Mediawiki (Windows)
From Biowikifarm Metawiki
(Redirected from Installation of PHP & Eclipse to debug Mediawiki)
See also Installation of PHP & Eclipse to debug Mediawiki (Ubuntu)
The following is a record written by Stephan Opitz:
Contents
Windows: Installation of XAMPP
- browse to http://www.apachefriends.org/de/xampp.html and install newest version
- start Apache webserver and mySQL database
Installation Mediawiki
- go to http://www.mediawiki.org mediawiki.org and download newest Mediawiki version
- copy sources to htdocs folder under XAMPP installation: XAMPP_INSTALL_PATH/htdocs
- under http://localhost/mediawiki/ it is availabe right now
- follow instructions of Mediawiki installation (enable checkbox superadvisor, because mySQL user:root with empty password is available)
- copy LocalSettings.php to the root folder of your mediawiki installation
Installation Eclipse
- go to http://www.eclipse.org/downloads/ and choose an Eclipse version (necessary to use latest version: 3.5+ otherwise there are PDT installation problems)
- recommend is the PHP version or other wise it is necessary to install the PDT (PHP) features later
- unzip archive of eclipse to a preferred folder (mostly C:\PROGRAM_FILES_PATH\eclipse)
- PDT feature installation (if choosen other Eclipse bundle):
- start Eclipse -> Help -> Install New Software
- add http://downloads.zend.com/pdt to 'Available Software Sites' and select/install newest version
Installation Zend Debugger
- download newest version from http://downloads.zend.com/pdt/server-debugger/ for actual operation system
- rename folder 5_1_x_comp -> php-5.1.x (not the nts version) and move to XAMPP_INSTALL_PATH\php\zendOptimizer\lib\Debugger\php-5.2.x\
- copy dummy.php to XAMPP_INSTALL_PATH\htdocs
- edit php.ini and change XAMPP_INSTALL_PATH to full path (eg. D:\xaamp):
...
output_buffering = 0
...
implicit_flush = On
...
[Zend]
zend_extension_ts = "XAMPP_INSTALL_PATH\php\zendOptimizer\lib\ZendExtensionManager.dll"
zend_extension_manager.optimizer_ts = "XAMPP_INSTALL_PATH\php\zendOptimizer\lib\Optimizer"
zend_optimizer.enable_loader = 0
zend_optimizer.optimization_level=15
zend_extension_manager.debug_server_ts="XAMPP_INSTALL_PATH\php\zendOptimizer\lib\Debugger"
zend_debugger.allow_hosts= 127.0.0.1
zend_debugger.expose_remotely=always
- important: code below from [Zend] part maybe already exists shorter so overwrite it
- restart apache and use:
<?php phpinfo(); ?>
to check the configuration of the Apache - zend debugger installation should be confirmed within an extra picture
Use Eclipse and Zend Debugger
- create new PHP-Project and use 'Creating project from existing source' - destination: XAMPP_INSTALL_PATH/htdocs/mediawiki (because you have to debug the code on the web-server)
- maybe it is necessary to customize: Eclipse -> Window -> Preferences -> PHP -> Debug -> Installed Debuggers -> Zend Debugger -> Client/Host IP
- start debug index.php by using Debug As in the context menu after clicking the file in the Eclipse File browser (use Debug markers/Breakpoints in the source code)
- important: customize run configuration (within the play dropdown) and change the debugger type to Zend Debugger (test for correct working possible)