|   | php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login | 
| 
 PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits              [2005-09-02 08:48 UTC] sniper@php.net
 | |||||||||||||||||||||||||||
|  Copyright © 2001-2025 The PHP Group All rights reserved. | Last updated: Fri Oct 31 10:00:02 2025 UTC | 
Description: ------------ I have a simple session handler which uses a postgres database for storage, and Pear::Log for logging. A script with all necessary code for reproduction is below. When I run the code as is (obviously adding in db parameters), the code runs without errors, but the path to the log is inserted as the id in the database instead of the session id. There are two independent changes I can make to avoid this behavior: 1) Use a shorter path for the log file. Using /log.log and the script functions as expected. 2) Switch lines 52 and 53, and 56 and 57, (i.e. to: $sql = "insert into sessions (id,datavalue) values ('$id','$val')"; $this->logger->log("Not found, inserting"); With the lines switched the script functions as expected. I've seen this bug on Mac OS X and Fedora Core 1. Reproduce code: --------------- http://www.saffitz.com/phperr.phps Session Table Definition: Table "public.sessions" Column | Type | Modifiers -------------------+------+---------------------- id | character varying(255) | not null created_date | date | not null default '2004-05-15'::date modification_date | timestamp without time zone | not null default '2004-05-15 00:35:58.094778'::timestamp without time zone datavalue | text | Indexes: sessions_pkey primary key btree (id) Expected result: ---------------- Session is populated correctly in the database (with correct id), and the count printed to the screen increments with each refresh. Actual result: -------------- Session is incorrectly populated in the database (path to log file is populated instead), and the count on the screen is not incremented.