Absolute Path error - Jfolder Path is not a folder

Phoca Download - download manager
wnycomputerguy
Phoca Newbie
Phoca Newbie
Posts: 1
Joined: 16 Aug 2012, 22:10

Absolute Path error - Jfolder Path is not a folder

Post by wnycomputerguy »

I've actually solved this issue but figured it was worth sharing as I can't imagine that others won't or haven't encountered it:

For reference, my environment is a Debian 6 VPS running Plesk 10.4; the site is Joomla 2.5

I attempted to configure Phoca Download to use an absolute path outside of my web root but was confronted with:

JFolder::files: Path is not a folder
JFolder::folder: Path is not a folder

in the place of a folder tree whenever the component attempted to list the folders for a file choice or multiple files.

This happened matter what I did - IF the path was above my web root (I experimented by setting an absolute path WITHIN the webroot and it worked fine)

- Tried modifying permissions
- Tried modifying FTP account permissions, root folder, etc
- Tried banging my head on the desk repeatedly

Finally I dug through all of the logs and disovered the cause:

[Thu Aug 16 14:14:56 2012] [error] [client X.X.X.X] PHP Warning: is_dir(): open_basedir restriction in effect. File(/usr/share/download/) is not within the allowed path(s): (/var/www/vhosts/WEBSITE/beta/:/tmp/) in /var/www/vhosts/WEBSITE/beta/libraries/joomla/filesystem/folder.php on line 475, referer: h t t p : / / WEBSITE/administrator/index.php?option=com_phocadownload&view=phocadownloadfile&layout=edit

Plesk utilizes the "open_basedir" setting in PHP that essentially dictates what paths it is allowed to interact with, any paths outside of the allowed ones will be rejected and cause Joomla to throw the Jfolder Errors as they simply do not exist from its perspective. (This frustratingly vague error within Joomla is a subject for another day....)

Official info on open_basedir:

http://www.php.net/manual/en/ini.core.p ... en-basedir


In my case, this setting can be modified within the Plesk Environment under the PHP settings - you can either set it to "none" (this seemed unwise to me) or add the folder to the allowed list (they just need to be separated by a colon)

Pretty sure this is just a setting in the php.ini file but I didn't verify this.

Hopefully this helps others who have encountered this issue, apologies if it's been covered elsewhere (if it has, I sure couldn't find it...)
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48595
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Absolute Path error - Jfolder Path is not a folder

Post by Jan »

Ok, thank you for your info.
Jan
If you find Phoca extensions useful, please support the project
Post Reply