Problem running PHP file
Hey guys, I have some issues running PHP files on my server. What I did so far is set up a remote interpreter (via SSH) and PhpStorm recognized it fine including the Xdebug extension. Then I went ahead and set up a Git repository on the server and checked out my project which also went fine. Then I set up a deployment host via FTPS (FTP over TLS). When I save a file locally it gets uploaded to the right path on the server and I can view the updated file in my browser. Committing to Git also works perfectly. What does not work is running the file via the Run menu. I am not sure what I am supposed to enter in the PHP Script configuration so that the right directory is used because now, when I hit Run, the file is uploaded to the server and then PhpStorm issues to command to run C:\Users\Sebastian\projectname\filename.php on the server and bash of course says it cannot find the file. Any ideas?
Please sign in to leave a comment.
Please check if you setup correctly: Tools | Deployment | Configuration | Mappings | Web path on server.
I am not sure what I am supposed to enter there. Currently, and what I think is correct, I have:
Local path:
C:\Users\Sebastian\Documents\brain
Deployment path on server:
/
Web path on server:
/
I assume the deployment path on server is relative to the working directory of the FTP user. Since my FTP user is rooted in /var/www/brain/ and that is also the directory from which Apache serves files over HTTP, I assumed / would be correct for both cases. I also tried entering the full path /var/www/brain/ as deployment path, but that didn't change anything. The console outputs: