If you use linux hosting such as cpanel, you really are not able to update your php.ini settings. This is the best way to use your own php.ini in your hosting. But make sure it not read by public and over the internet.
Edit the .htaccess file and use this code.


 SetEnv PHPRC /home/username/dir/to/php.ini  


You need to create a php.ini file in the directory you have specified (/home/username/dir/to/). You can update this php.ini file such as the original file, and this is an example of security that you can use in the php.ini.

 magic_quotes_gpc = Off  
 magic_quotes_runtime = Off  
 magic_quotes_sybase = Off  
 display_errors = 0  
 expose_php = Off  
 #make sure your error log cannot acces over the internet  
 error_log = /home/username/dir/to/logs/error_log.html  
 zlib.output_compression = on  
 zlib.output_compression_level = 2  
 date.timezone = Asia/Kuala_Lumpur  
 mysql.allow_persistent = Off  
 mysql.max_persistent = 10  
 mysql.connect_timeout = 5  
 php_flag allow_url_fopen = Off  
 allow_url_include = Off  
 register_globals = Off  
 display_startup_errors = off  
 html_errors = off  
 log_errors = on  
 docref_root = 0  
 docref_ext = 0  
 session.name = ©$-£??P?€-2013  
 cache_expire = 30  
 define_syslog_variables = Off  
 #make sure your error log cannot acces over the internet  
 mail.log = /home/username/dir/to/logs/mail.log.html  
 memory_limit = 100M  
 error_reporting = E_ALL & ~E_NOTICE & ~E_STRICT & ~E_DEPRECATED  
 error_reporting = 1080  
 log_errors_max_len = 1024  
 ignore_repeated_errors = Off  
 report_memleaks = On  
 track_errors = On  
 session.cache_expire = 30  
 session.cookie_httponly = On  
16 Nov 2013

0 comments:

Post a Comment

We are not responsible for comments expressed within this site. It is the account holder's personal views and all risks of comments posted his own account owner's responsibility. Comments wisely as it showed your maturity.

:) :)) ;(( :-) =)) ;( ;-( :d :-d @-) :p :o :>) (o) [-( :-? (p) :-s (m) 8-) :-t :-b b-( :-# =p~ $-) (b) (f) x-) (k) (h) (c) cheer
Click to see the code!
To insert emoticon you must added at least one space before the code.

Recent Comments

 
Top