ex_chaos_by_699 wrote in php 😯confused

intermittent error messages

Okay, why do I get this error message: "DB Error: unknown option portability" sometimes but not others?

This is the code I'm running:

DB_PORTABILITY_ALL, 'ssl'=>true, 'debug'=>2);

$db=&DB::connect($dsn,$options);  

if(DB::isError($db)){
	die($db->getMessage());
}

//PEAR_Error::getDebugInfo();

$query="select fldChild_FName, fldChild_LName from tblChild";
echo $query."
"; $db->setFetchMode(DB_FETCHMODE_ASSOC); $result=&$db->getAll($query); if(DB::isError($result)){ die($result->getMessage()); } echo ""; echo ""; foreach($result as $names){ echo ""; } echo "
First NameLast Name
".$names['fldchild_fname']."".$names['fldchild_lname']."

"; //print_r($result); $db->disconnect(); ?>


I'm not doing anything differently, but when I reload the page, sometimes it gives me the printout I'm expecting and sometimes it just gives me that error. I don't get it.

Help? I'm pretty new to PEAR, though not PHP in general.