|
|
How do I enable or install PHP on OSX 10.3.4?
|
|
|
|
Forum Regular
Join Date: Feb 2003
Status:
Offline
|
|
I installed Apache 2 and PHP 4 from http://serverlogistics.com/index.php no problem. For some reason http://localhost won't parse my php.
It should work since:
# PHP4 configuration
LoadModule php4_module modules/libphp4.so
AddType application/x-httpd-php .php
AddType application/x-httpd-php-source .phps
is in my Library/Apache2/conf/httpd.conf file.
Any ideas?
|
|
|
|
|
|
|
|
|
Mac Elite
Join Date: Oct 2000
Status:
Offline
|
|
Just checking my own install (I stuck with the preinstalled Apache 1)... do you have this line, and if so, is it uncommented?
AddModule mod_php4.c
|
|
|
|
|
|
|
|
|
Forum Regular
Join Date: Feb 2003
Status:
Offline
|
|
Hmm,. where do I find my apache1 folders and what file do I add this line to?
|
|
|
|
|
|
|
|
|
Senior User
Join Date: Oct 2002
Location: Adelaide, South Australia
Status:
Offline
|
|
Originally posted by Darksider:
Hmm,. where do I find my apache1 folders and what file do I add this line to?
The line goes in the httpd.conf of whichever Apache you are using.
When you say "http://localhost" won't parse what do you mean by that though?
Do you simply get the raw PHP dumped to your browser? If so then, as above, you're PHP module isn't correctly setup.
Do you get a server not found error? If so then your system isn't processing DNS properly - as a test try navigating to http://your.ip.address
Do you get a directory listing or forbidden error? If so that would be your httpd.conf setup not being complete. For testing purposes navigate directly to http://your.ip.address/pagename.php
Hope this helps.
|
|
|
|
|
|
|
|
|
Grizzled Veteran
Join Date: Nov 2003
Location: Hebburn, UK
Status:
Offline
|
|
Have a look here and see if it helps. I remember something about PHP being incompatible Apache 2 due to Apache 2 being multi-threaded and PHP not liking it, and was therefore only able to be added in CGI mode. I think this is FUD, as the link I provided seems to think so too... (so I have no idea why I even brought it up )
|
Just who are Britain? What do they? Who is them? And why?
Formerly Black Book
|
|
|
|
|
|
|
|
Occasionally Useful
Join Date: Jun 2001
Location: Liverpool, UK
Status:
Offline
|
|
php.net recommend apache 1.3.x
|
"Have sharp knives. Be creative. Cook to music" ~ maxelson
|
|
|
|
|
|
|
|
Forum Regular
Join Date: Feb 2003
Status:
Offline
|
|
Originally posted by DVD Plaza:
The line goes in the httpd.conf of whichever Apache you are using.
When you say "http://localhost" won't parse what do you mean by that though?
Do you simply get the raw PHP dumped to your browser? If so then, as above, you're PHP module isn't correctly setup.
Do you get a server not found error? If so then your system isn't processing DNS properly - as a test try navigating to http://your.ip.address
Do you get a directory listing or forbidden error? If so that would be your httpd.conf setup not being complete. For testing purposes navigate directly to http://your.ip.address/pagename.php
Hope this helps.
Well I decided to go back to apache 1.3 and enabled php through darwin. I restarted apache but it's still not parsing my php files. I just get text.
Here's the php code I'm trying to test:
(
Last edited by Darksider; Jun 27, 2004 at 01:41 PM.
)
|
|
|
|
|
|
|
|
|
Occasionally Useful
Join Date: Jun 2001
Location: Liverpool, UK
Status:
Offline
|
|
|
"Have sharp knives. Be creative. Cook to music" ~ maxelson
|
|
|
|
|
|
|
|
Mac Enthusiast
Join Date: Jan 1999
Location: Marietta, GA, USA
Status:
Offline
|
|
Originally posted by Darksider:
Well I decided to go back to apache 1.3 and enabled php through darwin. I restarted apache but it's still not parsing my php files. I just get text.
Here's the php code I'm trying to test:
From a terminal, try "httpd -v" and verify the version of Apache that's running.
|
Scott Genevish
scott AT genevish DOT org
|
|
|
|
|
|
|
|
Fresh-Faced Recruit
Join Date: Apr 2001
Location: Atlanta, GA, USA
Status:
Offline
|
|
What are you nameing the file that has <? phpinfo(); ?>
What output are you getting when you navigate to that page?
Have you tried going to System Prefs/Sharing/Web Sharing and clicking on the link they give you there? Anything show up? Is that in the same place as your phpinfo file?
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Forum Rules
|
|
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
|
HTML code is Off
|
|
|
|
|
|
|
|
|
|
|
|