I just reinstalled my PHP using MacPort and the PHP version is 5.3. I need to downgrade to PHP 5.2 as some of my application still not compatible with PHP 5.3. Had tried many ways but no luck. Luckily, one of my friend experienced this before and he pointed out the right way to downgrade to PHP 5.2 using macport to me. Thanks Paul!
To downgrade to PHP 5.2 using MacPort, follow the steps below:-
Advertisements
- First backup your all your files, database and vhost settings
- Start your terminal and uninstall your PHP 5.3 using the command below:-
sudo port uninstall php5
* if it show error on the dependent module, uninstall all of them too (these dependent moduly mostly are php5 module)
- To downgrade to PHP 5.2 you need to use this command:-
port install php52 +mysql5 +apache2
If you need to install other special module, you can check the available variants for PHP 5.2 using the command below:-
port variants php52
- Once done, just run a phpinfo and you should see PHP version 5.2.13
Related posts:
How to merge .001 files in Mac OS X
How to resize image in Mac OS X
Prestashop 1.5 - How to enable add to cart button at Home Featured Product?
Symfony: PHP Fatal error: Call to a member function setData()
Macport: Can't map the URL 'file://.' to a port description file
How to restart dock when dock hang in Mac OS X
How to disable Front Row shortcut key in Mac
How to change trackpad reverse scrolling in Mac OS X Lion
Share this with your friends:-