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 :
http://localhost4:8888/
… 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:
file:///Users/simon/Sites/LYNDA_PHP/helloworld.php
Obviously this doesn’t work. Really the browser should be doing this:
localhost4:8888/helloworld.php
I’ve right-clicked on a sidebar file and gone to > Project > Edit Preview URLs and entered this:
{
"cmd": ["open", "-a", "Applications/FirefoxDeveloperEdition.app", "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/FirefoxDeveloperEdition.app",
// for example: C:/Program Files (x86)/Nightly/firefox.exe
But still it’s not working. Any advice would be great.
si