Nov 7, 2011

Configuring PHP = php.ini




The PHP configuration usually done in the file 'php.ini'.
This, according to the server, can be found at: 
./etc/php.ini
./usr/local/Zend/etc/php.ini
./usr/local/admin/conf/php.ini
There are also servers with configurations that allow you to create a configuration file php.ini post
In the case of Plesk on Fedora Core 8.0-2 - (a multidomain server) file / home / httpd / vhosts / dominio.com.ar / conf / vhost.conf is available to change the way that PHP runs exclusively for that domain if you alter the configuration of the others that exist on that server.
Examples: 
<Directory /home/httpd/vhosts/dominio.com.ar/httpdocs>
php_value register_globals off
php_value upload_max_filesize 30M
php_value post_max_size 30M
php_value memory_limit 24M
php_value max_execution_time 10000
php_value max_input_time 10000
php_value register_globals 0
php_value track_vars 1
php_value short_open_tag 1
php_value magic_quotes_gpc 0
php_value magic_quotes_runtime 0
php_value magic_quotes_sybase 0
php_value arg_separator.output "&"
php_value session.cache_expire 200000
php_value session.gc_maxlifetime 200000
php_value session.cookie_lifetime 2000000
php_value session.auto_start 0
php_value session.save_handler user
php_value session.cache_limiter none
php_value allow_call_time_pass_reference On
</Directory>
<Files *.php>
SetOutputFilter PHP
SetInputFilter PHP
LimitRequestBody 30000000
</Files>
For the current PHP configuration, you can create a file containing this data and we can consult with a web browser:
<?php // Show all information, defaults to INFO_ALL phpinfo ();
// Show just the module information.
// phpinfo(8) yields identical results. 
phpinfo ( INFO_MODULES ); ?>
Another way to configure PHP in the file. Htaccess in the root directory of nustro site.
See. Htaccess as www.apache.org
It is understood that ImportNT php.ini settings will be ignored by adding a configuration file. Htaccess
Attention:
In. Htaccess can not be used as PHP_INI_USER certain constants.
Table of constants 
Constante Valor Significado
PHP_INI_USER____1___La entrada puede definirse en scripts de usuario o en el registro de Windows
PHP_INI_PERDIR__2___La entrada puede definirse en php.ini, .htaccess o httpd.conf
PHP_INI_SYSTEM__4___La entrada puede definirse en php.ini o httpd.conf
PHP_INI_ALL_____7___La entrada puede definirse en cualquier parte
To configure PHP. Htaccess is recommended: php_flag
Examples: 
php_flag register_globals off
php_flag magic_quotes_gpc on
For more information, visit:
Php.ini directives: http://www.php.net/manual/es/ini.php
PHP as es.wikipedia.org :
Official site of PHP: http://www.php.net/
How to change PHP settings according to www.php.net

0 comments:

Post a Comment

Twitter Delicious Facebook Digg Stumbleupon Favorites More

 
Design by Free WordPress Themes | Bloggerized by Lasantha - Premium Blogger Themes | Premium Wordpress Themes