Page 1 of 1

php uploads not working at all

Posted: Thu Jan 21, 2016 5:05 pm
by faris
Further to https://www.atomicorp.com/forum/viewtop ... f=1&t=8270
It looks as though uploads of any sort via php are not working.

I just tried uploading a file via wordpress and that ended up 0 bytes too.

There is plenty of space....

Still no errors in any log that I can find.

I'm out of ideas.

php-5.3.29-33.el6.art.x86_64

Re: php uploads not working at all

Posted: Fri Jan 22, 2016 9:25 am
by biggles
Had similar problems, though we managed to upload smaller files, but not larger ones. Not really sure which change finally fixed it, but I think it was a combination of timeout and memory limit for php.

Re: php uploads not working at all

Posted: Fri Jan 22, 2016 9:29 am
by faris
We're currently thinking it may be an issue in the latest php 5.3 itself :-(

I'm rather hoping it is, because otherwise I have no idea.

I will check the timeouts/memory limits etc too of course, but they really haven't changed and still no errors in any logs. I've also tested on tiny files and they become 0 bytes too :-(

Re: php uploads not working at all

Posted: Fri Jan 22, 2016 9:54 am
by scott
Could you upgrade to 5.3.29-35 and let me know if that resolves the problem for you, thanks!

Re: php uploads not working at all

Posted: Fri Jan 22, 2016 10:54 am
by faris
Yes, -35 resolved it. THANK YOU.

I'd be very curious to know the cause - at least if it is explainable to an amateur coder :-)

Re: php uploads not working at all

Posted: Sat Jan 23, 2016 4:09 pm
by scott
It has to do with the way the API's are changing in php from 5.3, to 5.4, to 5.5. As their are not any security fixes for 5.3 or 5.4 any more, you have to look at what has changed in a newer version to address it, and then translate that for the older code. Sometimes entire functions are renamed, or new fields are added (in this case, a function that used 4 fields in 5.3 is now using 5 fields in 5.6 which was the reference, and the function in 5.3 had to be modified to include the security fixes which also changed the function and required more fields in 5.3), other times functions dont exist at all and they have to be written from scratch.

Re: php uploads not working at all

Posted: Wed Jan 27, 2016 10:37 am
by faris
Thanks Scott.