Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#13 2004-11-14 20:40:50

Manfre
Plugin Author
From: North Carolina
Registered: 2004-05-22
Posts: 588
Website

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

#14 2004-11-14 21:24:54

thebombsite
Archived Plugin Author
From: Exmouth, England
Registered: 2004-08-24
Posts: 3,251
Website

Re: Mod File Upload

There you go! Sorted


Stuart

In a Time of Universal Deceit
Telling the Truth is Revolutionary.

Offline

#15 2004-11-15 21:54:57

thebombsite
Archived Plugin Author
From: Exmouth, England
Registered: 2004-08-24
Posts: 3,251
Website

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

#16 2004-11-15 22:18:00

Manfre
Plugin Author
From: North Carolina
Registered: 2004-05-22
Posts: 588
Website

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

#17 2004-11-15 23:52:50

thebombsite
Archived Plugin Author
From: Exmouth, England
Registered: 2004-08-24
Posts: 3,251
Website

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

#18 2004-11-16 00:25:08

Manfre
Plugin Author
From: North Carolina
Registered: 2004-05-22
Posts: 588
Website

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

#19 2004-11-16 01:34:46

thebombsite
Archived Plugin Author
From: Exmouth, England
Registered: 2004-08-24
Posts: 3,251
Website

Re: Mod File Upload

/home/thebombs/files/


Stuart

In a Time of Universal Deceit
Telling the Truth is Revolutionary.

Offline

#20 2004-11-16 01:52:33

Manfre
Plugin Author
From: North Carolina
Registered: 2004-05-22
Posts: 588
Website

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

#21 2004-11-16 03:15:08

thebombsite
Archived Plugin Author
From: Exmouth, England
Registered: 2004-08-24
Posts: 3,251
Website

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

#22 2004-11-16 03:52:52

Manfre
Plugin Author
From: North Carolina
Registered: 2004-05-22
Posts: 588
Website

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

#23 2004-11-16 03:56:31

thebombsite
Archived Plugin Author
From: Exmouth, England
Registered: 2004-08-24
Posts: 3,251
Website

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

#24 2004-11-16 03:57:54

Manfre
Plugin Author
From: North Carolina
Registered: 2004-05-22
Posts: 588
Website

Re: Mod File Upload

Add a ‘=’ after the ‘!’

Offline

Board footer

Powered by FluxBB