[RESOLVED] PHP Installation Errors

Cool-R

Active Member
#1
Hello,

I've been trying to update PHP using the Actions -> PHP. (admin panel)

I have tried it on CENTOS an Debian 64 bit, Got same errors.

I'm including Logs for easier understanding.

Code:
**MAIN_STATUS** retrieved from /usr/local/lsws/phpbuild/buildphp_1287909439.5.progress
Preparing all source code for building PHP 5.3.3 with LSAPI
Retrieving PHP source archive from LINK
Extracting PHP source archive: tar -zxf php-5.3.3.tar.gz
Retrieving Suhosin patch from LINK
Patching source with Suhosin patch
**ERROR** Could not patch source with Suhosin patch
I'm not really good at Linux but If someone could tell me how this can be fixed, I'd appreciate it. Is it a bug with Litespeed? Or I need to edit something to get it done automatically.
 
Last edited by a moderator:

NiteWave

Administrator
#2
install a command "patch"

apt-get install patch.x86_64

may resolve the issue. "patch.x86_64" may not be exact debian package name. "aptitude search patch" to get the right name.
 
Last edited:

Cool-R

Active Member
#3
Hello,

Thanks for your kind help. Yep, I've done this.

apt-get install patch
Ran it, It went fine.

Went to the next page. Now It's asking me to run this on Shell

/usr/local/lsws/phpbuild/buildphp_manual_run.sh
I ran it. Everything was fine untill at the end, I got this error.

**LOG_DETAIL** retrieved from /usr/local/lsws/phpbuild/buildphp_1287943317.7.log

==============================================
Start building PHP 5.3.3 with LSAPI
==============================================
Sun Oct 24 22:03:28 MSD 2010

Changing to build directory /usr/local/lsws/phpbuild/php-5.3.3
Configuring PHP build (2-3 minutes)
./configure '--prefix=/usr/local/lsws/lsphp5' '--with-mysqli' '--with-zlib' '--with-gd' '--enable-shmop' '--enable-track-vars' '--enable-sockets' '--enable-sysvsem' '--enable-sysvshm' '--enable-magic-quotes' '--enable-mbstring' '--with-iconv' '--enable-suhosin' '--with-litespeed'
creating cache ./config.cache
checking for Cygwin environment... no
checking for mingw32 environment... no
checking for egrep... grep -E
checking for a sed that does not truncate output... /bin/sed
checking host system type... x86_64-unknown-linux-gnu
checking target system type... x86_64-unknown-linux-gnu
checking for gcc... no
checking for cc... no
configure: error: no acceptable cc found in $PATH
**ERROR** Could not configure PHP build
I'll exlain my fixes(if found any) in detail so that others can overcome them :)
 

Cool-R

Active Member
#5
Thanks for the help Pipert. I was about to do that (Googled it :) )

I did that and re-ran it. I got this error.

checking libxml2 install dir... no
checking for xml2-config path...
configure: error: xml2-config not found. Please check your libxml2 installation.
**ERROR** Could not configure PHP build
Tried apt-get install xml2 and
apt-get install libxml2

No luck (Although xml2 got installed)

EDIT: Worked!

Solution:apt-get install libxml2-dev

Thank you Google :D

But, I got an error again!

checking if the location of ZLIB install directory is defined... no
configure: error: Cannot find libz
**ERROR** Could not configure PHP build
 
Last edited:

Cool-R

Active Member
#6
Can anyone tell me how to fix it.

checking if the location of ZLIB install directory is defined... no
configure: error: Cannot find libz
**ERROR** Could not configure PHP build
I just need know that I need to install zlib I think.(If I'm not wrong)
 

Cool-R

Active Member
#8
Thanks for your help, I was hassling with the tutorial on the other website.

I've got this error again!

If configure fails try --with-jpeg-dir=<DIR>
configure: error: libpng.(a|so) not found.
**ERROR** Could not configure PHP build
I must say you have good support, It's really good to see developers really helping out :)
 

Cool-R

Active Member
#9
Soulution found:

install libpng-dev
install libjpeg-dev
But now,
checking for mcrypt support... no
checking for MSSQL support via FreeTDS... no
checking for MySQL support... no
checking for specified location of the MySQL UNIX socket... no
checking for MySQLi support... yes
checking whether to enable embedded MySQLi support... no
mysql_config not found
configure: error: Please reinstall the mysql distribution
**ERROR** Could not configure PHP build
What are all the stuff that I have to take care?
 
#14
add "--disable-fileinfo" as a php build parameter

i.e., when you see
"--with-mysqli --with-zlib ..."
add the option to become
"--disable-fileinfo --with-mysqli --with-zlib"
 

Cool-R

Active Member
#15
Hello,

Thanks for your help. That solved the thing.

Everything went fine untill this,
==============================================
Start building Suhosin Extension
==============================================
Mon Oct 25 15:46:54 MSD 2010

Changing to build directory /usr/local/lsws/phpbuild/php-5.3.3/suhosin-0.9.32.1
Running PHPize for Suhosin extension
Configuring for:
PHP Api Version: 20090626
Zend Module Api No: 20090626
Zend Extension Api No: 220090626
Cannot find autoconf. Please check your autoconf installation and the
$PHP_AUTOCONF environment variable. Then, rerun this script.

**ERROR** Could not run PHPize for Suhosin
EDIT: I'm trying this

install autoconf
 
Last edited:

Cool-R

Active Member
#16
Edit:
install autoconf

Worked great!

Thanks.

I was just wondering if Litespeed can check these dependencies and install them & run this? Could be handy.

Pretty much thanks to developers.
 
Top