[TYPO3-dev] Switching between PHP 5.3 and 5.2.9 for Mac OS
Fabien Udriot
fudriot at omic.ch
Mon Apr 20 10:28:57 CEST 2009
Hi,
I would like to point out that it exists now a package for Mac OS X that install PHP 5.3 RC1 very
easyily. In fact the development of the entropy package seems to be relaunched.
http://www.entropy.ch/blog/Software/2009/03/27/PHP-5-2-9-and-5-3-0RC1-Packages-for-Mac-OS-X-10-5.html
In addition, I set up a basic bash that enables me to switch quickly between the 5.2.9 and 5.3. This
is very convenient to test the branch v.5 / FLOW3 and swap back to the v.4 branch.
Here are my steps:
1. download and install 5.2.9:
http://www2.entropy.ch/download/Entropy%20PHP%205.2.9-7.pkg
2. sudo mv /usr/local/php5 /usr/local/php5.2.9
3. download and install 5.3:
http://www2.entropy.ch/download/Entropy%20PHP%205.3.0RC1-1.pkg
4. sudo mv /usr/local/php5 /usr/local/php5.3.0-RC1
5. create a symbolic link to which distribution you wish
sudo ln -s /usr/local/php5.3.0-RC1 /usr/local/php5
6. Restart apache: sudo apachectl restart
Now you can copy / paste the lines bellow to a file called switchPHP.sh and execute it in command line:
sudo sh switchPHP.sh 3 -> switch to 5.3.0-RC1
sudo sh switchPHP.sh 2 -> switch to 5.2.9
Notice: this script is very basic, you may need to adapt it.
##############################################################
#!/bin/sh
if [ "$#" -eq 0 ]
then # Script needs at least one command-line argument.
echo "Usage $0 [3 or 2]"
exit
fi
PATH='/usr/local/'
if [ $1 = 3 ];
then
/bin/rm php5
/bin/ln -s ${PATH}php5.3.0-RC1 ${PATH}php5
/usr/sbin/apachectl restart
fi
if [ $1 = 2 ];
then
/bin/rm php5
/bin/ln -s ${PATH}php5.2.9 ${PATH}php5
/usr/sbin/apachectl restart
fi
More information about the TYPO3-dev
mailing list