I try to debug with PhpStorm (2016.3.1) and Zend Server 9.01 with Z-Ray. Everything has the newest Version and installed locally onto my MacBook. For making it simple, I created a new directory, with one file (index.php) in it.
Into PhpStorm into
Prefferences - Language&Frameworks - PHP - Servers, there is one Server: Host: zf3-test2.dev Port: 10088 Debugger: Zend Debugger
Prefferences - Language&Frameworks - PHP - Debug - Zend Debugger Debug Port: 10137 Settings broadcasting port: 20080 Can accept external connection: checked Ignore Z-Ray system requests: unchecked
Into my /etc/hosts I set 127.0.0.1 zf3-test2.dev
Into Zend Server I created a virtual host.
<VirtualHost *:${port}>
DocumentRoot "/usr/local/zend/apache2/htdocs/zf3-test2/"
<Directory "/usr/local/zend/apache2/htdocs/zf3-test2/">
Options +Indexes +FollowSymLinks
DirectoryIndex index.php
Order allow,deny
Allow from all
AllowOverride All
</Directory>
ServerName ${vhost}:${port}
# include the folder containing the vhost aliases for zend server deployment
Include "${aliasdir}/*.conf"
</VirtualHost>
So now, when i call into the browser the address http://zf3-test2.dev:10088 , my site opens and works fine.
I read this instructions: http://files.zend.com/help/Zend-Server/content/debugging_in_phpstorm_using_zend_server.htm
I created a breakpoint.
I activate into PhpStorm "Start Listening for PHP Debug Connections". Then I right klicked onto the index.php and choosed "Open in Browser - Chrome"
The file opens into chrome, and there I klicked into the z-Ray line onto the Debug sign, and choosed "Debug current page".
I shortly get a window with this text: Die Seite zf3-test2.dev funktioniert nicht zf3-test2.dev hat keine Daten gesendet. ERR_EMPTY_RESPONSE
Into PhpStorm into Event Log I get two times the same message: Cannot accept external Zend Debugger connection: Cannot evaluate expression 'isset($_SERVER['PHP_IDE_CONFIG'])'
Then into chrome, the page will be shown.
So no Debugging is possible at the moment. What can I do to fix it?
Thanks for help and greetings.
I ran into the same problem when trying to set up Zend Debugger with Zend Server 9.01. I found a bug on youtrack WI-34697 that gave me the idea to try upgrading to zend server 9.1 and that worked for me. Unfortunately the upgraded process deletes all of your zend server settings, so I don't know if there was a bug in zend server or a problem with my configuration.