...

View Full Version : Upload script won't exceed 2MB.



zazery
06-10-2005, 08:01 AM
Hello everyone,

I'm fairly new to php and unfortunately I'm really short on time to solve this problem. I created a simple script that will allow my classmates to upload their graduation pictures, however it won't allow people to upload files greater than 2MB. I have created files that are 1.85MB, 2.15MB and 3.5MB and only the 1.8MB file seems to upload.

Here is the error:

Warning: chmod() [function.chmod]: No such file or directory in /home/eric/grad/index.php on line 97

The script (http://grad.qartis.com/script.phps)

I'd appreciate any help I could get.

Thanks,
Eric

delinear
06-10-2005, 11:09 AM
More than likely your server is configured with a max upload size of 2MB, the setting is in the php.ini and is called upload_max_filesize.

You can check it through phpinfo(), it's probably listed under the section heading Configuration PHP Core, look in the directive column for upload_max_filesize and see what it's set to.

delinear
06-10-2005, 11:13 AM
Incidentally, any error related to the upload will be stored in $_FILES['fieldname']['error'] - if it's related to the max size setting in php.ini then the error will be 1 (IIRC, and error 2 if it's a html upload max filesize error). If it comes back 1 then you need to increase the size in the .ini or ask your host if they'll do it for you.

zazery
06-11-2005, 03:48 AM
That was the problem, thanks for the help.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum