Re: Newb PHP Question

From: Date: Fri, 13 Aug 2004 18:53:46 +0000
Subject: Re: Newb PHP Question
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-193744@lists.php.net to get a copy of this message
Can we see some of the code throwing the error? PHP is working correctly if you got the page above (a handy thing to keep around BTW).
I assumed it was a configuration error because the error occured on line 0. But in any case, here's some lowdown. main.php - the file everyone will be seeing, and the file that gets the error I originally posted... --- <? require("include/db.php"); require("include/template.php"); ..snip.. --- and from db.php, which may contribute to the problems... --- <? if(!connect()){ echo error('Connection failed!'); } session_start(); function connect() { $params = array( 'host' => "localhost", 'dbname' => "nmonkey", 'user' => "[ed]", 'password' => "[ed]" ); while(list($name,$val) = each($params)){ $constr[] = "$name=$val"; } return pg_connect(implode(' ',$constr)); } ...snip... --- Is maybe my "include" directory in php.ini set incorrectly? It's currently set to ".:/var/www", which is where main.php resides (and db.php is in /var/www/include)...

« previous php.general (#193744) next »