Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Developer Center > How do I enable or install PHP on OSX 10.3.4?

How do I enable or install PHP on OSX 10.3.4?
Thread Tools
Darksider
Forum Regular
Join Date: Feb 2003
Status: Offline
Reply With Quote
Jun 27, 2004, 12:18 AM
 
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?
     
Synotic
Mac Elite
Join Date: Oct 2000
Status: Offline
Reply With Quote
Jun 27, 2004, 02:59 AM
 
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
     
Darksider  (op)
Forum Regular
Join Date: Feb 2003
Status: Offline
Reply With Quote
Jun 27, 2004, 06:11 AM
 
Hmm,. where do I find my apache1 folders and what file do I add this line to?
     
DVD Plaza
Senior User
Join Date: Oct 2002
Location: Adelaide, South Australia
Status: Offline
Reply With Quote
Jun 27, 2004, 07:39 AM
 
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.
     
Chris O'Brien
Grizzled Veteran
Join Date: Nov 2003
Location: Hebburn, UK
Status: Offline
Reply With Quote
Jun 27, 2004, 07:45 AM
 
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
     
philzilla
Occasionally Useful
Join Date: Jun 2001
Location: Liverpool, UK
Status: Offline
Reply With Quote
Jun 27, 2004, 09:48 AM
 
php.net recommend apache 1.3.x
"Have sharp knives. Be creative. Cook to music" ~ maxelson
     
Darksider  (op)
Forum Regular
Join Date: Feb 2003
Status: Offline
Reply With Quote
Jun 27, 2004, 12:27 PM
 
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:

<?php

phpinfo();

?>
( Last edited by Darksider; Jun 27, 2004 at 01:41 PM. )
     
philzilla
Occasionally Useful
Join Date: Jun 2001
Location: Liverpool, UK
Status: Offline
Reply With Quote
Jun 27, 2004, 03:51 PM
 
"Have sharp knives. Be creative. Cook to music" ~ maxelson
     
genevish
Mac Enthusiast
Join Date: Jan 1999
Location: Marietta, GA, USA
Status: Offline
Reply With Quote
Jul 1, 2004, 12:44 PM
 
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
     
varcos
Fresh-Faced Recruit
Join Date: Apr 2001
Location: Atlanta, GA, USA
Status: Offline
Reply With Quote
Jul 2, 2004, 06:44 PM
 
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 Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Top
Privacy Policy
All times are GMT -4. The time now is 08:11 AM.
All contents of these forums © 1995-2017 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.8 © 2000-2017, Jelsoft Enterprises Ltd.,