Snow Leopard Apache and PHP enabled - Can't view in Browser

Problems with the Mac OS X version of XAMPP, questions, comments, and anything related.

Snow Leopard Apache and PHP enabled - Can't view in Browser

Postby danjohns82 » 23. December 2009 20:02

Hello,

Currently have Snow Leopard

Apache 2.3 is enabled.
PHP 5.3 is enabled.

When I check the versions and if they are running through terminal they are running.

When I run http://localhost/phpinfo.php it always says NOT FOUND url phpinfo.php was not found on this server.

I have a file saved as phpinfo.php

with the code as :
<?php
echo phpinfo();
?>

When I do http:localhost/ that error above comes up. If i drag the file over Safari or Firefox the site just shows:
<?php
echo phpinfo();
?>

I cant view or test any files. Am I missing something? Do I need to save the files somewhere special?

Any help would be appreciated. it's driving me crazy!

Thanks.
danjohns82
 
Posts: 3
Joined: 23. December 2009 19:50

Re: Snow Leopard Apache and PHP enabled - Can't view in Browser

Postby Wiedmann » 23. December 2009 20:05

Do I need to save the files somewhere special?

In the directory which is configured with DocumentRoot in your webserver config file.
Wiedmann
AF Moderator
 
Posts: 17102
Joined: 01. February 2004 12:38
Location: Stuttgart / Germany

Re: Snow Leopard Apache and PHP enabled - Can't view in Browser

Postby danjohns82 » 25. December 2009 01:52

Thanks for the reply. Sorry I'm a noob..but where is DocumentRoot in my Web config file?

If I am using a text editor an on a Mac, what file do I save it in?

Mac HD?
iDisk?

If you can let me know where it's located?

Thanks again.
danjohns82
 
Posts: 3
Joined: 23. December 2009 19:50

Re: Snow Leopard Apache and PHP enabled - Can't view in Browser

Postby caltuna » 25. December 2009 04:32

Your php test file must be in ~/applications/xampp/htdocs

You also want to set the permissions of the file to read/write for everyone via GetInfo.
caltuna
 
Posts: 111
Joined: 05. May 2009 16:35

Re: Snow Leopard Apache and PHP enabled - Can't view in Browser

Postby danjohns82 » 25. December 2009 22:51

I don't know if it is different cause I am using a New MacBook Pro and running Snow Leopard.

I'm not running XAMMP. I have Apache and PHP already on my computer so I don't have ~applications/xampp/htdocs.

I don't have htdocs file on my computer.

If I enabled PHP already and Apache is running without XAMPP, where do I save it?

Thanks again!
danjohns82
 
Posts: 3
Joined: 23. December 2009 19:50

Re: Snow Leopard Apache and PHP enabled - Can't view in Browser

Postby ralf.krause » 01. January 2010 17:25

I think you asked your question in the wrong forum ... this is a forum for "XAMPP for Mac OS X". :roll:

Perhaps the following post would help: viewtopic.php?f=28&t=38620#p154489
Sorry it's in German language but you will see the folders and urls ... they will also work in other versions of Mac OS X. :D
ralf.krause
 
Posts: 26
Joined: 26. January 2009 11:10
Operating System: OS X 10.8.2


Return to XAMPP for macOS

Who is online

Users browsing this forum: No registered users and 9 guests