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 ?
Problem with absolute path
-
- Phoca Newbie
- Posts: 5
- Joined: 08 Mar 2020, 19:19
Re: Problem with absolute path
Is there someone to help me ?
- Jan
- Phoca Hero
- Posts: 47887
- Joined: 10 Nov 2007, 18:23
- Location: Czech Republic
- Contact:
Re: Problem with absolute path
Hi, you need to check the path if it really is the right path and PHP can find this path on your server
Jan
Jan
If you find Phoca extensions useful, please support the project
-
- Phoca Newbie
- Posts: 5
- Joined: 08 Mar 2020, 19:19
Re: Problem with absolute path
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.
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.
- Jan
- Phoca Hero
- Posts: 47887
- Joined: 10 Nov 2007, 18:23
- Location: Czech Republic
- Contact:
Re: Problem with absolute path
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.
Jan
Jan
If you find Phoca extensions useful, please support the project
-
- Phoca Newbie
- Posts: 5
- Joined: 08 Mar 2020, 19:19
Re: Problem with absolute path
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 ?
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 ?
- Jan
- Phoca Hero
- Posts: 47887
- Joined: 10 Nov 2007, 18:23
- Location: Czech Republic
- Contact:
Re: Problem with absolute path
Hi, really hard to say, but maybe it can be caused by wrong ownership or permissions.
The error comes from this if clause:
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.
Jan
The error comes from this if clause:
Code: Select all
if (JFile::exists($absFile)) {
Jan
If you find Phoca extensions useful, please support the project
-
- Phoca Newbie
- Posts: 5
- Joined: 08 Mar 2020, 19:19
Re: Problem with absolute path
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
Thank you for for help.
If I find, I come back to tell you.
Diane
- Jan
- Phoca Hero
- Posts: 47887
- Joined: 10 Nov 2007, 18:23
- Location: Czech Republic
- Contact:
Re: Problem with absolute path
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 )
Jan
Jan
If you find Phoca extensions useful, please support the project