Build Matching PHP Binary - Help required please.

Discussion in 'Install/Configuration' started by BBUK, Mar 26, 2009.

  1. BBUK

    BBUK New Member

    Hi all,

    New to the forum & Litespeed.

    I have very little knowledge with litespeed and servers so I'm hoping you lot can advise me, I managed to install and get it working so that's a good start.

    I'd like to use the same PHP setup that we had with using Apache.

    I've tried going to WHM panel > LiteSpeed Web Server Plugin for WHM > Build Matching PHP Binary.

    ------------------
    Found Apache php binary at /usr/local/bin/php. Version is 5.2.8
    Found LiteSpeed php binary at /opt/lsws/fcgi-bin/lsphp5. Version is 4.4.9

    PHP binary has different version!
    ------------------

    ------------------

    ==============================================
    Start building PHP 5.2.8 with LSAPI
    ==============================================
    Wed Mar 25 02:24:09 GMT 2009

    Changing to build directory /home/cpeasyapache/ls.src
    Detected php build directory for cPanel /home/cpeasyapache/src/php-5.2.8
    Same source code will be copied over

    Query lastest LSAPI version: 4.9
    php-litespeed-4.9.tgz already downloaded, use the saved copy
    Extracting LSAPI archive: tar -xzf php-litespeed-4.9.tgz
    tar: gzip: Cannot exec: No such file or directory
    tar: Error is not recoverable: exiting now
    tar: Child returned status 2
    tar: Error exit delayed from previous errors
    **ERROR** Could not extract LSAPI archive

    -----


    Please help :)


    Thanks, Tom
  2. mistwang

    mistwang LiteSpeed Staff

    gzip is not available on this server?
  3. BBUK

    BBUK New Member

    Hi,

    Thanks for reply, I'm not too sure if server has Gzip or not? it's an unmanaged VPS, I can ask the providers support and find out.
  4. BBUK

    BBUK New Member

    Hi, they say Gzip would be a standard part of our CentOS installation.
  5. mistwang

    mistwang LiteSpeed Staff

    Maybe your VPS is out of memory when try to build it. So, you may need to stop Apache or other memory hungry processes before start building it.
  6. BBUK

    BBUK New Member

    Hi, thanks for the reply.

    I've tried doing the rebuild php while Litespeed is switched on, and also have tried switching back to Apache but still gives the same message.

    There's a few hundred MB memory spare while trying.. is this enough?
  7. IrPr

    IrPr New Member

    try gzip -V, if command not found returned try yum -y install gzip
  8. BBUK

    BBUK New Member

    root@vps-167 [~]# gzip -V
    -bash: gzip: command not found
    root@vps-167 [~]# yum -y install gzip
    Loading "fastestmirror" plugin
    Loading mirror speeds from cached hostfile
    * base: mirror.bytemark.co.uk
    * updates: mirror.bytemark.co.uk
    * addons: mirror.bytemark.co.uk
    * extras: mirror.bytemark.co.uk
    base 100% |=========================| 1.1 kB 00:00
    updates 100% |=========================| 951 B 00:00
    addons 100% |=========================| 951 B 00:00
    extras 100% |=========================| 1.1 kB 00:00
    Excluding Packages in global exclude list
    Finished
    Setting up Install Process
    Parsing package install arguments
    Package gzip - 1.3.5-10.el5.centos.i386 is already installed.
    Nothing to do
  9. IrPr

    IrPr New Member

    WTF? no gzip on your VPS?

    to find your current path and gzip binary location try:
    Code:
    echo $PATH
    
    whereis gzip
    
    locate gzip
    then post result here

    you may force re-install gzip RPM:
    Code:
    rpm -Uvh http://mirror.centos.org/centos/5/os/i386/CentOS/gzip-1.3.5-10.el5.centos.i386.rpm
    Last edited: Mar 28, 2009
  10. BBUK

    BBUK New Member

    root@vps-167 [~]# echo $PATH whereis gzip
    /usr/local/jdk/bin:/usr/kerberos/sbin:/usr/kerberos/bin:/usr/lib/courier-imap/sbin:/usr/lib/courier-imap/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/bin:/usr/X11R6/bin:/root/bin whereis gzip

    root@vps-167 [~]# echo $PATH locate gzip
    /usr/local/jdk/bin:/usr/kerberos/sbin:/usr/kerberos/bin:/usr/lib/courier-imap/sbin:/usr/lib/courier-imap/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/bin:/usr/X11R6/bin:/root/bin locate gzip


    should I force install?

    thanks for the help.
  11. IrPr

    IrPr New Member

    You should execute commands indivudually, however it seeems no gzip located in your box

    I suggest fore install using RPM
  12. BBUK

    BBUK New Member

    Ah right ok, new to this PuTTY program as well :) learning as I go along kind of thing!

    I've just tried to force install but says the following:


    root@vps-167 [~]# rpm -Uvh http://mirror.centos.org/centos/5/os/i386/CentOS/gzip-1.3.5-10.e15.centos.i386.rpm
    Retrieving http://mirror.centos.org/centos/5/os/i386/CentOS/gzip-1.3.5-10.e15.centos.i386.rpm
    error: skipping http://mirror.centos.org/centos/5/os/i386/CentOS/gzip-1.3.5-10.e15.centos.i386.rpm - transfer failed - Unknown or unexpected error
    warning: u 0x807d380 ctrl 0x807db48 nrefs != 0 (mirror.centos.org http)
    root@vps-167 [~]#
  13. IrPr

    IrPr New Member

    It seems that you typed the link manually
    there is typo there: el5.centos is correct, you typed e15.centos

    Take a look to putty documents: http://the.earth.li/~sgtatham/putty/0.52/htmldoc/Contents.html or Using PuTTY

    Code:
    rpm -Uvh http://mirror.centos.org/centos/5/os/i386/CentOS/gzip-1.3.5-10.el5.centos.i386.rpm
    Last edited: Mar 28, 2009
  14. BBUK

    BBUK New Member

    Woops, I'll give them links a read.

    Before I do this, could it lead to any problems? just want to make sure as our website is live and wouldn't want myself to be the blame for any damage :)

    Thanks!! Tom
  15. BBUK

    BBUK New Member

  16. IrPr

    IrPr New Member

    Try installing from source
    Code:
    cd /usr/src
    wget http://ftp.gnu.org/gnu/gzip/gzip-1.3.9.tar
    tar xf gzip-1.3.9.tar
    cd gzip-1.3.9
    ./configure
    make
    make install
    
  17. mistwang

    mistwang LiteSpeed Staff

    Try a "forced" update with rpm like


    rpm -Uvh --force ...
  18. BBUK

    BBUK New Member

    Hi thanks i managed to install gzip this way and was able to build matching php Binary.

    Only thing is, after the build matching php binary was complete, it said that i should copy over the new php Binary or something, which i don't think went to plan. Now i'm not sure what these commands were as there's no way to go back to it...

Share This Page