The server document root is set to its public subfolder, that is /MyProject/public. The project is stored in the /MyProject folder. The issue can happen in situations when the server document root is different from the project root, and deployment path mappings are not configured correspondingly.
#Phpstorm xdebug not working code#
Specified URL is not reachable, caused by: 'Request failed with status code 404' The URL to validation script contains something different from localhost, but the xdebug.remote_host value is not set, and is therefore using the default value of localhost, or is set to localhost or 127.0.0.1. Remote host is configured as 'localhost' despite server host is probably not local something which should probably be served as a static file To help the built-in PHP dev server, check if the request was actually for If you are using a framework or the PHP built-in web server, this is likely due to the framework sending a 404 response instead of sending the actual file in that directory.Ī quick way to test this is to create a test.php file in the directory you have set as the Path to create validation script, and then check that file is callable from the URL to validation script or deployment url with test.php appended.įor example, if the Path to create validation script is set to /var/www/public, create a test.php file with the following contents in that folder: The Path to create validation script within the local project does not map to the URL to validation script or Deployment URL option. Please check that web path to validation script is correctly configured for. Make sure that the URL (and port) are correct these are provided to your web server either in the URL to validation script option or within your Deployment. There has been a problem connecting to your web server. Troubleshoot Validation Results Connection Refused For details, see Configure synchronization with a Web server.Ĭhoose a configuration from the list or click Browse in the Deployment dialog.Ĭlick Validate to have PhpStorm create a validation script, deploy it to the target remote environment, and run it there. The folder must be accessible through http.ĭeployment Server: In this field, specify the server access configuration of the type Local Server or Remote Server to access the target environment. Path to Create Validation Script: In this field, specify the absolute path to the folder under the server document root where the validation script will be created. If the project root is mapped to a folder accessible through http, you can specify the project root or any other folder under it.Ĭhoose Remote Web Server to check a debugger associated with a remote server. URL to Validation Script: In this field, type the URL address of the folder where the validation script will be created. The folder must be accessible through http. For Web servers of the type Inplace, the folder is under the project root. In the Validate Remote Environment dialog that opens, choose the Web server to validate the debugger on.Ĭhoose Local Web Server or Shared Folder to check a debugger associated with a local Web server. You can also get more detailed information about the debugging engine on a local or remote Web server.įrom the main menu, choose Run | Web Server Debug Validation.
![phpstorm xdebug not working phpstorm xdebug not working](https://i.stack.imgur.com/IeCBa.jpg)
For details, see Configure a debugging engine, Configure local PHP interpreters, and Configure remote PHP interpreters. When configuring the PHP interpreter for a project, PhpStorm informs you whether a debugger is installed in your local PHP development environment and reports on the Xdebug or Zend Debugger version used. PhpStorm can validate your configuration of Xdebug or Zend Debugger and tell you if some setting is missing or inconsistent with other settings.
![phpstorm xdebug not working phpstorm xdebug not working](https://i.stack.imgur.com/JhUyl.png)
Validate the Configuration of a Debugging Engine