The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Cant Compile a CGI Binary outside of WHM :-(

Discussion in 'General Discussion' started by meridianblade, Dec 16, 2006.

  1. meridianblade

    meridianblade Member

    Joined:
    Dec 3, 2006
    Messages:
    6
    Likes Received:
    0
    Trophy Points:
    1
    Hey guys!

    Im having some real issues trying to get php to compile outside of Apache Update.

    Maybe you can take a look at my steps and see whats going wrong? I am trying to compile php 4.4.4 as fastCGI but it wont stick:

    Code:
    wget http://us2.php.net/get/php-4.4.4.tar.bz2/from/this/mirror
    tar xjvf php-4.4.4.tar.bz2
    cd php-4.4.4
    
    ./configure --prefix=/usr/local/php4-fcgi --with-xml --enable-bcmath --enable-calendar --with-curl --enable-ftp --with-gd --with-jpeg-dir=/usr/local --with-png-dir=/usr --with-xpm-dir=/usr/X11R6 --enable-magic-quotes --with-mysqli --with-mysql=/usr --enable-discard-path --with-pear --with-pspell --enable-sockets --enable-track-vars --enable-versioning --with-zip --with-zlib --enable-fastcgi --enable-force-cgi-redirect --disable-cli
    
    make
    make install
    /usr/local/php5-fcgi/bin/php -v gives me:

    Code:
    PHP 4.4.3 (cli) (built: Dec 15 2006 22:38:47)
    Copyright (c) 1997-2006 The PHP Group
    Zend Engine v1.3.0, Copyright (c) 1998-2004 Zend Technologies
        with eAccelerator v0.9.3, Copyright (c) 2004-2005 eAccelerator, by eAccelerator
        with Zend Extension Manager v1.0.9, Copyright (c) 2003-2006, by Zend Technologies
        with Zend Optimizer v2.6.2, Copyright (c) 1998-2006, by Zend Technologies
    
    I noticed that it still says PHP 4.4.3 (cli) and not PHP 4.4.3 (fastCGI) but it creates a binary in /usr/local/php4-fcgi/bin. I already have fastCGI setup and ready to go as an apache_mod so I think the issue is me not being able to make my server use that specific fastCGI binary. Please let me know if im completely wrong here. I've just tried to get this to work for about a week now and no ones been able to help me :-(

    Update:
    I changed my config from --prefix=/usr/local/php4-fcgi to --prefix=/usr and ran make / make install and then all my pages returned 500's. So I had to rebuild the site through apache update to fix it.

    Thanks for the help!

    here's my php info file http://www.crgn.net/network/info.php
     
  2. sumith

    sumith Well-Known Member

    Joined:
    May 9, 2005
    Messages:
    96
    Likes Received:
    2
    Trophy Points:
    8
    The phpinfo page shows that the serverAPI is FastCGI . ;)
     
  3. meridianblade

    meridianblade Member

    Joined:
    Dec 3, 2006
    Messages:
    6
    Likes Received:
    0
    Trophy Points:
    1
    Thanks for responding!

    I did get it to compile, but I cant get fastCGI to work with php now, here's what's in my .conf

    Code:
    <IfModule mod_fastcgi.c>
    FastCgiSuExec /usr/local/apache/bin/suexec
    FastCgiIpcDir /tmp/fcgi_ipc/
    FastCgiConfig -autoUpdate -singleThreshold 100 -killInterval 300 -idle-timeout $
    AddHandler fastcgi-script .fcgi
    Action application/x-httpd-php4 "/php.fcgi"
    AddType application/x-httpd-php4 .php
    AddType application/x-httpd-php4 .php4
    AddType application/x-httpd-php4 .php3
    AddType application/x-httpd-php-source .phps
    AddType application/x-httpd-php4 .phtml
    </IfModule>
    
    and in php.fcgi

    Code:
    #!/bin/sh
    PHPRC="/usr/local/Zend/etc/php.ini"
    export PHPRC
    PHP_FCGI_CHILDREN=4
    export PHP_FCGI_CHILDREN
    exec /usr/bin/php
    
    I just don't understand why it's not working, my guess would be something with the Action and AddType not being correct?

    Any help is appricated! im so close to getting this to work! :D
     
Loading...

Share This Page