problem with upload of images

jast

Joined: 2009-04-15
Posts: 4
Posted: Wed, 2009-04-15 13:20

every time i logged in to upload some images, he loggs me out. I use gd and im with the same result. please help: my system:

Operating System: Suse Linux 10.3 64Bit
Apache: Apache/2.2.3 (Linux/SUSE)
PHP: 5.2.8
MySQL: 5.0.26

on localhost it runs without problems

http://jast.the-barbarians.de/gallery3/

 
rjones78735

Joined: 2006-02-27
Posts: 1
Posted: Mon, 2009-04-20 23:32

I'm having the same problem with this config:

Operating System: Suse Linux 10.2 64Bit
Apache: Apache/2.2.3 (Linux/SUSE)
PHP: 5.2.6
MySQL: 5.0.26

I'm using svn build 20593 from 4/20.

 
bharat
bharat's picture

Joined: 2002-05-21
Posts: 7994
Posted: Fri, 2009-04-24 00:29

Try the latest svn, I put in a fix yesterday which should resolve this.

 
jast

Joined: 2009-04-15
Posts: 4
Posted: Sat, 2009-04-25 12:04

I tried this download http://www.gallery2.hu/download/Gallery3/gallery3nightly.tar.gz, I installed new, too. But the problem is the same...

 
bharat
bharat's picture

Joined: 2002-05-21
Posts: 7994
Posted: Sat, 2009-04-25 21:10

Ok, let's figure this out. I need more information, though. Can you give me the sequence of events that you're doing from after you log in to when you hit the error? And can you check the files in gallery3/var/logs to see if there are any errors listed there?

 
jast

Joined: 2009-04-15
Posts: 4
Posted: Sun, 2009-04-26 11:22

the following error is printed there:

2009-04-26 13:16:52 +02:00 --- error: Uncaught Exception: @todo FORBIDDEN in file core/helpers/access.php on line 176

i log me in, create a photoalbum and i try to upload an image, the upload works perfect, but if i click on "done", he loggs me out and no photo is there.

do you need the phpinfo() ?

 
bharat
bharat's picture

Joined: 2002-05-21
Posts: 7994
Posted: Thu, 2009-04-30 15:47

Hm. Check core/config/session.php and look for the "regenerate" line. Is it set to 0 or 100? It should look like this:

$config['regenerate'] = 0;

If it's not, change it to look like that. If it is set to zero and the problem is still happening then would you create a guest account and share it to me so that I can try to figure out what's going on?

 
jonathand131

Joined: 2007-10-02
Posts: 8
Posted: Sun, 2009-05-03 12:03

Hi

I've installed Gallery 3 from SVN checkout (rev 20672) and I've the same problem : I can't upload images.

After installing gallery, I've created a new album, then I try to add photos. Dialog box shows that all files are uploaded but I can't see nothing in the var/uploads directory. At the end, when I click "done", nothing appends. No log file is created in the var/logs directory.

Contrary to others people, I'm not logged out.

Edit:
core/config/session.php contains $config['regenerate'] = 0; like described earlier.
Graphics is imagemagick 6.4.8.3

 
bharat
bharat's picture

Joined: 2002-05-21
Posts: 7994
Posted: Sun, 2009-05-03 23:21

@jonathand131 can you pm me the url to your g3 and your admin pw so that I can check it out? Is there anything in your var/albums directory? That's where the uploaded photos would wind up. Check var/resizes and var/thumbs also. Anything showing up in your apache error logs?

 
jonathand131

Joined: 2007-10-02
Posts: 8
Posted: Tue, 2009-05-05 19:44

There is nothing in var/{albums,resizes,thumbs} but an empty directory with the name of the photo album.

Apache logs contains nothing I think revelant but here is the error log.

[Fri May 01 23:39:59 2009] [error] [client 192.168.1.252] File does not exist: /var/www/rougeotdelizy.jdsystem.info/htdocs/favicon.ico
[Sat May 02 18:20:09 2009] [error] [client 192.168.1.252] File does not exist: /var/www/rougeotdelizy.jdsystem.info/htdocs/favicon.ico
[Sun May 03 12:28:13 2009] [error] [client 192.168.1.252] File does not exist: /var/www/rougeotdelizy.jdsystem.info/htdocs/favicon.ico
[Sun May 03 12:55:29 2009] [error] [client 192.168.1.252] File does not exist: /var/www/rougeotdelizy.jdsystem.info/htdocs/gallery3/var/thumbs/fiancailles/.album.jpg, referer: http://rougeotdelizy.jdsystem.info/gallery3/index.php/
[Sun May 03 13:23:07 2009] [error] [client 192.168.1.252] File does not exist: /var/www/rougeotdelizy.jdsystem.info/htdocs/gallery3/var/thumbs/fiancailles/.album.jpg, referer: http://rougeotdelizy.jdsystem.info/gallery3/index.php/
[Sun May 03 13:48:18 2009] [error] [client 192.168.1.252] File does not exist: /var/www/rougeotdelizy.jdsystem.info/htdocs/gallery3/var/thumbs/fiancailles/.album.jpg, referer: http://rougeotdelizy.jdsystem.info/gallery3/index.php/
[Sun May 03 14:07:00 2009] [error] [client 192.168.1.252] File does not exist: /var/www/rougeotdelizy.jdsystem.info/htdocs/gallery3/var/thumbs/fiancailles/.album.jpg, referer: http://rougeotdelizy.jdsystem.info/gallery3/index.php/
[Sun May 03 14:50:55 2009] [error] [client 192.168.1.252] File does not exist: /var/www/rougeotdelizy.jdsystem.info/htdocs/gallery3/var/thumbs/fiancailles/.album.jpg, referer: http://rougeotdelizy.jdsystem.info/gallery3/index.php/
[Sun May 03 18:29:12 2009] [error] [client 192.168.1.252] File does not exist: /var/www/rougeotdelizy.jdsystem.info/htdocs/gallery3/var/thumbs/fiancailles/.album.jpg, referer: http://rougeotdelizy.jdsystem.info/gallery3/index.php/
[Mon May 04 22:08:51 2009] [error] [client 192.168.1.252] File does not exist: /var/www/rougeotdelizy.jdsystem.info/htdocs/gallery3/var/thumbs/fiancailles/.album.jpg, referer: http://rougeotdelizy.jdsystem.info/gallery3/index.php/
[Tue May 05 01:48:30 2009] [error] [client 192.168.1.252] File does not exist: /var/www/rougeotdelizy.jdsystem.info/htdocs/gallery3/var/thumbs/fiancailles/.album.jpg, referer: http://rougeotdelizy.jdsystem.info/gallery3/index.php/
[Tue May 05 19:14:25 2009] [error] [client 192.168.1.252] File does not exist: /var/www/rougeotdelizy.jdsystem.info/htdocs/gallery3/var/thumbs/fiancailles/.album.jpg, referer: http://rougeotdelizy.jdsystem.info/gallery3/index.php/
 
bharat
bharat's picture

Joined: 2002-05-21
Posts: 7994
Posted: Wed, 2009-05-06 04:14

@jonathand131 anything in your gallery3/var/logs directory?

 
jonathand131

Joined: 2007-10-02
Posts: 8
Posted: Wed, 2009-05-06 19:09

I've just one error :

2009-05-03 14:06:22 +02:00 --- error: Uncaught Kohana_404_Exception: The page you requested, admin/dashboard/reorder?csrf=048f1e2f600f64a1c1e3ced26159f223&dashboard_center%5B%5D=1957747793&dashboard_center%5B%5D=424238335&dashboard_center%5B%5D=719885386&dashboard_center%5B%5D=1649760492&dashboard_sidebar%5B%5D=1804289383&dashboard_sidebar%5B%5D=846930886&dashboard_sidebar%5B%5D=1681692777&dashboard_sidebar%5B%5D=1714636915, could not be found. in file kohana/core/Kohana.php on line 794
 
bharat
bharat's picture

Joined: 2002-05-21
Posts: 7994
Posted: Thu, 2009-05-07 00:40

That error is unrelated to the uploading problem. Thanks for sharing your g3 info with me. I tried adding photos to your site and it worked for me! I'm using Chrome 2.0.177.1 -- what browser are you using? Can you try with a different browser?

 
abnerjsnell

Joined: 2009-05-07
Posts: 2
Posted: Thu, 2009-05-07 12:56

I have the same issue with uploading/adding pictures.

o appears everything works fine
o automatically logged out of admin
o no images uploaded in the various directories
o the following message in the log file: Uncaught Exception: @todo FORBIDDEN in file core/helpers/access.php on line 176
o happens in IE 7 and Firefox 3

I have had this issue throughout all Alphas.

I can provide ssh access and guest login to my Gallery3.

 
bharat
bharat's picture

Joined: 2002-05-21
Posts: 7994
Posted: Fri, 2009-05-08 19:59

@abnerjsnell repro information and guest/ssh access would be very helpful, thanks! Please send me a private message with the details.

 
bharat
bharat's picture

Joined: 2002-05-21
Posts: 7994
Posted: Sat, 2009-05-09 21:07

@abnersjnell thanks for giving me ssh access. I believe the problem is that the Suhosin PHP hardening patch that you're using on your server is interfering with our flash based uploader. To disable it, edit your php.ini file and put this line at the bottom:

suhosin.session.encrypt = Off

then restart Apache. Does that fix it? If so, I'll put a notice into Gallery letting people know that they need to turn this setting off to use the flash uploader.

 
abnerjsnell

Joined: 2009-05-07
Posts: 2
Posted: Sat, 2009-05-09 21:38

YES! I made the suhosin parameter change and restarted Apache. Uploader works perfectly now. Thanks for all of your hard work and dedication!

 
bharat
bharat's picture

Joined: 2002-05-21
Posts: 7994
Posted: Sun, 2009-05-10 21:28

Great! I've added a warning on the upload page if you have that setting enabled so that others will not fall into this trap. Thanks, abnerjsnell!

 
jonathand131

Joined: 2007-10-02
Posts: 8
Posted: Wed, 2009-05-13 20:43

I've updated my gallery3 install today (rev 20786) and uploading photo still doesn't work for me.

I've tried with Firefox
Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.0.10) Gecko/2009042523 Ubuntu/9.04 (jaunty) Firefox/3.0.10

Then I've tried with Konqueror from KDE 4.2.3 (Webkit based browser) but it didn't display the "Select photo" button.

 
bharat
bharat's picture

Joined: 2002-05-21
Posts: 7994
Posted: Sat, 2009-05-16 01:13

@jonathand131 still nothing in your logs? It's weird that I am able to upload to your site and you are not. Are you running mod_security or suhosin in your php install? Can you share your phpinfo with me?
---
Gallery 3 problems? Check gallery3/var/logs before you post!
Gallery 3 nightlies: http://www.gallery2.hu/download/Gallery3/gallery3nightly.tar.gz
Gallery 3 subversion: http://codex.gallery2.org/Gallery:Using_Subversion#Quick_Start

 
jonathand131

Joined: 2007-10-02
Posts: 8
Posted: Sat, 2009-05-16 06:43

I've been able to upload photo with IE 8.0.7100.0 but I need to manually refresh the page to see it.

Still nothing in the gallery3/var/logs/ directory nor apache logs.

I'm not using mod_security and suhosin.

Phpinfo can be viewed here

 
bharat
bharat's picture

Joined: 2002-05-21
Posts: 7994
Posted: Sun, 2009-05-17 21:52

@jonathand131: ok I figured it out.. your PHP does not have the json_encode() function. I've made this a requirement in the installer, so others won't fall into this trap. You're using PHP 5.2.9 which is supposed to have json_encode() installed by default. I'm not a gentoo expert so I don't know why this isn't set up properly for you-- I suggest you ask your sysadmin for some assistance in getting that set up. thanks for being our mine detector!

 
jonathand131

Joined: 2007-10-02
Posts: 8
Posted: Thu, 2009-05-21 14:01

Ok, I've rebuilded PHP with json enabled. The "Add a photo" dialog now has expected behavior but photos are still not added when using Firefox. Nothing in var/upload, var/logs nor apache logs.

Gentoo use source packages instead of binary packages like debian, fedora, ... what permit some customization like disabling/enabling some optional component of each program. This is almost the same thing when you use configure with --enable-... or --disable-... parameters when compiling by hand.

You should check for all requirements even if some are supposed to be the default. From one to distrib to another, defaults could be different (enabled in debian, disabled in fedora, ...) and user could have a customized installation.

 
jonathand131

Joined: 2007-10-02
Posts: 8
Posted: Thu, 2009-05-21 14:22

I've updated to rev 20901 but problem is still present.

 
bharat
bharat's picture

Joined: 2002-05-21
Posts: 7994
Posted: Sun, 2009-05-24 08:15

It's a fool's errand to try to check for everything single thing we use. We'll do it on an as-needed basis. In the meantime, I used the authentication information that you provided to me before and was able to add an image to your site with no difficulty using Chrome. Not sure what's going wrong when you try to upload. :-/

 
jonathand131

Joined: 2007-10-02
Posts: 8
Posted: Sun, 2009-05-24 11:26

I didn't understand myself. It works with Firefox on Windows but not on Linux.

Windows : Mozilla/5.0 (Windows; U; Windows NT 5.1; fr; rv:1.9.0.10) Gecko/2009042316 Firefox/3.0.10
Linux : Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.0.10) Gecko/2009042523 Ubuntu/9.04 (jaunty) Firefox/3.0.10

Version strings show different locale (en-US vs fr), different Gecko version (2009042523 vs 2009042316) and different 64bits support (64bits on Linux, 32bits on Windows).

 
OsKKKK

Joined: 2009-06-03
Posts: 3
Posted: Thu, 2009-06-04 14:56

Hello,

When I look in this directory /gallery3/var/logs I can see :

2009-06-04 11:31:49 +02:00 --- error: Uncaught PHP Error: Undefined index: GD Version in file core/views/admin_graphics_gd.html.php on line 2

WHY ? and I haven't the way for put images ... ( browse )

 
bharat
bharat's picture

Joined: 2002-05-21
Posts: 7994
Posted: Fri, 2009-06-05 04:14

This is fixed in the latest code. It'll be in beta 1, or you can grab a download (links below)
---
Gallery 3 problems? Check gallery3/var/logs before you post!
Gallery 3 latest code: http://github.com/gallery/gallery3/zipball/master
Gallery 3 from git: http://codex.gallery2.org/Gallery:Using_Git