A
A
Anatoly Bezdetkin2017-04-28 09:05:36
PHP
Anatoly Bezdetkin, 2017-04-28 09:05:36

How to solve the problem with the error: open_basedir restriction in effect. File(/home/u314597346/public_html/tmp) is not within the allowed path(s)?

Dear experts. Help the teapot solve the Joomla!
At the moment, the site is located on a free hostinger.ru hosting, I am making a site for myself, so I just understand all the intricacies. Today I had free time and I decided to work on my site, went to the loomla admin panel and I got notifications about updating joomla itself, the shaper_helix3 template and the Russian language. When I entered the update, a disgusting inscription began to flaunt in front of me (I saw it for the first time):
Warning: is_writeable(): open_basedir restriction in effect. File(/home/u314597346/public_html/tmp) is not within the allowed path(s): (/home/u850868817:/tmp:/var/tmp:/opt/php-7.0/pear:/usr/local/bin :/etc/pki/tls/certs) in /home/u850868817/public_html/administrator/components/com_installer/models/warnings.php on line 104

spoiler
1e7259d113904a5383c1c2234006e4a6.jpg
I ignored it and clicked on the update and naturally got a big error on the screen.
Naturally, I shouted "-Ok! Gubl!" , but he showed me the answers in which I could not figure it out.
Then I climbed along the path of the issued error, searched for warnings.php and found many incomprehensible lines there:
spoiler
Вот выдержка последних строк
[28-Apr-2017 04:04:13 UTC] PHP Warning: file_exists(): open_basedir restriction in effect. File(/home/u314597346/public_html/tmp) is not within the allowed path(s): (/home/u850868817:/tmp:/var/tmp:/opt/php-7.0/pear:/usr/local/bin:/etc/pki/tls/certs) in /home/u850868817/public_html/libraries/joomla/filesystem/file.php on line 397
[28-Apr-2017 04:04:13 UTC] PHP Warning: is_dir(): open_basedir restriction in effect. File(/home/u314597346/public_html) is not within the allowed path(s): (/home/u850868817:/tmp:/var/tmp:/opt/php-7.0/pear:/usr/local/bin:/etc/pki/tls/certs) in /home/u850868817/public_html/libraries/joomla/filesystem/folder.php on line 479
[28-Apr-2017 04:04:13 UTC] PHP Warning: is_dir(): open_basedir restriction in effect. File(/home/u314597346) is not within the allowed path(s): (/home/u850868817:/tmp:/var/tmp:/opt/php-7.0/pear:/usr/local/bin:/etc/pki/tls/certs) in /home/u850868817/public_html/libraries/joomla/filesystem/folder.php on line 479
[28-Apr-2017 04:04:13 UTC] PHP Warning: is_dir(): open_basedir restriction in effect. File(/home) is not within the allowed path(s): (/home/u850868817:/tmp:/var/tmp:/opt/php-7.0/pear:/usr/local/bin:/etc/pki/tls/certs) in /home/u850868817/public_html/libraries/joomla/filesystem/folder.php on line 479
[28-Apr-2017 04:04:13 UTC] PHP Warning: is_dir(): open_basedir restriction in effect. File(/) is not within the allowed path(s): (/home/u850868817:/tmp:/var/tmp:/opt/php-7.0/pear:/usr/local/bin:/etc/pki/tls/certs) in /home/u850868817/public_html/libraries/joomla/filesystem/folder.php on line 479
[28-Apr-2017 04:04:13 UTC] PHP Warning: is_file(): open_basedir restriction in effect. File(/home/u314597346/public_html/tmp/Helix3_template_j3_v2.0.zip) is not within the allowed path(s): (/home/u850868817:/tmp:/var/tmp:/opt/php-7.0/pear:/usr/local/bin:/etc/pki/tls/certs) in /home/u850868817/public_html/libraries/joomla/archive/zip.php on line 135
[28-Apr-2017 04:04:13 UTC] PHP Warning: is_file(): open_basedir restriction in effect. File(/home/u314597346/public_html/tmp/) is not within the allowed path(s): (/home/u850868817:/tmp:/var/tmp:/opt/php-7.0/pear:/usr/local/bin:/etc/pki/tls/certs) in /home/u850868817/public_html/libraries/cms/installer/helper.php on line 300
[28-Apr-2017 04:04:13 UTC] PHP Warning: is_file(): open_basedir restriction in effect. File(/home/u314597346/public_html/tmp/home/u314597346/public_html/tmp/) is not within the allowed path(s): (/home/u850868817:/tmp:/var/tmp:/opt/php-7.0/pear:/usr/local/bin:/etc/pki/tls/certs) in /home/u850868817/public_html/libraries/cms/installer/helper.php on line 304
[28-Apr-2017 04:48:30 UTC] PHP Warning: is_writeable(): open_basedir restriction in effect. File(/home/u314597346/public_html/tmp) is not within the allowed path(s): (/home/u850868817:/tmp:/var/tmp:/opt/php-7.0/pear:/usr/local/bin:/etc/pki/tls/certs) in /home/u850868817/public_html/administrator/components/com_installer/models/warnings.php on line 104
The full text of the file was not included, so if someone can come in handy, here is a link to the entire text of the file
. Therefore, dear experts, kneeling and typing about their problems, please tell me what could be the problem? How to get rid of it? Explain what actions need to be taken to prevent these problems in the future.
PS You can even throw a stone at me.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
I
Ilya Myasin, 2017-04-28
@Graal666

open_basedir - a setting that limits the places where php can "climb".
In your case, these are the directories:
/home/u850868817
/tmp
/var/tmp
/opt/php-7.0/pear
/usr/local/bin // wow!
/etc/pki/tls/certs
On shared hosting, the value is set "from above" by the hoster and cannot be overridden from the script.
On the picture: Joomla took the upload_tmp_dir value - this is a temporary directory for uploading files to the server, and tried to check if it is possible to write there. But it failed to check, because open_basedir did not allow is_writable() to this directory, because it and its parents are not on the allowed list.
You would do well to find out who u314597346 is - because your account is called u850868817. Most likely you copied it somewhere and you need to look for it in the source code. Try creating a file like this:

<?php
echo 'tmp dir: '.ini_get('upload_tmp_dir')."<br />";
echo 'doc root: '. $_SERVER['DOCUMENT_ROOT'];

and see what it outputs. If there are different uXXXX - you need to ask the hoster what for. If both are u850868817, you need to look for where u314597346 came from.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question