While going through a Zend tutorial, I came across the following statement:
Note that the php_flag settings in .htaccess only work if you are using mod_php.
Can someone explain what that means?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
mod_phpmeans PHP, as an Apache module.Basically, when loading
mod_phpas an Apache module, it allows Apache to interpret PHP files (those are interpreted bymod_php).**EDIT :** There are *(at least)* two ways of running PHP, when working with Apache :
mod_php) : the PHP interpreter is then kind of "embedded" inside the Apache process : there is no external PHP process — which means that Apache and PHP can communicate better.And **re-edit, after the comment** : using CGI or `mod_php` is up to you : it’s only a matter of configuration of your webserver.
To know which way is currently used on your server, you can check the output of
phpinfo(): there should be something indicating whether PHP is running viamod_php(ormod_php5), or via CGI.You might also want to take a look at the
php_sapi_name()function : it returns the type of interface between web server and PHP.If you check in your Apache’s configuration files, when using `mod_php`, there should be a `LoadModule` line looking like this :
(The file name, on the right, can be different — on Windows, for example, it should be a
.dll)