Question

I am running Zend Server 5.6.0 which is PHP 5.4 and I am using PhpStorm 5.0. I am looking to put some profiling and debugging in place.

I have configured everything that I can see in PhpStorm, when I run the debug from the IDE it runs the script, then displays Connection with 'Zend Debugger' was not established. Validate Installation.

I have installed the toolbar but whenever I try to debug a page in Firefox it actually pops up with a download window and the file downloads, when opened it displays a server error.

All of the help guides online dont seem to work, has anyone else has these issues?

Was it helpful?

Solution

I ended up using Xdebug:

To Install Xdebug:

  1. Go to webpage.
  2. Paste your phpinfo() contents into the box
  3. Follow the instructions on the wizard page except for where it tells you to add zend_extension = C:\Zend\ZendServer\lib\phpext\php_xdebug-2.2.1-5.4-vc9-nts.dll to the top!, put this below the iOnCube Loader (if you have it installed)
  4. Add the following to php.ini then restart PHP & Apache.

php.ini

[XDebug] 
xdebug.remote_enable=1 
xdebug.remote_port=9000 
xdebug.profiler_enable=0 
xdebug.profiler_output_dir="C:\Zend\ZendServer\tmp\xdebug-profiler"  

Xdebug in PhpStorm

  1. Generate and add bookmarklets to your browser here (Note the IDE key ##PHPSTORM##)
  2. Open File -> Settings -> PHP
  3. Choose your interpreter
  4. Click [..]and choose Debugger: Xdebug
  5. Click the "Configurations" then Edit Configurations... item (Drop down next to debug button on toolbar)
  6. Press the [+] to add a configuration and choose PHP Remote Debug
  7. Call it Xdebug and use the IDE key PHPSTORM
  8. You can now start the debugger (Alt+Shift+F9)
  9. Start the debugger using the bookmarklet

You can now stop through code in PhpStorm, hope this helps someone

OTHER TIPS

This is happening because PHPStorm is using the binary for php found under /usr/bin this is not the same one as Zend Server uses under /usr/local/zend/bin. On some systems like Mac PHP is already installed by default under /usr/bin but it will not interact with the Zend Server/Debugger.

To fix this all you have to do is go into the PHPStorm preferences and tell it to use the proper Interpreter. Click the ... button next to the Interpreter drop down and give it the path to zend's bin directory /usr/local/zend/bin

This solved the issue with PHPStorm debugging with the Zend Debugger.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top