Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Re: Mod File Upload
Ahh…makes sense now. You have to select all of the user types that you wish to allow download access. This means that if only “none” is selected, then only anonymous people can download it. I think it would make more sense if I changed the download.php page’s behavior so that if no permissions are required to download, then it will allow anyone to download it.
The fixed download.php file is in the mod package
Last edited by Manfre (2004-11-14 20:41:33)
Offline
Re: Mod File Upload
There you go! Sorted
Stuart
In a Time of Universal Deceit
Telling the Truth is Revolutionary.
Offline
Re: Mod File Upload
I’ve uploaded a few files via FTP and am using the “existing files” facilty to bring them on-board. When I click the “Create” button I get this error at the top of the page:-
“Warning: chmod(): Operation not permitted in /path to site root/textpattern/include/txp_file.php on line 263”
The file gets included and I can work with it just fine but this “chmod” is being blocked.
Stuart
In a Time of Universal Deceit
Telling the Truth is Revolutionary.
Offline
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