Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

ooagentbender

macrumors member
Original poster
Dec 21, 2002
53
0
Ok so OS X comes pre installed with apache software, which is awesome. I also installed mySQL and php on my computer. I just want to know what folder im supposed to put my Php files in so that I can view them to make sure they work before I publish them to the web.

Thanks
 
Not sure about putting them in cgi-bin, but putting them in /Library/WebServer/Documents/ will work.

Make sure you have PHP enabled in httpd.conf and have restarted Apache.
 
OK I know where the folder is now I need to know where httpd.conf is just to make sure its working but more importantly I need to know what the adress is I would put into my web browser to view the files.

Thanks
 
ok provided that php is enabled for apache which it is beacause I installed php for apache, and I have the files I want to see in library/webserver/documents, then I should be able to view them correct? well it tells me I can't connect to the websever localhost. I started mysql up and everything, so Im a bit confused.
 
sounds like apache isn't running, if mysql was not running you'd get an error when you tried to view the page.

If you've been screwing with httpd.conf you might get an error log in /var/logs
if you're lucky.

127.0.0.1 (same as localhost) in your browser should jsut bring up the 'your site is running' type page, if it does not and you ahve no overwritten it, apache is not running.

To see if php is running put
phpinfo();
in a page, nothing else. (obviously the usual html tags and php tags though)
 
ok well that would signal to me that apache is not running, even thought teh mysql server runs

but my question then is how do I turn on the apache.
 
score that worked but now I don't know if php is working. I tried out a basic php file and it didn't work so now im kinda wondering what the hell is going on. How do you edit httpd.conf to turn php on.

Thanks
 
Dood I just wanted to let you know your the man and I have php on my comp now so I can learn how to flippin use it. Now I just have to figure out how it works with mysql and all that rubish


thanks again
 
Ok now the next question is:

Why when I start up mysql does it just sit there. I suspended the operation and then tried to get eh mysql comand propmt but it just sits there.

AAny ideas
 
Well if I have mySQL installed on my computer then when I run the server I should get a command prompt after I run mysql. The problem is I don't.

does that help.
 
OK heres some more clarification

I use the mysql_safe to start mySql up. Then, I suspend the operation with ctrl-z (tell me if any of this is wrong) then I try and run the mysql command in /usr/local/bin to get the command prompt for mysql but it just sits there and doesn't do nuthin.

Thanks.
 
OK well it works, but only if I close terminal and then re open it, then I can run any of the commands that you can use in mysql. Any idea why that might be. Im using X11 to open terminal because I put the terminal icon in the trash before I knew that would delete the app.

Know where I can download that?
 
Originally posted by Rower_CPU
Have you tried the Sharing Pref Pane yet?

Simply click the button next to "Personal Web Sharing" and you're set.

i'm trying to set up myPhoto and for some reason my personal web sharing will just NOT turn on...it just sits there saying that it is starting up and nothing will happen...i try quitting while this is going on and going back in only to find that it never started up...i also let it run for a few hours...and got nothing...anyone got any helpers???
 
Try launching Apache from the command line - it may give you some error messages that tell you what is wrong.

I don't have the exact instructions here, but you'd basically be starting httpd from a terminal window.
 
Here's a good way to launch Apache.

Use the command "apachectl graceful" to start/restart Apache. Error messages will be displayed telling you of any problems.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.