Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Re: Mod File Upload
Under Admin->Preferences, what value is shown in the “File Upload Path” field. It should be an absolute path that ends with a slash.
Offline
Re: Mod File Upload
It does. I’m presuming I don’t need “http” etc.
Stuart
In a Time of Universal Deceit
Telling the Truth is Revolutionary.
Offline
Re: Mod File Upload
The file upload path should be a file system path to the upload folder, not a url path. What value do you have in there?
Offline
Re: Mod File Upload
/home/thebombs/files/
Stuart
In a Time of Universal Deceit
Telling the Truth is Revolutionary.
Offline
Re: Mod File Upload
I wonder if the apache user has read access to that folder. Create the following php file and run it. It should output all of the files that you uploaded with ftp to that path.
<pre> <code> <?php $dir = '/home/thebombs/files/'; $files = scandir($dir); print_r($file); ?> </code> </pre>
Offline
Re: Mod File Upload
Fatal error: Call to undefined function: scandir() in /home/thebombs/public_html/files.php on line 3
Stuart
In a Time of Universal Deceit
Telling the Truth is Revolutionary.
Offline
Re: Mod File Upload
Sorry, that was for php 5. Here’s one for 4
<pre>
<code>
<?php
$dir = "/home/thebombs/files/";
$dh = opendir($dir);
while (false ! ($filename = readdir($dh))) {
$files[] = $filename;
}
sort($files);
print_r($files);
?>
</code>
</pre>
==
Offline
Re: Mod File Upload
Doh!
Parse error: parse error, unexpected ‘!’ in /home/thebombs/public_html/files.php on line 4
Stuart
In a Time of Universal Deceit
Telling the Truth is Revolutionary.
Offline
Offline
Re: Mod File Upload
Well that’s given me an array with all the files listed. Do you want to see it?
Stuart
In a Time of Universal Deceit
Telling the Truth is Revolutionary.
Offline
Re: Mod File Upload
On one of the files where the chmod fails, who is the owner and group for the file, and what are the permissions?
BTW…if you have aim MeManfre
Offline
Re: Mod File Upload
They are all chmod 644 which is read-only for group and read/write for owner. It doesn’t tell me “who”. Where do I find that? I’m on ICQ. Does AIM take much setting up?
Stuart
In a Time of Universal Deceit
Telling the Truth is Revolutionary.
Offline
Re: Mod File Upload
I can chmod them through FTP. I’ve already done it for the ones I’ve “imported” so far.
Stuart
In a Time of Universal Deceit
Telling the Truth is Revolutionary.
Offline
Offline
Re: Mod File Upload
Just a quick note. Everything is running fine but I thought I would also mention that the forced use of the download.php file means that I can track downloads via Shortstat or BBClone. Very useful.
Stuart
In a Time of Universal Deceit
Telling the Truth is Revolutionary.
Offline