[PHPLIB] access 2000, odbc, 7.2 From: Avrum Goodblatt (goodblat <email protected>)
Date: 11/25/99

I am not succeeding well in converting over to 7.2. I tried out the sample
scripts and am getting strange answers. Sometimes it works fine, sometimes my
name and password are invalid. On the main screen (index.php3) the counter
doesn't increment, but if I succeed in logging in, then there is an increment.

Calling index.php3 explicitly gives me the page properly.
Callling by just giving the url without index.php3 gives me an error on line
333 in session.inc

I'm using IIS4 with NT and php 3.0.11
Any pointers would be most helpful.

There was an error in the create odbc script - it referenced active_sessions
instead of active_sessions_split in creating the index.

Here's a simple and stupid php script to create the tables for 7.2 for odbc
(especially msaccess 2000):

<? function sqlexec($sqlstat) {
   global $conn;
     $result=odbc_exec($conn,$sqlstat);
     print " Result= $result <BR>";odbc_free_result($result);}

$a="CREATE TABLE ACTIVE_SESSIONS (SID VARCHAR(32) NOT NULL, NAME VARCHAR(32)
NOT NULL, VAL MEMO, CHANGED VARCHAR(14) NOT NULL)";
$b="create unique index ACTIVE_SESSIONS_PK on ACTIVE_SESSIONS (SID asc, NAME
asc) WITH PRIMARY";
$c="create index CHANGED on ACTIVE_SESSIONS (CHANGED asc)";

$d="create table ACTIVE_SESSIONS_SPLIT
(
    CT_SID VARCHAR(32) not null,
    CT_NAME VARCHAR(32) not null,
    CT_POS VARCHAR(6) not null,
    CT_VAL MEMO ,
    CT_CHANGED VARCHAR(14) not null)";
$e="create index ACTIVE_SESSIONS_SPLIT_PK on ACTIVE_SESSIONS_SPLIT (CT_SID asc,
CT_NAME asc, CT_POS asc) WITH PRIMARY";
$f="create index SCHANGED on ACTIVE_SESSIONS_SPLIT (CT_CHANGED asc)";

$g="create table AUTH_USER
(
    USER_ID VARCHAR(32) not null,
    USERNAME VARCHAR(32) not null,
    PASSWORD VARCHAR(32) not null,
    PERMS VARCHAR(255))";

$h="create table AUTH_USER_MD5
(
    USER_ID VARCHAR(32) not null,
    USERNAME VARCHAR(32) not null,
    PASSWORD VARCHAR(32) not null,
    PERMS VARCHAR(255))";

$i="create index AUTH_USER_PK on AUTH_USER (USER_ID asc) WITH PRIMARY";
$j="create index AUTH_USER_MD5_PK on AUTH_USER_MD5 (USER_ID asc) WITH PRIMARY";
$k="create unique index K_USERNAME on AUTH_USER (USERNAME asc)";

print $conn=odbc_connect("libtest","","");
sqlexec($a);sqlexec($b);sqlexec($c);sqlexec($d);sqlexec($e);sqlexec($f);sqlexec(
$g);sqlexec($h);
sqlexec($i);sqlexec($j);sqlexec($k);

?>

--------------------------------------------------
Avrum Goodblatt goodblat <email protected> (415) 9451368
http://home.sprynet.com/~goodblat
-
PHP3 Base Library Mailing List. Send messages to <phplib <email protected>>.
To unsubscribe, send "unsubscribe" to <phplib-request <email protected>> in
the body, not the subject, of your message.