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

Go Back   LiteSpeed Support Forums > External Applications > PHP > Can't compile PHP thru interface

Reply
 
Thread Tools Display Modes
  #1  
Old 04-19-2008, 02:14 PM
DJ XtAzY DJ XtAzY is offline
Member
 
Join Date: Oct 2007
Posts: 24
Default Can't compile PHP thru interface

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

--16:59:36-- http://download.suhosin.org/suhosin-...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/package...espeed-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?
Reply With Quote
  #2  
Old 04-19-2008, 09:19 PM
mistwang mistwang is offline
LiteSpeed Staff
 
Join Date: May 2003
Location: New Jersey
Posts: 7,583
chmod 0755 /usr/bin/gcc,
after finish compiling PHP, do chmod 0700 /usr/bin/gcc.
Reply With Quote
  #3  
Old 04-20-2008, 12:35 AM
DJ XtAzY DJ XtAzY is offline
Member
 
Join Date: Oct 2007
Posts: 24
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);}
Reply With Quote
  #4  
Old 04-20-2008, 06:22 PM
mistwang mistwang is offline
LiteSpeed Staff
 
Join Date: May 2003
Location: New Jersey
Posts: 7,583
What is your OS?
Reply With Quote
  #5  
Old 04-20-2008, 09:17 PM
DJ XtAzY DJ XtAzY is offline
Member
 
Join Date: Oct 2007
Posts: 24
CentOS 5.0 64Bit
Reply With Quote
  #6  
Old 04-21-2008, 07:41 AM
mistwang mistwang is offline
LiteSpeed Staff
 
Join Date: May 2003
Location: New Jersey
Posts: 7,583
You need to do the same thing to /usr/bin/ld as to /usr/bin/gcc
Reply With Quote
  #7  
Old 04-21-2008, 12:00 PM
DJ XtAzY DJ XtAzY is offline
Member
 
Join Date: Oct 2007
Posts: 24
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/Relea...e-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?
Reply With Quote
  #8  
Old 04-21-2008, 01:36 PM
mistwang mistwang is offline
LiteSpeed Staff
 
Join Date: May 2003
Location: New Jersey
Posts: 7,583
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".
Reply With Quote
  #9  
Old 04-21-2008, 02:46 PM
DJ XtAzY DJ XtAzY is offline
Member
 
Join Date: Oct 2007
Posts: 24
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.
Reply With Quote
  #10  
Old 04-21-2008, 02:49 PM
mistwang mistwang is offline
LiteSpeed Staff
 
Join Date: May 2003
Location: New Jersey
Posts: 7,583
in /usr/loca/lsws/fcgi-bin, /usr/bin/php is the CLI version of 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 09:46 AM.



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