I have developed some code that uses PHP 4.3.2 and PEAR::DB. An interesting event upon executing the code. I get a blank page; however, if I refresh the page the expected page displays. In my error_log file I recieve the following message:
Directory index forbidden by rule: /var/www/html/
PHP Warning: pg_errormessage(): supplied argument is not a valid PostgreSQL link resource in /usr/share/pear/DB/pgsql.php on line 410
PHP Fatal error: Call to undefined function: fetchinto() in /var/www/html/syslog/login.php on line 50
The code around line 50 in login.php appears below:
My connect.php follows below...Code:46 if(isset($entries)) { 47 foreach($entries[0]['memberof'] as $groups) { 48 $sth = $dbh->query("SELECT operation from access where groupname = '".$ groups."'"); 49 50 while($sth->fetchInto($row,DB_FETCHMODE_ASSOC)) { 51 if($row['operation'] == $myUrl) { 52 $_SESSION['authok'] = 1; 53 $dbh->disconnect(); 54 break; 55 } else { 56 $_SESSION['authok'] = ""; 57 $welmsg = "You Are Not Authorized to View This Page"; 58 } 59 60 } 61 } 62 }
Has anyone seen this problem before and if so is there a way to address the issue?Code:<?php require 'DB.php'; function MyDbConnect() { $dsn = array( 'phptype' => 'pgsql', 'username' => 'user', 'password' => '', 'hostspec' => 'localhost', 'port' => '5432', 'database' => 'DATABASE', ); $options = array( 'debug' => 2, // 'portability' => DB_PORTABILITY_ALL, ); $db =& DB::connect($dsn, $options); return $db; } ?>
Thanks!




Bookmarks