Session_start(): Failed to read session data: user (path: C:\app\php7.1\tmp) – PHP – Fórum – Programujte.com
 x   TIP: Přetáhni ikonu na hlavní panel pro připnutí webu

Session_start(): Failed to read session data: user (path: C:\app\php7.1\tmp) – PHP – Fórum – Programujte.comSession_start(): Failed to read session data: user (path: C:\app\php7.1\tmp) – PHP – Fórum – Programujte.com

 

9254686f0
Duch
28. 11. 2017   #1
-
0
-

Dobrý den, po shlednuti skolo pulky forumu jsem nenašel nic co by mi pomohlo. 
Mam dotaz jak se s tim poprat a popřipadě nějaký řešeni ktere by fungovalo by bylo idealni. 
Děkuji 

Nahlásit jako SPAM
IP: 193.85.207.–
peter
~ Anonymní uživatel
3981 příspěvků
28. 11. 2017   #2
-
0
-

Nepolozil jsi dotaz. Nepopsal problem. Nedal zadny php kod.
Servery a prohlizece mivaji ruzna omezeni.
- Povolene cookies?
- Prava k zapisu do adresare pro session?
- Omezeni velikosti diskoveho prostoru adresare session?
- Zkousel jsi pouzit session_regenerate_id? http://php.net/…erate-id.php

Nahlásit jako SPAM
IP: 2001:718:2601:258:c4ce:4c...–
9254686f0
Duch
28. 11. 2017   #3
-
0
-

#2 peter
Dotaz: Co udělat s Session_start(): Failed to read session data: user (path: C:\app\php7.1\tmp) aby se mi na localu spustil web. 
-Ano
-Ano
-5GB
-Ne nezkoušel.
Kod z native.php


<?php
/**
 * @package     Joomla.Platform
 * @subpackage  Session
 *
 * @copyright   Copyright (C) 2005 - 2016 Open Source Matters, Inc. All rights reserved.
 * @license     GNU General Public License version 2 or later; see LICENSE
 */
defined('JPATH_PLATFORM') or die;
/**
 * Interface for managing HTTP sessions
 *
 * @since  3.5
 */
class JSessionHandlerNative implements JSessionHandlerInterface
{
/**
* Has the session been started
*
* @var    boolean
* @since  3.5
*/
private $started = false;
/**
* Has the session been closed
*
* @var    boolean
* @since  3.5
*/
private $closed = false;
/**
* Starts the session
*
* @return  boolean  True if started
*
* @since   3.5
*/
public function start()
{
if ($this->isStarted())
{
return true;
}
$this->doSessionStart();
return true;
}
/**
* Checks if the session is started.
*
* @return  boolean  True if started, false otherwise.
*
* @since   3.5
*/
public function isStarted()
{
return $this->started;
}
/**
* Returns the session ID
*
* @return  string  The session ID
*
* @since   3.5
*/
public function getId()
{
return session_id();
}
/**
* Sets the session ID
*
* @param   string  $id  The session ID
*
* @return  void
*
* @since   3.5
* @throws  LogicException
*/
public function setId($id)
{
if ($this->isStarted())
{
throw new LogicException('Cannot change the ID of an active session');
}
session_id($id);
}
/**
* Returns the session name
*
* @return  mixed  The session name
*
* @since   3.5
*/
public function getName()
{
return session_name();
}
/**
* Sets the session name
*
* @param   string  $name  The name of the session
*
* @return  void
*
* @since   3.5
* @throws  LogicException
*/
public function setName($name)
{
if ($this->isStarted())
{
throw new LogicException('Cannot change the name of an active session');
}
session_name($name);
}
/**
* Regenerates ID that represents this storage.
*
* Note regenerate+destroy should not clear the session data in memory only delete the session data from persistent storage.
*
* @param   boolean  $destroy   Destroy session when regenerating?
* @param   integer  $lifetime  Sets the cookie lifetime for the session cookie. A null value will leave the system settings unchanged,
*                              0 sets the cookie to expire with browser session. Time is in seconds, and is not a Unix timestamp.
*
* @return  boolean  True if session regenerated, false if error
*
* @since   3.5
*/
public function regenerate($destroy = false, $lifetime = null)
{
if (null !== $lifetime)
{
ini_set('session.cookie_lifetime', $lifetime);
}
$return = session_regenerate_id($destroy);
// Workaround for https://bugs.php.net/bug.php?… as suggested by David Grudl
session_write_close();
$this->closed = true;
if (isset($_SESSION))
{
$backup = $_SESSION;
$this->doSessionStart();
$_SESSION = $backup;
}
else
{
$this->doSessionStart();
}
return $return;
}
/**
* Force the session to be saved and closed.
*
* This method must invoke session_write_close() unless this interface is used for a storage object design for unit or functional testing where
* a real PHP session would interfere with testing, in which case it should actually persist the session data if required.
*
* @return  void
*
* @see     session_write_close()
* @since   3.5
*/
public function save()
{
// Verify if the session is active
if ((version_compare(PHP_VERSION, '5.4', 'ge') && PHP_SESSION_ACTIVE === session_status())
|| (version_compare(PHP_VERSION, '5.4', 'lt') && $this->started && isset($_SESSION) && $this->getId()))
{
$session = JFactory::getSession();
$data    = $session->getData();
// Before storing it, let's serialize and encode the JRegistry object
$_SESSION['joomla'] = base64_encode(serialize($data));
session_write_close();
$this->closed  = true;
$this->started = false;
}
}
/**
* Clear all session data in memory.
*
* @return  void
*
* @since   3.5
*/
public function clear()
{
// Need to destroy any existing sessions started with session.auto_start
if ($this->getId())
{
session_unset();
session_destroy();
}
$this->closed  = true;
$this->started = false;
}
/**
* Performs the session start mechanism
*
* @return  void
*
* @since   3.5.1
* @throws  RuntimeException If something goes wrong starting the session.
*/
private function doSessionStart()
{
// Register our function as shutdown method, so we can manipulate it
register_shutdown_function(array($this, 'save'));
// Disable the cache limiter
session_cache_limiter('none');
/*
* Extended checks to determine if the session has already been started
*/
// If running PHP 5.4, try to use the native API
if (version_compare(PHP_VERSION, '5.4', 'ge') && PHP_SESSION_ACTIVE === session_status())
{
throw new RuntimeException('Failed to start the session: already started by PHP.');
}
// Fallback check for PHP 5.3
if (version_compare(PHP_VERSION, '5.4', 'lt') && !$this->closed && isset($_SESSION) && $this->getId())
{
throw new RuntimeException('Failed to start the session: already started by PHP ($_SESSION is set).');
}
// If we are using cookies (default true) and headers have already been started (early output),
if (ini_get('session.use_cookies') && headers_sent($file, $line))
{
throw new RuntimeException(sprintf('Failed to start the session because headers have already been sent by "%s" at line %d.', $file, $line));
}
// Ok to try and start the session
if (!session_start())
{
throw new RuntimeException('Failed to start the session');
}
// Mark ourselves as started
$this->started = true;
}
}


 

Nahlásit jako SPAM
IP: 193.85.207.–
9254686f0
Duch
28. 11. 2017   #4
-
0
-

session_regenerate_id nepomohlo. 

Nahlásit jako SPAM
IP: 193.85.207.–
peter
~ Anonymní uživatel
3981 příspěvků
29. 11. 2017   #5
-
0
-

Aha. Takze chces provozovat Joomlu. Mas ho nainstalovaneho?
Ten kod je jakysi kod ovladajici session. V kodu jsem nenasel nic, jako text 'Failed to read session data', takze si nejsem uplne jisty, zda to vypise php nebo joomla. U session_start, kdyz nenastartuji, tak je tam jiny text. Schvalne jsi dej ctrl+f (vyhledavani v prohlizeci) a najdi si text session_start.
Takze v tuto chvili spis tipuji, ze neni problem se samotnym session_start, ale s tim, ze neco v joomle nefunguje podle ocekavani. Bud neni spravne nainstalovana nebo na tom localhostu nebezi neco spravne.

Na win ted pouzivam Xamp server. Driv jsem pouzival Wamp server. Wamp mi prisel, ze je i lepsi. Kliknes, nainstaluje se, jede. Rucni instalace a spusteni php serveru / apache na win obvykle nedopadne dobre. Na linuxu nevim, tam by se server mel nainstalovat v pohode s snad bez chyb.

Zkus dat do google = Failed to read session data joomla, treba se tam objevi neco chytreho, co by problem resilo.

Nahlásit jako SPAM
IP: 2001:718:2601:258:282b:47...–
peter
~ Anonymní uživatel
3981 příspěvků
29. 11. 2017   #6
-
0
-

https://github.com/joomla/joomla-cms/issues/10855
Jestli to spravne chapu, tak tu pisi, ze to souvisi s php7, verze na php 5.6 to pry funguje. Nebo je mozna treba stahnout instalator joomly pro php 5.6.

Nahlásit jako SPAM
IP: 2001:718:2601:258:282b:47...–
Zjistit počet nových příspěvků

Přidej příspěvek

Toto téma je starší jak čtvrt roku – přidej svůj příspěvek jen tehdy, máš-li k tématu opravdu co říct!

Ano, opravdu chci reagovat → zobrazí formulář pro přidání příspěvku

×Vložení zdrojáku

×Vložení obrázku

Vložit URL obrázku Vybrat obrázek na disku
Vlož URL adresu obrázku:
Klikni a vyber obrázek z počítače:

×Vložení videa

Aktuálně jsou podporována videa ze serverů YouTube, Vimeo a Dailymotion.
×
 
Podporujeme Gravatara.
Zadej URL adresu Avatara (40 x 40 px) nebo emailovou adresu pro použití Gravatara.
Email nikam neukládáme, po získání Gravatara je zahozen.
-
Pravidla pro psaní příspěvků, používej diakritiku. ENTER pro nový odstavec, SHIFT + ENTER pro nový řádek.
Sledovat nové příspěvky (pouze pro přihlášené)
Sleduj vlákno a v případě přidání nového příspěvku o tom budeš vědět mezi prvními.
Reaguješ na příspěvek:

Uživatelé prohlížející si toto vlákno

Uživatelé on-line: 0 registrovaných, 4 hosté

 

Hostujeme u Českého hostingu       ISSN 1801-1586       ⇡ Nahoru Webtea.cz logo © 20032024 Programujte.com
Zasadilo a pěstuje Webtea.cz, šéfredaktor Lukáš Churý