Welcome to the navigation

Sint voluptate in aliqua, exercitation ullamco magna ut velit minim id in excepteur duis ut proident, ex consequat, nostrud sunt cupidatat irure nisi incididunt veniam. Consectetur amet, qui occaecat deserunt do in dolore elit, incididunt minim duis et nisi sed ut sint excepteur magna sit quis non fugiat aliqua, voluptate

Yeah, this will be replaced... But please enjoy the search!

Downgrading PHP 5.3.0 to 5.2.11 on Snow Leopard Server

Categories Tags
Many thanks to Jeff Seibert for his excellent guide, however it needs some clarifications and extra info for newbies.

1. Check that you need this

Open a console and enter
$php --version
If the reply is similar to this
PHP 5.3.0 (cli) (built: Jul 19 2009 00:34:30)
Copyright (c) 1997-2009 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2009 Zend Technologies
then you can proceed. Otherwise, don't.

2. Install Xcode on your server

If not installed, install it from the "other installs" folder of your Snow Leopard DVD or via Apple's site.

3. Install the “Snow Leopard” version of MacPorts from macports

Go to this webpage and get the Snow Leopard package. Install it.

4. Open the terminal, or ssh

$sudo port -v selfupdate
$sudo port -f uninstall installed
$sudo port install php52 +mysql5 +sqlite
$sudo cp /opt/local/etc/php5/php.ini-dist /opt/local/etc/php5/php.ini
These commands may take some time, easily up to an hour if you have an older system.

5. Change some setting files

Edit /etc/apache2/httpd.conf and change
# Here is a suggested series of commands
# I use nano, you may use other text editors as well
$sudo nano /etc/apache2/httpd.conf

# Press control + w to search (with nano)
# In my file this is line 152, but this may vary
Search: LoadModule php5_module

# Change
# To
Edit /opt/local/etc/php5/php.ini
$sudo nano /opt/local/etc/php5/php.ini

# If the file doesn't exist there is another one
$sudo cp /opt/local/etc/php5/php.ini-recommended /opt/local/etc/php5/php.ini

# Find and change
mysql.default_socket =
# To
mysql.default_socket = /var/mysql/mysql.sock

6. Restart the web service

With the Server Admin tool, the sharing pane in system preferences or
$sudo serveradmin stop web && sudo serveradmin stop mysql
$sudo serveradmin start web && sudo serveradmin start mysql
Or use the serviceRestart for a more complete reset of the server.

7. Check the results

$ php --version
PHP 5.2.11 (cli) (built: Oct  7 2009 03:34:39)
Copyright (c) 1997-2009 The PHP Group
Zend Engine v2.2.0, Copyright (c) 1998-2009 Zend Technologies
Please note that this portal is a BETA site , I will continuously improve all functionality and performance during the coming weeks / the author