CHAPTER 21 SECURE PHP PROGRAMMING 519 disable_classes (Simple web server)

CHAPTER 21 SECURE PHP PROGRAMMING 519 disable_classes (string) Scope: PHP_INI_SYSTEM; Default value: NULL Given the new functionality offered by PHP s embrace of the object-oriented paradigm, it likely won t be too long before you re using large sets of class libraries. However, there may be certain classes found within these libraries that you d rather not make available. You can prevent the use of these classes with the disable_classes directive. For example, suppose you want to completely disable the use of two classes, named administrator and janitor: disable_classes = “administrator, janitor” Note that the influence exercised by this directive does not depend on the safe_mode directive. doc_root (string) Scope: PHP_INI_SYSTEM; Default value: NULL This directive can be set to a path that specifies the root directory from which PHP files will be served. If the doc_root directive is set to nothing (empty), it is ignored, and the PHP scripts are executed exactly as the URL specifies. If safe mode is enabled and doc_root is not empty, PHP scripts residing outside of this directory will not be executed. max_execution_time (integer) Scope: PHP_INI_ALL; Default value: 30 This directive specifies for how many seconds a script can execute before being terminated. This can be useful to prevent users scripts from consuming too much CPU time. If max_execution_time is set to 0, no time limit will be set. memory_limit (integer) Scope: PHP_INI_ALL; Default value: 8M This directive specifies, in megabytes, how much memory a script can use. Note that you cannot specify this value in terms other than megabytes, and that you must always follow the number with an M. This directive is only applicable if –enable-memory-limit was enabled when you configured PHP. open_basedir (string) Scope: PHP_INI_SYSTEM; Default value: NULL PHP s open_basedir directive can establish a base directory to which all file operations will be restricted, much like Apache s DocumentRoot directive. This prevents users from entering otherwise restricted areas of the server. For example, suppose all Web material is located within the directory /home/www. To prevent users from viewing and potentially manipulating files like /etc/passwd via a few simple PHP commands, consider setting open_basedir like so: open_basedir = “/home/www/”
If you are looking for cheap and quality webhost to host and run your website check Jboss Web Hosting services.

Leave a Reply