Jump to content

Upload file fails if over 128KB yet php.ini looks right


alan
 Share

Recommended Posts

I am trying to use the Admin i/f to upload a .PDF (or .DOC) and it seems I can as long as the file is 128KB or less.

I have edited php.ini for a website and now phpinfo(); reports:

post_max_size = 32M

upload_max_filesize = 24M

max_execution_time = 60

max_input_time = 60

memory_limit = 128M

I tried uploading files of gradually decreasing size and it worked for one that was 127KB but failed for one that was 132KB (and for all those larger) — the upload bar moves as expected to 100% but then does not prompt for a file description and when saving the page the file is no longer seen.

I am running PW 2.2.2.1.

Any ideas anyone pretty please?

Link to comment
Share on other sites

The answer to this may help others, I hope.

It is not ProcessWire (I didn't think it was but I was hopeful someone else might have had some related knowledge that might have helped hence bothering you guys here). I had already spoken to the hoster in this case to work out which php.ini file was to be edited.

The answer is interesting and easy: as I was running a website with FastCGI the php.ini file just above the httpdocs location was the one to edit, not the overall one often found in /etc/php.ini. All good, I edited it. But the problem remained.

So a call to (mt), the hosters for this site, and they quickly found and fixed a one-time file that stops FastCGI working with files greater than 128KB. They upped the limit for this file to 1GB and so now this site and any others that use FastCGI will practically be controlled by the settings in their php.ini files.

Result: all is working beautifully :D

I hope this is helpful to someone else and thanks again PW people for this superb product. Cheers, -Alan

  • Like 4
Link to comment
Share on other sites

  • 1 month later...

My understanding is you need PHP (of course) and it can be run as/via CGI but this is not good (slow and other issues I think) or PHP can be run as FastCGI module which is AOK or as an Apache module, also AOK.

So I think you are correct.

I am not an expert at PHP/Apache so apologies if I am in error here.

Edited by alan
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...