My hosting company just switched my php installation from php module to cgi.

My site broke, badly.

How do I set drupal up to run as cgi?

Comments

cog.rusty’s picture

Normally there should be no difference as far as Drupal is concerned.

But they may have made some change somewhere in the configuration. How exactly did the site break? What do you do and what do you see?

jessicakoh’s picture

I have the same problem, after moving a site to a different host (running php as CGI).

The main page displayed, Internal Server Error

this is the error in the log

invalid command 'php_value', perhaps misspelled or defined by a module not included in the server configuration

cog.rusty’s picture

Just remove (or comment out) all php_value and php_flag lines from your .htaccess file.

If you are on PHP 5, it is most likely that you are OK with the default settings and you didn't need to set those values anyway. If it is Drupal 6, you can take a look at the admin/reports/status page to see if Drupal complains about any of those settings after removing the lines.

If you find out that you need to configure some of those php settings, you can do it in a local copy of the server's php.ini file (see http://drupal.org/node/113220). Some hosts provide an option to do that directly from your cpanel.

-------- Edited to add:

If you have access you your server configuration, to make it possible to use php_value directives in your .htaccess files, check:

http://www.suphp.org/FAQ.html "Can I use the php_value directives in .htaccess files with suPHP?"
http://pecl.php.net/package/htscanner

mm167’s picture

could u tell us the name of your hosting?

let other users award this.

toomanypets’s picture

See 5-Apr-2009 post on http://drupal.org/node/189981. You may need to make a minor change to /includes/common.inc to change the header that is sent with 404's.

See also http://drupal.org/node/175855 (#24).