Install Joomla 4.0.3 into a folder:
/var/www/XXXXX/htdocs/
Set public $log_everything = 1; in configuration php or enable "Log Almost Everything" in System -> Global Configuration -> Logging
Try Log-paths unter htdocs folder, for example:
/var/www/XXXX/htdocs/administrator/logs
Try to login into administraton
Login
Error 500 (in my case, depends on your php integration into the webserver)
I enabled the php error logging into a file, result:
"[03-Oct-2021 11:16:54 Europe/Berlin] PHP Warning: is_dir(): open_basedir restriction in effect. File(/var/www/XXXXX) is not within the allowed path(s): (/var/www/XXXXX/htdocs/:/var/www/XXXXX/apps/:/var/www/XXXXX/priv/:/var/www/XXXXX/tmp/:/usr/share/pear/:/usr/share/php/:/tmp/) in /var/www/XXXXX/htdocs/libraries/src/Filesystem/Folder.php on line 478
"
As you can see above, the folder where Joomla! is installed /var/www/XXXXX/htdocs/ is inside the folders allowed on open_basedir.
Open basedir /var/www/XXXX/htdocs/:/var/www/XXXX/apps/:/var/www/XXXX/priv/:/var/www/XXXX/tmp/:/usr/share/pear/:/usr/share/php/:/tmp/
PHP Built On Linux server6.andrehotzler.de 4.9.0-16-amd64 #1 SMP Debian 4.9.272-2 (2021-07-19) x86_64
Database Type mysql
Database Version 10.1.48-MariaDB-0+deb9u2
Database Collation latin1_swedish_ci
Database Connection Collation utf8mb4_general_ci
Database Connection Encryption None
Database Server Supports Connection Encryption No
PHP Version 8.0.11
Web Server Apache
WebServer to PHP Interface cgi-fcgi
Joomla! Version Joomla! 4.0.3 Stable [ Furaha ] 12-September-2021 10:39 GMT
User Agent Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/94.0.4606.61 Safari/537.36
The question is why Joomla, when installed in the htdocs folder, encounters an open_basedir restriction in the parent folder. Shouldn't Joomla! actually stay inside the htdocs folder?
Labels |
Added:
No Code Attached Yet
|
public $log_path = '/var/www/XXXX/htdocs/administrator/logs';
If it say File(/var/www/XXXXX) is not within the allowed path(s):
then it not within, PHP cannot lie ;)
Make sure your web user XXXXX are correct in $log_path
There is no need, that /var/www/XXXXX
should be in the allowed paths, because joomla isnt installed there.
Joomla is installed in /var/www/XXXXX/**htdocs**
so it is sufficient if this path is included in open_basedir
If it say
File(/var/www/XXXXX) is not within the allowed path(s):
then it not within, PHP cannot lie ;) Make sure your web user XXXXX are correct in $log_path
As you can see above, the folder where Joomla! is installed is inside the folders allowed on open_basedir.
As you can see above, the folder where Joomla! is installed is inside the folders allowed on open_basedir.
Well, no, we cannot see it, because of privacy thing.
You need to be sure your User behind XXXXX inside $log_path is correct.
The issue is that Joomla requires a larger openbasedir than necessary. The issue is not that I have mixed up different paths on the server and jumbled them together with XXX.
You can believe me: I just used search/replace to replace the real user with X.... it is always the same.
Then probably there a simlink somewhere in the path. I cannot think about other issue here.
Maybe someone else know better.
The issue is that Joomla requires a larger openbasedir than necessary.
Joomla does not require such, it all up to PHP to allow or not to allow.
Joomla does not require such, it all up to PHP to allow or not to allow.
Of course, the server generates the error itself... ithas nothing better to do
I have been able to reproduce the issue on various J!4 installations, both upgrades and brand new installations.
I don't know why it's useful for you to insist that Joomla doesn't do this and that, when the error - at least for me - is there.
I'm out. I'm sick of these always pointless discussions about culpability, that's the reason why hardly anyone wants to participate here.
I cannot reproduce this issue. I have pointed you to one of potential problems.
To me it is clearly server configuration issue, if you say that your $log_path is correct.
i have also just reconfigured my server to use openbase_dir and have been unable to replicate the issue
Status | New | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2021-10-03 18:09:11 |
Closed_By | ⇒ | Fedik |
What is the setting for the log path in your global configruation
public $log_path=