Is PHP a CGI or Apache module?

PHP runs as a cgi at Fast-name – this is because it is more secure than running it as an Apache module (if it runs as an Apache module PHP runs as the same user with the same rights as Apache).

This means that php_value directives in .htaccess files will not work - however we do allow local php.ini (or php4.ini for php4) files - these are plain text files that allow php.ini directives to control PHP for scripts in the directory where the file is placed, and its subdirectories.

Additionally, .htaccess directives such as AddHandler .php x-httpd-php will break your PHP scripts.

  • 70 Users Found This Useful
Was this answer helpful?

Related Articles

How do I set permissions on files and scripts?

Doing a CHMOD (changing a file's permissions) is the setting of access privileges for a file....

What is the path to perl?

/usr/bin/perlYou can also find information on paths to other useful programs by logging in to...

How do I query a MySQL database from a PHP script?

Use the following outline to connect and begin querying the MySQL server from within your PHP...

What are the correct file permissions for a PHP file?

As a general rule, the permissions of a PHP file should take one of two sets of values, either...

I have created an include file that contains a username and password for a database. How do I prevent people from accessing that file directly?

Protecting PHP IncludesIn order to create a PHP file that is inaccessible from the WWW, please...

Powered by WHMCompleteSolution