Search code examples
windows-7xamppphpstorm

Setting up phpstorm 4 with XAMPP on Windows 7


I need help setting up phpstorm (4.0) with XAMPP which is at the default location c:\xampp\htdocs. I create all my projects at c:\xampp\htdocs\projectname.

Here are the things I have already done:

  • Setup the PHP interpretator by going to settings and then PHP (main menu)

enter image description here

  • Go to PHP > Servers and then

enter image description here

  • To setup run configuration I have the done the following:

enter image description here

Now when I run using the above configuration it just takes me to localhost in my browser, instead of the file I am editing (http://localhost instead of localhost/myproject/myfile.php).

What am I missing? I read the help topics of phpstorm and googled a lot but still couldn't figure it out.


Solution

  • Turns out you don't need to set up run configuration. The answer lies in setting up the mapping in the deployment tab in settings.

    (assuming that you are creating your projects in c:\xampp\htdocs)

    To do that go to settings (Ctrl + Alt + S) and then choose deployment: enter image description here

    Under mappings tab, it should look like this: enter image description here

    And after that you can view the file in the browser through this menu:

    enter image description here