Nette 2.4 nefunguje na hostingu WebSupport s PHP7, Failed to create(read) session ID: memcache
Upozornění: Tohle vlákno je hodně staré a informace nemusí být platné pro současné Nette.
- MKI-Miro
- Člen | 278
Ahojte
Na hostingu pri zapnuti PHP 7 mi to hlasi:
Recoverable Error
session_regenerate_id(): Failed to create(read) session ID: memcache (path: /apachetmp/sessions) search►
Source file
File: .../web/vendor/nette/http/src/Http/Session.php:222
212: * @throws Nette\InvalidStateException
213: * @return void
214: */
215: public function regenerateId()
216: {
217: if (self::$started && !$this->regenerated) {
218: if (headers_sent($file, $line)) {
219: throw new Nette\InvalidStateException('Cannot regenerate session ID after HTTP headers have been sent' . ($file ? " (output started at $file:$line)." : '.'));
220: }
221: if (session_status() === PHP_SESSION_ACTIVE) {
222: session_regenerate_id(TRUE);
223: session_write_close();
224: }
225: $backup = $_SESSION;
226: session_start();
Call stack
.../web/vendor/nette/http/src/Http/Session.php:222 source session_regenerate_id(arguments)
.../web/vendor/nette/http/src/Http/Session.php:149 source Nette\Http\Session->regenerateId()
.../cache/Nette.Configurator/Container_2aa5441ad5.php:2306 source Nette\Http\Session->start()
.../nette/bootstrap/src/Bootstrap/Configurator.php:218 source Container_2aa5441ad5->initialize()
.../puzzlemania.sk/web/app/bootstrap.php:20 source Nette\Configurator->createContainer()
.../puzzlemania.sk/web/www/index.php:6 source require(arguments)
z hostingu mi napisali za to chyba nie je u nich a dali mi tento link:
"":https://bugs.php.net/bug.php?…
neviete prosim co stym?
Dakujem
- CZechBoY
- Člen | 3608
Co jsem vycetlz toho bugu a dalsi diskuse tak by melo stacit podedit
SessionaHandler a prepsat read metodu.
V Nette se session handler zaregistruje v config.neon takto (pisu z hlavy tak
snad to pojede)
services:
sessionHandler: App\CachedSessionHandler
class: Nette\Http\Session
setup:
- setHandler(@sessionHandler)
Editoval CZechBoY (4. 9. 2016 12:15)
- MKI-Miro
- Člen | 278
setup: – setHandler(@sessionHandler)
s pomlckou mi to hlasi syntax error
tak som to skusil takto:
sessionHandler: App\CachedSessionHandler
class: Nette\Http\Session
setup: setHandler(@sessionHandler)
a teraz hlasi:
Class App\CachedSessionHandler used in service ‚sessionHandler‘ not found
- David Grudl
- Nette Core | 8228
Je to chyba na WebSupportu, řeším to tímto v config.neon:
session:
saveHandler: files