Closed (fixed)
Project:
FileField
Version:
5.x-2.2
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
2 Oct 2007 at 21:02 UTC
Updated:
25 Sep 2008 at 22:58 UTC
Jump to comment: Most recent file
Hi, I just upgraded to 2.2 and am getting the following error when I try to upload a file:
user warning: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'FROM content_ WHERE vid = 0 LIMIT 0, 1' at line 1 query: SELECT FROM content_ WHERE vid = 0 LIMIT 0, 1 in /var/www/html/esage/dpl1/includes/database.mysqli.inc on line 151.
Please advise.
| Comment | File | Size | Author |
|---|---|---|---|
| #4 | backtrace_1.txt | 20.37 KB | mtndan |
Comments
Comment #1
jpetso commentedI notice a slight similarity to this recent issue. Any chance that the file you want to upload is large, and probably larger than your 'post_max_size' PHP setting? Sounds like a duplicate to me.
Comment #2
mtndan commentedUnfortunately I don't think that's the prob. The file is just 1 mb, and my post max is set to 20M
Comment #3
jpetso commentedWell then you need to track it down for me. In particular, I would be interested in what the $_POST variable contains when filefield_js() is called, and if it's not empty, I need a backtrace (which is easy to do with Devel module).
Comment #4
mtndan commentedHere's the backtrace attached - I'm not sure how to get the other info you requested - can you let me know? Thanks
Comment #5
mtndan commentedHi, just wondering if anyone can help with this. Thanks in advance.
Comment #6
jpetso commentedOh right, sorry. What you could do is insert this line:
as first line of the filefield_js() function (at the bottom of filefield.module), and try to upload a file that doesn't work as described.
That should hopefully produce some meaningful output and tell why uploading didn't work out.
Comment #7
vascopedro commentedI have the same issue, when uploading a file I get
user warning: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'FROM content_ WHERE vid = 0 LIMIT 0, 1' at line 1 query: SELECT FROM content_ WHERE vid = 0 LIMIT 0, 1 in /home/papsonli/public_html/includes/database.mysql.inc on line 172.
I am trying to upload a txt file with 1k size, so it's not the size limit. I have double checked the permissions on user uploading files. I have searched for hours and I just can't figure it out.
Please HELP!!!!
Cheers,
Vasco
Comment #8
vm commenteddid you do what comment #6 asks of someone having this error ? doing so will help diagnose the problem so it can be fixed
Comment #9
vascopedro commentedI got this when looking at a page that uses the module:
Parse error: parse error, unexpected '<' in /home/papsonli/public_html/modules/filefield/filefield/filefield.module on line 793
I don't have the devel module installed, I looked at it and there is a note that it might brake everything, is it needed?
Sorry, drupal newbie.
Vasco
Comment #10
vascopedro commentedGot it! previously was just some dumb error, here is the result
POST: Array
(
[user_cv_node_form] => Array
(
[cck_filefield_field_usercv_op] => Upload
[nid] =>
[vid] =>
[type] => user_cv
[changed] =>
[field_usercv-attach-url] => http://papsonline.org/?q=filefield/js
[log] =>
[menu] => Array
(
[title] =>
[description] =>
[pid] => 1
[path] =>
[weight] => 0
[mid] => 0
[type] => 86
)
[comment] => 0
[status] => 1
)
[form_token] => 3d568a5a78455e651f19eb714b0c161d
[form_id] => user_edit
)
Does this help?
Vasco
Comment #11
jpetso commentedThank you, this is great! Of course, it doesn't really help to find out *why* the node (including the especially important "nid") is not in the $_POST variable, but it does help writing a workaround for getting rid of at least those ugly error messages. If anyone finds out why the nid is not passed, I'd be forever grateful.
Comment #12
vascopedro commentedI don't know if it helps, but I can upload fine if go to create content -> resume, but if I go to My Account -> create Resume, I get the error. I hope it helps, I could really use this module.
Thanks,
Vasco
Comment #13
gladideg commentedI have the same issue. On the sixth file I try to upload, the total size of the node goes from 29mb to 34mb. Then this error occurs and files are deleted.
SUbscribing.
Comment #14
dopry commentedAre there any errors in your webserver logs or watchdog after these upload issue. This has failed ajax upload post written all over it... What modules do you have enabled on the sites? what is you post_max_size and max_upload_size set to?
Comment #15
ohnemax commentedI had the same issue, it donesn't come up anymore after changing both post_max_size and max_upload_size to 24M (at least bigger than the biggest file I wanted to upload...)
Comment #16
dopry commentedDoes this happen if you use the 5.x-2.x dev release?
Comment #17
dopry commentedclose for inactivity... and this is a support request.. It works fine with a properly configured web server... Check you php.ini for post_max_size and max_upload_size.
Comment #18
avoine commentedWe have the same problem here we are not able to upload with filefield and normal drupal upload and we have:
php version 5.2.0-8+etch11
drupal 5.10
File Field 5.x-2.3
JQuery Update 5.x-1.0
and the upload work fine with the javascript off
Comment #19
huizache commentedComment #20
dopry commented@all: do not reopen closed issues. open your own issue describing your problem.