The scenario -
When I call index.php3 through the url, the session data
gets updated in the database but I get the following
notice:
Notice: Undefined offset: 0 in pathinfo\db_odbc.inc on
line 86.
I have the following configuration:
WinXP (SP1)
IIS 5.1
PHP 4.2.3 - verified working properly
PHPLIB 7.4-pre1 - problem
MS Access 2002 (SP2)
Sample Database Created Manually with the following
tables (case is accurate):
Table - active_sessions
Column - sid - text(32)
Column - name - text(32)
Column - val - Memo
Column - changed - text(14)
Index - active_sessions_pk (sid, name)
Index - changed (changed)
active_sessions_split
Column - ct_sid - text(32)
Column - ct_name - text(32)
Column - ct_pos - text(6)
Column - ct_val - Memo
Column - ct_changed - text(14)
Index - active_sessions_pk (ct_sid, ct_name, ct_pos)
Index - changed (ct_changed)
auth_user
Column - user_id - text(32)
Column - user_name - text(32)
Column - password - text(32)
Column - perms - text(255)
Index - auth_user_pk (user_id)
Index - k_username (username)
auth_user_md5
Column - user_id - text(32)
Column - user_name - text(32)
Column - password - text(32)
Column - perms - text(255)
Index - user_id (user_id)
permissions on database - iusr_machine_name has
read & write privileges. SELECT, INSERT, UPDATE
and DELETE all have been run successfully from test
scripts against other tables in the db.
PHPLIB has been unpacked and an include directory
has been created and populated with the appropriate
files. Include files have been successfully included.
The offending section of code sits within the next_record
function as follows:
function next_record() {
$this->Record = array();
$stat = odbc_fetch_into($this->Query_ID, ++$this-
>Row, &$this->Record);
if (!$stat) {
if ($this->Auto_Free) {
odbc_free_result($this->Query_ID);
$this->Query_ID = 0;
};
} else {
// add to Record[<key>]
$count = odbc_num_fields($this->Query_ID);
for ($i=1; $i<=$count; $i++)
$this->Record[strtolower(odbc_field_name ($this-
>Query_ID, $i)) ] = $this->Record[ $i - 1 ];
}
return $stat;
}
Where line 86 contains the following nested in the for
loop:
$this->Record[strtolower(odbc_field_name ($this-
>Query_ID, $i)) ] = $this->Record[ $i - 1 ];
Any help you can provide would be much appreciated.