From: [EMAIL PROTECTED]
Operating system: Linux 2.2.17 i686 unknown
PHP version: 4.0.4pl1
PHP Bug Type: *Session related
Bug description: can't use interbase functions in user defined sessions
I wrote my own session handlers, for use with interbase. Logging is done to a file
that is truncated by the open function, and then a line appended by each other session
function.
When I start with the example session handler from the manual, everything works ok.
Then I start adding interbase functions. Session reading works. BUT, when I add
interbase functions to writing, that function is not called anymore (it doesn't write
it's entry in the logfile anymore). The same for adding ibase_commit() or
ibase_close() to the close function, it doesn't write it's log entry anymore.
I tested the queries, and they _do_ work.
A working write function:
function ibs_write($key, $val) {
global $ibs_local_key, $ibs_db_id;
$fd = fopen('/home/pkedu/olivier/nwuser/log.out', 'a');
$dbkey = addslashes($key.$ibs_local_key);
$val = addslashes($val);
$now = time();
$query = "update user_info set session_data='$val' where user_id = (select
user_id from user_session where session_key='$dbkey')";
// $ret = ibase_query($ibs_db_id, $query);
fputs($fd, $query."\n");
fclose($fd);
}
This is the same function where it doesn't work anymore, only thje comment is removed,
and now the query is not written to the logfile anymore:
function ibs_write($key, $val) {
global $ibs_local_key, $ibs_db_id;
$fd = fopen('/home/pkedu/olivier/nwuser/log.out', 'a');
$dbkey = addslashes($key.$ibs_local_key);
$val = addslashes($val);
$now = time();
$query = "update user_info set session_data='$val' where user_id = (select
user_id from user_session where session_key='$dbkey')";
$ret = ibase_query($ibs_db_id, $query);
fputs($fd, $query."\n");
fclose($fd);
}
The system does not have any other problems with interbase or sessions, I tried normal
and persistant database connections, PHP does not crash (no reports in the apache
error_log). Apache is Apache/1.3.9 from Debian Potato. Please contact me for any
missing information.
--
Edit Bug report at: http://bugs.php.net/?id=9681&edit=1
--
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]