Advanced search  

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

Pages: [1] 2   Go Down

Author Topic: FTP partial video list  (Read 12238 times)

0 Members and 1 Guest are viewing this topic.

fabrozor

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 25
FTP partial video list
« 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
« Last Edit: June 01, 2006, 09:48:43 pm by Paver »
Logged

fabrozor

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 25
Re: FTP partial video list
« Reply #1 on: May 30, 2006, 10:06:25 pm »

up
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Logged

fabrozor

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 25
Re: FTP partial video list
« Reply #3 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 ?
Logged

Paver

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: us
  • Offline Offline
  • Gender: Male
  • Posts: 1609
  • Paul V.
Re: FTP partial video list
« Reply #4 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.
Logged

fabrozor

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 25
Re: FTP partial video list
« Reply #5 on: May 31, 2006, 08:45:51 am »

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

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Logged

fabrozor

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 25
Re: FTP partial video list
« Reply #7 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.
Logged

Paver

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: us
  • Offline Offline
  • Gender: Male
  • Posts: 1609
  • Paul V.
Re: FTP partial video list
« Reply #8 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").
Logged

fabrozor

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 25
Re: FTP partial video list
« Reply #9 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 ?
Logged

Paver

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: us
  • Offline Offline
  • Gender: Male
  • Posts: 1609
  • Paul V.
Re: FTP partial video list
« Reply #10 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:
Code: [Select]
getfoldercontent($dir, $dir_array, $pic_array, $expic_array);and add this line after it:
Code: [Select]
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.
Logged

fabrozor

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 25
Re: FTP partial video list
« Reply #11 on: June 01, 2006, 12:08:02 am »

File permissions seems to be :
Code: [Select]
-rw-r--r--
The result of modified "searchnew.php" is :

Code: [Select]
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
Logged

Paver

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: us
  • Offline Offline
  • Gender: Male
  • Posts: 1609
  • Paul V.
Re: FTP partial video list
« Reply #12 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:
Code: [Select]
while ($file = readdir($dir)) {and add this line after it:
Code: [Select]
echo "TESTING2: $file <br />";
Then see which files are listed with "TESTING2".
Logged

fabrozor

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 25
Re: FTP partial video list
« Reply #13 on: June 01, 2006, 12:45:34 am »

function getfoldercontent modified as you told gives :
Code: [Select]
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
« Last Edit: June 01, 2006, 12:51:33 am by fabrozor »
Logged

Paver

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: us
  • Offline Offline
  • Gender: Male
  • Posts: 1609
  • Paul V.
Re: FTP partial video list
« Reply #14 on: June 01, 2006, 01:23:01 am »

Ok, we're almost there.

In function getfoldercontent, look for this line:
Code: [Select]
if (is_file($CONFIG['fullpath'] . $folder . $file)) {and add before it this line:
Code: [Select]
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.
Logged

fabrozor

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 25
Re: FTP partial video list
« Reply #15 on: June 01, 2006, 06:58:34 pm »

I modified as you said and here is the result :

Code: [Select]
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 -
Logged

Paver

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: us
  • Offline Offline
  • Gender: Male
  • Posts: 1609
  • Paul V.
Re: FTP partial video list
« Reply #16 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 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:
Code: [Select]
if (is_file($CONFIG['fullpath'] . $folder . $file)) {with this line:
Code: [Select]
if ((is_file($CONFIG['fullpath'] . $folder . $file)) || (preg_match('/\.avi$/i',$file))) {
Logged

fabrozor

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 25
Re: FTP partial video list
« Reply #17 on: June 01, 2006, 08:06:11 pm »

Here is the result :
(https://forum.coppermine-gallery.net/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.
« Last Edit: June 01, 2006, 08:15:04 pm by fabrozor »
Logged

Paver

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: us
  • Offline Offline
  • Gender: Male
  • Posts: 1609
  • Paul V.
Re: FTP partial video list
« Reply #18 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:
Code: [Select]
if (filesize($picname) && is_readable($picname)) {and replace it with this line:
Code: [Select]
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.
« Last Edit: June 01, 2006, 09:01:09 pm by Paver »
Logged

fabrozor

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 25
Re: FTP partial video list
« Reply #19 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.
Logged
Pages: [1] 2   Go Up
 

Page created in 0.025 seconds with 19 queries.