Page 1 of 2 12 LastLast
Results 1 to 10 of 13
  1. #1
    Join Date
    Jun 2007
    Location
    Eustis, Florida, USA, EARTH
    Posts
    366
    Plugin Contributions
    0

    Default Running PHP as CGI?

    Many hosts are running PHP as cgi. And now my host announced plans to do the same.

    How will this effect me?

    Do I need to do anything special?

  2. #2
    Join Date
    Mar 2004
    Posts
    16,019
    Plugin Contributions
    5

    Default Re: Running PHP as CGI?

    once your host makes the switch you will need to set all folders to 755 ( this means the images folders and all )
    and all files need to go to 644 ( exception are the 2 configure.php files these need to be at 444 )

    thats it

  3. #3
    Join Date
    Jun 2007
    Location
    Eustis, Florida, USA, EARTH
    Posts
    366
    Plugin Contributions
    0

    Default Re: Running PHP as CGI?

    what about httaccess?

  4. #4
    Join Date
    Mar 2004
    Posts
    16,019
    Plugin Contributions
    5

    Default Re: Running PHP as CGI?

    you will need to remove alll php over rides from your htaccess and put them in a php.ini

  5. #5
    Join Date
    Jun 2007
    Location
    Eustis, Florida, USA, EARTH
    Posts
    366
    Plugin Contributions
    0

    Default Re: Running PHP as CGI?

    i.e. ?

    Merry Something

  6. #6
    Join Date
    Mar 2004
    Posts
    16,019
    Plugin Contributions
    5

    Default Re: Running PHP as CGI?

    register_globals on

    this would not be able to be in the htaccess
    would need to go into a custom php.ini

  7. #7
    Join Date
    Oct 2006
    Location
    Alberta, Canada
    Posts
    4,128
    Plugin Contributions
    0

    Default Re: Running PHP as CGI?

    Quote Originally Posted by pixelpadre View Post
    Many hosts are running PHP as cgi. And now my host announced plans to do the same.

    How will this effect me?

    Do I need to do anything special?
    Special, no, but you should verify your site is still functional. Unless your site is static HTML pages then odds are it is going to break if certain things are not done.

    These type upgrades/changes require 4 things regarding Hosting accounts. Three have been mentioned already by Merlin and the 4rth one is 'nobody' files.

    Many popular scripts such as Joomla and Mambo use files with Ownership of 'nobody' and running PHP as CGI does not allow that. As they are not owned by you, the Hosting account Owner, they cannot be changed by you. Only through a special script or by Server 'root' can Ownership be changed.

    In my opinion as a Hoster, it would make no sense to switch PHP to run as CGI without also doing all 4 steps mentioned at the Server level, along with advising all Clients affected of the upcoming change. Leaving it up to the Hosting Clients is not right and is just going to make a lot of people upset; when they find their site no longer works and don't know how to correct. I can only presume your Hoster has advised of when the PHP change will be made and, hopefully, will be doing all necessary changes as well.
    Last edited by Website Rob; 25 Dec 2008 at 08:35 PM.
    The learning is in the doing.

    Potent Products

  8. #8
    Join Date
    Oct 2006
    Location
    Alberta, Canada
    Posts
    4,128
    Plugin Contributions
    0

    Default Re: Running PHP as CGI?

    Example of changes you could make after the PHP change, is with your .htaccess file.

    ## public_html/.htaccess
    php_flag session.use_trans_sid off
    php_value register_globals off


    change to

    ## public_html/php.ini
    session.use_trans_sid = off
    register_globals = off
    The learning is in the doing.

    Potent Products

  9. #9
    Join Date
    Jun 2007
    Location
    Eustis, Florida, USA, EARTH
    Posts
    366
    Plugin Contributions
    0

    Default Re: Running PHP as CGI?

    OK, I did a fresh install. But I have a problem.

    I can login to admin.

    But

    I get 500 error on main page.

    Is there something minor here? Or do I have to do some serious digging.

  10. #10
    Join Date
    Mar 2004
    Posts
    16,019
    Plugin Contributions
    5

    Default Re: Running PHP as CGI?

    if you are getting a 500 error
    1 owner and group are not set rignt ( call host )
    2 you have a folder thats holding a php file in it set above 755 ( fix folder permissions

    3 you have files that are set higher than 644 once again fix the permissions

 

 
Page 1 of 2 12 LastLast

Similar Threads

  1. Running on a Mac
    By Rob905 in forum Templates, Stylesheets, Page Layout
    Replies: 6
    Last Post: 14 Mar 2008, 10:14 PM
  2. Running PHP as CGI
    By hduk in forum General Questions
    Replies: 14
    Last Post: 8 Mar 2008, 09:34 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •