New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cannot run concrete5 because open_basedir restriction #2579
Comments
According to the host, they were able to do a clean install even with 5.7.3.1. But transferring an existing installation does not work. Might it be that the old server settings are stored somewhere and they are conflicting with the new server? |
There are 183 places where <?php
/**
* -----------------------------------------------------------------------------
* Generated ...
*
* @item ...
* @group concrete
* @namespace null
* -----------------------------------------------------------------------------
*/
return array(
'site' => '...',
'version_installed' => '...',
[...]
); You should add these lines just after 'debug' => array(
'detail' => 'debug',
'display_errors' => true
), Doing so, you should see the full log of the error, so that we can see where this error occurs. |
It was actually coming from all addresses which I tried to access. But adding that debug line gave more information: /public_html/concrete/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Session/Storage/Handler/NativeFileSessionHandler.php throw new \InvalidArgumentException(sprintf('Invalid argument $savePath '%s'', $savePath));
|
Possible the same issue: |
Could you see the value of the The simplest way to do this is to temporarily change the file var_dump(ini_get('session.save_path'));
die(); |
string(12) "/var/lib/php" |
I see these options to solve the problem:
@aembler What about adding a new configuration parameter to change the default path where the session files are saved? It's quite simple, just update the initialization of NativeFileSessionHandler |
Thanks for the quick help. Changing sessions to database fixed the problem. Seems there is still something funky with the new server because I get often when opening pages: ERR_EMPTY_RESPONSE Waiting for a moment (1-2 seconds) and the page will then open fine. Will have to consult the host about that one. |
Opening a normal HTML page works without problems in the host. Seems like its just concrete5 which is not sending data at first. Do you have any pointers how this could be debugged? |
In the future, lets suggest people add to /application/config/concrete.php
|
You should be able to configure where session files are stored by using the |
Seems really weird. After changing sessions to database, I can login with my own credentials but another user is having trouble logging in. She has tried on several computers and also I tried with her credentials and we both get error 500 for Access denied. |
I was able to fix the problem by reverting back to PHP 5.6 and using files to save sessions. But with PHP 7 and database storage the user gets logged out immediately after clicking some link. I checked the Sessions table in database and it seems that sessions are generated but they are just not valid. Example sessionValue:
|
And sorry, I deleted the original message because I thought I solved the problem before. So the original problem was that our host changed the PHP 7 settings for where the sessions are stored. I then changed our settings for saving sessions to database but this lead to problems for users to login. Users were able to login but they were immediately kicked out with invalid session. Users kept getting logged out even though they cleared temporary files, cookies, restarted browser or even used a completely different computer. And I was also getting logged out when using another users username / password with similar problems. I also tried to define the sessions save path in concrete5.php but that did not seem to work either. The original error went away after saving sessions to database but sessions were not working correctly anymore. |
If you set the concrete.session.save_path` configuration key to a writable directory and using file-based session files, what's the error message that you see? |
I think I got it working now. I changed the directory permissions and now files seem to be getting generated again and user seems to be able to login. Still wondering what messes up with the database sessions but at least the biggest problem seems to be over. Thanks a ton. |
Also on a sidenote. |
When trying to run concrete5 5.7.4.2 in our new host, I get the following error:
is_dir(): open_basedir restriction in effect. File(/var/lib/php) is not within the allowed path(s): (/home/user/:/tmp:/var/tmp:/usr/local/lib/php/:/usr/local/php55/lib/php/)
I asked about this from our host, and they said that this is a bug in concrete5 itself and they cannot fix it without compromising the servers security.
Installation was fine on other server but the new server seems to have stricter open_basedir settings.
The text was updated successfully, but these errors were encountered: