Most developer use a local website to test and develop their applications. One of the most used servers is Apache. Since for many developers setting this complex tool is not worth spending their time, some use smart installers who can do those settings for them. I personally use Vertrigo server, who brings me the advantage of 0 time for install, 0 time required for setting and making other tools work together, like MySQL, PHP, PHP MyAdmin, Zend Optimizer etc.
This tutorial is for Windows environment, but it can be easily adapted to Linux or MAC environments because all the settings are done in the configurations files.
The problem that I want to solve in this tutorial arises when one might want to debug its work. I mean, you wrote your application in PHP. There are some tools to allow you to debug it, but either are costly, like Zend Studio and Zend Server or are hard to setup, like XCode. At the end of the day, you’re paid to create applications, not to do dirty settings in 10 or so files in order to enable a simple debug feature.
Facing this challenge I tried to create a simple yet productive setup for ZendDebugger, so my fellow PHP Developers not to waste their time like I had to do.
First you have to know where you installed your already working version of Vertrigo. If you don’t have it, you can download it free from their Sourceforge website. The installation is very simple, basically just Next, Next and Finish.
I choose to install the server in E:\Projects\Web\VertrigoServ\ because this tool has the nice feature that you don’t have to reinstall it each time your Windows is.
Steps to add the debugging feature:
- First, download latest Zend Debugger here – choose the ZendDebugger-5.2.14-cygwin_nt-i386.zip for Windows on 32 bits.
- Then unzip the downloaded zip file to some temp directory, then rename the children directory from W_Y_x_comp to php-W.Y.x, – by example: change 5_2_14_comp to php-5.2.x
- Move the directory to the Zend dir under Vertrigo installation path, you have to get something like E:\Projects\Web\VertrigoServ\Zend\ZendDebugger-5.2.14\
- In the ZendDebugger directory, I left only the root files from unzipped dir plus the folder that interested me – the renamed one.
- In the last step, you have to modify the php.ini file to let the PHP interpreter know about your newly added debugger. To be fully able to replicate the settings, I add here the entire section from php.ini:
; Local Variables: ; tab-width: 4 ; End: [Zend] zend_optimizer.optimization_level=15 zend_extension_ts="E:\Projects\Web\VertrigoServ\Zend\ZendExtensionManager.dll" zend_extension_manager.optimizer_ts="E:\Projects\Web\VertrigoServ\Zend\Optimizer-3.3.0" zend_extension_manager.debug_server_ts="E:\Projects\Web\VertrigoServ\Zend\ZendDebugger-5.2.14\" zend_debugger.expose_remotely=allowed_hosts zend_debugger.allow_hosts=127.0.0.1 zend_debugger.expose_remotely=always
so completed php.ini should have something like this.
Now start (or restart) your Apache and have fun!
That’s all folks! Use and spread the word!