Page 1 of 1

PHP Script Not Finding Files in Specified Directory

Posted: Tue Nov 11, 2008 6:12 pm
by FirstBorn
Hi,

Thank you for reading.

I'm currently using the PHP script from here:
http://www.cantonbecker.com/canton/proj ... script.php

Here is the issue:
This Podcast PHP Script Does Not Find MP3 Files in Directory

It's a great script with the exception of 1 thing,
the MP3 files in a directory are not found by this script,
and will not display in the xml file generated by this script ...

I've used EVERY Conceivable "Path" that I can figure out to no avail.

I'll copy some of the code below for a better idea on what I'm using.

Any Ideas on what I might be doing wrong?

Thank you VERY Much in advance for your help!

Thanks,
FirstBorn

PS. I Like this smiley! -------> :drunk:

Code: Select all

// CONFIGURE THESE VARIABLES:
 
// actual place where your mp3s live on your server's filesystem. TRAILING SLASH REQ'D.
// $musicDirectory="/var/www/html/samples.mysite.com/samples/";
// $musicDirectory="/html/samples.mysite.com/samples/";
// $musicDirectory="../samples.mysite.com/samples/";
// $musicDirectory="./samples.mysite.com/samples/";
// $musicDirectory="/var/www/home/myaccount/samples.mysite.com/samples/";
$musicDirectory="/home/myaccount/samples.mysite.com/samples/";
    
// corresponding web URL for accessing the music directory. TRAILING SLASH REQ'D.
$musicURL="http://samples.mysite.com/samples/";
 

Re: PHP Script Not Finding Files in Specified Directory

Posted: Tue Nov 11, 2008 6:30 pm
by John Cartwright
Take a look at getcwd() and the $_SERVER super global to compare against what you think is the correct directory.

Moved to PHP-Code.

Re: PHP Script Not Finding Files in Specified Directory

Posted: Tue Nov 11, 2008 7:04 pm
by FirstBorn
Dear Jcart,

Thank you for such a quick reply and
for the code to test for the working directory...
It was actually something like this:

Code: Select all

$musicDirectory="/home/.hostservername/myaccount/samples.mysite.com/samples/";
 
k, I tested and found a totally different directory
than what I tested previously, however,
after I edited the file,
ftp'd it to the proper directory,
refreshed the page (in Firefox,)
got the same results...

Is there something that I could be missing and/or overlooking?
This script seems to be a bit 'cut and dry' and to the point,
and I have been able to access the directory using the
Pod Cast Generator (from sourceforge) with little issue...
(just can't have more than 10 Files listed at once in the xml file
generated from the Podcast Generator mentioned above even
after modifying the config.php file, but that's a totally different
script ...)

Thanks,
FirstBorn

PS. I've checked out the Forum Rules and Tour...
Thank you and I apologize for posting in the wrong category.