Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    New to the CF scene
    Join Date
    Jun 2005
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Upload script won't exceed 2MB.

    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:
    Code:
    Warning: chmod() [function.chmod]: No such file or directory in /home/eric/grad/index.php on line 97
    The script

    I'd appreciate any help I could get.

    Thanks,
    Eric

  • #2
    Regular Coder
    Join Date
    Feb 2005
    Location
    West Midlands, UK
    Posts
    623
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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.

  • #3
    Regular Coder
    Join Date
    Feb 2005
    Location
    West Midlands, UK
    Posts
    623
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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.

  • #4
    New to the CF scene
    Join Date
    Jun 2005
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts
    That was the problem, thanks for the help.
    Last edited by zazery; 06-11-2005 at 02:54 AM.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •