Hello everyone 
I have just install Gallery 3 and I have one little ;-) problem - when I want to upload new photos click on "Add some" and select photos I see "uploading complete" but when I click close no one photos are upload 
Thank for answers and suggestions. (Sorry for my English)
Posts: 23
Hi, did you upgrade to the latest experimental version?
http://codex.gallery2.org/Gallery3:Upgrading
Posts: 6
I run upgrade and gallery 3 was upgradeing from 6 to 7 but nothing change. I cant upload photos.
Operating System: FreeBSD
Apache: Unknown
PHP: 5.2.6
MySQL: 5.0.66a-log
Server load: Unavailable
Version: 3.0 beta 2
Posts: 23
Then something went wrong during the upgrade, the latest gallery version is 11...
Posts: 6
OK I upgrade to version 12 and still nothing
Posts: 16503
First check your gallery's logs. They are located in var/logs
Copy what you find in there here.
____________________________________________
Like Gallery? Like the support? Donate now!!! See G2 live here
Posts: 8
I have the exact same problem, and in fact it appeared suddenly, upload used to work fine with my original Beta2 install.
Now the uploader seems to succeed but the close button does not work and the photos are not actually added.
Inspecting the ajax requests with firebug shows that they all receive as response an error page with the usual text: "Dang... Something went wrong!" etc..). BTW I find myself logged out after each of these errors.
I have now upgraded to v12 (status show pre-beta3) but the problem remains.
My log files shows these errors:
2009-09-09 16:34:08 +02:00 --- error: Uncaught Exception: @todo FORBIDDEN in file modules/gallery/helpers/access.php on line 176
If I print $user->name in function user_can() starting from the image upload request, I always get 'guest', who of course does not have the permission to upload photos.
Any ideas about what else I could check to track down the issue?
Thx!
PS: BTW, I'm not sure what has changed to trigger this... perhaps the sysadmin touched the config of the server. Other than that nothing, just a few comments added by the guest user.
Posts: 16503
I'd try clearing your cookies and cache in your browser and try a different browser or different computer to help narrow down the problem.
____________________________________________
Like Gallery? Like the support? Donate now!!! See G2 live here
Posts: 8
Forgot to mention that I did that already of course: cleaned up cookies and cache on FF, tried with Safari, and did the same on another computer, no luck, same problems remains.
Posts: 16503
Could you post or PM me a link to phpinfo? This link explains how:
FAQ: What information is required when I ask for help in the forums?
____________________________________________
Like Gallery? Like the support? Donate now!!! See G2 live here
Posts: 8
Sure, if you think that's gonna help, please check your PMs.
Posts: 16503
o.k. Let's try setting 2 different settings:
upload_tmp_dir
session.save_path <-- this is probably the one causing problems, maybe
Add these lines to your .htaccess file:
php_value upload_tmp_dir /tmp
php_value session.save_path /tmp
____________________________________________
Like Gallery? Like the support? Donate now!!! See G2 live here
Posts: 8
I've added these 2 lines to the .htaccess of gallery3, but the result is still the same.
It seems that the "upload_tmp_dir" still gives "no value" in phpinfo() though.
Don't think that helps, but I got a backtrace of the exception that occurs in simple_uploader.php:add_photo() when the problem is triggered at the first upload after logging in:
#0 .../modules/gallery/helpers/access.php(123): access_Core::forbidden()
#1 .../modules/gallery/controllers/simple_uploader.php(41): access_Core::required('add', Object(Item_Model))
#2 [internal function]: Simple_Uploader_Controller->add_photo('1')
#3 .../system/core/Kohana.php(291): ReflectionMethod->invokeArgs(Object(Simple_Uploader_Controller), Array)
#4 .../system/core/Event.php(209): Kohana::instance()
#5 .../system/core/Bootstrap.php(55): Event::run(Array)
#6 .../index.php(86): require('...')
#7 {main}
"..." replaces the common base directory for gallery3 above.
(Line numbers in access.php might differ due to my debugging commands, but there's only 1 line where self::forbidden() is called in access_Core::required(...))
Posts: 7934
Gallery3 stores sessions in the database, so that would be the right place to start. I'm guessing that something is going wrong with the way that your browser is storing and returning cookies to the server. Probably the best place to start would be if you can give us an account your gallery3 that has add permissions and let us try logging in. If we can log in from here, then we can localize the problem to your browser.
---
Problems? Check gallery3/var/logs
bugs/feature req's | upgrade to the latest code | use git | help! vote!
Posts: 8
I would be surprised to find out that my browser is causing this, especially since:
- it used to work in the beginning, since my gallery already contains dozens of images I uploaded with this setup
- I have tried on several browsers, several computers, and even different platforms! A specific browser is hardly the common denominator there...
- it seems that other people are having the same issue, look above in this thread (and in other threads as well), with other gallery3 installs and other browsers
Nevertheless, I will gladly provide a login to a test instance showing this problem, I just can't open my current gallery to you.
I'll duplicate it tomorrow (it's 3am here) and remove all the pictures, then give you an account on it, hopefully it will still show the same problem.
Posts: 7934
I'm more than willing to believe that this is a bug on our code, I'm just trying to narrow down the possibilities. If we can reproduce the problem remotely then maybe we can learn enough to fix it. If we can't reproduce it then we have to figure out what's different between our clents and yours. A tcp level trace of your connection stream would probably be really helpful if you can repro it and we can't. Let us know how it goes.
---
Problems? Check gallery3/var/logs
bugs/feature req's | upgrade to the latest code | use git | help! vote!
Posts: 8
Here you go:
My test gallery is at: http://www.emilien.be/testgallery/
You can login with admin/admin
There are no photos because I removed all my previous albums, and have not been able to upload anything anymore.
I have also captured a full tcpdump of the following HTTP session:
- I open the home page of my test gallery after clearing my cookies on Firefox 3.5.2 on OSX 10.6.
- I login with admin/admin
- I click on "Add photos" in the menu
- I select a random image on my computer, and the flash uploader says "Upload complete" after a few seconds (while in fact the POST resulted in an error page). At this point I am already logged out, even if it doesn't show it.
- I click on "Close", which does not produce any visible effect (the ajax request also ends up with an error response, albeit with a 200 status)
- I go to the home page URL again, which shows that I have indeed lost my session, and that no photo was uploaded.
The dump can be downloaded here: http://www.emilien.be/testgallery/gallery.dmp
I hope this helps.. let me know if I can check anything else for you.
Posts: 16503
Looks like the formatting for this error needs to be fixed to it wraps, but that's the error that pops up every time I try to use the uploader on your site
FAQ: Error: your server is configured to use the suhosin.session.encrypt setting from Suhosin. You must disable this setting to upload photos.
____________________________________________
Like Gallery? Like the support? Donate now!!! See G2 live here
Posts: 8
Well, this is strange, because that error has been there from the start when I installed B2.
The first time I saw it I tried to upload a picture anyway, and since it worked, I simply decided to ignore the warning.
Now after adding "php_value suhosin.session.encrypt Off" in my .htaccess, I see that:
- the warning is still there!
- but it does seem to fix the upload problem indeed! Yay!
So I guess this means that somehow this suhosin.session.encrypt was indeed Off when I created my gallery, but has maybe been changed to On by the sysadmin recently... Or something similar. Unless you guys know of some case where the upload could work with session.encryption enabled?
In any case I am 100% sure that this warning was there from the start and I never changed anything to disable session encryption until today.
To sum it up, the answer was in front of my eyes all the time (D'oh!).
Thanks a lot for your help!!
My $0.02 to follow-up on this:
1. You test this parameter with a simple boolean check on ini_get. This is incorrect when the value is set by php_value instead of php_flag in an .htaccess (as your FAQ recommands), or with php_admin_value. Indeed ini_get will return the string "Off", which evaluates to true! (See comments in the php manual on ini_get)
2. If you know for sure that "suhosin.session.encrypt" is incompatible with your uploader, why not disable it by default in the .htaccess?
3. The warning message did wrap correctly in v6, but not anymore in v12 -- I know because it was there all the time for me ;-)
And a final note for others with the same issue:
Have you tried adding "php_flag suhosin.session.encrypt Off" to your .htaccess, even if file uploads used to work without it?
My hosting is done on a CPanel server, so it is possible that a recent CPanel update did affect php or suhosin in a way that stopped this from working.
Posts: 16503
The incorrect setting for .htaccess was my fault. It wasn't there at all before and I added it, getting the information from here:
http://www.howtoforge.com/forums/showthread.php?p=203700#post203700
Bharat has cleaned up that FAQ and made it better.
Here's another post about this:
http://www.zen-cart.com/forum/showthread.php?t=110204
Both of those threads say for .htaccess to use php_value though....
I would not be surprised at all if an upgrade to cPanel changed this behavior.
____________________________________________
Like Gallery? Like the support? Donate now!!! See G2 live here
Posts: 7934
It's unfortunate that PHP, which knows that this value is a boolean, does not complain that you're incorrectly using php_value to assign something to it. As far as I can tell, ini_get() is the correct way to examine boolean values set in PHP. I agree that this is error prone, but the solution to do it more thoroughly really sucks and I'd like to avoid it if we can.
Unfortunately, since that suhosin setting is a security setting, it cannot be disabled in .htaccess. You can try to set it there, but it'll be ignored.
And incidentally I pushed a change yesterday to fix the wrapping in the warning message. Try upgrading and see if that clean it up for you.
---
Problems? Check gallery3/var/logs
bugs/feature req's | upgrade to the latest code | use git | help! vote!
Posts: 8
Well, that's strange, because this is the way I changed it, by adding it in the .htaccess using php_flag (it was also working with php_value, but your warning was still being displayed).
I can also confirm that I can see the Local value for this setting changing in phpinfo() according to what I set in the .htaccess.
Or am I missing something?
Posts: 16503
I think it can be set at the .htaccess level depending on how the server is setup. I can verify from the phpinfo link you sent me that yes, it's set to "off" for the local value, but the master value is still set to "on".
____________________________________________
Like Gallery? Like the support? Donate now!!! See G2 live here
Posts: 7934
Awesome, you can turn it off in .htaccess. I was looking at the wrong variable. I've modified our .htaccess file to turn it off by default, and incidentally changed all php_value calls on booleans to be php_flag so that ini_get() will do the right thing. Thanks odony!
---
Problems? Check gallery3/var/logs
bugs/feature req's | upgrade to the latest code | use git | help! vote!
Posts: 7934
@Irbis: are you still having this problem? If so, what's in your gallery3/var/logs error logs?
---
Problems? Check gallery3/var/logs
bugs/feature req's | upgrade to the latest code | use git
Posts: 6
Yes I still cannot upload file.
In gallery3/var/logs are two file:
2009-09-15.log.php
<?php defined('SYSPATH') or die('No direct script access.'); ?>
2009-09-15 03:57:02 +02:00 --- error: Uncaught Kohana_404_Exception: The page you requested, login, could not be found. in file /system/core/Kohana.php on line 841
2009-09-15 03:57:02 +02:00 --- error: Uncaught Kohana_404_Exception: The page you requested, login, could not be found. in file /system/core/Kohana.php on line 841
and
2009-09-16.log.php
<?php defined('SYSPATH') or die('No direct script access.'); ?>
2009-09-16 03:56:59 +02:00 --- error: Uncaught Kohana_404_Exception: The page you requested, login, could not be found. in file /system/core/Kohana.php on line 841
2009-09-16 03:56:59 +02:00 --- error: Uncaught Kohana_404_Exception: The page you requested, login, could not be found. in file /system/core/Kohana.php on line 841
thats all
Posts: 7934
@Irbis: can you please give us your php info?
FAQ: How do I create a phpinfo page?
---
Problems? Check gallery3/var/logs
bugs/feature req's | upgrade to the latest code | use git
Posts: 6
Can I must paste phpinfo on forum?
http://album.invest-dom.pl/phpinfo.php Is enough?
Posts: 16503
That's not Apache. It's not supported. I don't know about bharat, but I've never even heard of IdeaWebServer.
____________________________________________
Like Gallery? Like the support? Donate now!!! See G2 live here
Posts: 6
I see that mean no gallery 3 on my serwer
, gallery 2 work fine. what a shame
Is anyone different way to upload photo??
Posts: 16503
Right now in G3 there are only 2 ways to import photos. That simple uploader and the Server Add module:
http://codex.gallery2.org/Gallery3:Modules:serveradd
____________________________________________
Like Gallery? Like the support? Donate now!!! See G2 live here
Posts: 1
i have the same problem with 2 different servers running ubuntu, i upgraded both from beta 3 to the newest git today and my albums with foreign(norwegian) characters gave me this error at first:
The page you requested, fisketur.snokkitjørnaa.18.august, could not be found.
File: system/core/Kohana.php, line: 841
And here's how we got there:
*
Kohana::show_404( )
* system/core/Event.php [209]:
call_user_func( Array
(
[0] => Kohana
[1] => show_404
)
)
* system/libraries/Router.php [163]:
Event::run( system.404 )
*
Router_Core::setup( )
* system/core/Event.php [209]:
call_user_func( Array
(
[0] => Router
[1] => setup
)
)
* system/core/Bootstrap.php [49]:
Event::run( system.routing )
* index.php [86]:
require( system/core/Bootstrap.php )
I then tried to reinstall with a fresh install on both servers, one colo and one at home.
installation went fine, but im not able to upload any pictures at all, i reinstalled gallery3 from newest git about 20 times without any luck
it always give`s me "upload complete" , but there are still no pictures in var/albums/*/.
Posts: 16503
For your albums that have Norwegian characters in them make sure that the internet address doesn't contain any Norwegian characters.
The directory name and title can contain them, just not the Internet Address, which you'll see if you click on Edit Album.
Also, if you are hiding these albums from public view, then for now, you have to make sure that the Internet Address and Directory Name are exactly the same:
https://sourceforge.net/apps/trac/gallery/ticket/812
____________________________________________
Like Gallery? Like the support? Donate now!!! See G2 live here