$db = NULL

From: Date: Mon, 25 Nov 2002 19:35:34 +0000
Subject: $db = NULL
Groups: php.pear.general 
Request: Send a blank email to pear-general+get-2827@lists.php.net to get a copy of this message
I've made all the database connection code in a single file which is to be included in all pages which are to connect to the database. It has been working great for a couple of weeks and now it suddenly doesn't. I've tried different things to find out whats wrong. If I put var_dump($db); in the file which includes the connect file it outputs "NULL", if I put it in the connect file it outputs: object(db_pgsql)(27) { ["connection"]=> resource(1) of type (pgsql link persistent) ["phptype"]=> string(5) "pgsql" ["dbsyntax"]=> string(5) "pgsql" ["prepare_tokens"]=> array(0) { } ["prepare_types"]=> array(0) { } ["transaction_opcount"]=> int(0) ["dsn"]=> array(9) { ["phptype"]=> string(5) "pgsql" ["dbsyntax"]=> string(5) "pgsql" ["username"]=> string(6) "<user>" ["password"]=> string(6) "<password>" ["protocol"]=> string(4) "unix" ["hostspec"]=> bool(false) ["port"]=> bool(false) ["socket"]=> string(9) "localhost" ["database"]=> string(6) "<database>" } ["row"]=> array(0) { } ["num_rows"]=> array(0) { } ["affected"]=> int(0) ["autocommit"]=> bool(true) ["fetchmode"]=> int(1) ["_debug"]=> bool(false) ["_default_error_mode"]=> NULL ["_default_error_options"]=> NULL ["_default_error_handler"]=> string(0) "" ["_error_class"]=> string(8) "DB_Error" ["_expected_errors"]=> array(0) { } ["features"]=> array(4) { ["prepare"]=> bool(false) ["pconnect"]=> bool(true) ["transactions"]=> bool(true) ["limit"]=> string(5) "alter" } ["errorcode_map"]=> array(0) { } ["type"]=> NULL ["prepared_queries"]=> NULL ["prepare_maxstmt"]=> int(0) ["last_query"]=> string(0) "" ["fetchmode_object_class"]=> string(8) "stdClass" ["options"]=> array(4) { ["persistent"]=> bool(true) ["optimize"]=> string(11) "performance" ["debug"]=> int(0) ["seqname_format"]=> string(6) "%s_seq" } ["dbh"]=> NULL } Whats wrong ? -- Henrik Stidsen | HS235-DK | Ikke eksisterende samleobjekt/undtagelse "I am a nobody, and nobody is perfect; therefore I am perfect." http://hs235.dk | @spammer.dk <- spamfri emailadresse ;)

« previous php.pear.general (#2827) next »