Entropy.ch Discussion Forums Forum Index Entropy.ch Discussion Forums
Discussion forums about Mac OS X software development.
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Read this if installing PHP5 fails and you used PHP4 before

 
Post new topic   Reply to topic    Entropy.ch Discussion Forums Forum Index -> PHP on Mac OS X
View previous topic :: View next topic  
Author Message
liyanage
Site Admin


Joined: 22 May 2003
Posts: 1104
Location: Zurich, Switzerland

PostPosted: Fri Jul 21, 2006 9:20    Post subject: Read this if installing PHP5 fails and you used PHP4 before Reply with quote

Here's a good explanation someone just sent me. I included a note on the installation instruction page.

Quote:
I finally got my web server back up and running this morning. It was
not anything I did wrong per se...just a missing step in the
documentation.

Apparently, the entropy package assumes that you either a) haven't
turned on the PHP4 that comes with 10.4, or b) you have installed the
PHP4 entropy package. If either of these is true, then it looks like
an install should go flawlessly.

What the doc didn't mention, though, was that if you have commented
out those two lines in your factory httpd.conf file that invoke PHP4
(that is, if you have non-entropy PHP4 already running), installing
the entropy PHP5 package will tank your web server, because now
Apache is all confused about which PHP to use, the PHP4 in the
httpd.conf file, or the PHP5 in entropy's conf file.

Long story short, on a whim this morning, I went into the httpd.conf
file and commented out the two PHP4 calls, and voila, everything's
working fine. [...]
Back to top
View user's profile Send private message Visit poster's website AIM Address MSN Messenger
dawnleo



Joined: 26 Jun 2007
Posts: 1
Location: Greensboro, NC

PostPosted: Fri Jun 29, 2007 12:35    Post subject: Need a little more info Reply with quote

I too realized that I had (attempted to) install PHP4 before downloading and attempting to install PHP5. But, being a total novice at this web server experiment, how exactly did you "comment out the 2 PHP4 calls?" I need step-by-step instructions... Thanks!
_________________
dawn-
everything you do matters!
Back to top
View user's profile Send private message Visit poster's website
f3ze



Joined: 21 Aug 2007
Posts: 3

PostPosted: Tue Aug 21, 2007 18:00    Post subject: Reply with quote

Hi guys, if you;re having trouble installing the package like I was, try this:
http://www.mamp.info/en/index.php

This downloaded and installed instantly the whole kaboodle. Not sure yet if its given me extra copies of stuff I dont need (since I already had apache/sql/php4) but its working first go.
There's also a widget for turning on n off servers and it looks like you can get a few servers going at once.

edit: been using it a few hours, i'm impressed - comes complete with phpmyadmin, mysql (all installs on its own) and you can switch between php4 and 5 in seconds... It puts everything in the applications folder, so it is separate to anything else you have, but does mean you can delete it easily. It did also mean having localhost set at port 8888 but in prefs you can change that to 'default ports' and then regular http://localhost works fine.

(marc sorry to paste what might be seen as a competitor to your package, please delete this post if it is)
_________________
---
Bay of Islands NZ
Back to top
View user's profile Send private message
sdrio



Joined: 12 Dec 2007
Posts: 1

PostPosted: Thu Dec 13, 2007 23:36    Post subject: Reply with quote

I'm sure I'll get the dummy award for this, but this is still not working for me.

I'mr running 10.4.10 on a mac pro. I have php 4.4.7 and Apache 1.3.33, both of which work OK.

I have run the installer, all the files seem to be there, but it ain't workin . . .

I have commented out the lines in httpd.conf;

#LoadModule php4_module libexec/httpd/libphp4.so

and

#AddModule mod_php4.c

Then restarted apache (stop/start personal web sharing).

When I go to load a page from my server, I get the dialog box to choose how to open the file. So it seems neither is running, although in shell if I type php --version, it reports;

PHP 4.4.7 (cli) (built: Jul 10 2007 10:54:32)
Copyright (c) 1997-2007 The PHP Group
Zend Engine v1.3.0, Copyright (c) 1998-2004 Zend Technologies

Sooo . . . I don't know what's going on.

I don't need php4 at all, this is on a second startup disk, so I'd happily get rid of it. I'd prefer to stick with apache 1.3, but if you think I should, I'll can that too.

The only thing I wonder, is whether I *must* have 10.4.11 - seems I have hosed something else because the download keeps failing to unpack. Another story, which I'm trying to avoid having to fix right now.

Any ideas please?
Back to top
View user's profile Send private message
jlbrown



Joined: 28 Jun 2007
Posts: 5
Location: Melbourne, Australia

PostPosted: Tue May 13, 2008 6:17    Post subject: Reply with quote

I'm having the same problems sdrio.

Did you get it working?

Anyone have any suggestions?

Thanks,

James.
Back to top
View user's profile Send private message Visit poster's website
wegus



Joined: 30 Mar 2005
Posts: 23

PostPosted: Tue May 13, 2008 8:40    Post subject: Reply with quote

you have to tell the Apache to execute Files with .php-Ending with your Loaded PHP-Module by a line like this in httpd.conf:

AddType application/x-httpd-php .php


without making the link between File-Ending and Module Apache does not know what to do with such a file and he either displays it as plain text or offers it for download!
_________________
An Apple a day keeps the doctor away!
Back to top
View user's profile Send private message
jlbrown



Joined: 28 Jun 2007
Posts: 5
Location: Melbourne, Australia

PostPosted: Tue May 13, 2008 9:06    Post subject: Reply with quote

Thanks wegus, that worked!

I added:

AddType application/x-httpd-php .php
AddType application/x-httpd-php-source .phps

restarted apache and all works fine now.

Many thanks for your help.

James.
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    Entropy.ch Discussion Forums Forum Index -> PHP on Mac OS X All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group