LiteSpeed Technologies
Download Download     Blog Blog     Wiki Wiki     Forum Forum     Store     Contact Contact    

Go Back   LiteSpeed Support Forums > LiteSpeed Web Server > Install/Configuration > [RESOLVED] PHP Installation Errors

Reply
 
Thread Tools Display Modes
  #1  
Old 10-24-2010, 01:42 AM
Cool-R Cool-R is offline
Member
 
Join Date: Oct 2010
Posts: 28
Default [RESOLVED] PHP Installation Errors

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 NiteWave; 10-25-2010 at 06:26 PM..
Reply With Quote
  #2  
Old 10-24-2010, 01:50 AM
NiteWave NiteWave is offline
LiteSpeed Staff
 
Join Date: Sep 2009
Posts: 2,218
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 by NiteWave; 10-24-2010 at 01:54 AM..
Reply With Quote
  #3  
Old 10-24-2010, 11:10 AM
Cool-R Cool-R is offline
Member
 
Join Date: Oct 2010
Posts: 28
Hello,

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

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

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

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

Quote:
**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
Reply With Quote
  #4  
Old 10-24-2010, 11:50 AM
Pipert Pipert is offline
Member
 
Join Date: Oct 2009
Posts: 12
You need gcc installed.

Run:

apt-get install gcc
Reply With Quote
  #5  
Old 10-24-2010, 11:54 AM
Cool-R Cool-R is offline
Member
 
Join Date: Oct 2010
Posts: 28
Thanks for the help Pipert. I was about to do that (Googled it )

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

Quote:
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

But, I got an error again!

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

Last edited by Cool-R; 10-24-2010 at 12:03 PM..
Reply With Quote
  #6  
Old 10-24-2010, 12:22 PM
Cool-R Cool-R is offline
Member
 
Join Date: Oct 2010
Posts: 28
Can anyone tell me how to fix it.

Quote:
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)
Reply With Quote
  #7  
Old 10-24-2010, 12:35 PM
mistwang mistwang is offline
LiteSpeed Staff
 
Join Date: May 2003
Location: New Jersey
Posts: 7,585
install libz-dev
Reply With Quote
  #8  
Old 10-24-2010, 12:38 PM
Cool-R Cool-R is offline
Member
 
Join Date: Oct 2010
Posts: 28
Thanks for your help, I was hassling with the tutorial on the other website.

I've got this error again!

Quote:
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
Reply With Quote
  #9  
Old 10-24-2010, 12:45 PM
Cool-R Cool-R is offline
Member
 
Join Date: Oct 2010
Posts: 28
Soulution found:

Quote:
install libpng-dev
install libjpeg-dev
But now,
Quote:
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?
Reply With Quote
  #10  
Old 10-24-2010, 12:58 PM
Cool-R Cool-R is offline
Member
 
Join Date: Oct 2010
Posts: 28
Fixed.

Quote:
install libmysqlclient15-dev
install zlib1g-dev
I have tried to install this.

EDIT: Got this error

Quote:
virtual memory exhausted: Cannot allocate memory
make: *** [ext/fileinfo/libmagic/apprentice.lo] Error 1
**ERROR** Could not compile PHP
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -7. The time now is 12:07 AM.



- Archive - Top
© Copyright 2003-2011 LiteSpeed Technologies, Inc. All rights reserved. Privacy Policy.