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.

Compile PHP 5.4 as a CGI on Centos

Discussion in 'General Discussion' started by deth4uall, Sep 30, 2011.

  1. deth4uall

    deth4uall Well-Known Member

    Joined:
    Sep 30, 2011
    Messages:
    45
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    Austin, Texas, United States
    cPanel Access Level:
    Root Administrator
    I have looked all over and found ways to compile PHP as a cgi/secondary install but no guides show how to compile PHP 5.4 as a cgi to be called in a .htaccess. I want to have a development cgi version of future updates so that I can test my code and make sure it will be supported in future versions.


    Has anyone seen any articles I may have missed or be able to explain how to create a cgi version of PHP on a CentOS 5.6 box with cPanel?


    Thanks!
     
  2. sirdopes

    sirdopes Well-Known Member
    PartnerNOC

    Joined:
    Sep 25, 2007
    Messages:
    141
    Likes Received:
    0
    Trophy Points:
    16
    It is going to be similiar to the post that I made here http://forums.cpanel.net/f5/php-5-2-17-php-5-3-8-not-feature-request-but-request-help-233781.html#post963352

    The difference for using cgi and not through suphp would be adding the following to the apache configuration instead of the suphp configuration file and copying/symlinking the php-cgi binary to /usr/local/cpanel/cgi-sys/php-cgi

    Code:
    AddHandler application/x-httpd-php5 php
    Action application/x-httpd-php5 /cgi-sys/php-cgi
    
    You can also put a wrapper that does an exec on the php-cgi binary instead.
     
  3. deth4uall

    deth4uall Well-Known Member

    Joined:
    Sep 30, 2011
    Messages:
    45
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    Austin, Texas, United States
    cPanel Access Level:
    Root Administrator
    I actually ended up using suPHP after reading that article. Thank you!

    Can I have a mod set this as [solved]?
     
Loading...

Share This Page