- Saved searches
- Use saved searches to filter your results more quickly
- session_start(): Failed to read session data: user (path:) #931
- session_start(): Failed to read session data: user (path:) #931
- Comments
- Почему Kohana 3.3 Error reading session data при любом вызове сессии, после OAuth?
- Saved searches
- Use saved searches to filter your results more quickly
- Error reading session data #105
- Error reading session data #105
- Comments
Saved searches
Use saved searches to filter your results more quickly
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session.
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
session_start(): Failed to read session data: user (path:) #931
session_start(): Failed to read session data: user (path:) #931
Comments
The following error is installed in the php7.2 environment.
[error] 7500#0: *53 FastCGI sent in stderr: «PHP message: PHP Warning: session_start(): Failed to read session data: user (path:) in packagist/app/cache/prod/classes.php on line 66PHP message: PHP Warning: session_start(): Failed to read session data: user (path: ) in packagist/app/cache/prod/classes.php on line 66″ while reading response header from upstream, client: 127.0.0.1, server: packagist.medbanks.cn, request: «GET / HTTP/1.1», upstream: «fastcgi://127.0.0.1:9000», host: «packagist.mydomain.com»
The text was updated successfully, but these errors were encountered:
after i make
chmod 777 /var/lib/php/sessions
and
rm -rf app/cache/*
and
service php7.1-fpm restart
[Thu Aug 16 17:59:19.075231 2018] [proxy_fcgi:error] [pid 26326:tid 139660449801984] [client 194.254.x.x:57058] AH01071: Got error ‘PHP message: PHP Warning: session_start(): Failed to read session data: user (path: /var/lib/php/sessions) in /var/www/packagist.univ.fr/htdocs/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Session/Storage/NativeSessionStorage.php on line 155\nPHP message: PHP Warning: session_start(): Failed to read session data: user (path: /var/lib/php/sessions) in /var/www/packagist.univ.fr/htdocs/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Session/Storage/NativeSessionStorage.php on line 155\n’
I think the issue is that your folder configured to write sessions ( /var/lib/php/sessions according to the error message) might not be accessible to your webserver
the directory sessions of PHP have all permissions:
root@xxxxxxx:/var/lib/php# ls -la
total 8
drwxr-xr-x 4 root root 4096 févr. 12 2018 modules
drwxrwxrwt 2 root root 4096 août 16 18:04 sessions
it is a particularity introduced with PHP 7.1.
The load session mustn’t return null but an empty string.
@mhetru the Symfony session handling code is running fine in production since a long time on PHP 7.1 and PHP 7.2. So I doubt your issue is the same than the SO answer you are linking to (even though PHP displays the same error message, which it can display for many things)
Btw, a sessions folder owned by root looks suspicious to me. I hope your webserver does not run the PHP code as root
i have changed this line
handler_id: snc_redis.session.handler
with this line:
handler_id: ~
in app/config/config_prod.yml:
hmm, then report it to the SncRedisBundle.
I indeed forgot that Packagist was using a third-party session handler.
oh, and make sure your redis server is working of course.
hello, i don’t use redis server for session storage but native session of PHP.
Well, before you changed the line in the config, you were using redis
No i have not a redis server. So i disable the session handler for redis in this config file.
I just downgrade the PHP Version to 7.0 , it works! I don’t know the real reason
Finally i have installed an old version of packagist (an old version git cloned 11 march 2015) and it works!
I had to install this old version of packagist because the fresh last version gitcloned don’t work without redis server. Even i disable the session handler redis. I could not publish packages.
It’s a shame to have imposed the use of the server redis
Well, packagist uses Redis not only for storing the session, but also for storing other infos (for instance for storing download stats).
ok nice, thanks for your answer.
but it would be cool to be capable to disable the redis server if we don’t want to store stats, download, stats and others datas. 😉
The packagist code is about running packagist.org. It is not meant for re-use, as documented at the beginning of the README: https://github.com/composer/packagist#packagist
So this is out of the scope of the project (it would require making the codebase more complex by wrapping all places using redis).
Thus, it would be quite complex, as Redis is now used for many things (and so your Packagist setup would probably not work fine)
Thanks for your precisions 👍
even with a redis server installed, the last version of packagist work good : i can submit a package, but when i go on the page of the package, i see multiples nonstop requests on the URL «/jobs/long-id». and the informations of the package are not displayed. i forgot something in the configuration?
Closing as we do not provide support for running your own instance of the code. Feel free to keep discussing if you like though.
Почему Kohana 3.3 Error reading session data при любом вызове сессии, после OAuth?
Коллеги!
Не сплю вторую ночь.
Подключил модули facebook и google oath к Kohana.
По началу все работало и я не заметил когда все сломалось.
Может быть кто-то сталкивался с подобным?
facebook и google в процессе аутентификации, создают свою сессию.
Здесь и происходит конфликт.
Когда я первый раз с этим столкнулся, то помогло создание собственного конфига сессий:
array( 'name' => sha1(URL::base()), 'lifetime' => 43200, 'encrypted' => FALSE, ), 'cookie' => array( 'name' => 'cookie_name', 'encrypted' => TRUE, 'lifetime' => 43200, ), 'database' => array( 'name' => 'cookie_name', 'encrypted' => TRUE, 'lifetime' => 43200, 'group' => 'default', 'table' => 'table_name', 'columns' => array( 'session_id' => 'session_id', 'last_active' => 'last_active', 'contents' => 'contents' ), 'gc' => 500, ), );
Но при дальнейшей разработке инцидент повторился и уже ничто не может помочь.
BOM-вычистил из всех файлов, а их более 600-сот.
Session_Exception [ 1 ]: Error reading session data. SYSPATH\classes\Kohana\Session.php [ 324 ] 319 > 320 > 321 catch (Exception $e) 322 < 323 // Error reading the session, usually a corrupt session. 324 throw new Session_Exception('Error reading session data.', NULL, Session_Exception::SESSION_CORRUPT); 325 >326 327 if (is_array($data)) 328 < 329 // Load the data locally SYSPATH\classes\Kohana\Session.php [ 125 ] » Kohana_Session->read(arguments) SYSPATH\classes\Kohana\Session.php [ 54 ] » Kohana_Session->__construct(arguments) MODPATH\auth\classes\Kohana\Auth.php [ 58 ] » Kohana_Session::instance(arguments) MODPATH\auth\classes\Kohana\Auth.php [ 37 ] » Kohana_Auth->__construct(arguments) APPPATH\classes\Controller\login.php [ 81 ] » Kohana_Auth::instance() 76 < 77 Auth::instance()->force_login($user); 78 $this->redirect('login/login'); 79 > 80 81 if(Auth::instance()->logged_in()) < 82 Model::factory('User')->link_user_facebook_id($fb_id); 83 $this->redirect('login/login'); 84 > else < 85 $user_data = Model::factory('Facebook')->parse_fb_info($fb->api('/me')); 86 //Model::factory('User')->create_user_from_google_id($user_data);
Ошибка возникает в 81й строке.
На экране мой контроллер login, который выполняет action facebook. Если пользователь залогинен в FB, то возврат происходит сюда же, но уже должна сработать функция, которая принудительно логинит пользователя, найденного в БД по Facebook_id штатными средствами Auth.
Подскажите, что еще можно попробовать ткнуть палкой?
Saved searches
Use saved searches to filter your results more quickly
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session.
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
Error reading session data #105
Error reading session data #105
Comments
i get this error:
Error reading session data
throw new Session_Exception(‘Error reading session data.’, NULL,Session_Exception::SESSION_CORRUPT);
throw new Session_Exception(‘Error reading session data.’. » [SID:».$id.»(«.$this->id().»), name:».$this->_name.»][Details: » . $e . «]\n», NULL, Session_Exception::SESSION_CORRUPT);
Session_Exception [ 1 ]: Error reading session data. [SID:(), name:session][Details: exception ‘ErrorException’ with message ‘session_start(): Function spl_autoload_call() hasn’t defined the class it was called for’ in /var/www/html/kohana/v3.3.3.1/system/classes/Kohana/Session/Native.php:66 Stack trace: #0 [internal function]: Kohana_Core::error_handler(2, ‘session_start(). ‘, ‘/var/www/html/k. ‘, 66, Array) #1 /var/www/html/kohana/v3.3.3.1/system/classes/Kohana/Session/Native.php(66): session_start() #2 /var/www/html/kohana/v3.3.3.1/system/classes/Kohana/Session.php(300): Kohana_Session_Native->_read(NULL) #3 /var/www/html/kohana/v3.3.3.1/system/classes/Kohana/Session.php(125): Kohana_Session->read(NULL) #4 /var/www/html/kohana/v3.3.3.1/system/classes/Kohana/Session.php(54): Kohana_Session->__construct(NULL, NULL) #5 /var/www/html/www/admin/application/classes/Controller/Acess.php(7): Kohana_Session::instance() #6 /var/www/html/kohana/v3.3.3.1/system/classes/Kohana/Controller.php(69): Controller_Acess->before() #7 [internal function]: Kohana_Controller->execute() #8 /var/www/html/kohana/v3.3.3.1/system/classes/Kohana/Request/Client/Internal.php(97): ReflectionMethod->invoke(Object(Controller_Acess)) #9 /var/www/html/saocamilo/kohana/v3.3.3.1/system/classes/Kohana/Request/Client.php(114): Kohana_Request_Client_Internal->execute_request(Object(Request), Object(Response)) #10 /var/www/html/kohana/v3.3.3.1/system/classes/Kohana/Request.php(997): Kohana_Request_Client->execute(Object(Request)) #11 /var/www/html/saocamilo/www/admin/index.php(128): Kohana_Request->execute() #12 ]
Someone can help-me? sometimes the error appears and other non
The text was updated successfully, but these errors were encountered: