Advanced search  

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Pages: [1]   Go Down

Author Topic: Batch add problems  (Read 8770 times)

0 Members and 1 Guest are viewing this topic.

Russ_

  • Coppermine regular visitor
  • **
  • Country: nz
  • Offline Offline
  • Posts: 57
Batch add problems
« on: August 13, 2012, 10:25:33 am »

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.

Jeff Bailey

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: us
  • Offline Offline
  • Gender: Male
  • Posts: 1322
  • Fishing relaxes me.
    • Bailey Family Co.
Logged
Thinking is the hardest work there is, which is probably the reason why so few engage in it. - Henry Ford

Russ_

  • Coppermine regular visitor
  • **
  • Country: nz
  • Offline Offline
  • Posts: 57
Re: Batch add problems
« Reply #2 on: August 14, 2012, 12:13:05 pm »

Okay, I believe I've done all that.

Account: tester
pw: tester123


Russ_

  • Coppermine regular visitor
  • **
  • Country: nz
  • Offline Offline
  • Posts: 57
Re: Batch add problems
« Reply #3 on: August 14, 2012, 12:28:32 pm »

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é

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15764
Re: Batch add problems
« Reply #4 on: August 16, 2012, 02:17:38 pm »

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.
Logged

Russ_

  • Coppermine regular visitor
  • **
  • Country: nz
  • Offline Offline
  • Posts: 57
Re: Batch add problems
« Reply #5 on: August 20, 2012, 04:05:31 am »

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é

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15764
Re: Batch add problems
« Reply #6 on: August 27, 2012, 04:14:33 pm »

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?


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.
Logged

Russ_

  • Coppermine regular visitor
  • **
  • Country: nz
  • Offline Offline
  • Posts: 57
Re: Batch add problems
« Reply #7 on: August 28, 2012, 03:11:52 am »

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é

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15764
Re: Batch add problems
« Reply #8 on: August 29, 2012, 11:01:48 am »

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.
Logged

Russ_

  • Coppermine regular visitor
  • **
  • Country: nz
  • Offline Offline
  • Posts: 57
Re: Batch add problems
« Reply #9 on: August 30, 2012, 06:57:21 am »

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é

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15764
Re: Batch add problems
« Reply #10 on: August 30, 2012, 10:22:36 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.


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?
Logged

Russ_

  • Coppermine regular visitor
  • **
  • Country: nz
  • Offline Offline
  • Posts: 57
Re: Batch add problems
« Reply #11 on: August 30, 2012, 11:02:35 pm »

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é

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15764
Re: Batch add problems
« Reply #12 on: August 31, 2012, 07:43:41 pm »

Open searchnew.php, find
Code: [Select]
display_dir_tree($folder . $file . '/', $ident . '    ');and remove that line.
Logged

Russ_

  • Coppermine regular visitor
  • **
  • Country: nz
  • Offline Offline
  • Posts: 57
Re: Batch add problems
« Reply #13 on: September 03, 2012, 02:07:05 am »

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é

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15764
Re: Batch add problems
« Reply #14 on: September 03, 2012, 06:25:18 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.


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

Russ_

  • Coppermine regular visitor
  • **
  • Country: nz
  • Offline Offline
  • Posts: 57
Re: Batch add problems
« Reply #15 on: September 04, 2012, 04:10:08 am »

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

  • Coppermine frequent poster
  • ***
  • Country: us
  • Offline Offline
  • Gender: Male
  • Posts: 244
Re: Batch add problems
« Reply #16 on: September 16, 2012, 03:17:17 pm »

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. 
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15764
Re: Batch add problems
« Reply #17 on: September 17, 2012, 11:27:00 am »

You can also try the FTP batch upload process
That's what we just fixed here for Russ_
Logged
Pages: [1]   Go Up
 

Page created in 0.028 seconds with 20 queries.