Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

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:
    56
    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!
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  2. sirdopes

    sirdopes Well-Known Member
    PartnerNOC

    Joined:
    Sep 25, 2007
    Messages:
    141
    Likes Received:
    0
    Trophy Points:
    66
    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:
    56
    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]?
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
Loading...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice