Installing the Entropy PHP 5.1.4 Package on an Intel Mac

June 22, 2006

I just bought a MacBook Pro to take the place of both my G5 tower and my G4 iBook, and immediately had a problem installing PHP using the Universal Binary package from entropy.ch. I had transferred all of the files off of my G5 to the new MacBook using Apple’s very handy Migration Assistant, but that assistant will only go so far. The PHP installation I had got borked, so I had to head back to Marc Liyanage’s site to get the newest-Intel based package for install. The problem is, when you use a tool like the Migration Assistant, if you had junk on the old machine, you transfer the junk to the new machine. I think there were some lines in my httpd.conf file that were keeping the new installation from working. In the effort to be a good little Netizen, I’ll explain how I got the Enropy PHP 5.1.4 package back up and running on an Intel Mac – and in this case, if you had already had a package installed previously. And keep in mind, if you bork your own machine following any instructions I’ve written here, I dont know you and had nothing to do with it!

First I located the old installed files and made sure to delete them. This included all of the entropy files located in /Library/Receipts, which consisted of the following:
entropy-php-extension-curl.pkg entropy-php-extension-frontbase.pkg entropy-php-extension-gettext.pkg entropy-php-extension-iodbc.pkg entropy-php-extension-json.pkg entropy-php-extension-libxslt.pkg entropy-php-extension-mcrypt.pkg entropy-php-extension-mhash.pkg entropy-php-extension-ming.pkg entropy-php-extension-mssql.pkg entropy-php-extension-mysql.pkg entropy-php-extension-pdflib.pkg entropy-php-extension-postgresql.pkg entropy-php.pkg

Then I deleted the existing php5 folder, that was located at /usr/local/. In Terminal, I navigated to the folder ( cd /usr/local), and used this command: sudo rm -R php5/

I downloaded the Intel package from Marc’s site. Go to this page http://www.entropy.ch/software/macosx/php/ and grab the “PHP 5.1.4 for Apache 1.3” file located under “PHP 5 on Mac OS X 10.4, PPC and Intel”.

I knew my existing httpd.conf file was messed up, so I copied the contents of httpd.conf.original (which was in the same folder as the httpd.conf file) and pasted the text into the httpd.conf file (these are located in /etc/httpd/). This made sure that any old lines from a previous entropy install weren’t there. If you see a line like the following, you want to make sure it’s out of there:

Include /usr/local/php5/httpd.conf.php

Then I saved, and authenticated.

After that, I installed the PHP package that I had downloaded, and it threw an error at the end, which I ignored. I went back into the httpd.conf file and manually added this line at the end:

#entropy Include /usr/local/php5/entropy-php.conf

Finally I went into my System Preferences to stop and restart web sharing – voila! PHP5 has arrived! I’m fairly certain I didn’t miss any steps as I just did this about ten minutes ago, but if you have anything to add or any questions, feel free to leave a comment.

3 Comments

  1. 1. stewey

    July 29th, 2006

    thank you so much for publishing your way of getting php5 to work on a macbook. haven’t tried it yet but its looking hopefull. bit confused about the whole httpd.conf file and what I do with it but I’m sure a bit of head scratching and I’ll work out what to do.

    thanks again!

  2. 2. ryan

    July 31st, 2006

    You’re welcome. I hope you’re able to get things up and running. Good luck!

  3. 3. Leon Sargent

    September 18th, 2006

    I thought PHP5.1.4 was for Apache 2 Universal Binary and PHP5.1.6 was for Apache 1.3 as installed by the Tiger install DVD also Universal Binaries.

    I tried to use PHP5.1.6 on an upgraded 1.3.33 to 1.3.37 and the install for PHP5 gave the message at the end fo the install that errors occured.

    I tried adding the line of code you suggested to the httpd.conf file, a fresh copy. No php.  Php pages from my site came up as text on the screen they were not executed as PHP files.

    Leon

Sorry, comments are closed.