Page 1 of 1

Problem with absolute path

Posted: 08 Mar 2020, 19:40
by dianem
Hello
Phoca download can't find files when I'm using absolute path outside my website folders which is /var/www/vhosts/myserver.com/mywebsite.com/.
For example, I had try to fill /var/www/phocadownload/ in Absolute Path field but "Error while downloading file File not found on server"

I read this help : https://www.phoca.cz/documents/17-phoca ... tml-folder but I don't understand why it don't work.
Direct link is No.
I'm having no more idea.
Is someone can help me ?

Re: Problem with absolute path

Posted: 11 Mar 2020, 10:33
by dianem
Is there someone to help me ?

Re: Problem with absolute path

Posted: 12 Mar 2020, 19:51
by Jan
Hi, you need to check the path if it really is the right path and PHP can find this path on your server :idea:

Jan

Re: Problem with absolute path

Posted: 12 Mar 2020, 23:32
by dianem
Thank Jan
How can I check it ? I can't open the path in a browser if it is outside my website folder.
The path looks good viewing the tree of folders in root ftp.

Re: Problem with absolute path

Posted: 17 Mar 2020, 23:50
by Jan
Hi, try to compare it with paths in confiruration.php file. Mostly e.g. if "/" is missing at start or at end, there can be problem, etc. :idea:

Jan

Re: Problem with absolute path

Posted: 21 Mar 2020, 00:57
by dianem
Thanks for your help and sorry for this later answer.
No problem with slash.
The original path is : /var/www/vhosts/ecolezhongfu.org/ecolezhongfu.com/phocadownload/
and them I wanted is : /mnt/sdb/mediatheque/phocadownload/
Perhaps is it a problem of folder's owner ? For new path, owner is root while the owner's current path is an other.
What do you think ?

Re: Problem with absolute path

Posted: 22 Mar 2020, 21:53
by Jan
Hi, really hard to say, but maybe it can be caused by wrong ownership or permissions.

The error comes from this if clause:

Code: Select all

if (JFile::exists($absFile)) {
So Joomla! File method just says, the file with this full path just don't exist. For now I have no information that exists method checks for permissions or ownership so really hard to say if this can be caused by permissions/ownership. I would just say, the method just cannot find the file with the full path set. :idea:

Jan

Re: Problem with absolute path

Posted: 23 Mar 2020, 00:10
by dianem
Ok, I do not know either what is causing the error.
Thank you for for help.
If I find, I come back to tell you.

Diane

Re: Problem with absolute path

Posted: 23 Mar 2020, 22:26
by Jan
Hi, yes, will be great, just try to change the paths (adding or removing /, adding or removig first parent folders because somtimes the server works with shortcuts for the paths :idea: )

Jan