Can't compile PHP thru interface

DJ XtAzY

Active Member
#1
So I tried to compile php thru LS interface but it gave me this error:

--16:59:36-- http://download.suhosin.org/suhosin-patch-5.2.5-0.9.6.2.patch.gz
Resolving download.suhosin.org... 85.214.93.8
Connecting to download.suhosin.org|85.214.93.8|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 23157 (23K) [application/x-gzip]
Saving to: `suhosin-patch-5.2.5.patch.gz'

0K .......... .......... .. 100% 40.0K=0.6s

16:59:39 (40.0 KB/s) - `suhosin-patch-5.2.5.patch.gz' saved [23157/23157]

patching file php-5.2.5/TSRM/TSRM.h
patching file php-5.2.5/TSRM/tsrm_virtual_cwd.c
patching file php-5.2.5/TSRM/tsrm_virtual_cwd.h
patching file php-5.2.5/Zend/Makefile.am
patching file php-5.2.5/Zend/Zend.dsp
patching file php-5.2.5/Zend/ZendTS.dsp
patching file php-5.2.5/Zend/zend.c
patching file php-5.2.5/Zend/zend.h
patching file php-5.2.5/Zend/zend_alloc.c
patching file php-5.2.5/Zend/zend_alloc.h
patching file php-5.2.5/Zend/zend_canary.c
patching file php-5.2.5/Zend/zend_compile.c
patching file php-5.2.5/Zend/zend_compile.h
patching file php-5.2.5/Zend/zend_constants.c
patching file php-5.2.5/Zend/zend_errors.h
patching file php-5.2.5/Zend/zend_hash.c
patching file php-5.2.5/Zend/zend_llist.c
patching file php-5.2.5/configure
patching file php-5.2.5/configure.in
patching file php-5.2.5/ext/standard/basic_functions.c
patching file php-5.2.5/ext/standard/dl.c
patching file php-5.2.5/ext/standard/file.c
patching file php-5.2.5/ext/standard/file.h
patching file php-5.2.5/ext/standard/info.c
patching file php-5.2.5/ext/standard/syslog.c
patching file php-5.2.5/main/fopen_wrappers.c
patching file php-5.2.5/main/main.c
patching file php-5.2.5/main/php.h
patching file php-5.2.5/main/php_config.h.in
patching file php-5.2.5/main/php_logos.c
patching file php-5.2.5/main/snprintf.c
patching file php-5.2.5/main/spprintf.c
patching file php-5.2.5/main/suhosin_globals.h
patching file php-5.2.5/main/suhosin_logo.h
patching file php-5.2.5/main/suhosin_patch.c
patching file php-5.2.5/main/suhosin_patch.h
patching file php-5.2.5/main/suhosin_patch.m4
patching file php-5.2.5/sapi/apache/mod_php5.c
patching file php-5.2.5/sapi/apache2filter/sapi_apache2.c
patching file php-5.2.5/sapi/apache2handler/sapi_apache2.c
patching file php-5.2.5/sapi/cgi/cgi_main.c
patching file php-5.2.5/sapi/cli/php_cli.c
patching file php-5.2.5/win32/build/config.w32
--16:59:40-- http://www.litespeedtech.com/packages/lsapi/php-litespeed-4.7.tgz
Resolving www.litespeedtech.com... 209.151.227.121
Connecting to www.litespeedtech.com|209.151.227.121|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 24953 (24K) [application/x-gtar]
Saving to: `php-litespeed-4.7.tgz'

0K .......... .......... .... 100% 673K=0.04s

16:59:40 (673 KB/s) - `php-litespeed-4.7.tgz' saved [24953/24953]

Forcing buildconf
using default Zend directory
buildconf: checking installation...
buildconf: autoconf version 2.59 (ok)
buildconf: Your version of autoconf likely contains buggy cache code.
Running cvsclean for you.
To avoid this, install autoconf-2.13.
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
shtool:echo:Warning: unable to determine terminal sequence for bold mode
shtool:echo:Warning: unable to determine terminal sequence for bold mode
checking for gcc... gcc
checking whether the C compiler (gcc ) works... no
configure: error: installation or configuration problem: C compiler cannot create executables.

------------
But when i look at config.log, i see a lot of "Permssion denied" for gcc. If i simply go the phpbuild directory and manually do "./configure blah blah", it works fine. And idea how to fix this?
 

DJ XtAzY

Active Member
#3
Tried that but now the config.log saids

This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.

configure:2153: checking for Cygwin environment
configure:2169: cc -c conftest.c 1>&5
configure: In function 'main':
configure:2165: error: '__CYGWIN32__' undeclared (first use in this function)
configure:2165: error: (Each undeclared identifier is reported only once
configure:2165: error: for each function it appears in.)
configure: failed program was:
#line 2158 "configure"
#include "confdefs.h"

int main() {

#ifndef __CYGWIN__
#define __CYGWIN__ __CYGWIN32__
#endif
return __CYGWIN__;
; return 0; }
configure:2186: checking for mingw32 environment
configure:2198: cc -c conftest.c 1>&5
configure: In function 'main':
configure:2194: error: '__MINGW32__' undeclared (first use in this function)
configure:2194: error: (Each undeclared identifier is reported only once
configure:2194: error: for each function it appears in.)
configure: failed program was:
#line 2191 "configure"
#include "confdefs.h"

int main() {
return __MINGW32__;
; return 0; }
configure:2217: checking for egrep
configure:2232: checking for a sed that does not truncate output
configure:2382: checking host system type
configure:2403: checking target system type
configure:2515: checking for gcc
configure:2628: checking whether the C compiler (gcc ) works
configure:2644: gcc -o conftest conftest.c 1>&5
collect2: cannot find 'ld'
configure: failed program was:

#line 2639 "configure"
#include "confdefs.h"

main(){return(0);}
 

DJ XtAzY

Active Member
#7
Ok i did the same for ld and gcc. Its doing fine until it want to phpsize with xcache installation

Installing PHP SAPI module: cgi
Installing PHP CGI binary: /usr/bin/
Installing PHP CLI binary: /usr/bin/
Installing PHP CLI man page: /usr/man/man1/
Installing build environment: /usr/lib/php/build/
Installing header files: /usr/include/php/
Installing helper programs: /usr/bin/
program: phpize
program: php-config
Installing man pages: /usr/man/man1/
page: phpize.1
page: php-config.1
Installing PEAR environment: /usr/lib/php/
[PEAR] Console_Getopt - already installed: 1.2.3
[PEAR] Archive_Tar - already installed: 1.3.2
[PEAR] Structures_Graph- already installed: 1.0.2
[PEAR] PEAR - already installed: 1.7.1
Wrote PEAR system config file at: /usr/etc/pear.conf
You may want to add: /usr/lib/php to your php.ini include_path
ls_install: Success
--14:56:49-- http://xcache.lighttpd.net/pub/Releases/1.2.2/xcache-1.2.2.tar.gz
Resolving xcache.lighttpd.net... 64.34.180.144
Connecting to xcache.lighttpd.net|64.34.180.144|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 269238 (263K) [application/octet-stream]
Saving to: `../xcache-1.2.2.tar.gz'

0K .......... .......... .......... .......... .......... 19% 146K 1s
50K .......... .......... .......... .......... .......... 38% 515K 1s
100K .......... .......... .......... .......... .......... 57% 599K 0s
150K .......... .......... .......... .......... .......... 76% 682K 0s
200K .......... .......... .......... .......... .......... 95% 1.01M 0s
250K .......... .. 100% 394K=0.7s

14:56:50 (388 KB/s) - `../xcache-1.2.2.tar.gz' saved [269238/269238]

/usr/local/lsws/phpbuild/phpbuild.1208803795.6oc.sh: line 25: /usr/local/lsws/lsphp5/bin/phpize: No such file or directory

it seems like its looking in the wrong directory for phpsize?
 

mistwang

LiteSpeed Staff
#8
You need to remove the "--prefix=/usr" configuration parameter, instead set it via "Install Path Prefix" configuration. if you want to use "/usr" just set it to "/usr".
 

DJ XtAzY

Active Member
#9
Good find! I copied and paste from the phpinfo and I didnt realize that --prefix=/usr was there. So after the compilation is done, is the PHP LSAPI in the /usr/bin or is it in /usr/local/lsws/fcgi-bin? I did change the Install Path Prefix to /usr.
 
#11
is the lsphp5 in /usr/local/lsws/fcgi-bin automatically updated after being compiled? When I check whether the file was modified, it was still a few months old.

Edit: nm i restarted LS and its updated
 
Last edited:

DJ XtAzY

Active Member
#13
Ok so I tried to compile PHP 5.2.6 and made neccessary changes in the 'utility' folder. I installed php with prefix /usr/local since thats how cpanel installed php there in the first place. But in the fcgi-bin directory, the lsphp5 is still version 5.2.5. The CLI php is updated, but not the api.
 

mistwang

LiteSpeed Staff
#14
Please check the configuration options with the installed CLI php.

php -i

then check the PHP build directory see if the sapi/litespeed/php get created or not. If not, try "make" from command line see if there is any errors.
 

DJ XtAzY

Active Member
#15
php -i looks fine. I can only get up to sapi/litespeed and in there are random files. I tried to run make and it just gave me

make: *** No targets specified and no makefile found. Stop.
 
#17
I fixed my problem. For some reason my fcgi-bin folder has the ownership root:root. I changed it to nobody:nobody to fix this issue. Should I have it root:nobody instead?
 
Top