Hi,
I was working with filestore module of drupal version 4.20....and and as suggested by the community i changed a few settings in php.ini and php.conf to increase the upload capacity.....since there was a memory overflow error, i increased the memory_limit to 32M in the php.ini script...
Now if i upload a file say about 1MB the following errors occur...
user error: MySQL server has gone away
query: INSERT INTO filestore (fileauthor, version, homepage, filename, filetype, filesize, filedata, nid) VALUES ('Hash', '1.0', '', 'man.zip', 'application/zip', '959938',
'All the data goes here....... in /var/www/drupal/includes/database.mysql.inc on line 75.
I have no clue wghat it means...........please help me on this....it is very critical as i am piutting up my site in the next 2 days...
should i configure Mysql or something...let me know...
Thanx in advance
Comments
Comment #1
cherylchase commentedI am having the same problem, trying to upload a pdf file that is 860kb. I suspect that it is a size limit, but not sure where/who enforcing it. I have tried the following:
1. Check php.ini (using phpinfo()). Mine says "upload_max_filesize 2097152 2M"
2. Add "LimitRequestBody 2000000" to .htaccess
Neither of these alleviated the problem.
Comment #2
gordon commentedIt is not the size of the file that can be uploaded, it is the size of the SQL statement that is being sent to MySQL which is this problem.
Check out filestore2 which is in cvs for both 4.3 and 4.4
Comment #3
harishkm commentedHi gordon,
Thanx for the interest shown and the suppport.....that really meant something for a newbie like me ...
I downloaded filestore2 ..my drupal version is 4.2. .... when i install the filestore2 module it was alright..when i clicked the files link the following was the error :
user error: You have an error in your SQL syntax near '} n JOIN {filestore2} f WHERE n.status = '1' AND n.nid = f.nid ' at line 1
query: SELECT COUNT(*) FROM {node} n JOIN {filestore2} f WHERE n.status = '1' AND n.nid = f.nid in ./drupal/includes/database.mysql.inc on line 75.
user error: You have an error in your SQL syntax near '} n JOIN {filestore2} f WHERE n.status = '1' AND n.nid = f.nid ORDER BY n.static' at line 1
query: SELECT n.nid, n.type FROM {node} n JOIN {filestore2} f WHERE n.status = '1' AND n.nid = f.nid ORDER BY n.static DESC, n.created DESC LIMIT 0, 30 in ./drupal/includes/database.mysql.inc on line 75.
warning: call_user_func_array() expects first argument, 'pager', to be a valid callback in ./drupal/includes/theme.inc on line 214.
warning: call_user_func_array() expects first argument, 'page', to be a valid callback in ./drupal/includes/theme.inc on line 214.
i modified node module according to the patch provided in the cvs rpository....what should i do now ??
Please guide.......Thank you in advance
Comment #4
harishkm commentedhey gordon,
the problem still exist... my site is up without the filestore ..
Please look into the error..i corrected problems like {node} changed to node .. in sql stmts where i removed the brackets...
but the error still occurs ..please let me know as the module is ctritical to my site....i am using Drupal v4.2.....
Thanx in advance...........
Comment #5
(not verified) commentedHey, folks.
Yes, the problem lies with the SQL server.
Add this line in php.ini under the [mysqld] section:
max_allowed_packet=16M
Also, check this page for more info on that server var:
http://dev.mysql.com/doc/mysql/en/Server_system_variables.html
-Dave
http://www.daveswave.net/
Comment #6
gordon commentedComment #7
gordon commentedI think this is fixed now.
Comment #8
(not verified) commentedComment #9
bwinett commentedJust an FYI:
I found that I had to add
max_allowed_packet=16M
in my.ini in the [mysqld] section, not in php.ini.