Web hosting comparison - 561Chapter 30Configuration–with-exec-dir[=DIR] Another compile-time option relating to safe

561Chapter 30Configuration–with-exec-dir[=DIR] Another compile-time option relating to safe mode is –with-exec-dir. This option sets thedefault safe-mode execution directory to /usr/local/bin, but that can be changed with thesafe_mode_execdirective in php.ini. Remember you can only run programs from this singledirectory under safe mode. –enable-discard-pathIf you d like to place the CGI version of PHP outside the Web tree and call it as you would aPerl CGI script (such as with #!/usr/local/bin/phpas the first line of each script), youneed to specify this compile-time flag. You must also make all PHP CGI scripts executable. –enable-force-cgi-redirectThis flag is a security must for the CGI module. It prevents browser users from calling CGI-binfiles directly, thereby bypassing Apache security settings. This is an Apache-specific configu- ration directive; don t bother trying to enable it if you are running on a different Web serveror as a standalone binary. Apache configuration filesIf PHP is used with Apache as a module or with CGI, much of PHP s basic file-serving capabilityis determined by Apache s configuration files. The main ones from recent versions of ApacheServer are the httpd.conffile for global settings, and the .htaccessfile for per-directoryaccess settings. Older versions of Apache split up httpd.confinto three files (access.conf, httpd.conf, and srm.conf), and some users still prefer this arrangement. In PHP3, there were specific Apache configuration directives that could substitute for almostevery php.inisetting. For example, instead of setting Engine=Onin the first substantiveline of php.ini, you could put php3_engine onin an .htaccessfile for a similar effect. Asthe number of PHP configuration directives increased, however, people decided that too manyflags were cluttering up Apache s namespace. The naming scheme has been generalized, there- fore, to encompass these four basic, configurable directives: .php_value name value: Sets value of variable. .php_flag name on|off: Sets Boolean. .php_admin_value name value: Sets value of variable. Can only be used in mainApache configuration file(s) rather than .htaccess. .php_admin_flag name on|off:Sets Boolean. Can be used only in main Apache configuration file(s) rather than .htaccess. An example would be magic quotes for GET, POST, and COOKIEvariables. You can use php_flagwith the name of the variable, like this: php_flag magic_quotes_gpc offIf this is all too confusing, don t worry: The new-style Apache configuration directive namingonly applies to settings you can change in php.inianyway. Apache server has a very powerful, but slightly complex, configuration system of its own. Learn more about it at the Apache Web site: www.apache.org/. The following headings describe settings in httpd.confthat affect PHP directly and cannotbe set elsewhere.
Note: If you are looking for cheap webhost to host and run your apache application check Vision jboss web hosting services

Leave a Reply