Issues with web server debug validation (resolved)

Answered

Hi,

I'm having a little trouble with the "web server debug validation" feature, I've used it in the past but would like some confirmation if an insecure site will cause issues in the validation process.

I can hit the URL via my browser, I get a warning but ultimately the request works (albeit it says Not Secure) - https://something.domain.local (exists in my /etc/hosts file)

During validation I get this error

Specified URL is not reachable, caused by: 'No name matching something.domain.local found'

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

I can confirm the _intellij_phpdebug_validator.php file was created in the docroot for the project

I've also managed to debug this project in the past but something has changed recently and not sure what.

PhpStorm 2021.2.3
Build #PS-212.5457.49, built on October 13, 2021
Licensed to XXXX
You have a perpetual fallback license for this version.
Subscription is active until XXXXXX
Runtime version: 11.0.12+7-b1504.40 x86_64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.
macOS 11.5.2
GC: G1 Young Generation, G1 Old Generation
Memory: 750M
Cores: 8
Registry: debugger.watches.in.variables=false, run.processes.with.pty=TRUE
Non-Bundled Plugins: name.kropp.intellij.makefile (212.5457.62), mobi.hsz.idea.gitignore (4.3.0), org.intellij.plugins.hcl (0.7.14), ru.adelf.idea.dotenv (2021.3.0.212), de.espend.idea.php.annotation (8.0.0), fr.adrienbrault.idea.symfony2plugin (0.23.213)

 

2 comments
Comment actions Permalink

Hi there,

As far as I'm aware that Debug Validator thingy does not really work with self-signed certificates: https://youtrack.jetbrains.com/issue/WI-51607

See if adding that certificate to "Settings/Preferences | Tools | Server Certificates" will help here.

Otherwise -- use plain HTTP here.

 

P.S. I personally never use that tool. If you know how Xdebug works then you can check its live config from phpinfo() (or xdebug_info() for v3) output.

1
Comment actions Permalink

Andriy Bazanov thanks for your suggestion, I didn't realise that was an option.

I tried that as well as a couple of other things

  • I changed my docker config (xdebug.remote_port=9009) to use a different port than 9000, not sure if it was clashing with the local php-fpm that was running
  • Created a self signed certificate for *.domain.local and rebuilt my container so that nginx would use the new certificate

For what it's worth, running this

sudo lsof -nP -iTCP -sTCP:LISTEN | grep 9000

Showed a few other things and not sure if that was the problem

phpstorm 36518 carlton.dickson 151u IPv6 0x5xxxxxxxxxx 0t0 TCP *:9000 (LISTEN)
php-fpm 94499 carlton.dickson 8u IPv4 0x5xxxxxxxxx2 0t0 TCP 127.0.0.1:9000 (LISTEN)
php-fpm 94513 carlton.dickson 9u IPv4 0x5xxxxxxxxx3 0t0 TCP 127.0.0.1:9000 (LISTEN)
php-fpm 94514 carlton.dickson 9u IPv4 0x5xxxxxxxxx4 0t0 TCP 127.0.0.1:9000 (LISTEN)

Checking for my new port seems better

sudo lsof -nP -iTCP -sTCP:LISTEN | grep 9009
phpstorm 36518 carlton.dickson 136u IPv6 0x5xxxxxxxxxx 0t0 TCP *:9009 (LISTEN)

It's now working which is the main thing

3

Please sign in to leave a comment.