Problem with absolute path

Phoca Download - download manager
dianem
Phoca Newbie
Phoca Newbie
Posts: 5
Joined: 08 Mar 2020, 19:19

Problem with absolute path

Post by dianem » 08 Mar 2020, 19:40

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 ?

dianem
Phoca Newbie
Phoca Newbie
Posts: 5
Joined: 08 Mar 2020, 19:19

Re: Problem with absolute path

Post by dianem » 11 Mar 2020, 10:33

Is there someone to help me ?

User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 42096
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Problem with absolute path

Post by Jan » 12 Mar 2020, 19:51

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
If you find Phoca extensions useful, please support the project

dianem
Phoca Newbie
Phoca Newbie
Posts: 5
Joined: 08 Mar 2020, 19:19

Re: Problem with absolute path

Post by dianem » 12 Mar 2020, 23:32

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.

User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 42096
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Problem with absolute path

Post by Jan » 17 Mar 2020, 23:50

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
If you find Phoca extensions useful, please support the project

dianem
Phoca Newbie
Phoca Newbie
Posts: 5
Joined: 08 Mar 2020, 19:19

Re: Problem with absolute path

Post by dianem » 21 Mar 2020, 00:57

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 ?

User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 42096
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Problem with absolute path

Post by Jan » 22 Mar 2020, 21:53

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
If you find Phoca extensions useful, please support the project

dianem
Phoca Newbie
Phoca Newbie
Posts: 5
Joined: 08 Mar 2020, 19:19

Re: Problem with absolute path

Post by dianem » 23 Mar 2020, 00:10

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

User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 42096
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Problem with absolute path

Post by Jan » 23 Mar 2020, 22:26

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
If you find Phoca extensions useful, please support the project

Post Reply