|Jan 31, 2012, 11:28 AM||#1|
MAMP, MySQL, Netbeans help- "safari cannot connect to localhost"
Very new to using MAMP and not too hot with running diagnostics or using terminal (though i know some basics).
My problem is i think in setting up MAMP, MySQL workbench and Netbeans to work together... the actual issue is when i click on 'run project' in Netbeans, it opens safari and says that it can't connect to localhost:8888. i am trying to run an .html page.
I ran 'sudo apachectl -t' through terminal as mentioned in another forum and it said 'syntax ok'. Not sure how relevant this is.
Using Mac OS X 10.6.8. I had some issues setting up a new server instance in MySQL workbench- I'm still not sure that my settings are right though the paths check out:
path URL/admin tool: /Applications/MySQLWorkbench.app
Path to start command: /Applications/MAMP/bin/startMysql.sh
Path to stop command: /Applications/MAMP/bin/stopMysql.sh
Oh, also thought it was weird that my basic MySQL server properties (netbeans>services>databases>properties) defines the port i'm using as 3306. Though my MAMP port as defined on the starter page that opens in my browser on opening MAMP is 8889. And Safari is telling me it cant connect to localhost:8888. Why are all these different and should they be the same? The new server instance that i created in MySQL workbench was created on 3306.
Well, thats all the info i can think to provide. Any advice appreciated or links to a good MAMP configuration tutorial perhaps (I have been following a WAMP config tutorial, but it is different. Some of the paths and file names are different to mine and even some of the steps are different. Can't find anything online that explains what i need to know)
Thank you, really appreciate any responses to be able to finally preview my site!
P.S. My apologies- this is a repost from the 'macbook pro' thread as i started the thread in the wrong place first time around, and couldn't simply move it.
|Feb 8, 2012, 05:16 AM||#2|
It is not really clear what your are trying to do, but as you are using MAMP I assume you are trying to program PHP in Netbeans, to run on MAMP's Apache Web server?
PHP does not need to be compiled, as it is executed (interpreted) on page request. So you do not need to 'run' a project as it is being interpreted whenever a page is being requested.
So you just need to code in Netbeans (or any other IDE or text editor), and just browse to localhost (I set my Apache port back to 80).
Note that MAMP indeed uses it's own ports, not to conflict with any other possible running instances. Also, privileged ports (below 1024) require root access, so setting Apache to port 80 would require you to enter your administrator password when you try to run MAMP. Note that you can easily change the ports configured in MAMP by just running the bundled MAMP application...
Also note that MAMP is only able to run one site, and MAMP Pro (which you have to buy) is able to run more. However, it is extremely easy to allow multiple sites (virtual hosts) by just editing the httpd.conf. I always develop in ~/Workspace and I have created a folder ~/Workspace/apache to hold my apache virtual host configuration files. Defining host names in /etc/hosts and creating their respective virtual host configurations allows for running multiple virtual hosts from within MAMP:
This allows me to update MAMP whenever I want, and I just have to append that one line to MAMP's httpd.conf to have my setup working again...
Last edited by 4np; Feb 8, 2012 at 05:26 AM.
|Thread Tools||Search this Thread|
|thread||Thread Starter||Forum||Replies||Last Post|
|Any way to make it so the "back" and "forward" buttons in a Safari never disappear?||TH55||iOS 7||71||Sep 11, 2014 09:23 PM|
|Mavericks and range of issues (netbeans/MAMP)||kevinyeandel||OS X||0||Mar 7, 2014 11:02 AM|
|Xdebug Not Working (MAMP / Netbeans)||turbobass||Web Design and Development||1||Jul 15, 2012 12:01 AM|
|Safari problem - "Safari canít save the file"||GeorgeTheBest||Web Design and Development||0||Jun 14, 2012 04:37 AM|
All times are GMT -5. The time now is 10:32 PM.