Problem building matching PHP binary

#1
Hello,

I have installed both 4.0.17 and 4.0.16 on a cPanel/WHM server, either manually or via the WHM plugin, still when I try to build the PHP via WHM with the "Build matching PHP binary" tool, I am getting:
Code:
Build PHP Using Apache Configuration with LSAPI
Progress:      Stopped due to Error

==============================================
Start building PHP 5.2.11 with LSAPI
==============================================
Tue Dec 7 14:32:12 CST 2010

Changing to build directory /home/cpeasyapache/ls.src
Cannot find php build directory for cPanel, will download source code
Retrieving PHP source archive
http : // us.php.net /get /php-5.2.11.tar.gz/from/us2.php.net/mirror:
14:32:12 ERROR 404: Not Found.
**ERROR** Could not retrieve PHP source archive
(the link above was separated with spaces, as the forum does not allow me to post links.. great anti spam tactic :D)

The PHP on the server is configured as follows:

PHP 5.2.11 (cli) (built: Nov 13 2009 02:10:26)
Copyright (c) 1997-2009 The PHP Group
Zend Engine v2.2.0, Copyright (c) 1998-2009 Zend Technologies
with the ionCube PHP Loader v3.3.20, Copyright (c) 2002-2010, by ionCube Ltd., and
with Zend Extension Manager v1.2.2, Copyright (c) 2003-2007, by Zend Technologies
with Zend Optimizer v3.3.3, Copyright (c) 1998-2007, by Zend Technologies

Other server info:

Linux *****.com 2.6.18-128.1.6.el5 #1 SMP Wed Apr 1 09:10:25 EDT 2009 x86_64 x86_64 x86_64 GNU/Linux

Any hints to this would be highly appreciated!
 
#3
Hello,

I have already compiled Apache & PHP on this server using the EasyApache script that cPanel/WHM provides. Still, the issue persists.

Any hints will be much appreciated! Thanks!
 

mistwang

LiteSpeed Staff
#4
Which version of PHP you build with easyApache?
Can you check if there is any PHP source code directory under /home/cpeasyapache/src ?

It should have the PHP source code. It should be 5.2.11 if you select 5.2.11 when run easyApache.

check the version number reported by "/usr/local/bin/php -i"
and "/usr/bin/php -i".
 
#5
This is the content of the /home/cpeasyapache folder:

drwx------ 5 root root 4096 Dec 7 13:54 ./
drwx--x--x 720 root root 20480 Dec 7 15:42 ../
drwxr-xr-x 2 root root 4096 Dec 7 13:54 ls.src/
drwxr-xr-x 3 root root 4096 Dec 7 06:35 phpextensions/
drwxr-xr-x 8 root root 4096 Jun 29 21:10 src/

This is the content of ls.src:

total 8
drwxr-xr-x 2 root root 4096 Dec 7 13:54 ./
drwx------ 5 root root 4096 Dec 7 13:54 ../
-rw-r--r-- 1 root root 0 Dec 7 19:55 php-5.2.11.tar.gz

^-- Note that the file size, of the source, is 0K

This is the content of src:

drwxr-xr-x 8 root root 4096 Jun 29 21:10 ./
drwx------ 5 root root 4096 Dec 7 13:54 ../
-rw-r--r-- 1 root root 593 Dec 22 2009 applied_case_15258.patch
drwxr-xr-x 2 root root 4096 Jun 29 21:03 cppatch/
-rw-r--r-- 1 root root 519 Jun 21 13:48 cppatch_curl-config_libs.patch
drwxr-xr-x 10 root root 4096 Jun 29 21:08 curl-7.21.0/
drwxr-xr-x 13 root root 4096 Jun 29 21:09 imap-2007e/
drwxr-xr-x 16 root root 12288 Jun 29 21:10 libxml2-2.7.6/
drwxr-xr-x 8 root root 4096 Jun 29 21:11 pcre-8.02/
drwxr-xr-x 17 root root 4096 Jun 29 21:12 php-5.2.9/
-rw-r--r-- 1 root root 8150 Jun 29 21:03 targz.yaml

The version here is 5.2.9, for some reason, though I am confident the server is running on 5.2.11 for quite a long time ago.

Even the above, I am not sure how EasyApache is concerned in this case, the installation script for some reason is not able to download the PHP source from PHP's website. How can we fix this?
 
Last edited:
#7
Thanks for this hint! :) The installation started flawlessly now, however, after approximately 7-8 minutes, a new issue appeared:

Code:
/home/cpeasyapache/ls.src/php-5.2.11/ext/ming/ming.c:1196: undefined reference to `SWFDisplayItem_get_rot'
ext/ming/.libs/ming.o: In function `zim_swfdisplayitem_getYSkew':
/home/cpeasyapache/ls.src/php-5.2.11/ext/ming/ming.c:1181: undefined reference to `SWFDisplayItem_get_ySkew'
ext/ming/.libs/ming.o: In function `zim_swfdisplayitem_getXSkew':
/home/cpeasyapache/ls.src/php-5.2.11/ext/ming/ming.c:1166: undefined reference to `SWFDisplayItem_get_xSkew'
ext/ming/.libs/ming.o: In function `zim_swfdisplayitem_getYScale':
/home/cpeasyapache/ls.src/php-5.2.11/ext/ming/ming.c:1151: undefined reference to `SWFDisplayItem_get_yScale'
ext/ming/.libs/ming.o: In function `zim_swfdisplayitem_getXScale':
/home/cpeasyapache/ls.src/php-5.2.11/ext/ming/ming.c:1136: undefined reference to `SWFDisplayItem_get_xScale'
ext/ming/.libs/ming.o: In function `zim_swfdisplayitem_getY':
/home/cpeasyapache/ls.src/php-5.2.11/ext/ming/ming.c:1121: undefined reference to `SWFDisplayItem_get_y'
ext/ming/.libs/ming.o: In function `zim_swfdisplayitem_getX':
/home/cpeasyapache/ls.src/php-5.2.11/ext/ming/ming.c:1106: undefined reference to `SWFDisplayItem_get_x'
collect2: ld returned 1 exit status
make: *** [sapi/litespeed/php] Error 1
**ERROR** Could not compile PHP
I suppose this is somehow related to the Ming extension, which I am running on number of other servers, again with PHP 5.2, again with LiteSpeed and with cPanel.

What might be the reason for this error?
 

webizen

Well-Known Member
#8
It seems your server is missing ming-devel package. Do 'rpm -qa | grep ming-devel' to verify. You can work around this with 'yum install ming-devel'. However, these libraries are supposed to be ready by EasyApache prior to this. In addition, as mistwang pointed out earlier, if you ran EasyApache to build php 5.2.11, it should have the source there. So it doesn't looks like php 5.2.11 was built through EasyApache.
 
Top