I've just had two whole days of the worst nightmare with some strange errors in Drupal. Now, after deleting everything, resetting everything, I finally fingered out what the problem was, and I want to post the solution to ya'll here, preventing you from going through the same dreadful mess I just got dragged through.
I have some huge .zip files containing photos And I couldn't upload these with "mass import" it kept running out of time and/or max size. showing strange behaviour like going into blank screen and whatnot. So I changed the php.ini with something like this:
upload_max_filesize 8000M
post_max_size 8000M
max_execution_time 3600
max_input_time 3600
And I tried to "mass upload" again. At some time in all of this I tried to logout of the "admin" account, and THIS is where the nightmare began. I couldn't log into the "admin" account again?!? It simply just reloaded the login page and counted me in as a guest. I tried every trick I could find including putting some global variable in the index.php and changing code in the user.module, clearing cookies and cache, but nothing happened. The login page just reloads ignoring my valid authentication.
At this point I got more and more desperate. Trying to clear the bad data out of my system I emptied the cache tables directly in the database eventually deleting them and other stuff. So now my system was totally screwed up, and (having only an old backup, sad to say) I had to delete my installation and the database as well.
Now starting from scratch I was VERY surprised to discover that even the first Drupal installation page, the "Database Configuration" also was ignoring everything I put into the form and simply just reloads the page every time with no error reports, not in Drupal, not in Apache, Not in MySQL. Reinstalling MySQL didn't help. Trying to install a completely new site resulted in the same error, so something was rotten in the state of Denmark.
As you might have guessed the problem lay in my changes in the php.ini file. Setting the upload_max_filesize and the post_max_size TOO high cause the mind bending errors mentioned here in my nightmare. Now I've fiddled a little with it and these settings seem to be sound and stable:
upload_max_filesize 4000M
post_max_size 2000M
max_execution_time 3600
max_input_time 3600
Hope I just saved you from a lot of trouble ;o)
Comments
Form Posting problems - solution found!
You just saved me from a lot of trouble ;-)
Posting comment to validate that this is in fact a common reason for forms (anything with a submit button, ie HTTP POST) failing or reloading with no change.
I had the exact same problem. Adjusted post_max_size and upload_max_size in php.ini because of another site on the server.
Thinking I would be smart about it I set both very high (better too high than too low!). Smart bit me in the smart-ass
If you set it too high it must exceed the maximum of that particular data type. It seems to default back to ZERO. That means all HTTP POST operations have NO data in them, which usually means all forms just reload the page. All forms become broken.
I had a feeling this setting caused the problem, but I only noticed the form problem a week after changing the setting, so could not pinpoint which change had caused it.
Reading this article I solved it in 2 minutes, after wasting 1 hour. I could've easily wasted another 10 hours if I hadn't seen it!
Thank you!
THANK YOU! THANK YOU! (Yes,
THANK YOU!
THANK YOU!
(Yes, I'm shouting.)
Don't know how I would have fixed my similar problem without you post. I appreciate your sharing the fix with the community.
Saved me a couple of gray hairs
I want to thank you for your post! This saved me a lot of time of troubleshooting weird errors...and of course some gray hairs too ;)
Thank you! So much! I was
Thank you! So much! I was laboring over this for 2 days.
yess
thanks man, spent hours to find a fix, now it's solved
Post_max_size
Post_max_size did it for me, thank you for confirming my belief that this was the issue. I was trying out different ways until I read this and figured it made sense! :-)
THANK YOU SO MUCH. This was
THANK YOU SO MUCH.
This was exactly the problem that had me stumped for about 5 hours.
Eventually I had to go back and restore the default php.ini file, then start increasing the memory limit.
Anywhere else where upload_max_filesize can be changed?
I have the same problem but the website I'm working on doesn't have a php.ini file. Is there anywhere else where upload_max_filesize might be changed to cause this problem?
There are many places, and
There are many places, and sometimes you can even create the php.ini yourself in your webroot. However it will depend on your server configuration, so you should contact your hosting company on the matter.
Contact me to contract me for D7 -> D10/11 migrations.
Okay, I found it by using the
Okay, I found it by using the command php --ini
But I looked in it and max_execution_time and the others were all reasonable sizes. This thread doesn't seem to have the solution for me.
See if you can find anything
See if you can find anything in your php error logs.
Contact me to contract me for D7 -> D10/11 migrations.
thanks for your reply. I don
thanks for your reply. I don't see any clues, though. there's nothing in the error log.