1

I'm deploying my website to a remote hosting server. The provider says it has the Zend debugger enabled. In the phpinfo I find all these lines that refers to Zend:

Zend Signal Handling    enabled
Zend Memory Manager     enabled
Zend Multibyte Support  provided by mbstring 
report_zend_debug   On  On
zend.assertions -1  -1
zend.detect_unicode On  On
zend.enable_gc  On  On
zend.exception_ignore_args  On  On
zend.multibyte  Off Off
zend.script_encoding    no value    no value
zend.signal_check   Off Off

In PhpStorm I create a PHP Remote Debug configuration (and also a PHP Web Page) but when I try to validate the debugger it successfully deploy the script _intellij_phpdebug_validator.php but it fails with this error:

Validation script was created but cannot be executed. Possible reasons: 
Configured 'URL to validation script' is incorrect
Validated Web Server is not running.
Target directory for validation script is not public.
  1. The URL is the root of my hosting space, say https ://mydomain.com. Opening this with a browser renders the homepage
  2. The Web Server is running because as said the website is up
  3. The target directory is at the same level of the index.php so it's public (i.e. PhpStorm deploy files there)

Furthermore, during the validation Filezilla shows me the _intellij_phpdebug_validator.php on the remote server, so it actually deployed it.

What I need to configure further to enable a remote debug?

UPDATE

The hosting provider let me view to errors log only and there I don't find anything related to the validation script.

Manually accessing to the script from a browser leads to this content:

<?xml version="1.0"?><validation><path_to_ini path="/php7.4/etc/php.ini"/><additional_php_ini files=""/><server server_name="<mydomain>" remote_addr="<my public IP>"/></validation>
Mark
  • 4,338
  • 7
  • 58
  • 120
  • 1
    1) Check the access log of your web server. See what response it sends when that `_intellij_phpdebug_validator.php` file is requested 2) What response (both HTTP code and actual content) do you get if you manually access that file via browser? – LazyOne Apr 27 '22 at 08:00
  • @LazyOne question updated – Mark Apr 27 '22 at 08:12
  • The response is way too short IMO. I was expecting to see more details TBH, the fact that it detected what debug engine is in use... No better ideas from me right now (I mean: the actual possible reason). I've tried Zend Debugger really long time ago (maybe like 10 years ago; back in PhpStorm v2 or so). And now I simply do not know how well it's supported now (as it's Xdebug everywhere)... and do not know what kind of checks that validation script performs for Zend Debugger. – LazyOne Apr 27 '22 at 09:06
  • What PhpStorm version do you have there? BTW -- JetBrains has plans of dropping Zend Debugger at some point in the future: https://youtrack.jetbrains.com/issue/WI-56036 – LazyOne Apr 27 '22 at 09:07
  • @LazyOne 2021.2.3 – Mark Apr 27 '22 at 09:09
  • *"In PhpStorm I create a PHP Remote Debug configuration (and also a PHP Web Page)..."* Have you created the `PHP | Servers` entry for this? That's where you can specify what engine is used. Debug Validation should detect the engine... but it fails to execute (accordingly to your description the IDE fails executing the URL for some reason). It could be SSL certificate issue for example. Can you try with plain HTTP? – LazyOne Apr 27 '22 at 09:09
  • *"2021.2.3"* That version should be OK. The `https://` was added in 2021.1.4. But see if you installing the latest 2022.1 will do any better (you can run multiple versions in parallel, just do not open the same project in both versions at the same time; you may backup `.idea` subfolder (project settings) just in case) – LazyOne Apr 27 '22 at 09:11
  • @LazyOne yes I created a `PHP | Servers` entry. Unfortunately the hosting redirects any `http` request to `https`. It released an `SSL DV` certificate but I had to accept it in my browser. Perhaps this could be an issue? – Mark Apr 27 '22 at 09:12
  • *"It released an SSL DV certificate but I had to accept it in my browser. Perhaps this could be an issue?"* Not sure -- I always debug over plain HTTP. But see if you can add it here: `Settings (Preferences on macOS) | Tools | Server Certificates` -- maybe it will help. – LazyOne Apr 27 '22 at 09:14
  • Try collecting detailed logs: it may give some hints. See https://www.jetbrains.com/help/phpstorm/troubleshooting-php-debugging.html May also do the same for Deployment as well (https://www.jetbrains.com/help/phpstorm/troubleshooting-deployment.html). **The idea is:** Enable extra logging, try Debugger Validation again (but delete the already uploaded test script first) and then check the logs -- it should give the hints on what is going on. (P.S. Do not forget to disable extra logging when done -- no need to waste the space) – LazyOne Apr 27 '22 at 09:17

0 Answers0