[BlueOnyx:08263] Re: Wordpress reading PHP version incorrectly

Colin Jack colin at mainline.co.uk
Thu Aug 25 16:14:36 -05 2011


Hi Michael,

If I use phpinfo() it returns 5.1.6 even though I have your 5.2.17 pkg installed

Colin



On 25 Aug 2011, at 21:15, "Michael Stauber" <mstauber at blueonyx.it> wrote:

> Hi Colin,
> 
> > This is just something with the WP detection mechanism for checking the
> > environment. It is running phpinfo and returning the CentOS PHP version
> > which is 5.1.6. and then refusing to install. Moodle must use something
> > different, because that detects the Solarspeed version correctly
> 
> Most likely it's not using a php function such as phpinfo() to detect the version information, but uses "/usr/bin/php -v" to determine that info. And /usr/bin/php is still the onboard PHP binary, where any third party PHP usually brings its own binary and has it in a different location.
> 
> The are two work arounds to get it working:
> 
> Check the WP code and see if it really uses "/usr/bin/php -v" and if so, point it to the location of your third party PHP binary instead.
> 
> OR you can try something which has a lot of bad side effects: Temporarily (!) rename /usr/bin/php (to something like /usr/bin/php.org) and copy the third party PHP binary to /usr/bin/php. BUT: As long as you have this temporary fix in place the GUI will throw errors left and right. So as soon as you are done, copy the original /usr/bin/php back.
> 
> --
> With best regards
> 
> Michael Stauber
> 
> _______________________________________________
> Blueonyx mailing list
> Blueonyx at mail.blueonyx.it
> http://mail.blueonyx.it/mailman/listinfo/blueonyx




More information about the Blueonyx mailing list