forum.coppermine-gallery.net

Support => cpg1.4.x Support => Older/other versions => cpg1.4 upload => Topic started by: Aliza on September 18, 2009, 08:11:09 pm

Title: batch add help
Post by: Aliza on September 18, 2009, 08:11:09 pm
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
Title: Re: batch add help
Post by: Aliza on September 19, 2009, 04:12:14 am
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.
Title: Re: batch add help
Post by: Aliza on September 19, 2009, 10:57:41 pm
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.
Title: Re: batch add help
Post by: phill104 on September 19, 2009, 11:06:41 pm
http://coppermine-gallery.net/demo/cpg14x/docs/index.htm#upload_support
Title: Re: batch add help
Post by: Aliza on September 20, 2009, 01:32:48 am
user test
pass test
Title: Re: batch add help
Post by: Aliza on September 21, 2009, 05:32:21 am
If theres anything else I need to do, let me know, as I am still need help with this problem.
Title: Re: batch add help
Post by: Joachim Müller on September 21, 2009, 11:22:32 am
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
Quote
Sorry there is no album where you are allowed to upload files
Don't waste our time: do your homeworks first!
Title: Re: batch add help
Post by: Aliza on September 22, 2009, 01:11:06 am
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.
Title: Re: batch add help
Post by: Joachim Müller on September 22, 2009, 09:00:56 am
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.
Title: Re: batch add help
Post by: Aliza on September 22, 2009, 05:53:42 pm
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.
Title: Re: batch add help
Post by: Aliza on September 24, 2009, 04:34:02 am
This problem still requires a solution, please.
Title: Re: batch add help
Post by: Joe Carver on September 24, 2009, 05:09:03 am
Start here:

4.11.4 Upload troubleshooting (http://coppermine-gallery.net/demo/cpg14x/docs/index.htm#upload_trouble)

Continue here if needed:

4.11.5 Asking for support on upload issues (http://coppermine-gallery.net/demo/cpg14x/docs/index.htm#upload_support)

Make certain you follow all of the steps before returning.
Title: Re: batch add help
Post by: Aliza on September 24, 2009, 05:57:42 pm
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.
Title: Re: batch add help
Post by: Joachim Müller on September 24, 2009, 06:49:49 pm
Error message
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.
Title: Re: batch add help
Post by: 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.

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.
Title: Re: batch add help
Post by: Justin Daigle on September 25, 2009, 05:24:58 am
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.
Title: Re: batch add help
Post by: Joachim Müller on September 25, 2009, 08:16:35 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.

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.

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."
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 (http://coppermine-gallery.net/demo/cpg14x/docs/index.htm#admin_general_coppermine-url)": 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?
Title: Re: batch add help
Post by: Aliza on September 25, 2009, 05:56:59 pm
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
Title: Re: batch add help
Post by: RJackson on September 26, 2009, 12:34:38 am
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,
Title: Re: batch add help
Post by: Joachim Müller on September 30, 2009, 10:43:11 am
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 (http://www.php.net/manual/en/function.readdir.php) part of the code and find a replacement construct using scandir (http://www.php.net/manual/en/function.scandir.php) or dir (http://www.php.net/manual/en/class.dir.php) if that is an alternative that performs better. Something like
Code: [Select]
$dh = dir($dir);
while ($file = $dh->read()) {
    //...
}
$dh->close();
should do the trick.
Title: Re: batch add help
Post by: Aliza on October 07, 2009, 10:29:10 pm
Just posting an update on the situation:

None of the suggested fixes worked.
Title: Re: batch add help
Post by: Aliza on October 16, 2009, 03:17:45 am
Does anyone else have any more suggestions?
Title: Re: batch add help
Post by: Joachim Müller on October 16, 2009, 09:39:37 am
We can't find workarounds for your issues with your webhosting. If the suggestions posted don't help, we're out of options as far as Coppermine is concerned. If your webhost can't fix things you might consider to join up with another webhost. Look: your webhost's staff has been nice and all, but if they have an issue on their server that they can not make go away, how do you think we could help? If the plumber in your house can't fix the bathtub, do you ask the water supply works for support? Or do you ask a physicists about the specific weight of water? Hell, no: you will look for another plumber who will be able to fix the $#&! bathroom.