Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Thanks for the module, from what I've seen so far it looks very promising. I have had problems uploading photos though. I have been getting this error:
An HTTP error 0 occurred.
/node_gallery/upload/js
Any help would be appreciated.
Comment | File | Size | Author |
---|---|---|---|
#22 | DSC_0163.NEF_.jpg | 394.58 KB | Anjaro |
Comments
Comment #1
IRoar CreditAttribution: IRoar commentedOk, so I have been able to prevent the above error from appearing by adjusting the file upload settings to reduce file sizes. Now, however, when I try to upload 5 images at a time I get this error:
Validation error, please try again. If this error persists, please contact the site administrator.
I suspect that this is also a file size related issue, since I do not get this error when uploading 4 files. So I am wondering if anyone else is having this problem, and if so if there are any solutions?
Comment #2
wilson98 CreditAttribution: wilson98 commentedit should be the file upload limitation issue. you can ajust it in the page "admin/settings/uploads".
Comment #3
droolpal CreditAttribution: droolpal commentedversion: alpha3
I also get a "Validation error, please try again. If this error persists, please contact the site administrator." error when trying to upload an image. I have the File upload settings set properly (I think). Size 5000x5000 @ 2MB, more than enough. I'm trying to upload a 1700x1200 @ 650kb single file and it continues to give me a validation error. What have I missed?
**Update:
I still get the validation error, but the images have been uploaded to the directory as I have configured.
Comment #4
kmontyI suspect this is a file upload limitation as well. Make sure your settings are not trumped by your limits set in php.ini Also, make sure that settings per user role are not smaller than your general settings.
Comment #5
kmontyIf anyone is still having this problem, please let us know.
Comment #6
der_tisch CreditAttribution: der_tisch commentedWhen logged in as administrator I get the above mentioned error (An HTTP error 0 occurred. /node_gallery/upload/js), too.
When logged in as authenticated user it does not appear and the image upload works.
Comment #7
asb CreditAttribution: asb commentedI can upload images, they display at a path like /node/1867/upload?destination=node/1867, but I keep getting an "You must upload an image" error when clicking on "submit".
Greetings, -asb
Comment #8
t4him CreditAttribution: t4him commentedI get this error with alpha6
Validation error, please try again. If this error persists, please contact the site administrator.
Comment #9
kmontyEnough people have reported this issue that I highly doubt it is a file-size issue anymore. I'll look into this ASAP.
Comment #10
kmontyI really do not have enough information to go off on. I have been testing and have only been able to get errors if I am operating in off-line mode (but that is such a minor issue it is not at the top of my list).
Can people give me more details about their server/file upload settings? Is anyone's site in maintenance mode (off-line)? Are people able to attach files to other nodes (using File Attachment?) Can people tell me what kind of files they are trying to upload (file size and extension?) Can people see if it works using a very simple (small) image?
Comment #11
VasilyKraev CreditAttribution: VasilyKraev commentedProblem was in upload_tmp_dir. I create /Applications/MAMP/tmp/php (default in MAMP php5.ini-template), chmod to 777, and all is ok. ;)
May be better use Drupal temporary directory for temp files?
Comment #12
kmontyThe module is using the Drupal temp directory (as the uploads go through upload.module). Maybe you had this incorrectly configured?
Comment #13
SunSt0rm09 CreditAttribution: SunSt0rm09 commentedValidation error, please try again. If this error persists, please contact the site administrator. This is the error I get after trying to upload an image... I have narrowed it down to a size issue. i got a small image under 2kb to upload but I don't have access to php.ini.
Comment #14
kmonty@SunSt0rm09 - Can you tell me what your file upload settings are on admin/settings/uploads ? Also, you can increase the maximum upload size in settings.php or .htaccess - http://drupal.org/node/422474
Comment #15
greenf-1 CreditAttribution: greenf-1 commentedI get this error with node_gallery-6.x-1.0-alpha8. In my case it depends on the browser that I use. The error appears only in Opera, but in Mozilla Firefox uploads work fine.
Comment #16
kmonty@greenf - Did you check the known issues on the project page? Do you fit into any of those categories? If not, can you please tell me what version of Drupal 6.x are you using and what your file upload settings are?
Comment #17
greenf-1 CreditAttribution: greenf-1 commentedOf course I have checked. But as I experienced the problem of "/node_gallery/upload/js" alerts depends on a browser, not on the size of uploading files or some other settings. My Drupal version is 6.10.
As I said when I use Firefox on Linux uploads work successfully. But trying to upload the same file with Opera 9.25 and 9.64 on Linux I get a javascript alert:
An HTTP error 0 occurred.
/node_gallery/upload/js
It would be logical to suppose that the cause of the problem is somewhere in javascripts.
My workaround was to downgrade jquery.form.js to version 2.18 (the version that comes with Drupal 6.10 is 2.21). After I replaced jquery.form.js with older version the problem was solved.
Comment #18
kmonty@greenf - Thanks for the solid debugging work! I have a few questions. First, the version of jquery.form.js that ships with Drupal 6.11 is version 2.01, where did you get the 2.21 file? http://cvs.drupal.org/viewvc.py/drupal/drupal/misc/jquery.form.js?revisi...
Second, can you try and update to the latest version of jquery.form.js (2.25) and see if it solves the problem? http://malsup.com/jquery/form/#download If that does, I'll try and update the jQuery Forum Update module and make it required by Node Gallery. Thanks!
Comment #19
greenf-1 CreditAttribution: greenf-1 commentedYou are right. Of course Drupal 6.10 ships with jquery.form.js 2.01.
In my experiments with jquery scripts I installed jquery_update-6.x-2.x-dev module that comes with jquery.form.js 2.21, that is why I made a mistake. But now I found out that my assumption that the cause of this problem is in jquery.form.js was false.
My last experiment was to return back to original version of jquery.form.js (2.01) and completely remove /home/myuser/.opera directory that stores browser's cached data and some local user settings. This solved the problem, upload works fine in Opera on Linux.
Comment #20
Anjaro CreditAttribution: Anjaro commentedHi thanks for a great module.
I also had the validation error.
I was confused by this and tried a lot of settings and so on.
Finally i got it working, and mabye it can solve the problem with other users too.
I see that others had the same problem, first the validation error, the file is uploaded to server, but not showing.
I get the error if one or more files have a filename like this : DSC_0163.NEF.jpg
But if i remove the . in the filname like this : DSC_0163 NEF.jpg it works perfectly.
Mabye it can be corrected to allow this or mabye a small note on the upload page can be a help for users who dont think about this ?
Thanks and sorry for the bad English.
Comment #21
kmonty@butte Thanks for the tip. I just tried uploading some images with periods in the middle and had no issues. Can you tell me which version of Drupal and Node Gallery you are using? Also, can you attach the image you specifically were attempting to upload here so I can use it to test.
Comment #22
Anjaro CreditAttribution: Anjaro commentedYes offcource.
Drupal 6.12
Node gallery 6.x-1.0-alpha8
And an attach image that if i have the . then will not work.
Thanks.
Comment #23
Anjaro CreditAttribution: Anjaro commentedWait just a minute....
I just noticed, that if i attach the file DSC_0163.NEF.jpg here its renamed to DSC_0163.NEF_.jpg
The same happen on my site in when uploading with node gallery.
Ok fine.
So the file DSC_0163.NEF.jpg i can not use with node gallery. But if i download this same file again that i just attached with the name DSC_0163.NEF_.jpg i can use it with node gallery :)
I hope you understand what im saying.
I have trouble to wrap my head around this myself :)
Comment #24
Anjaro CreditAttribution: Anjaro commentedAlso note that if you play with this module in offline mode you will get this error, with every picture you try to upload.
Well thats what is happening on my site, i gather it will be the same with everyone else.
So if you are building up a site and have it in offline mode, and you encounter this problem, then try to put it in online mode and test if this eliminate the error.
Thanks
Comment #25
Tally CreditAttribution: Tally commentedI, too, get the error:
An HTTP error 0 occurred.
/node_gallery/upload/js
I am running drupal 6.12 and the June 10 developer version of Node Gallery. I am using ImageMagick and GD toolkit. My Gallery Relationship is set for max resolution of 1600x1200 and file size of 1.2MB.
Using the Upload Images page I note the following when I try to upload a single image into an empty gallery:
My original pic is 2576x1932 and 1.6MB. I get the above error.
I shrink the pic to 2138x1604 and 898kB. I get the above error.
I shrink the pic to 1803x1352 and 664kB. Pic uploads fine and resolution is adjusted to max.
I rename the files to something simple, like "side.jpg" and no difference is noted.
I change ImageAPI to GD2, no difference noted.
If I increase the allowable file size in the Gallery Relationship, no difference is noted.
If I remove the resolution requirement (with a larger allowable file size) and put 0 in the Gallery Relationship "Maximum resolution for uploaded images:" field, I can upload all files without the above error.
Comment #26
kmontyThis is a known issue with the devel module.
If you are still having this issue, you might want to ask devel to fix whatever the issue is. Or uninstall the module.
Comment #27
Tally CreditAttribution: Tally commented@kmonty: This is a known issue with the devel module.
If you are still having this issue, you might want to ask devel to fix whatever the issue is. Or uninstall the module.
I am not running nor have I ever run the devel module. Issue here points to devel and CCK Filefield for this error code. I had CCK installed, but it has since been uninstalled. The below test was made without CCK.
I am running the Jul 1 dev version of Node Gallery. I just set My Gallery Relationship for max resolution of 1600x1200 and file size of 2MB. I get the error:
An HTTP error 0 occurred.
/node_gallery/upload/js
when I try to upload a picture with a resolution of 2576x1932 and filesize of 1.6MB. If I remove the max resolution from the relationship, the same file uploads fine.
Unfortunately, I don't know enough about what is happening after the Submit Files button is clicked to figure out why the error occurs. I click the Submit Files button, the Ajax style bar appears, after a time about equal to the image upload time, a Windows dialog appears with the above error message (actually, it is a Windows caution message because it has the yellow triangle with the exclamation point inside). I click OK on the dialog and I am back at the Upload Images page.
. . . More investigation turned up this thread: File upload for Page Attachment giving error.
I checked my server logs and it had this error:
[10-Jul-2009 16:08:51] PHP Fatal error: Out of memory (allocated 41943040) (tried to allocate 6400 bytes) in /home/tally/public_html/SubDomain.tally/includes/image.gd.inc on line 95
The image.gd.inc file is calling imagecreatetruecolor(), which is a php GD2 library function.
This error, which plagues users throughout Drupal, is apparently a php memory limit issue. But the error log message is confusing because I have 64MB php memory allocated, 42MB used, and an out of memory error on a request for 6kB.
This does not appear to be a Node Gallery issue unless Node Gallery is using too much memory for other operations and has not done its housekeeping to release sufficient memory for this function to operate. But, it is not only a Devel module issue either. Instead, it seems to be a larger Drupal issue.
Regardless, the only solution seems to be to increase the php memory limit. Unfortunately, that is not an option for me on my shared host.
Comment #28
kmontyComment #29
illSleepWheniDie CreditAttribution: illSleepWheniDie commentedHi guys,
I had the same
"An HTTP error 0 occurred.
/node_gallery/upload/js"
error. I quadruple checked node-gallery, file paths, upload module, permissions, image cache settings. Then I changed "php file upload limit" and "php post upload" limit, and also apc "file upload limit" settings and had no luck..
so I went down to nginx and tried these in the config ...
I put them in the html{} block.
Voila! It worked again.
So I recommend working down from web layer -> drupal layer -> php layer -> server layer when troubleshooting ...
Hope this helps :)
Cheers
Alex
So
Comment #30
kmontyThanks for the report! This might be a good topic for the documentation.
Comment #31
dbeall CreditAttribution: dbeall commentedThis is 1 issue that should be in handbook with 3 possible solutions?
FAQ: Upload does not work if max resolution is set and insufficient PHP memory.
Issue Que: /node/330444 ; this thread
1. This is a nginx limits issue? yes?
2. Add reference to the page http://drupal.org/node/422474 ;about using htaccess and settings.php to fix php memory limit.
Note: I always up php.ini limits upon installing Drupal.(I guess some people have no access to php.ini)
3. and this has to do with version of jquery as well, jquery.form.js 2.01 (or) jquery.form.js 2.21?
Which one is recommended? jquery.form.js 2.21
Please comment, set me straight.
This was edited, sorry, my words were mixed up.
Comment #32
Tally CreditAttribution: Tally commented@dbeal:
1. #29 is a fix specific to nginix. It does not help the multitude using Apache.
2. page http://drupal.org/node/422474 relates to Increase Maximum File Size and does not have info on increasing php memory. See post #27 above.
Many using shared hosting cannot adjust their php memory allocation because the hosting service locks the memory_limit setting.
3. From my searching, I do not think jQuery has anything to do with this. It seems to be a problem of not enough php memory allocated on the server.
Comment #33
dbeall CreditAttribution: dbeall commentedI looked at node/422474 page, it has a few tips about using htaccess and creating a local php.ini file, although I have never tried them.
Would any of this info be helpful to people using node_gallery.
My question is due to comment #30 by Kmonty.
Is there something here that needs to be in documentation?
Comment #34
Tally CreditAttribution: Tally commentedThese settings discussed in http://drupal.org/node/422474 are useful if you want to increase the maximum upload filesize limits because they are too small. That is, if you are getting errors or failing to upload files because the filesize is greater than the limits, you increase the limits. The referenced page does not address php memory allocation.
The danger in using these settings to prevent uploading files that are too large is that the abstraction level is too high and there is no programmatic handling of files that exceed the limits. Another danger is that using such settings (as in #33) will not allow uploading video files, which are typically much larger than images.
The settings in #33 are for setting maximum filesize and have nothing to do with memory allocation for php. The settings in #29 are for buffer size (or memory allocation), which is different than filesize. But, #29 does not apply to Apache.
The problem raised by the original poster is an http error caused by an out of memory condition on the server because the php graphics routines require too much server memory for certain operations. To prevent the routines from running out of memory, more server memory must be allocated. #33 provides for allocating more memory for nginix. For Apache, php memory_limit must be set at an appropriate value. Unfortunately, that parameter is not always settable on a shared hosting plan.
Comment #35
UdarEC CreditAttribution: UdarEC commentedI had the same error, but when I turned off Devel module, the error was gone. I`m happy now)
Comment #36
nleo CreditAttribution: nleo commentedSame error in Opera 10. In FF no problem.
Comment #37
dbeall CreditAttribution: dbeall commentedAdded this to FAQ page of node_gallery handbook:
http://drupal.org/node/544760
Comment #38
dbeall CreditAttribution: dbeall commentedThis module might be a help to some people:
http://drupal.org/project/drupal_tweaks
Some of what it can do:
Quick common operation
--- Enabling and disabling modules through auto complete suggestions
--- Quick search for the nodes, users, etc. to make some operations
Quick Drupal operation
--- clear the cache and rebuild permissions from one place or do them both at once
PHP Settings
--- Increasing PHP max_execution_time value
--- Increasing PHP memory_limit value
Comment #39
kmontyI'm closing this thread because it is mostly related to version 1, which we no longer support.
Comment #40
Slovak CreditAttribution: Slovak commentedSolution in #29 worked for my nginx setup as well. Thanks!