The Nexus
Show navigation Hide navigation
  • BLOG
  • ABOUT
    • Ego Surfing
  • PROJECTS
    • n2
    • S2ajax
    • Condo
    • ezEdit
    • FreeBlog - Air
    • Tooredo Alpha
    • Tools
    • Journlr, Again!
22 Sep 2010 | 2 min. (371 words)

Update your XAMPP PHP and keep Mediawiki & Drupal happy

Once again, the – otherwise very nice, I’m sure – PHP people have done this thing that has made me miserable with my own open-source code and is now also affecting Mediawiki: in PHP 5.3.1, references passed to __call() are silently turned into values.
Apparently, this bug was fixed but a contract was broken in the process: even if packages such as Wikipedia or Drupal were wrong in the way they were passing references, this used to work. Now, when running the same code, not only is a warning issued – good – but the function is not called. The latter is quite hard to justify.
Of course, this means that a simple “dot” upgrade can render your whole website unusable ; it’s a pill that’s a tad hard to swallow.

If you are running a LAMP stack, such as XAMPP, from ApacheFriends, you may feel that you are sorry out of luck. XAMPP, for instance, currently ships with PHP 5.3.1 and the Mediawiki updater encourages you to either upgrade or downgrade your version of PHP. How do you do this when running a full stack? XAMPP Beta, for instance, does not come with an upgrade path to the next release. I scoured the their forums and did not find much advice on how to get things back up and running without pain.

So, here is how to upgrade your PHP version -- and PHP only – to 5.3.3, while Apache, MySQL, etc. remain untouched. Oh and that ’s on Linux.

Go to your XAMPP root directory. Typically:

cd /opt/lampp

Make a backup of your current PHP files (or not, it’s up to you):

tar cvf BEFORE_php533.tar bin/php* etc/php* etc/pear* lib/* modules

Download XAMPP Beta from http://www.apachefriends.org/en/xampp- beta.html

Extract XAMPP Beta to, say, ~/Tmp/

Stop Apache:

/opt/lampp/lampp stopapache

Now, copy all the files you will need:

cp -rf ~/Tmp/lampp/bin/* bin/  
cp -f ~/Tmp/lampp/etc/p* etc/  
cp -rf ~/Tmp/lampp/lib/php lib/  
cp -f ~/Tmp/lampp/lib/libssl.so* lib/  
cp -f ~/Tmp/lampp/lib/libcrypto.so* lib/  
cp -f ~/Tmp/lampp/lib/libldap* lib/  
cp -f ~/Tmp/lampp/lib/liblber* lib/  
cp -rf ~/Tmp/lampp/modules lib/

Start Apache:

/opt/lampp/lampp startapache

I want something simpler

OK, then. Simply download the “patch” below and extract it in your XAMPP root directory. You will still need to restart Apache.

Caution! 15MB Download.

Contents

    • I want something simpler

Comments powered by Talkyard.

Android: Create a "lite" version of your application

SuggestEditText: Android auto-suggest component

2022 The Nexus