batch add help batch add help
 

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]

Main Menu

batch add help

Started by Aliza, September 18, 2009, 08:11:09 PM

Previous topic - Next topic

0 Members and 2 Guests are viewing this topic.

Aliza

I get this error when trying to batch upload files:

please select a directory
    C:\webroot\stillbelieving.co.cc\gallery\albums/
   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 recently change my domain from stillbelieving.co.cc to stillbelieving.net the "stillbelieving.co.cc" folder on the server was changed to "stillbelieving.net" as well. How can I get coppermine to change work right when batch adding files with the new folder names?

http://stillbelieving.net/gallery

Aliza

well my host changed the name of the folder on the server so that's apparently not the problem. I don't know what it is. But I do indeed have at least 60 directories in the albums folder with thousands of images in them.

Aliza

Ok, I switched the batch add view back to the other view and I get this error

Fatal error: Maximum execution time of 300 seconds exceeded in C:\webroot\stillbelieving.co.cc\gallery\searchnew.php on line 275
 



and it won't show all of the folders.

phill104

It is a mistake to think you can solve any major problems just with potatoes.

Aliza


Aliza

If theres anything else I need to do, let me know, as I am still need help with this problem.

Joachim Müller

Yes: evaluate the details you post. You haven't tried the test user account. If you would have done that, you would have realized that all you get when logging in with that account and trying to upload a file is the message
QuoteSorry there is no album where you are allowed to upload files
Don't waste our time: do your homeworks first!

Aliza

Try it now.


I didn't know I was supposed to do anything with the account. I have no need for members groups in my gallery so the configuration for it is unfamiliar to me. So if I set something wrong that was to be expected. I changed something, don't remember what and the test account works fine for me. I really don't know what I'm supposed to do with it now. I have not found that information. And I don't know what uploading single files has to do with the problem I'm having either.

Joachim Müller

OK, I'm out of this: you have enabled admin approval for the http upload, so I can't really check. You're wasting my time. I am no longer willing to look into this.

Aliza

Oh, so that's what the "approval" buttons meant. If it had said "admin approval" I would have known. Previously i had just set everything to "yes." I think it is fixed right this time.

Please try again.

I've decided to upload a picture of my problem.
This is on the batch add page. While the list of albums is cut off, the list only usually goes as far as "r" alphabetically when there are actually folders up to "w" and after that should be sub-directories starting with numbers.

Aliza

This problem still requires a solution, please.

Joe Carver

Start here:

4.11.4 Upload troubleshooting

Continue here if needed:

4.11.5 Asking for support on upload issues

Make certain you follow all of the steps before returning.

Aliza

I have already done all three of those. The error message I get is not in the list provided.  I will post the test account again.

account is
user test
pass test

I have tested the account, and as far as I know, it works fine.

Joachim Müller

Error message
Quote from: Aliza on September 19, 2009, 10:57:41 PM
Fatal error: Maximum execution time of 300 seconds exceeded in C:\webroot\stillbelieving.co.cc\gallery\searchnew.php on line 275
should be pretty self-explanatory: this issue is related to your webserver setup, not coppermine. We can't help you with webserver setup.
Self-hosting is not recommended btw.

Justin Daigle

She's not hosting herself.
I would be Justin Daigle, the manager of Milestone 2 Hosting.

It seems the problem is more with the Coppermine software than with M2's PHP settings.
While I didn't set the values in the PHP config files, 300 seconds (5 minutes) seems like a perfectly reasonable execution time.
I'm sure that's quite a bit more than what most other hosts allow, and raising it any higher would be unreasonable, as this could allow scripts to slow down the server.

Why your software would need over five minutes to add new files is beyond me.

Justin Daigle

Seems I can't edit my posts, but I forgot to mention, the folder names on the server never changed.
I wasn't thinking when I was setting the aliases for her FTP account, so she saw the "new" folder name as opposed to the real one.
The folder name on the server is still "stillbelieving.co.cc."

Sorry for the confusion.

Joachim Müller

Quote from: Justin Daigle on September 25, 2009, 05:14:52 AM
She's not hosting herself.
I would be Justin Daigle, the manager of Milestone 2 Hosting.
OK, thanks for clarifying that. The path C:\webroot\stillbelieving.co.cc\gallery\albums/ that was mentioned in the initial posting lead me to believe that she was self-hosting. I apologize for the false assumption. Are you using symlinks (or rather: the Windows/NTFS equivalent "junctions")? Because that has caused issues in the past as well. I'm asking this because I find it hard to believe that you can afford to store all hosts on the primary partition easily.
I'm concerned as well about the appearance of forward and backward slashes in that message that might indicate there's something fishy.

Quote from: Justin Daigle on September 25, 2009, 05:24:58 AM
Seems I can't edit my posts
That's intended behaviour. We removed user's ability to edit postings due to abuse in the past.

Quote from: Justin Daigle on September 25, 2009, 05:24:58 AMbut I forgot to mention, the folder names on the server never changed.
I wasn't thinking when I was setting the aliases for her FTP account, so she saw the "new" folder name as opposed to the real one.
The folder name on the server is still "stillbelieving.co.cc."
That might cause the issue then: dots in folder names are a bad thing as far as Coppermine is concerned. Although Coppermine is designed to work on any OS, the main focus is on Lunix-driven servers, where dots have a special meaning. Additionally, it's hard for a script to determine the difference between a file and a folder if there are dots in the folder name. Maybe you can change that.

@Aliza: please post a deep link to one of the files you're trying to batch-add.
Also review the coppermine config setting "URL of your coppermine gallery folder": all your images appear to be located at http://stillbelieving.net/gallery/albums%5Cuserpics/1000x/filename.jpg -> Notice the %5 where actually a slash should reside. What do you have set for that config option?

Aliza

The "URL of your coppermine gallery folder (no 'index.php' or similar at the end)" is "http://stillbelieving.net/gallery/"

I'm not sure what a deep link his, so here is a direct link of an image picked randomly that is not in coppermine yet: http://stillbelieving.net/gallery/albums/greysanatomy/s1/8saveme/8saveme0776.JPG

RJackson

Good evening,  I am Rob Jackson, Milestone Services Administrator.

Myself and my colleagues have been looking into this error and it turns out the error resides in a function in PHP, rather than the Coppermine Gallery software. The function in question, 'readdir' which is being used in a while loop, 'while (($file = readdir($dir)) !== FALSE) { // loop looking for files'.

What the team have discovered is that when that function is called, rather than reading the images in the configured directory, the function seems to read images in that directory and it's sub-directories:

Let's say we want to read C:\example, The function however reads the sub-directories aswell as the configured directory:
C:\example\
C:\example\images\
C:\example\images\gallery\
C:\example\pictures\
etc.

From our troubleshooting we've discovered it takes 0.015s to read each file,  with our file structure that accounts to a whole 1653s (30mins apx) to read all of the files.  This will explain why the timeout problem will occur, and it also explains why the server is using copious amounts of CPU cycles on PHP.

We're still looking into solutions, as we believe phpts.dll may also be related to the problem.  We don't specialise in PHP so any help you can give us as the hosts, and our client will be much appreciated.

Regards,

Joachim Müller

Thanks for the clarification. I wish there were more tech staff members like you, having the guts to actually confess that there is a webserver-sided issue; most webhost supporters usually blame the application and send the user into a support loop. Of course you can not be held responsible for a possible flaw in PHP's implementation of a particular function. I have no idea about the contract Aliza has got with you, but judging from the way both you as well as Justin are dealing with this issue I can only congatulate you and recommend your services to others: although I'm not very fond of Windows-driven webservers there seems to be a lot of compassion in your company for what you do.
Although Aliza had a bad start here and didn't perform well I'm more than ready to help you guys solve the issue.
This being said, here's my suggestion: as there appear to be quite some known issues and bugs related to readdir (see http://www.google.com/search?q=site%3Abugs.php.net+readdir) I strongly suggest to make sure you're using the latest stable PHP release. If you offer Lunix-based webhosting as well as Windows-based webhosting I suggest talking with your customer (the thread starter Aliza) about a possible migration to a Linux-driven webserver as an option. If that is not an option, you could review the readdir part of the code and find a replacement construct using scandir or dir if that is an alternative that performs better. Something like$dh = dir($dir);
while ($file = $dh->read()) {
    //...
}
$dh->close();
should do the trick.