PHP form - Attach multiple files

Hey,

I´m using this script where I can upload attachments along with the form input.
But! If I attach all 4 attachments, it only attaches 2-3 of them.

Anyone knows what can cause this?

http://pastebin.com/dzgZEq8m

I didn’t look at the code, but maybe you’re hitting a limit in you php.ini

Take a look at your settings and make sure you’re not exceeding them.

max_file_uploads = 600
memory_limit = 200M
post_max_size = 200M

In addition, different browsers have different limits as well.

Hey,

After some researching and testing it seems like there are problems with MS Office documents. (xls, xlsx, docx etc.)
When I upload those I get some random coding at the end of the E-mail, see the example below.

Any clues?

--32392a43c84e7121cb9f33a0bb3098fe Content-Type: application/octet-stream; name="daniel.xls" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="daniel.xls" 0M8R4KGxGuEAAAAAAAAAAAAAAAAAAAAAPgADAP7/CQAGAAAAAAAAAAAAAAABAAAARAAAAAAAAAAA EAAA/v///wAAAAD+////AAAAAEMAAAD///////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////8J CBAAAAYFAGcyzQfZgAEABgYAAOEAAgCwBMEAAgAAAOIAAABcAHAADAAAV2luZG93cyBVc2VyICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIEIAAgCwBGEBAgAAAMABAAA9AQQA AQACAJwAAgARABkAAgAAABIAAgAAABMAAgAAAK8BAgAAALwBAgAAAD0AEgAAAAAAQDjAITgAAAAA AAEA9AFAAAIAAACNAAIAAAAiAAIAAAAOAAIAAQC3AQIAAADaAAIAAAAxABoAyAAAAAgAkAEAAAAA AdAFAUEAUgBJAEEATAAxABoAyAAAAAgAkAEAAAAAAdAFAUEAUgBJAEEATAAxABoAyAAAAAgAkAEA AAAAAdAFAUEAUgBJAEEATAAxABoAyAAAAAgAkAEAAAAAAdAFAUEAUgBJAEEATAAxABoAyAAAAAgA kAEAAAACANAFAUEAcgBpAGEAbAAxAC4AQAEBAAgAvAIAAAABANAPAVQAaQBtAGUAcwAgAE4AZQB3 ACAAUgBvAG0AYQBuADEALgDIAAAACACQAQAAAAEA0A8BVABpAG0AZQBzACAATgBlAHcAIABSAG8A bQBhAG4AMQAuAMgABQAIALwCAAABAQDQDwFUAGkAbQBlAHMAIABOAGUAdwAgAFIAbwBtAGEAbgAx ABoAyAAAAAgAkAEAAAACANAFAUEAcgBpAGEAbAAxABoAyAAAAAgAkAEAAAACANAFAUEAcgBpAGEA bAAxAB4AaAEBAD0AvAIAAAACAKIHAUMAYQBtAGIAcgBpAGEAMQAeACwBAQA9ALwCAAAAAgCiBwFD AGEAbABpAGIAcgBpADEAHgAEAQEAPQC8AgAAAAIAogcBQwBhAGwAaQBiAHIAaQAxAB4A3AABAD0A

bump!

I did some research and couldn’t find an answer for you… I have no idea why that’s happening.

Sponsor our Newsletter | Privacy Policy | Terms of Service