Batch add problems Batch add problems
 

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Main Menu

Batch add problems

Started by Russ_, August 13, 2012, 10:25:33 AM

Previous topic - Next topic

0 Members and 3 Guests are viewing this topic.

Russ_

I had problems with batch add, so switched off Browsable Interface", as I read here. But I still have trouble, and it seems to be getting worse, whenever I click "Batch add files". First I would have to refresh once or twice to get the full list of folders with the pics in them, now it seems I can hardly even get the whole list. Tonight I've refreshed about 15 times, still no luck.

At the top of the page I get, "Fatal error:  Maximum execution time of 60 seconds exceeded in C:\...\gallery\searchnew.php on line 286" (I put the dots in there in case it was dangerous to leave the whole path).

Is there any way to fix this? Can the default time out of 60s be lengthened?

Please keep answers simple for me!

Site in sig.


Russ_

Okay, I believe I've done all that.

Account: tester
pw: tester123



Russ_

Don't believe it - just went to batch add some more - and it worked straight away! Grrrrr.

So is it just a webhost problem?

Αndré

Quote from: Russ_ on August 13, 2012, 10:25:33 AM
Can the default time out of 60s be lengthened?
The max_execution_time time limit is set in the PHP configuration (php.ini file), but 60 seconds is usually more than enough.

Do you have a very big directory tree structure (hundreds/thousands of directories and sub-directories)? If so, the browsable interface could fix that issue, as it just loads the first level directories. If not, maybe hour host has/had some trouble with the file system, as reading a directory structure with just a few directories should be fine within 60 seconds.

Russ_

Cheers André, I have 130 directories in the albums folder. No subdirectories under them. I can see this number getting quite a bit though as I add a directory for each game I photograph. Is that too many do you think?

The browsable interface didn't show any directories, which is why I turned browsable off. Just tried it again and get this: "There are no folders inside the "albums" folder yet. Make sure to create at least one custom folder within "albums" folder and ftp-upload your files there. You mustn't upload to the "userpics" nor "edit" folders, they are reserved for http uploads and internal purposes. "

I also have "Display preview thumbnails" turned off.

If I were to ask if my webhost is able to change the 60 seconds to say, 120 seconds, could someone please tell me exactly what to say to them, I don't know the correct thing to ask.

Αndré

130 directories should be processed in 60 seconds without a problem on a normal machine, usually (maybe the server's file system or CPU is under heavy load). Not sure how Coppermine's mini browser operates, but probably the number of files will also matter. Apart from that, does your gallery work without any (performance) issues?


Quote from: Russ_ on August 20, 2012, 04:05:31 AM
If I were to ask if my webhost is able to change the 60 seconds to say, 120 seconds, could someone please tell me exactly what to say to them, I don't know the correct thing to ask.
They have to increase the PHP configuration value "max_execution_time". But this means that you'll have to wait up to two minutes before the directory tree is generated or you'll get a timeout error message.

Russ_

I have nearly 11,000 files. No problems generally speaking.

I'll contact them and see if they can do that, maybe 90 seconds, 120 seems like ages!

Thanks.

Αndré

11000 files seems to be too much to process in 60 seconds, as the script needs to read your whole directory tree in that time. The ideal solution would be to fix the browsable interface, as it always reads just a part of your directory tree.

Does your gallery reside in a path that contains spaces or other "special" characters like dots? E.g. it works fine in my testbed at D:\xampplite\htdocs\svn_cpg15x_trunk.

Russ_

Nope, no spaces etc.  -  /httpdocs/gallery/albums
then all my albums under that, again no spaces etc   -  120825ParePlimmWgtnSnr1
so I get:  /httpdocs/gallery/albums/120825ParePlimmWgtnSnr1

I have 136 folders in the albums folder - each a separate game (I do sports photos).

(Bear in mind here I know nothing about this stuff) As it only needs to list the folders so I can select the one with the photos in I'm adding, why should Coppermine be looking at all the photos within all the folders? Can't it just read the folders?

Αndré

Quote from: Russ_ on August 30, 2012, 06:57:21 AM
As it only needs to list the folders so I can select the one with the photos in I'm adding, why should Coppermine be looking at all the photos within all the folders? Can't it just read the folders?
That's not a Coppermine issue, but a general one. Each element has to be inspected if it's a folder, a file or something else.


Quote from: Russ_ on August 30, 2012, 06:57:21 AM
I have 136 folders in the albums folder - each a separate game (I do sports photos).
If there are no sub-folders, we could adjust the script to just list the first level elements (like the browsable interface does, which doesn't work for you, for whatever reason). Do you have sub-folders?

Russ_

Quote from: Αndré on August 30, 2012, 10:22:36 AM
If there are no sub-folders, we could adjust the script to just list the first level elements (like the browsable interface does, which doesn't work for you, for whatever reason). Do you have sub-folders?
Nope, no sub-folders within those ones. Just reading the first elements sounds like the answer.

I have read here others have trouble with the browsable interface, which is how I knew to turn it off when I struck problems.

Αndré

Open searchnew.php, find
display_dir_tree($folder . $file . '/', $ident . '    ');
and remove that line.

Russ_

Wow - that worked! I'm a programmer now :)

The resulting list of folders was near instantaneous.

The browsable interface still doesn't work, not sure if that's of relevance to you or not.

I presume I'll have to do that deletion with every upgrade?

Αndré

Quote from: Russ_ on September 03, 2012, 02:07:05 AM
The browsable interface still doesn't work, not sure if that's of relevance to you or not.
Of course it would be the best option to fix the browsable interface, but I wanted to give you a fast fix. I'll try to set my testbed so the browsable interface also won't work, that way I can try to fix that issue without to need a live gallery as yours.


Quote from: Russ_ on September 03, 2012, 02:07:05 AM
I presume I'll have to do that deletion with every upgrade?
Correct.

Russ_

I appreciate the fast fix too! :D

Would  be great to get the browsable thing going like that too, but I realise you're a busy boy!

I've removed the tester user on my site, but if you need access for a trial, or if you want me to try something I'm okay with that.

Thank you for your time.

pols1337

You can also try the FTP batch upload process too  :)  In my not-too-technical opinion, it's usually a much smoother and faster process than the browsable interface method. 

Αndré

Quote from: pols1337 on September 16, 2012, 03:17:17 PM
You can also try the FTP batch upload process
That's what we just fixed here for Russ_