Server Add Module - @todo FORBIDDEN Error when trying to remove Authorized paths

eltrkbrd

Joined: 2011-05-25
Posts: 7
Posted: Wed, 2011-05-25 15:55

When going to Admin | Settings | Server Add, I get the following Error upon clicking the trash-bin icon for removing any of the existing Authorized Paths:

Kohana_Exception [ kohana/core.errors.403 ]: @todo FORBIDDEN

Detailed error message log: http://pastebin.ca/2069007

Platform information:
Host name: anon.hostgator.com
Operating system: Linux 2.6.34.6
Apache: Unknown
PHP: 5.2.17
MySQL: 5.1.52
Server load: 1.02 1.31 1.24
Graphics toolkit: imagemagick

Gallery Version: 3.0.2 (Coollanta)

Environment:
http://pastebin.ca/2069019

I followed the installation guide, and verified that my hosting environment meets all the requirements.

I searched the forums and Google to no avail.

Even when I deleted the database, removed the gallery folder on my server, and did a clean install with all the Gallery 3 defaults, I have the same problem.

Any ideas why this is happening?

~Thanks in Advance

 
nivekiam
nivekiam's picture

Joined: 2002-12-10
Posts: 16503
Posted: Wed, 2011-05-25 17:50

Looks like a bug. I'm getting the same thing. I've create a ticket to track this:

https://sourceforge.net/apps/trac/gallery/ticket/1740
____________________________________________
Like Gallery? Like the support? Donate now!

 
eltrkbrd

Joined: 2011-05-25
Posts: 7
Posted: Wed, 2011-05-25 19:48

Hi Nivekiam,

Thanks for the response! I'll follow the bug ticket for updates.

Can someone please let me know if there is anything I can do to modify the PHP code on my end for a fix in the meantime until a later release includes it?

Also, is it possible for me to upload multiple images via FTP to a subfolder in \var\albums\ and then import the images without the Server Add module creating a duplicate folder with all the images?

I noticed after I uploaded 100 images (approx. 18MB) via FTP that it took about 3 minutes to import them all and that it copied the files over to another folder. This is the default behavior in G3 with the Server Add module.

Doesn't this method of importing images seem redundant and slow? It apparently puts an unnecessary load on the server.

Is there any alternative way to accomplish this?

Gallery 3 is awesome, my sincere appreciation to all those who have contributed, I look forward to doing the same!

~Regards

 
inposure
inposure's picture

Joined: 2010-04-23
Posts: 304
Posted: Wed, 2011-05-25 18:34

Line 29 in modules/server_add/views/admin_server_add.html.php should be:

<a href="<?= url::site('admin/server_add/remove_path?path=' . urlencode($path) . '&amp;csrf=' . access::csrf_token()) ?>"

There seems to be a case of nested PHP that really doesn't work in the original version:

<a href="<?= url::site("admin/server_add/remove_path?path=" . urlencode($path) . "&amp;csrf=<?= access::csrf_token() ?>") ?>"

--
http://inposure.se/

 
nivekiam
nivekiam's picture

Joined: 2002-12-10
Posts: 16503
Posted: Wed, 2011-05-25 18:52
Quote:
Doesn't this method of importing images seem redundant and slow? It apparently puts an unnecessary load on the server.

Unnecessary load in what terms? The images need to be copied to the server and imported no matter what method you use. At this time there are no plans to make it so that you can ftp files directly to /var/albums and then have Gallery scan that for new stuff and create the thumbs and resized images.

What you're seeing is the same behavior of ever version of Gallery.
____________________________________________
Like Gallery? Like the support? Donate now!

 
eltrkbrd

Joined: 2011-05-25
Posts: 7
Posted: Wed, 2011-05-25 19:12

You all rock, that worked! Thanks a million inposure.

The awesomeness of G3 seems second only to the community backing it... :)

 
eltrkbrd

Joined: 2011-05-25
Posts: 7
Posted: Wed, 2011-05-25 19:20

Niekiam, what I meant by duplicate was that if I upload images to var/uploads/imgsubdir1 and then import them using server add, it copies them over to /var/albums/imgsubdir1 leaving duplicate files behind on the server at var/uploads/imgsubdir1.

I thought it might be possible to do a file move operation instead of copy.

Based on my test upload a 100 images (18MB), it took approx. 3 minutes to do the import after the files had already been uploaded to the server. If I had to upload 10,000 photos it would take at least 5 hours. Is this normal?

Maybe it's something to do with having to create a all the DB records for each image?

 
nivekiam
nivekiam's picture

Joined: 2002-12-10
Posts: 16503
Posted: Wed, 2011-05-25 19:41
Quote:
If I had to upload 10,000 photos it would take at least 5 hours. Is this normal?

Yes
____________________________________________
Like Gallery? Like the support? Donate now!

 
eltrkbrd

Joined: 2011-05-25
Posts: 7
Posted: Wed, 2011-05-25 19:46

OK, I can live with that! :)

Thanks again. :)

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 25961
Posted: Tue, 2012-04-10 13:51