error on make install PHP

Discussion in 'Install/Configuration' started by doniking, Sep 6, 2007.

  1. doniking

    doniking Member


    I am running FreeBSD 6.2, Litespeed + PHP 4.4.7 installed from port, and they are all running well.
    But the problem came up when I want to upgrade the PHP.
    I got this error when doing make install PHP

    esabsd# tar zxvf php-litespeed-4.1.tgz
    x litespeed/
    x litespeed/config.m4
    x litespeed/Makefile.frag
    x litespeed/lsapi_main.c
    x litespeed/README
    x litespeed/lsapilib.c
    x litespeed/lsapilib.h
    x litespeed/lsapidef.h
    esabsd# cd ..
    esabsd# make install
    Installing PHP SAPI module: litespeed
    :No such file or directory
    *** Error code 1

    Stop in /root/php-5.1.4.

    I've tried PHP 5.2.3 and 5.1.4 and got same problem. even though I reconfigured PHP many times.

    What made this error?
    Thanks in advance
    Last edited: Sep 7, 2007
  2. mistwang

    mistwang LiteSpeed Staff

    It is bug with PHP configuration on FreeBSD. The solution is to install CGI verion of PHP first, then build LiteSpeed SAPI without "make install", just copy over sapi/litespeed/php .
  3. doniking

    doniking Member

    Hi mistwang,

    Thanks for your reply.
    I thought so. I'll try it.

  4. mistwang

    mistwang LiteSpeed Staff

    "make install" will install PHP PEAR library for you, for LiteSpeed PHP, "sapi/litespeed/php" is the only thing you need if PEAR extensions are not used.
  5. doniking

    doniking Member

    can you please explain it step by step? maybe others will need it too.

  6. mistwang

    mistwang LiteSpeed Staff

    To install the CGI version of PHP, just configure PHP without neither "--with-litespeed" nor "--with-axps", the rest is the same, it will build the CGI version of PHP.
  7. doniking

    doniking Member

    if I did ./configure without neither "--with-litespeed" nor "--with-axps"
    and copy, but hey, where is php file under sapi/litespeed ?
    did I make a mistake?

  8. mistwang

    mistwang LiteSpeed Staff

    You just do "make install" to install PHP library files, so you can build matching php opcode cache like APC or eAccelerator.

    After that you need to configure PHP with "--with-litespeed" option and "make", then copy.
  9. doniking

    doniking Member

    Thanks mistwang.
    You rock!

    First I installed PHP as usually into /usr/local/php5/ then reconfigure and recompile it with litespeed as you told to me, without "make install".
    And, tada..., it works. All extensions needed successfully loaded.
    And the new drupal site is online.


  10. doniking

    doniking Member

    Last edited: Oct 15, 2007
  11. mistwang

    mistwang LiteSpeed Staff

    Thank Donie,
    Please feel free to add that link in our wiki page?
  12. Dani

    Dani Well-Known Member

    * Setup up PHP [Y/n]: n
    * Suffix for PHP script(comma separated list)
    *  Would you like to change PHP opcode cache setting [y/N]? N

    Correct me 
    if I'm wrong but if you choose No for setup PHP then it wont ask you for suffix nor opcache? Just change it to Y.
  13. doniking

    doniking Member

    Last edited: Oct 1, 2007
  14. luckypoem

    luckypoem New Member

    to mistwong

    i do as what u said.but when i visit,it didn't show php info but a download box pop out.why ?how to fix it?
  15. webizen

    webizen Well-Known Member

    Check script handle for php at your lsws server level (Admin Console -> Configurations -> Server -> Script Handler -> php). It is likely missing.

Share This Page