ID: 28475
Updated by: [EMAIL PROTECTED]
Reported By: m at saffitz dot com
-Status: Open
+Status: Bogus
Bug Type: Scripting Engine problem
-PHP Version: PHP 5.0.0RC3
+PHP Version: 5.0.0RC3
New Comment:
PEAR bugs belong to pear.php.net
Previous Comments:
------------------------------------------------------------------------
[2004-05-21 19:09:37] m at saffitz dot com
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.
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=28475&edit=1