This error occurred after the last git pull. I don't know if it was already broken.. but found it just now. The uploader gives a 500 error.
If I follow the POST url, I get this error: "So here's the error: @todo FORBIDDEN, File: modules/gallery/helpers/access.php, line: 189"
But that, of course can also be because I don't include POST variables.. but just do it as a GET.
I tried switching from IM to GD, but didn't matter. All dirs that need to be writable are writable. It is possible to make the album, but not uploading the pics.
# APACHE LOGS:
- - [18/Sep/2009:14:13:13 +0200] "GET /gallery/lib/swfupload/swfupload.swf?preventswfcaching=1253275990516 HTTP/1.1" 200 12787
- - [18/Sep/2009:14:13:20 +0200] "POST /gallery/index.php/simple_uploader/add_photo/6636 HTTP/1.0" 500 3751 "-" "Shockwave Flash"
# GALLERY LOGS:
#2 .../...../..../.../gallery3/modules/gallery/helpers/photo.php(126): graphics_Core::generate(Object(Item_Model))
#3 .../...../..../.../gallery3/modules/gallery/controllers/simple_uploader.php(65): photo_Core::create(Object(Item_Model), '/.../../../...', 'IMG_3845.jpg', 'IMG 3845')
#4 [internal function]: Simple_Uploader_Controller->add_photo('6636')
#5 .../...../..../.../gallery3/system/core/Kohana.php(291): ReflectionMethod->invokeArgs(Object(Simple_Uploader_Controller), Array)
#6 [internal function]: Kohana::instance()
#7 .../...../..../.../gallery3/system/core/Event.php(209): call_user_func(Array)
#8 .../...../..../.../gallery3/system/core/Bootstrap.php(55): Event::run('system.execute')
#9 .../...../..../.../gallery3/index.php(86): require('/.../../../...')
#10 {main}
2009-09-18 14:21:49 +02:00 --- error: Uncaught Exception: @todo FORBIDDEN in file modules/gallery/helpers/access.php on line 189
Posts: 16503
Can you post a link to phpinfo?
FAQ: How do I create a phpinfo page?
____________________________________________
Like Gallery? Like the support? Donate now!!! See G2 live here
Posts: 23
I've sent a PM with the link
Posts: 16503
Try increasing the memory limit from 16M to 32M
Make sure the image is less than 2M as that's what post_max_size is set to
Try a different browser, not sure what you've tried yet, but try Firefox
If all of that still doesn't work, try setting the value of upload_tmp_dir to a valid directory that the webserver has access too.
Since this is your "sandbox" I'm making an assumption you know how to do all of that, if you need any details just ask.
____________________________________________
Like Gallery? Like the support? Donate now!!! See G2 live here
Posts: 23
In my php.ini the post_max_size is set to 8M...
The .htaccess contains:
php_value upload_max_filesize 20M
php_value post_max_size 100M
Uploading very big pictures wasn't a problem before.
I normally use Firefox. Now I tried IE8 and got this Adobe Flash error: "Error #2044: Unhandled IOErrorEvent:. text=Error #2038: File I/O Error.". This results in the same "Upload error: bad image file".
After all the changes you've suggested it still gives the same error.
(btw, i've sent a new phpinfo link)
Posts: 23
It is fixed in the current version. I guess it had something to do with the lack of a directory being made. A database entry was added, but not a real directory..
Posts: 6
I'm having the same problem, it only created the albums, logs, modules, resizes, thumbs, tmp and uploads but not the albums underneath.
Every time i try to upload it says bad image file.
I'm using:
# Apache: Apache/2.2.3 (Red Hat)
# PHP: 5.2.9
# MySQL: 5.0.86
Gallery Version: 3.0 beta 3
PHPINFO
Thanks
Posts: 3
Hi,
Latest GIT release (gallery-gallery3-fbb6a86f94deba1c2a65e7371be210fe4520351e)has introduced the same problem here too - unable to upload images.
"Upload error: bad image file"
Previously no problems.
Mike
Posts: 2
Dear all,
Today, 5 october 2009 I installed Gallery3 Beta 3 as well and got the error message: "Upload error: bad image file" when I try to upload files. The configuration of the webserver can be found here: http://gic-web-bsd-028.genotec.ch/info/mod_php/.
Hopefully someone can help to resolve this problem soon.
Regards,
Swissi
Posts: 16503
Swissi, are you using GD or ImageMagick as your toolkit?
____________________________________________
Like Gallery? Like the support? Donate now!!! See G2 live here
Posts: 2
Hi nivekiam, in my graphics settings it's written "You have GD version bundled (2.0.34 compatible)"
Posts: 16503
Try upgrading to the latest experimental code and let us know if you are still having issues.
____________________________________________
Like Gallery? Like the support? Donate now!!! See G2 live here
Posts: 1
Just a note I was getting same error with beta 3, but realized it was due to a space in the filename (10_06_2009 -DSC01506.JPG) I renamed the file replacing the space with an underscore (10_06_2009_-DSC01506.JPG) and it uploaded fine, now however I'm having other problems such as whole albums being inaccessible.
Posts: 16503
If you've set permissions so that Everybody cannot view albums then you need to make sure that the Directory Name and Internet Address for the album match.
http://sourceforge.net/apps/trac/gallery/ticket/812
____________________________________________
Like Gallery? Like the support? Donate now!!! See G2 live here
Posts: 16503
Ticket 812 has been fixed, upgrade to the latest experimental code:
http://codex.gallery2.org/Gallery3:Upgrading
____________________________________________
Like Gallery? Like the support? Donate now!!! See G2 live here
Posts: 1
Hi all, today I download and install gallery 3 beta 3 over Debian lenny with lighttpd. When I try to upload any image I get the same error commented in this thread: Upload error: bad image files!
the problem still happens after upgrade to the latest experimental code. There is nothing reported in the log file. ¿Any idea?
Posts: 16503
lighttpd is not supported. Only Apache 2.2 or newer for a web server
That being said:
http://gallery.menalto.com/node/87018
http://gallery.menalto.com/node/88740
and for more info:
http://www.google.com/
http://gallery.menalto.com/search
____________________________________________
Like Gallery? Like the support? Donate now!!! See G2 live here
Posts: 4
Upload error: Bad image file
### IF YOUR GETTING THIS ERROR. READ HERE ###
it drove me crazy, it turned out to be a server config error.
from my webhost:
There was an issue with "mod_security". We have tweaked it a bit and its working fine now.
We have liberalized the rule set on the mod security file to correct the issue. The rules are set on the file '/usr/local/apache/conf/modsec_rootkits.conf'.
[Wed Oct 28 12:22:08 2009] [error] [client XXX.89.XXX.167] ModSecurity: Access denied with code 406 (phase 2). Pattern match "=(http|www|ftp)\\:/(.+)\\.(c|dat|kek|gif|jpe?g|jpeg|png|sh|txt|bmp|dat|txt|js|html?|tmp|asp)\\x20?\\?" at REQUEST_URI. [file "/usr/local/apache/conf/modsec_rootkits.conf"] [line "27"] [id "390144"] [rev "1"] [msg "Rootkit attack: Generic Attempt to install rootkit"] [severity "CRITICAL"] [hostname "YOUR URL.com"] [uri "/forum/images/avatars/gallery/pictureview-password-2008.html//appserv/main.php"] [unique_id "HIDDEN"]
HOPE THIS HELPED