AddHandler principally tells Apache to invoke a PHP handler for.php files. There are several ways of doing that, hence several variations in the syntax. The functionality and the syntax has also varied between Apache 1.3, 2.2 and 2.4.
Is it possible to use PHP instead of php5-script for addhandler?
ANOTHER EDIT: Seems like there was a typo the first time with me setting php instead of .php for AddHandler php5-script .php. But also, try this instead using application/x-httpd-php5 instead of php5-script:
How do I implement handler features in the Apache API?
In order to implement the handler features, an addition has been made to the Apache API that you may wish to make use of. Specifically, a new record has been added to the request_rec structure:
How to serve up a PHP page on an Apache server?
First of all there appear to be different ways to serve up PHP pages (I assume PHP5 for sake of this post) on an Apache server, the biggest two being to A) use the Apache PHP module (on RHEL/CentOS: “LoadModule php5_module /usr/lib64/httpd/modules/libphp5.so”) or B) tell Apache to associate PHP with CGI/make it’s handler CGI.
What happened to Apache 2 handler SAPI in PHP 8?
The Apache 2 Handler SAPI in PHP 8.0 is renamed, and can affect when PHP is used as an Apache module. It is recommended to use PHP-FPM with Apache mod_event MPM. However, PHP 8.0 still supports the Apache 2 Handler SAPI, which is integrated with Apache 2 web server as an Apache module. Module identifier renamed to php_module
What is the difference between addaddtype and addhandler in PHP?
AddType principally adds a content type header to the HTML page that is output. AddHandler principally tells Apache to invoke a PHP handler for .php files.
How to load the PHP module for Apache 2?
To load the PHP module for Apache 2.x, the following lines in the Apache httpd.conf configuration file must be inserted: # before PHP 8.0.0 the name of the module was php7_module LoadModule php_module “c:/php/php8apache2_4.dll” SetHandler application/x-httpd-php # configure the path to php.ini PHPIniDir “C:/php”