• Resolved Bloke

    (@bloke)


    This maybe a PHP issue I am not sure. I have a WP plugin that uploads file attachments. If I exceed the memory or file size would it still post the files? I am searching all over in my code to see why it won’t load more than 5 attachments. I have debug turned on and I don’t get any errors. I assumed that if it exceeded the limit, it would not post any attachments and fail. It always posts no more than 5 files.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Is this a plugin you developed? Or one you’re trying to use?

    Thread Starter Bloke

    (@bloke)

    Its one that was developed by someone and I have edited it. I know the classes that upload the files. There are no reference to file upload size etc. No limit to amount of files. I was curious if a query to upload say 10 files but the memory was exceeded wouldn’t it fail completely? It always limits to 5 files.

    Thread Starter Bloke

    (@bloke)

    I got it figured out. I hard coded the number of files and it worked. So then I changed this:

    
    for($i=0; $i<count($_FILES); $i++)
     
    to this:
    
    for($i=0; $i<=count($_FILES); $i++) 
    
Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘PHP and WP memory limits’ is closed to new replies.