On Tue, 12 Apr 2005 23:47:24 +0100, "Alistair Baillie SS2002"
<ab******@cis.strath.ac.uk> wrote:
When uploading a file from a form to my server, I get hit by the max file
size exceded error, I have tried setting:
/*** Sets some INI Variables ***/
ini_set("post_max_size", "30M");
ini_set("upload_max_filesize", "30M");
ini_set("memory_limit", -1 );
To bypass them, but this doesn't seem to work,
post_max_size and upload_max_filesize aren't settable at runtime, because
that's too late. The PHP only runs after the file has been uploaded, i.e. it
can't reach the ini_set until the upload_max_filesize has already been
exceeded. See http://uk.php.net/manual/en/ini.php#ini.list which lists where
each can be changed.
memory_limit can be changed, since you can set it before you use up all the
memory.
is there another variable
that I am missing? Its on a local machine so i can modify the ini file
directly, but I would prefer not to, since I need to use it on machine where
I dont have access to these settings?
You can change these either in the global php.ini file, or per-directory under
Apache using .htaccess files.
--
Andy Hassall / <an**@andyh.co.uk> / <http://www.andyh.co.uk>
<http://www.andyhsoftware.co.uk/space> Space: disk usage analysis tool