View Full Version : Need to know something about apache
ooagentbender
Mar 10, 2003, 04:23 AM
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
encro
Mar 10, 2003, 07:18 AM
/Library/WebServer/CGI-Executables/
Rower_CPU
Mar 10, 2003, 11:41 AM
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.
ooagentbender
Mar 10, 2003, 03:05 PM
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
Rower_CPU
Mar 10, 2003, 03:11 PM
httpd.conf is in /etc/httpd/
It's a good idea to make a back-up of it when you start making changes.
You can view the pages on your local machine using these two addresses:
http://localhost/
http://127.0.0.1/
If the pages are in your home directory, simply append "~username" to the URL.
ooagentbender
Mar 10, 2003, 03:45 PM
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.
jaguarx
Mar 10, 2003, 04:00 PM
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)
ooagentbender
Mar 11, 2003, 12:50 AM
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.
Rower_CPU
Mar 11, 2003, 09:50 AM
Have you tried the Sharing Pref Pane yet?
Simply click the button next to "Personal Web Sharing" and you're set.
ooagentbender
Mar 12, 2003, 02:08 AM
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
Rower_CPU
Mar 12, 2003, 11:02 AM
Here you go:
http://www.macdevcenter.com/pub/a/mac/2002/01/04/apache_macosx_pt3.html
ooagentbender
Mar 12, 2003, 12:17 PM
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
ooagentbender
Mar 12, 2003, 12:31 PM
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
Rower_CPU
Mar 12, 2003, 12:59 PM
Can you be more specific?
ooagentbender
Mar 12, 2003, 02:06 PM
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.
ooagentbender
Mar 12, 2003, 02:09 PM
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.
ooagentbender
Mar 12, 2003, 02:13 PM
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?
Rower_CPU
Mar 12, 2003, 04:25 PM
You should be able to pull it out of the .pkg files on the OS X install CD.
mnkeybsness
Mar 23, 2003, 11:57 PM
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 (http://agent0068.dyndns.org/~mike/projects/myPhoto/index.php) 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???
mnkeybsness
Mar 24, 2003, 10:16 AM
anybody?
i could really use some help!!!!
Rufus
Mar 25, 2003, 09:31 AM
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.
Rower_CPU
Mar 25, 2003, 11:30 AM
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.
mnkeybsness
Mar 25, 2003, 11:44 AM
already got it figured out!
check this thread to see what was wrong
http://forums.macrumors.com/showthread.php?s=&threadid=22894
vBulletin® v3.8.6, Copyright ©2000-2012, Jelsoft Enterprises Ltd.