Custom php.ini file - Joomla! Forum - community, help and support


i read alot global register_off being important security reasons.

i asked host site5.com , directed me information. hope helps.


also, wanted verify me, if added right info

http://tips-scripts.com/?tip=php_ini#tip




- - start script here - -
// put php.ini parameters want change below. 1 per line.
// follow example format $parm[] = "parameter = value";
$parm[] = "register_globals = off";
$parm[] = "session.use_trans_sid = 0";
// full unix path - location of default php.ini file @ host
// can determine location of default file using phpinfo()
$defaultpath = '/usr/local/lib/php.ini'; 
// full unix path - location want custom php.ini file
$custompath = "/home/user/public_html/php.ini"; <-- change "user" mine
$parm[] = "upload_max_filesize = 4m";   <-- added these lines regarding max upload , post max
// user specified max file upload size
$parm[] = "post_max_size = 10m";   
// user specified post max size
// nothing should change below line.
if (file_exists($defaultpath)) {
  $contents = file_get_contents($defaultpath); 
  $contents .= "\n\n; user modified parameters follow\n\n";   
  foreach ($parm $value) $contents .= $value . " \n";
  $handle = fopen($custompath, 'w'); 
  if (fwrite($handle, $contents)) { 
    fclose($handle);
    if (chmod($custompath,0600)) $message = "the php.ini file has been modified , copied";
      else $message = "processing error - php.ini chmod failed";
  } else {
    $message = "processing error - php.ini write failed";
  }
} else {
  $message = "processing error - php.ini file not found";
}
echo $message;
?> 
- - end script here - -

you need check host many (if not majority) of hosts not allow override these settings





Comments

Popular posts from this blog

Convierte tu Raspberry en un NAS. Firmware fvdw-sl 15.3 - Raspberry Pi Forums

How to format a Get Request

avrdude: verification error, first mismatch at byte 0x0000 0x0c != 0x62