PHP + APACHE configuration

xiaoxiao2021-03-06  42

1. Configure the directory of the extension module: extension_dir = "./ext/" Note: At the end, it will end with "/". 2. Configure the mysql model EXTENSION = php_mysql.dll

Description: PHP runtime configuration: Some initialization parameters running in PHP can be set in the php.ini file. Set the path to the PHP.INI file when compiling. You can also use environment variable phPRC to set up initialization parameters.

Is PHP effective in the parameter in Apache? 1. If PHP is integrated with Apache in a CGI mode, PHP will use the parameters in php.ini. 2. If the PHP is loaded in an APAHCE module, the PHP parameters can be reset in httpd.conf. Such as: If you want to configure, you need to set: httpd.conf and .htaccess parameters: ALLOWOVERRIDE ALL makes permissions complete configuration

php_value include_path ":. / Usr / local / lib / php" php_admin_flag safe_mode on configuration options Description:. Php_value name value Sets the value of the specified directive Can be used only with PHP_INI_ALL and PHP_INI_PERDIR Type Directives. To Clear a Previously Set Value Use none as the value.

Note: don't use php_value to set boolean value. PHP_FLAG (See Below) Should Be Used Instead.

PHP_FLAG Name on | Off Used to Set A Boolean Configuration Directive. can be used Only with php_ini_all and php_ini_perdir type directives.

php_admin_value name value Sets the value of the specified directive. This can not be used in .htaccess files. Any directive type set with php_admin_value can not be overridden by .htaccess or virtualhost directives. To clear a previously set value use none as the value.

php_admin_flag name on | off Used to set a boolean configuration directive This can not be used in .htaccess files Any directive type set with php_admin_flag can not be overridden by .htaccess or virtualhost directives.php apache configuration mode 1. Configure CGI.. , Join in httpd.conf:

Scriptalias / php / "c: / php /" addtype application / x-httpd-php .php # for php 4action application / x-httpd-php "/php/php.exe"# for php 5Action application / x-httpd- PHP "/ php/php-cgi.exe" mode 2. Configure php as a module of Apache, add: # for php 4 do sometying like this: loadModule PHP4_Module "C: / PHP / SAPI / PHP4APACHE2 in httpd.conf:. DLL "AddType Application / X-httpd-php .php # for php 5 Do Something Like this: loadModule PHP5_MODULE" c: / php/php5apache2.dll "AddType Application / X-httpd-php .php

The configuration of httpd.conf needs to be restarted after restarting the server.

转载请注明原文地址:https://www.9cbs.com/read-79090.html

New Post(0)