build_admin_php.php not updating Admin PHP binary ?

#1
Seems running build_admin_php.sh for changing PHP version to a more updated release i.e. PHP 5.5.3:

1. Doesn't properly update the PHP binary at /usr/local/lsws/fcgi-bin/lsphp as it is stuck on the PHP binary that is automatically downloaded and put in place at /usr/local/lsws/fcgi-bin/lsphp which is PHP version 5.3.25 http://openlitespeed.com/threads/how-often-does-build_admin_php-sh-php_version-get-updated.50/

Code:
/usr/local/lsws/fcgi-bin/lsphp -v
PHP 5.3.25 (litespeed) (built: May 14 2013 13:35:05)
Copyright (c) 1997-2004 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2013 Zend Technologies
2. But it does update /usr/local/lsws/admin/fcgi-bin/admin_php* PHP binary. So Web Admin console's http headers does report PHP 5.5.3 in use but the command line still shows PHP 5.3.25

Code:
/usr/local/lsws/fcgi-bin/lsphp -v
PHP 5.3.25 (litespeed) (built: May 14 2013 13:35:05)
Copyright (c) 1997-2004 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2013 Zend Technologies
But if I copy over the updated PHP binary, the command line reports the correct version

Code:
cp -f /usr/local/lsws/phpbuild/php-5.5.3/sapi/litespeed/php /usr/local/lsws/fcgi-bin/lsphp

/usr/local/lsws/admin/fcgi-bin/admin_php -v
PHP 5.5.3 (litespeed) (built: Aug 25 2013 12:37:21)
Copyright (c) 1997-2004 The PHP Group
Zend Engine v2.5.0, Copyright (c) 1998-2013 Zend Technologies
Is this a bug ?
 

lsmichael

Active Member
#2
Howdy George,

So, (our) George tried to answer this in the Google Group, but it seems there was some sort of miscommunication. Honestly, I don't understand what happened, so I'll just start from the beginning:

build_admin_php.sh builds the Admin PHP (the PHP that the WebAdmin console uses). /usr/local/lsws/fcgi-bin/lsphp is the PHP that external applications use. These are two different things. That's why you saw the headers on the WebAdmin console using the new PHP but when you checked /usr/local/lsws/fcgi-bin/lsphp you found nothing changed.

Does that make sense? Did I foul things up?

m
 
#3
Guess I am confused as looking in /dist/install.sh you are downloading 5.3.25 binary to /usr/local/lsws/admin/fcgi-bin/admin_php and then making a copy to /usr/local/lsws/fcgi-bin/lsphp

so what's difference between

this ???

/usr/local/lsws/fcgi-bin/lsphp -v
PHP 5.3.25 (litespeed) (built: May 14 2013 13:35:05)
Copyright (c) 1997-2004 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2013 Zend Technologies

versus

i know this is for external app for site usage

/usr/local/lsws/lsphp5/bin/php -v
PHP 5.4.18 (cli) (built: Aug 23 2013 18:59:00)
Copyright (c) 1997-2013 The PHP Group
Zend Engine v2.4.0, Copyright (c) 1998-2013 Zend Technologies

as that's how it looks after compile for main PHP to 5.4.18

I know this is for admin console

/usr/local/lsws/admin/fcgi-bin/admin_php -v
PHP 5.5.3 (litespeed) (built: Aug 25 2013 12:37:21)
Copyright (c) 1997-2004 The PHP Group
Zend Engine v2.5.0, Copyright (c) 1998-2013 Zend Technologies
 
Last edited:

lsmichael

Active Member
#4
I'm baaa-ack. Sorry about that. I was totally absorbed in another project. But I'm basically done with that now.

OK. Let me see if I can get this right (with some help from our George):

/usr/local/lsws/lsphp5/bin/php is where LSPHP is installed. It is actually compiled under lsws/phpbuild/php-xxxx/ but then it is installed in lsws/lsphp5

That LSPHP is not actually used, though. Mostly, it's just a convenient place for LSPHP to be installed. (You can change that if you have a more convenient place.) Instead, for actual use, a copy of the binary from /usr/loca/lsws/phpbuild/php-xxxx/sapi/litespeed/php is made to /usr/local/lsws/fcgi-bin/ A new copy is made every time you compile with the WebAdmin console.

/usr/local/lsws/fcgi-bin/lsphp is the path for LSPHP that LSWS uses for external apps by default. /usr/local/lsws/fcgi-bin/lsphp is then symlinked to the newest LSPHP binary in the folder each time you compile.

If you want to use two versions of PHP at once, you can direct external applications the location of other copies of LSPHP in /usr/local/lsws/fcgi-bin/ or /usr/local/lsws/lsphp5/bin/ or wherever.

And, yes, /usr/local/lsws/admin/fcgi-bin/admin_php is the PHP for the WebAdmin. (I hope you didn't already get this answered in the Google Group. I'm horribly out of touch there, too.)

I'm slowly working through everything guys!

m
 
Top