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

Go Back   LiteSpeed Support Forums > LiteSpeed Web Server > Bug Reports > PHP install error

Reply
 
Thread Tools Display Modes
  #1  
Old 01-13-2010, 03:41 AM
raphidae raphidae is offline
Senior Member
 
Join Date: Apr 2008
Posts: 59
Default PHP install error

For some reason PHP always fails to install. I have never seen Litespeed install PHP correctly since I started using it more than a year ago. The error is always the same:

Code:
Build complete.
Don't forget to run 'make test'.

Installing PHP
Installing PHP SAPI module:       litespeed
:No such file or directory
Installing build environment:     /usr/local/lsws/lsphp5/lib/php/build/
Installing header files:          /usr/local/lsws/lsphp5/include/php/
Installing helper programs:       /usr/local/lsws/lsphp5/bin/
  program: phpize
  program: php-config
Installing man pages:             /usr/local/lsws/lsphp5/man/man1/
  page: phpize.1
  page: php-config.1
1 error
*** Error code 1 (continuing)
`install' not remade because of errors.
**ERROR** Could not install PHP
As the compile did complete successfully I've always simply fixed this by doing something like:

'cp /usr/local/lsws/phpbuild/php-5.3.1/sapi/litespeed/php /usr/local/lsws/fcgi-bin/lsphp5'

As I use FreeBSD exclusively this might be a FreeBSD specific bug, I have noticed it on 6-RELEASE, 6-STABLE, 7-STABLE, 8-RC1, 8-STABLE and 9-CURRENT.

I'm guessing the compiler writes the lsapi php binary somewhere else on FreeBSD or something similar.
Reply With Quote
  #2  
Old 03-26-2010, 06:15 PM
raphidae raphidae is offline
Senior Member
 
Join Date: Apr 2008
Posts: 59
This is still present in 4.0.13...
Reply With Quote
  #3  
Old 03-31-2010, 12:00 PM
raphidae raphidae is offline
Senior Member
 
Join Date: Apr 2008
Posts: 59
I've investigated:

Code:
[root@virasena /opt/lsws]# /usr/local/lsws/phpbuild/buildphp_manual_run.sh
Manually running installation script: /usr/local/lsws/phpbuild/buildphp_1270060006.9.install.sh
Running at background with command:
/usr/local/lsws/phpbuild/buildphp_1270060006.9.install.sh 1> /usr/local/lsws/phpbuild/buildphp_1270060006.9.log 2>&1
[: xroot: unexpected operator
First, this doesn't run in the background as stated.

Second, there's an error due to:

Code:
if [  "x$INST_USER" == "xroot" ]; then
   chown -R lsadm:lsadm /usr/local/lsws/phpbuild/php-5.2.12
   check_errs $? "Could not chown to lsadm for direcotry /usr/local/lsws/phpbuild/php-5.2.12"
fi
in buildphp_xx.9.install.sh & buildphp_manual_run.sh

'==' is not a valid operator for a test evaluation. At least it isn't on BSD. You should be using '=' there.

The actual install error is due to the following:

Code:
[root@virasena /opt/lsws/phpbuild/php-5.2.12]# make -k install-sapi
Installing PHP SAPI module:       litespeed
:No such file or directory
*** Error code 1 (continuing)

[root@virasena /opt/lsws/phpbuild/php-5.2.12]# make -k -n install-sapi
echo "Installing PHP SAPI module:       litespeed"
/usr/local/lsws/phpbuild/php-5.2.12/build/shtool mkdir -p /opt/lsws/lsphp5/bin
if test ! -r /usr/local/lsws/phpbuild/php-5.2.12/libs/libphp5.so; then  for i in 0.0.0 0.0 0; do  if test -r /usr/local/lsws/phpbuild/php-5.2.12/libs/libphp5.so.$i; then  ln -s /usr/local/lsws/phpbuild/php-5.2.12/libs/libphp5.so.$i /usr/local/lsws/phpbuild/php-5.2.12/libs/libphp5.so;  break;  fi;  done;  fi

[root@virasena /opt/lsws/phpbuild/php-5.2.12]#
Notice the blank line after the two commands. Somehow make is trying to execute an empty command... This is due to this in '/usr/local/lsws/phpbuild/php-5.2.12/Makefile':

Code:
install-sapi: $(OVERALL_TARGET)   
        @echo "Installing PHP SAPI module:       $(PHP_SAPI)"
        -@$(mkinstalldirs) $(INSTALL_ROOT)$(bindir)
        -@if test ! -r $(phptempdir)/libphp$(PHP_MAJOR_VERSION).$(SHLIB_DL_SUFFIX_NAME); then \
                for i in 0.0.0 0.0 0; do \
                        if test -r $(phptempdir)/libphp$(PHP_MAJOR_VERSION).$(SHLIB_DL_SUFFIX_NAME).$$i; then \
                                $(LN_S) $(phptempdir)/libphp$(PHP_MAJOR_VERSION).$(SHLIB_DL_SUFFIX_NAME).$$i $(phptempdir)/libphp$(PHP_MAJOR_VERSION).$(SHLIB_DL_SUFFIX_NAME); \
                                break; \
                        fi; \
                done; \
        fi
        @$(INSTALL_IT)
The variable INSTALL_IT should have been set in '/usr/local/lsws/phpbuild/php-5.2.12/sapi/litespeed/config.m4', even if not used, otherwise it results in trying to execute "". Adding

INSTALL_IT="@true"

to '/usr/local/lsws/phpbuild/php-5.2.12/sapi/litespeed/config.m4' will fix this.

I'm quite concerned that apparently you haven't fully tested at least the last three releases on BSD and that a small error like this isn't fixed in over two months. If you aren't taking the BSD platform seriously I'd like to know.

(Also, there's two spelling/grammar errors in this: 'Running at background with command:' -> 'Running command in the background:' and 'direcotry' -> 'directory'.)

Last edited by raphidae; 03-31-2010 at 05:41 PM..
Reply With Quote
  #4  
Old 03-31-2010, 02:36 PM
raphidae raphidae is offline
Senior Member
 
Join Date: Apr 2008
Posts: 59
Since litespeed SAPI is included in PHP >5.3 distributions I reported this bug to PHP, see: http://bugs.php.net/bug.php?id=51452

As I noticed that 'php-litespeed-5.3.tgz' is downloaded anyway and extracted over 'sapi/litespeed', I urge you to fix this as well.
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 04:02 AM.



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