Page 1 of 1

Download Manager - error

Posted: Tue Dec 18, 2007 6:14 pm
by Don Chambers
I installed the download manager a long time ago, but never had any files in there. I created a new download category, then clicked on the folder to add files and received the following error:

Warning: opendir(/home/content/c/h/a/chambers//downloadspending): failed to open dir: No such file or directory in /home/content/c/h/a/chambers/html/plugins/serendipity_event_downloadmanager/serendipity_event_downloadmanager.php on line 1715

Line 1715 is: $fp = opendir($absincomingpath);
The plugin configuration for incoming path is: /home/content/c/h/a/chambers//downloadspending (is that supposed to be a double slash there?)


Warning: readdir(): supplied argument is not a valid Directory resource in /home/content/c/h/a/chambers/html/plugins/serendipity_event_downloadmanager/serendipity_event_downloadmanager.php on line 1717

Line 1717 is: while ($file = readdir($fp)) {


Warning: closedir(): supplied argument is not a valid Directory resource in /home/content/c/h/a/chambers/html/plugins/serendipity_event_downloadmanager/serendipity_event_downloadmanager.php on line 1738

Line 1738 is: closedir($fp);


The folder “downloadspending” definitely exists – I placed a file there with FTP.

When I tried to upload the file directly by browsing, I received the following error:

Warning: move_uploaded_file(/home/content/c/h/a/chambers//downloads/me78ZvRSefC89vv1noUMh000xxUpqNij): failed to open stream: No such file or directory in /home/content/c/h/a/chambers/html/plugins/serendipity_event_downloadmanager/serendipity_event_downloadmanager.php on line 1368

Line 1368 is: if (!move_uploaded_file($_FILES['file']['tmp_name'][$ulnum], $absdownloadspath."/".$SERVERFILENAME)) {

Warning: move_uploaded_file(): Unable to move '/tmp/phpjJBKSC' to '/home/content/c/h/a/chambers//downloads/me78ZvRSefC89vv1noUMh000xxUpqNij' in /home/content/c/h/a/chambers/html/plugins/serendipity_event_downloadmanager/serendipity_event_downloadmanager.php on line 1368

Does this folder need permissions 777? I have it at 755.
EDIT: No - that does not seem to be the cause of the problem.

Re: Download Manager - error

Posted: Tue Dec 18, 2007 7:12 pm
by garvinhicking
Hi!

You sure you created that "downloadspending" directory exactly here:

/home/content/c/h/a/chambers//downloadspending


Check that path thorougly. Maybe you'Re missing an intermediate "blog", "serendipity" or "upload" directory within that variable?

Regards,
Garvin

Posted: Tue Dec 18, 2007 7:22 pm
by Don Chambers
Yes - positive. Its there. I tried changing the folder name to dlpending in both the plugin and via ftp. Did not make a difference, other than the error reporting the different folder name.

The plugin has no problem with the absolute path to downloads at: /home/content/c/h/a/chambers//downloads

EDIT: The only thing I just noticed on this first error:

Warning: opendir(/home/content/c/h/a/chambers//downloadspending): failed to open dir: No such file or directory in /home/content/c/h/a/chambers/html/plugins/serendipity_event_downloadmanager/serendipity_event_downloadmanager.php on line 1715

is that the plugin location includes /html/ in the path, whereas the absolute path to the folder does not include that, nor do I see /html/ as a folder when I view my directory structure via ftp.

Posted: Tue Dec 18, 2007 7:39 pm
by garvinhicking
Hi!

That's the error then. The plugin expects you to put your files in a location lower than "html". You must add "/html/" yourself then to the directory location.

Regards,
Garvin

Posted: Tue Dec 18, 2007 7:58 pm
by Don Chambers
Hmmm.... my site configuration uses the following for the installation path of s9y: /home/content/c/h/a/chambers/html/. That path was autodetected by the install process - I did not provide it.

The plugin configuration has these for paths, which clearly do not use the /html/ path.

Incoming data path:
/home/content/c/h/a/chambers//downloadspending

Absolute download data path:
/home/content/c/h/a/chambers//downloads

HTTP-path to plugin:
/plugins/serendipity_event_downloadmanager/

The plugin "sees" a file I have sitting in the /downloads folder just fine. That path does not specify /html/ which, as I mentioned, is not a folder I see.

This server stuff drives me nuts!!! :lol:

Posted: Tue Dec 18, 2007 8:23 pm
by garvinhicking
Hi!

Exactly. For security reasons, the plugin tries to tell you to put your download directory outside of the HTTP DOcument Root. If you have no FTP access to the level below your document root, you must point the incoming data path to within the document root, thus add /html/.

HTH,
Garvin

Posted: Tue Dec 18, 2007 8:51 pm
by Don Chambers
Hmmm.. learn something new every day! :)

I'm also wondering if this is the source of some other problems/delays I have had..... Are there other places I should be using this /html/ when asked for a path?

EDIT - also, I activated url rewriting after I initially installed this plugin months ago.... is there something I need in my .htaccess file for this to work: /downloads.html?

These are my current rewrite rules:

Code: Select all

RewriteEngine On
RewriteBase /
RewriteRule ^google4e610ac711a08486.html google4e610ac711a08486.html [L]
RewriteRule ^((archives/([0-9]+)-[0-9a-z\.\_!;,\+\-\%]+\.html)/?) index.php?/$1 [NC,L,QSA]
RewriteRule ^(authors/([0-9]+)-[0-9a-z\.\_!;,\+\-\%]+) index.php?/$1 [NC,L,QSA]
RewriteRule ^(feeds/categories/([0-9;]+)-[0-9a-z\.\_!;,\+\-\%]+\.rss) index.php?/$1 [NC,L,QSA]
RewriteRule ^(feeds/authors/([0-9]+)-[0-9a-z\.\_!;,\+\-\%]+\.rss) index.php?/$1 [NC,L,QSA]
RewriteRule ^(categories/([0-9;]+)-[0-9a-z\.\_!;,\+\-\%]+) index.php?/$1 [NC,L,QSA]
RewriteRule ^archives([/A-Za-z0-9]+)\.html index.php?url=/archives/$1.html [NC,L,QSA]
RewriteRule ^([0-9]+)[_\-][0-9a-z_\-]*\.html index.php?url=$1-article.html [L,NC,QSA]
RewriteRule ^feeds/(.*) index.php?url=/feeds/$1 [L,QSA]
RewriteRule ^unsubscribe/(.*)/([0-9]+) index.php?url=/unsubscribe/$1/$2 [L,QSA]
RewriteRule ^approve/(.*)/(.*)/([0-9]+) index.php?url=approve/$1/$2/$3 [L,QSA]
RewriteRule ^delete/(.*)/(.*)/([0-9]+) index.php?url=delete/$1/$2/$3 [L,QSA]
RewriteRule ^(admin|entries)(/.+)? index.php?url=admin/ [L,QSA]
RewriteRule ^archive/? index.php?url=/archive [L,QSA]
RewriteRule ^(index|atom[0-9]*|rss|b2rss|b2rdf).(rss|rdf|rss2|xml) rss.php?file=$1&ext=$2
RewriteRule ^(plugin|plugin)/(.*) index.php?url=$1/$2 [L,QSA]
RewriteRule ^search/(.*) index.php?url=/search/$1 [L,QSA]
RewriteRule ^comments/(.*) index.php?url=/comments/$1 [L,QSA]
RewriteRule ^(serendipity\.css|serendipity_admin\.css) index.php?url=/$1 [L,QSA]
RewriteRule ^index\.(html?|php.+) index.php?url=index.html [L,QSA]
RewriteRule ^htmlarea/(.*) htmlarea/$1 [L,QSA]
RewriteRule (.*\.html?) index.php?url=/$1 [L,QSA]

Posted: Tue Dec 18, 2007 9:38 pm
by garvinhicking
Hi!

No, the downloadmanager and backup plugins are the only one that access files outside of the HTTP DocumentRoot.

HTH,
Garvin

Posted: Tue Dec 18, 2007 10:01 pm
by Don Chambers
Then why does this not work: http://www.optional-necessity.com/downloads.html

but this does:
http://www.optional-necessity.com/index ... ]=download

I have configured the download manager permalink as both /downloads.html, and the full path, but neither works.

Posted: Tue Dec 18, 2007 11:01 pm
by garvinhicking
Hi!

The downloads' manager plugin permalink detection is not as good as staticpages etc, so it might be that the staticpage plugin (if installed) or other plugins can interfer. Try to change the order of event plugins, or try to use something like /downloads/downloads.htm or /downloads/downloadmanager.txt ?


Regards,
Garvin

Posted: Tue Dec 18, 2007 11:12 pm
by Don Chambers
You got here a few minutes too quick!! I managed to resolve it.... turned out to be a conflict with the static page plugin, but not what you might think. I had created a static page (as a test) a long time ago with the same name!!!!! Go figure!

Posted: Tue Dec 18, 2007 11:24 pm
by Don Chambers
Hmmmm... this might need to be an actual plugin modification though. My changes worked fine for the main download page, but the category pages are still ugly URLs, like this:
http://www.optional-necessity.com/index ... &thiscat=3

Posted: Wed Dec 19, 2007 12:46 pm
by garvinhicking
Hi!

Yes, the plugin uses this, because additional variables cannot be so easily passed to permalinks.

Regards,
Garvin