Dopo l'aggiornamento alla versione 3.0 Codeigniter ottengo l'errore di DB dopo aver provato chiamata qualsiasi controllore:Codeigniter sessione di errore DB
Error Number: 1064
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'WHERE `id` = 'd1d384b0ceed0bd72fa210337acc666aab1a04e5'' at line 2
SELECT `data` WHERE `id` = 'd1d384b0ceed0bd72fa210337acc666aab1a04e5'
Filename: libraries/Session/drivers/Session_database_driver.php
Quando ricaricare la pagina, ottengo che ancora una volta con un altra sessione hash generato. Come risolvere?
In config.php
ho impostato file di sessione: $config['sess_driver'] = 'database';
ho guardato file in cui è un errore (linea 138):
public function read($session_id)
{
if ($this->_get_lock($session_id) !== FALSE)
{
// Needed by write() to detect session_regenerate_id() calls
$this->_session_id = $session_id;
$this->_db
->select('data')
->from($this->_config['save_path'])
->where('id', $session_id);
if ($this->_config['match_ip'])
{
$this->_db->where('ip_address', $_SERVER['REMOTE_ADDR']);
}
if (($result = $this->_db->get()->row()) === NULL) // Line 138
{
$this->_fingerprint = md5('');
return '';
}
$this->_fingerprint = md5(rtrim($result->data));
$this->_row_exists = TRUE;
return $result->data;
}
$this->_fingerprint = md5('');
return '';
}
la sintassi corretta è 'selezionare la colonna FROM tablename WHERE id = blah' non trovi il 'DA tableName' – Mihai
Perché è il vostro id fuggito con' ma il valore con' ? – Yami
Capisco, che sinta incorpore, ma come risolvere? Ho scaricato questo fork: https://github.com/bcit-ci/CodeIgniter/tree/feature/session – Danil