PDA

View Full Version : updgrade to php5 problem


karloff
07-16-2008, 03:15 PM
when trying to upgrade to php5 via CP is seem to get the following error.

........

checking for xml2-config path... /usr/bin/xml2-config
checking whether libxml build works... yes
checking for OpenSSL support... no
checking for Kerberos support... no
checking for PCRE support... yes
checking for ZLIB support... yes
checking if the location of ZLIB install directory is defined... no
checking for gzgets in -lz... yes
checking whether to enable bc style precision math functions... no
checking for BZip2 support... no
checking whether to enable calendar conversion support... no
checking whether to enable ctype functions... yes
checking for cURL support... no
checking if we should use cURL for url streams... no
checking for long... (cached) yes
checking size of long... (cached) 8
checking for int... (cached) yes
checking size of int... (cached) 4
checking for int32_t... yes
checking for uint32_t... yes
checking for sys/types.h... (cached) yes
checking for inttypes.h... (cached) yes
checking for stdint.h... (cached) yes
checking for string.h... (cached) yes
checking for stdlib.h... (cached) yes
checking for strtoll... yes
checking for atoll... yes
checking for strftime... (cached) yes
checking for QDBM support... no
checking for GDBM support... no
checking for NDBM support... no
checking for Berkeley DB4 support... no
checking for Berkeley DB3 support... no
checking for Berkeley DB2 support... no
checking for DB1 support... no
checking for DBM support... no
checking for CDB support... no
checking for INI File support... no
checking for FlatFile support... no
checking whether to enable DBA interface... no
checking whether to enable dbase support... no
checking whether to enable DOM support... yes
checking for xml2-config path... (cached) /usr/bin/xml2-config
checking whether libxml build works... (cached) yes
checking whether to enable EXIF (metadata from images) support... no
checking for FrontBase SQL92 (fbsql) support... no
checking for FDF support... no
checking whether to enable input filter support... yes
checking pcre install prefix... no
checking whether to enable FTP support... no
checking OpenSSL dir for FTP... no
checking for GD support... yes
checking for the location of libjpeg... no
checking for the location of libpng... no
checking for the location of libXpm... no
checking for FreeType 1.x support... no
checking for FreeType 2... no
checking for T1lib support... no
checking whether to enable truetype string function in GD... no
checking whether to enable JIS-mapped Japanese font support in GD... no
checking for fabsf... yes
checking for floorf... yes
If configure fails try --with-jpeg-dir=
configure: error: libpng.(a|so) not found.

i have install the following rpm's

yum install libxml2 libxml2-devel

but can't get any further, any ideas

karloff
07-16-2008, 03:32 PM
i may have found a fix

http://litespeedtech.com/support/forum/archive/index.php/t-399.html

however, is there anyway to integrate this into the cp install feature or does it have to be implemented manually?

mistwang
07-16-2008, 03:46 PM
You need to install libpng-devel and libjpeg-devel

karloff
07-16-2008, 04:10 PM
i have managed to install php5, however when i check the verion i get

fcgi-bin/lsphp -v
PHP 4.4.8 (litespeed) (built: Jan 8 2008 14:37:45)
Copyright (c) 1997-2004 The PHP Group
Zend Engine v1.3.0, Copyright (c) 1998-2004 Zend Technologies


why would that be? do i need to reconfigure anything, or must i reboot the entire server?



edit: i tried to restart my server and still get the old version showing, also my sql has stop.. typical;)

mistwang
07-16-2008, 05:56 PM
change "php" "Script Handler" configuration at server level from lsphp4 to lsphp5.

karloff
07-17-2008, 05:00 AM
do i need to edit the current script handlers or create a new one? i can't see and option for that?

mistwang
07-17-2008, 03:13 PM
http://www.litespeedtech.com/docs/webserver/config/scripthandler/

Under "Server"->"Script Handler" tab, you should have a script handler configuration for "php". the "Handler Name" should be lsphp4 or phpLsapi, try to change it to "lsphp5", if it does not show up in the drop down list, you need to create a "lsphp5" External app under "External App" tab using the lsphp5 binary you have built.
Just use the existing external app configuration as an example.

karloff
07-17-2008, 03:29 PM
i have done that but the php version does not seem to have changed

mistwang
07-17-2008, 03:39 PM
run "/opt/lsws/fcgi-bin/lsphp5 -i" from command line see if it is really PHP5.

Make sure to restart the server after the configuration change.

karloff
07-17-2008, 03:51 PM
i have restarted the server and web serrver, however i still get the smae message.

if i run

/usr/local/lsws/fcgi-bin/lsphp5 -v


i get the correct version.

do i need to remove the lsphp file and rename the lsphp5 file as lsphp?

mistwang
07-17-2008, 09:08 PM
You need to change the external app "command" configuration to use "$SERVER_ROOT/fcgi-bin/lsphp5" instead of changing the file name.

And it is even better to create a "lsphp5" external app instead of changing the existing one for PHP4.

karloff
07-18-2008, 01:24 PM
i did that, however i seem to get the error

connection to [uds://tmp/lshttpd/lsphp.sock] on request #0, error: No such file or directory!
2008-07-18 15:19:25.295 [INFO] [uds://tmp/lshttpd/lsphp.sock] Connection refused, restart!

I have notice that in my tmp/lshttpd directory my sock files are not named as they are supposed to

eg is set the address for the VH to uds://tmp/lshttpd/$VH_NAME_lsphp.sock

but in the tmp/lshttpd dir they are called

uds://tmp/lshttpd/$VH_NAME_.sock

obviously causing some conflicting, how can i resolve this. without totally removing the vh and recreating them?

mistwang
07-19-2008, 05:16 PM
Please try 3.3.16 package, just change the version number in the download link.

karloff
07-21-2008, 04:06 AM
i have just tried a re-install of php5 and i get this warning message
Build complete.
Don't forget to run 'make test'.

mv /usr/local/lsws/fcgi-bin/lsphp-5.2.6 /usr/local/lsws/fcgi-bin/lsphp-5.2.6.bak; cp /usr/local/lsws/phpbuild/php-5.2.6/sapi/litespeed/php /usr/local/lsws/fcgi-bin/lsphp-5.2.6
mv: cannot stat `/usr/local/lsws/fcgi-bin/lsphp-5.2.6': No such file or directory


however is seem to install fine other than that

will keep you posted if it works, otherwise i will try the upgrade

karloff
07-21-2008, 02:07 PM
unfortunetly i could not get it working, still giving me a 503 error on php5. who should be the owner of fcgi-bin dir and its contents? root or nobody? tried changing it but no success:(

the only error i get is this
connection to [uds://tmp/lshttpd/lsphp.sock] on request #0, error: No such file or directory!


nothing in any other logs. mistwang, how do i go about changing the version?

mistwang
07-21-2008, 02:27 PM
PM me a temp root login of your server, I can take a look.

mistwang
07-21-2008, 03:00 PM
The main problem is that "Auto Start" was not set for "lsphp5" app at server level.
And you also have virtual host level configurations in the mix, since all of your vhosts are owned by "nobody" user, PHP suEXEC does not give any extra benefits, so I removed the vhost level "script handler" configuration.

karloff
07-21-2008, 03:31 PM
thanks man, it seems to have updated my php, however there seems to be a problem with my main site, it doesn't seem to show anything. just a blank screen?

edit: i should not there is nothing in the error.log that would describe the problem as well

karloff
07-21-2008, 03:38 PM
infact i'm getting the error

[ADMIN] authentication failed!

wagonlips
08-27-2008, 06:05 PM
Version 3.3.17 installed on OS X 10.5 PPC
Getting same error when trying to upgrade to PHP 5 using the control panel:
configure: error: libpng.(a|so) not found.
/opt/local/lib/libpng.a <--is there. Is there a way to make Litespeed see it?

(Also tried 3.3.16, same problem)

mistwang
08-27-2008, 09:13 PM
add php configuration option "--with-png-dir=/opt/local".

wagonlips
08-28-2008, 11:55 AM
Thank you! I did as you said and it was happy, for a second.
Next the configuration script asked for the mysql_config location which I found and added like so:
--with-config-file-path=/usr/local/mysql-5.0.51b-osx10.4-powerpc/bin
Then it wanted the location of mysql.sock and I added this:
--with-mysql-sock=/tmp/mysql.sock
"Surely, I am home free now," I thought to myself. But then...
configure: error: Cannot find MySQL header files under yes.
In this post http://litespeedtech.com/support/forum/showthread.php?t=2200 (you really are prolific), you indicate that the solution is to "install mysql client library devel package." I would like to do that, but I'm having a hard time finding such a thing for this OS X 10.5 (PPC) box. Any ideas?

mistwang
08-28-2008, 04:11 PM
You probably have it already, just try
--with-mysql=/usr/local/mysql-5.0.51b-osx10.4-powerpc/

wagonlips
08-28-2008, 07:30 PM
So I did that, and then some other things, too. I can't remember all the different things I tried, but eventually I got past this.

At the end of the configuration log I find the message:
configure: error: freetype.h not found.
But the file lives here:
/opt/local/include/freetype2/freetype/freetype.h
So far, I've tried --with-freetype-dir=/opt/local/include,
--with-freetype-dir=/opt/local/include/freetype2, and
--with-freetype-dir=/opt/local/include/freetype2/freetype
and it failed each time.

So I pulled the freetype call from the list.

Then I pulled the --with-mysqli bit and it configured!

But it didn't actually build.

ld: symbol(s) not found
collect2: ld returned 1 exit status
make: *** [sapi/litespeed/php] Error 1

Here are the parameters I used to get that far:
"--with-mysql=/usr/local/mysql-5.0.51b-osx10.4-powerpc/ --with-zlib --with-gd --enable-shmop --enable-track-vars --enable-sockets --enable-sysvsem --enable-sysvshm --enable-magic-quotes --enable-mbstring --with-iconv --with-png-dir=/opt/local --with-config-file-path=/usr/local/mysql-5.0.51b-osx10.4-powerpc/bin --with-mysql-sock=/tmp/mysql.sock --with-jpeg-dir=/opt/local/lib"

wagonlips
09-03-2008, 10:36 AM
I sort of solved this by using a CentOS Linux box instead. OS X is nice and all, but presented too many configuration hoops for me to jump through. With Yum I was able to easily install all of the libraries that building PHP5 required, had it up and running in a comparably short time.

Thank you very much for the help! The stuff I learned while trying to build it under OS X definitely made installing on Linux that much easier.