coppermine-gallery.com/forum

Support => cpg1.4.x Support => Older/other versions => cpg1.4 upload => Topic started by: fabrozor on May 30, 2006, 09:59:17 AM

Title: FTP partial video list
Post by: fabrozor on May 30, 2006, 09:59:17 AM
Hello,     
I made a research but without finding the answer to my question (sorry if the answer existed already).   

With Filezilla, I uploaded on my website (Free.fr), 33 videos ".avi" going in size from 700 KB to 55 Mo.   

When I use the "ftp" function of coppermine and that I browse directories, I have well the list of the 33 videos in the directory.   

The problem it is that after having validated this directory, I obtain only one partial list of the videos (with check boxs) to place them in an album. 

In this partial list there are only 5 videos instead of 33. 
The 5 Vidéos that I see are less than 5 Mo each.   
I went in the "configuration" and I put the limit of size at 60000 (since one of my videos weighs 55Mo) ... but without a better result.   

Do you have a solution? 
This problem has you it already treated in another post?

Thank you
Title: Re: FTP partial video list
Post by: fabrozor on May 30, 2006, 10:06:25 PM
up
Title: Re: FTP partial video list
Post by: Joachim Müller on May 31, 2006, 12:14:04 AM
http://coppermine-gallery.net/demo/cpg14x/docs/faq.htm#lamesupport
Title: Re: FTP partial video list
Post by: fabrozor on May 31, 2006, 12:49:44 AM
Hi GauGau,

Quote* make sure you have given us enough time to react (days, not hours!)
    * maybe nobody knows the answer to your problem
    * maybe your question has been asked very often
    * maybe your posting has been rude or impolite and you're ignored for that reason
    * maybe you requested a feature that requires a lot of coding, and none of those who are able to do it have a need for the feature
Wich one were you thinking about while pasting the link ?
Title: Re: FTP partial video list
Post by: Paver on May 31, 2006, 12:52:10 AM
The first point, mainly.  You bumped your post after about 12 hours.  Please consider the points you pasted and be patient.
Title: Re: FTP partial video list
Post by: fabrozor on May 31, 2006, 08:45:51 AM
Ok ...
I keep the hope someone knows the solution :)
Title: Re: FTP partial video list
Post by: Joachim Müller on May 31, 2006, 09:02:44 AM
http://coppermine-gallery.net/demo/cpg14x/docs/index.htm#upload_trouble
http://forum.coppermine-gallery.net/index.php?topic=24088.0
Title: Re: FTP partial video list
Post by: fabrozor on May 31, 2006, 03:39:19 PM
I've read the 2 links you gave with my low English reading skill (i'm not english).
I didn't find the solution.
Title: Re: FTP partial video list
Post by: Paver on May 31, 2006, 03:48:46 PM
Are you using "Batch add files"?  And if so, are you using the "Browseable interface"?  If yes to the second question, try turning the browseable interface OFF (to "No").
Title: Re: FTP partial video list
Post by: fabrozor on May 31, 2006, 06:12:34 PM
Thank you for trying to help.

I 'm using the batch add files.
I tryied both Browsable interface "ON" and "OFF". The result is the same. The list displays only 5 videos less than 5 Mo and doesn't show the remaining 28 videos bigger than 5 Mo.

Do you think it's possible to directly type the SQL command to add the 28 videos in the database ?
Title: Re: FTP partial video list
Post by: Paver on May 31, 2006, 07:34:23 PM
Oh, I forgot that you said the larger files weren't listed.

I don't know what to say.  I cannot reproduce this problem on my testbed.  The listing of the files is not filtered based on group quota.  In fact, as far as I can tell, the group's space quota is only checked when you add the file to the album.

So I don't understand why the listing would be missing those files.  The only checks done are whether the file has a filesize and is_readable.  I assume you checked to make sure all files are 644 or 755?

You can try this troubleshooting step.  In searchnew.php, look for this line in the function CPGscandir:
getfoldercontent($dir, $dir_array, $pic_array, $expic_array);
and add this line after it:
echo "TESTING: <pre>"; print_r($pic_array); echo "</pre><br />";

Then browse into the folder using Batch Add and see what the TESTING line says - see if it shows the missing files.
Title: Re: FTP partial video list
Post by: fabrozor on June 01, 2006, 12:08:02 AM
File permissions seems to be :
-rw-r--r--

The result of modified "searchnew.php" is :


TESTING
Array
(
    [3] => 2006_05_01_070.avi
    [4] => 2006_05_01_078.avi
    [0] => 2006_05_01_091.avi
    [1] => 2006_05_01_100.avi
    [2] => 2006_05_01_101.avi
)

5 files instead of 33
Title: Re: FTP partial video list
Post by: Paver on June 01, 2006, 12:35:19 AM
Ok, you can remove that previous line (or leave it).

Look for this line in function getfoldercontents:
while ($file = readdir($dir)) {
and add this line after it:
echo "TESTING2: $file <br />";

Then see which files are listed with "TESTING2".
Title: Re: FTP partial video list
Post by: fabrozor on June 01, 2006, 12:45:34 AM
function getfoldercontent modified as you told gives :
TESTING2: .
TESTING2: ..
TESTING2: 2006_05_01_089.avi
TESTING2: 2006_05_01_090.avi
TESTING2: 2006_05_01_091.avi
TESTING2: 2006_05_01_092.avi
TESTING2: 2006_05_01_093.avi
TESTING2: 2006_05_01_097.avi
TESTING2: 2006_05_01_098.avi
TESTING2: 2006_05_01_099.avi
TESTING2: 2006_05_01_100.avi
TESTING2: 2006_05_01_101.avi
TESTING2: 2006_05_01_096b.avi
TESTING2: 2006_05_01_096c.avi
TESTING2: 2006_05_01_096d.avi
TESTING2: 2006_05_01_097b.avi
TESTING2: 2006_05_01_070.avi
TESTING2: 2006_05_01_071.avi
TESTING2: 2006_05_01_072.avi
TESTING2: 2006_05_01_073.avi
TESTING2: 2006_05_01_074.avi
TESTING2: 2006_05_01_075.avi
TESTING2: 2006_05_01_076.avi
TESTING2: 2006_05_01_077.avi
TESTING2: 2006_05_01_078.avi
TESTING2: 2006_05_01_079.avi
TESTING2: 2006_05_01_080.avi
TESTING2: 2006_05_01_081.avi
TESTING2: 2006_05_01_082.avi
TESTING2: 2006_05_01_083.avi
TESTING2: 2006_05_01_084.avi
TESTING2: 2006_05_01_085.avi
TESTING2: 2006_05_01_086.avi
TESTING2: 2006_05_01_087.avi
TESTING2: 2006_05_01_088.avi


But ... the list with check boxes displays only
    [v] 2006_05_01_070.avi
    [v] 2006_05_01_078.avi
    [v] 2006_05_01_091.avi
    [v] 2006_05_01_100.avi
    [v] 2006_05_01_101.avi
Title: Re: FTP partial video list
Post by: Paver on June 01, 2006, 01:23:01 AM
Ok, we're almost there.

In function getfoldercontent, look for this line:
if (is_file($CONFIG['fullpath'] . $folder . $file)) {
and add before it this line:
echo "TESTING3: $file - ".is_file($CONFIG['fullpath'] . $folder . $file)."<br />";

You're looking at the number after each file, either a "1" or a blank.
Title: Re: FTP partial video list
Post by: fabrozor on June 01, 2006, 06:58:34 PM
I modified as you said and here is the result :

TESTING3: . -
TESTING3: .. -
TESTING3: 2006_05_01_089.avi -
TESTING3: 2006_05_01_090.avi -
TESTING3: 2006_05_01_091.avi - 1
TESTING3: 2006_05_01_092.avi -
TESTING3: 2006_05_01_093.avi -
TESTING3: 2006_05_01_097.avi -
TESTING3: 2006_05_01_098.avi -
TESTING3: 2006_05_01_099.avi -
TESTING3: 2006_05_01_100.avi - 1
TESTING3: 2006_05_01_101.avi - 1
TESTING3: 2006_05_01_096b.avi -
TESTING3: 2006_05_01_096c.avi -
TESTING3: 2006_05_01_096d.avi -
TESTING3: 2006_05_01_097b.avi -
TESTING3: 2006_05_01_070.avi - 1
TESTING3: 2006_05_01_071.avi -
TESTING3: 2006_05_01_072.avi -
TESTING3: 2006_05_01_073.avi -
TESTING3: 2006_05_01_074.avi -
TESTING3: 2006_05_01_075.avi -
TESTING3: 2006_05_01_076.avi -
TESTING3: 2006_05_01_077.avi -
TESTING3: 2006_05_01_078.avi - 1
TESTING3: 2006_05_01_079.avi -
TESTING3: 2006_05_01_080.avi -
TESTING3: 2006_05_01_081.avi -
TESTING3: 2006_05_01_082.avi -
TESTING3: 2006_05_01_083.avi -
TESTING3: 2006_05_01_084.avi -
TESTING3: 2006_05_01_085.avi -
TESTING3: 2006_05_01_086.avi -
TESTING3: 2006_05_01_087.avi -
TESTING3: 2006_05_01_088.avi -
Title: Re: FTP partial video list
Post by: Paver on June 01, 2006, 07:41:00 PM
So there's the problem.  The function is_file() is saying those other files are not files.  The PHP manual page (http://us2.php.net/is_file) has a few comments that give ways is_file() would return false for files.  Assuming your permissions are set correctly, there is one filesize reason, but that's for 2^32 bytes for most systems.  I don't if that limit would be smaller on some systems.  I don't think it's a PHP.ini setting because is_file() is a simple function that just checks if the argument given is a file.

I don't know what else to say for this problem.  I can give a work-around hack that will bypass the is_file() check for AVI files.  There might be a better way to do this.  And I don't know if there are ways you might get into trouble with this hack, but on first thought, I think it's fairly safe.

Replace this line:
if (is_file($CONFIG['fullpath'] . $folder . $file)) {
with this line:
if ((is_file($CONFIG['fullpath'] . $folder . $file)) || (preg_match('/\.avi$/i',$file))) {
Title: Re: FTP partial video list
Post by: fabrozor on June 01, 2006, 08:06:11 PM
Here is the result :
(https://coppermine-gallery.com/forum/proxy.php?request=http%3A%2F%2Fimg363.imageshack.us%2Fimg363%2F2613%2Fpbgallery6fw.th.jpg&hash=cc801dd221489f78b7bb3e07a169b17e7eeda610) (http://img363.imageshack.us/my.php?image=pbgallery6fw.jpg)

The previous recognised files are still checked.
The previous unrecognised files now display an icon "404 error - can't read that file"

Waiting for finding a solution, i wrote an html page with direct link to the files. They are downloadable that way so ... it's probably a problem from my Webspace provider PHP/SQL configuration.
Title: Re: FTP partial video list
Post by: Paver on June 01, 2006, 08:22:45 PM
Well, the same reason that causes is_file() to fail probably causes is_readable() to fail.  So to hack that check in function picrow (which produces the checkboxes), look for this line:
if (filesize($picname) && is_readable($picname)) {
and replace it with this line:
if (filesize($picname) && is_readable($picname) || (preg_match('/\.avi$/i',$picname))) {

You'll still get the 404 error thumb.  To avoid that, you'd have to hack the script showthumb.php.

I'm not sure if there are any checks after you check a file to be added.  And I don't know if there will be any problems playing the video once it's in the Coppermine gallery.

Ideally, you should figure out why these basic functions are not working with those files. 

edit: Fixed typo in code above.
Title: Re: FTP partial video list
Post by: fabrozor on June 01, 2006, 08:44:59 PM
The result is the same as previous.
No checkbox for the unrecognised files.
I mean, the files still diplay in white italic letters with 404 icon.
Title: Re: FTP partial video list
Post by: Paver on June 01, 2006, 09:01:51 PM
Oops.  I made a mistake in the code above.  The variable in the picrow() function is $picname, not $file.  I changed the code above.
Title: Re: FTP partial video list
Post by: fabrozor on June 01, 2006, 09:30:51 PM
IIIIITTTTT WWWWWOOOOOORRRRRRKKKKKKK !!!!!!!!!!!!!!!!!!!!!!!  :o
PAVER YOU'RE A GOD !!!!!!!!!!!!!!!!!!!!!!   :o ;D ;D ;D ;D ;D ;D

I pm you the link so you can take a look and enjoy  ;D ;D ;D

Thank you very very much for your precious help.
About the video, if some seems not to start , just hit "reload" and it should fix it.
Title: Re: FTP partial video list
Post by: Paver on June 01, 2006, 09:48:27 PM
I'm still very curious why is_file() and is_readable() didn't work with your larger files.

Oh well.  Too many things to do to dwell on this issue.

I'm glad the work-around worked.
Title: Re: FTP partial video list
Post by: fabrozor on June 01, 2006, 10:00:17 PM
Well, this problem occurs with other people on the same Internet Provider that host our files.
So it's probably a server side configuration problem.
Title: Re: FTP partial video list
Post by: Joachim Müller on June 01, 2006, 11:15:44 PM
Let's check if the large video files are accessible in the first place: please post a deep link to one of the video files that you're having issues with.
Title: Re: FTP partial video list
Post by: fabrozor on June 01, 2006, 11:46:34 PM
What does "deep link" mean ?
A direct link in an Html page worked fine.

The Coppermine_gallery problem was fixed with paver solution.

But something strange. If i display the files info (size, ...) in the coppermine options, the 55Mo video display a size of 0Ko.
Well i upload all my video again to be sure there was no FTP transfert problem.
Title: Re: FTP partial video list
Post by: Paver on June 02, 2006, 12:38:47 AM
Yeah, if is_file() and is_readable() don't work, then the function filesize() probably won't work as well - hence the empty filesizes you see in the file information.

Double-check the group owner for the files and the permissions.  Make sure the 5 that show up fine are exactly the same as the rest.  I don't understand how all these functions would fail just because of the filesize being too big, but if that's the only common denominator, then I guess that must be what it is.

A "deep link" means a link directly to the video file, either through Coppermine's displayimage.php URL or to the file itself.  You're correct that if a link on an HTML page works fine, then the webserver is fine with the files.  However, the PHP execution *may* be run as a different owner - I think I've read that, although I don't really know.
Title: Re: FTP partial video list
Post by: Joachim Müller on June 02, 2006, 08:43:18 AM
If you don't know what a "deep link" is, a regular link would be a good start too ;)
Title: Re: FTP partial video list
Post by: fabrozor on June 02, 2006, 10:13:09 AM
@ Paver : i wonder how i can check who is the owner of the file (that are hosted on my internet provider server).

@ GauGau : sorry but i'm not english and i do my best to anderstand.
I wonder how to put an avatar in my profile !?
Title: Re: FTP partial video list
Post by: Joachim Müller on June 02, 2006, 10:19:47 AM
...then post a link to your coppermine gallery, for Christ's sake!
Title: Re: FTP partial video list
Post by: fabrozor on June 02, 2006, 10:30:48 AM
lol, i knew since your first answer you didn't want to help but only be sarcastic.
And you come now, as all is finished, only to see my private photos and videos ... but sorry, for now the FTP upload is not finished (as i'm re-uploading).

You can use your administrator rights to "punish" me. Arghh ! negativ karma ! it hurts !
Oh by the way, for the second time i wonder how to put an avatar in my profile, thank you for your help (will you finally help ?)

{i edited this message as an answer, after you closed the thread}
Title: Re: FTP partial video list
Post by: Joachim Müller on June 02, 2006, 10:36:34 AM
Editing out your initial postings (http://forum.coppermine-gallery.net/index.php?topic=32049.msg149334#msg149334), making the replies look silly is bad and selfish behaviour. If you want further support, respect board rules and common sense. Locking this thread now, giving negative karma.