Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

#15 wrong max_upload_size

open
nobody
None
5
2007-01-12
2007-01-12
Pascal Nobus
No

in fun_extra.php on line 245
$max = get_cfg_var("upload_max_filesize");

better is
$max = ini_get("upload_max_filesize");

I changed it because one customer was using this program and could not upload because the php.ini-variable was read (2M), and his directory could upload 10M

Discussion

  • "get_cfg_var will not return configuration information set when the PHP was compiled, or read from an Apache configuration file." (from php.net)

    If you are running a virtual-host you often have to put your php-confiugration in a vhost.conf (or similar). This configuration-file is read by the apache. So php.ini will not have this configuration-value - and therefore get_cfg_var will not return the expected value in this environment.