Sublime Text and PHP

Hi there,
I’ve posted this question on the Sublime Text forum, but unfortunately nowadays that forum doesn’t seem to get a lot of traffic. And as this question is also specific to PHP and MAMP Pro, I thought I’d ask here.

I’m using MAMP Pro to locally host my PHP files and I’m using Firefox Developer Edition to view them. If I type the URL of the root directory e.g :


… Then it will display the index in the browser and I can open the PHP files just fine. However, when I go to the side bar, right-click on a PHP file and use Open With or Open In Browser, it totally bypasses MAMP and tries to open it as if it was a normal HTML file:


Obviously this doesn’t work. Really the browser should be doing this:


I’ve right-clicked on a sidebar file and gone to > Project > Edit Preview URLs and entered this:

"cmd": ["open", "-a", "Applications/", "http://localhost4:8888/${file/\/Users\/simon\/Sites\/LYNDA_PHP\///}"] 

I’ve then gone to Sublime Preferences > Package Settings > Side Bar > Settings - User and entered this:

//if installed in a default location maybe this works.
"default_browser": “FirefoxDeveloperEdition",
 //one of this list: firefox, aurora, chrome, canary, chromium, opera, safari

"portable_browser": "Applications/", 
// for example:  C:/Program Files (x86)/Nightly/firefox.exe

But still it’s not working. Any advice would be great.

si :slight_smile:

Here’s some information that seems like it might apply to your case?

Let us know if any of that works or not.I didn’t read it super closely, getting some work done at the moment :smiley:

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.