So,
I am kind-a frustrated. pffff (breathe slowly)

I am a noob in drupal. I've created a website, everything works fine until i get this message

Warning: MySQL server has gone away query: INSERT INTO watchdog (uid, type, message, variables, severity, link, location, referer, hostname, timestamp) VALUES (1, 'php', '%message in %file on line %line.', 'a:4:{s:6:\"%error\";s:12:\"user warning\";s:8:\"%message\";s:859111:\"MySQL server has gone away\nquery: UPDATE cache_update SET data = 'a:28:{s:10:\\"admin_menu\\";a:10:{s:5:\\"title\\";s:19:\\"Administration menu\\";s:10:\\"short_name\\";s:10:\\"admin_menu\\";s:10:\\"dc:creator\\";s:3:\\"sun\\";s:11:\\"api_version\\";s:3:\\"6.x\\";s:17:\\"recommended_major\\";s:1:\\"1\\";s:16:\\"supported_majors\\";s:3:\\"1,3\\";s:13:\\"default_major\\";s:1:\\"1\\";s:14:\\"pro in /public_html/includes/database.mysqli.inc on line 134

I read that I have to increase the upload size in the php.ini but that kind of file does not exist on my server (000webhost).I can't get to the admin settings as well because I get the same error (I can't access anything in the Admin directory at all because of this error).

I was getting also watchdog messages also and I could not run cron. I am absolutely confused what to do. I was reading that I could edit the .htaccess but when I search I get 3 files and I don't know which one I have to edit.

All in all I am very frustrated right now because nobody explains in detail and just throws the documentation in your face that contains language that could be understood only by the drupal veterans.

Please have mercy and explain it like to a retard what to do and fix the issue.
PLEASE

Comments

Ayesh’s picture

By .htaccess, it refers to the .htaccess file at the root of your Drupal installation.

Create a php file with following in it.

 phpinfo();

And save it as info.php and open it on your broswer.
Now, find the places of used php.ini file(s) and try to find out which parameter is causing the problem(usually mysql max packet size).

In most hosts, creating a new php.ini file in the root of the public_html folder works. So give it a try(you can find which directories are scanned as well).
You can find out php.ini syntax just by Googling or at php.net. If you could find the setting that causes the problem, "memory_limit" for example,

[PHP]
memory_limit = 128M

does the trick. However, be careful about data type when eldoing this. Some settings are expecting Boolean values.

legioner’s picture

I already had the php.ini in there. I've just set it to 128 as suggested but it did not work.

After doing the info.php the only thing I get about the php.ini is

Configuration File (php.ini) Path /usr/local/lib
Loaded Configuration File /usr/local/lib/php.ini

I've no idea what I have to do next.

I get multiple errors per page should I upload the rest?

legioner’s picture

It turned out to be the update module.

I followed the instructions:

1. log in into your host account
2. locate and click on phpmyadmin
3. click on system on the left hand side
4. back on the top in the right window on the left side click Browse
5. find the update module and click the pencil
6. in the status field on the right side change the value from 1 to 0
7. press go on the bottom to save the changes.

now... lets deal with all those cron and memory issues...

thanks to #1 for the help

thegraphicalsense’s picture

This is very helpful! thanks

smartsystems160’s picture

Thanks. Had this same issue with an installation profile. This helped me! the update module was the culprit

paultrotter50’s picture

This steps about do seems to work, but at a cost. Usually you can go to admin/reports/updates page to receive information about the modules that need to be updated. The steps above disables this functionality, so it seems to be a compromise rather than a fix.