Ignore:
Timestamp:
09/26/13 15:41:49 (11 years ago)
Author:
angelo
Message:

Ticket #3491 - Compatibilizar Expresso com novas versoes do PHP

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sandbox/2.5.1-evolucao/phpgwapi/inc/adodb/tests/testsessions.php

    r34 r8222  
    22 
    33/*  
    4 V4.80 8 Mar 2006  (c) 2000-2007 John Lim (jlim#natsoft.com.my). All rights reserved. 
     4V4.80 8 Mar 2006  (c) 2000-2012 John Lim (jlim#natsoft.com). All rights reserved. 
    55  Released under both BSD license and Lesser GPL library license.  
    66  Whenever there is any discrepancy between the two licenses,  
     
    2424include('../session/adodb-cryptsession2.php'); 
    2525 
    26 $options['debug'] = 99; 
     26 
     27$options['debug'] = 1; 
    2728$db = 'postgres'; 
    2829 
     
    3132case 'oci8':  
    3233        $options['table'] = 'adodb_sessions2'; 
    33         ADOdb_Session::config('oci8', '', 'jcollect', 'natsoft', '',$options); 
     34        ADOdb_Session::config('oci8', 'mobydick', 'jdev', 'natsoft', 'mobydick',$options); 
    3435        break; 
    3536 
    3637case 'postgres': 
    37         ADOdb_Session::config('postgres', 'localhost', 'tester', 'test', 'test',$options); 
     38        $options['table'] = 'sessions2'; 
     39        ADOdb_Session::config('postgres', 'localhost', 'postgres', 'natsoft', 'northwind',$options); 
    3840        break; 
    3941         
    4042case 'mysql': 
    4143default: 
     44        $options['table'] = 'sessions2'; 
    4245        ADOdb_Session::config('mysql', 'localhost', 'root', '', 'xphplens_2',$options); 
    4346        break; 
     
    8487                 
    8588                if (rand() % 2 == 0) { 
    86                         print "<p>Random session destroy</p>"; 
     89                        print "<p>Random own session destroy</p>"; 
    8790                        session_destroy(); 
    8891                } 
     92        } else { 
     93                $DB = ADODB_Session::_conn(); 
     94                $sessk = $DB->qstr('%AZ'.rand().time()); 
     95                $olddate = $DB->DBTimeStamp(time()-30*24*3600); 
     96                $rr = $DB->qstr(rand()); 
     97                $DB->Execute("insert into {$options['table']} (sesskey,expiry,expireref,sessdata,created,modified) values ($sessk,$olddate, $rr,'',$olddate,$olddate)"); 
    8998        } 
    9099?> 
Note: See TracChangeset for help on using the changeset viewer.