FTP partial video list FTP partial video list
 

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

FTP partial video list

Started by fabrozor, May 30, 2006, 09:59:17 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

fabrozor

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

fabrozor


Joachim Müller


fabrozor

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 ?

Paver

The first point, mainly.  You bumped your post after about 12 hours.  Please consider the points you pasted and be patient.

fabrozor

Ok ...
I keep the hope someone knows the solution :)


fabrozor

I've read the 2 links you gave with my low English reading skill (i'm not english).
I didn't find the solution.

Paver

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").

fabrozor

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 ?

Paver

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.

fabrozor

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

Paver

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

fabrozor

#13
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

Paver

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.

fabrozor

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 -

Paver

So there's the problem.  The function is_file() is saying those other files are not files.  The PHP manual page 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))) {

fabrozor

#17
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)

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.

Paver

#18
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.

fabrozor

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.