4

We currently have a dedicated server with one company that is running apache, php, mysql etc. It currently has whm/cpanel installed. We are migrating to a new server with cpanel/whm. Everything migrated over fine but now one of my sites has some php_flag and php_value lines in the .htaccess file. When I go to the site on this new server I am getting 500 errors that read Invalid command 'php_flag', perhaps misspelled or defined by a module not included in the server configuration.

I am not sure what I need to do to get these to work so any help would be greatly appreciated.

1 Answer 1

10

Putting php_flag etc in .htaccess is only possible when you are using mod_php. With CGI/FCGI, Apache settings cannot be used to configure PHP since it is not running within Apache.

Using CGI, if you need a site with a custom php.ini, the exact details would depend on how exactly you're running the PHP (CGI, mod_fastcgi (with or without php-fpm), mod_fcgid). For basic CGI you will need to create an alternate Action for php files in that site that executes a wrapper script containing something like /usr/bin/php5-cgi -c /some/alternate/php.ini

0

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.