|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| ||||||||||||||||||||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Call to a member function on a non-object in /usr/share/pear/DB.php on line 883
I'm transferring my PHP/PEAR written program from my dev machine (Windows XP) to web server, Linux (Mandrake 10.1) and have encountered a problem with PEAR which worked fine in windows.
If i give a simple run down of my problem I hope someone can help. The error i'm getting is "Fatal error: Call to a member function on a non-object in /<folder>/<folder>/pear/DB.php on line 883" The database object is made in a "require_once" file which happens at the top of every page. $dsn = 'mysql://' . DB_Username . ':' . DB_Password . '@' . DB_Server . '/' . DB_Initial_Catalog . ''; $db = DB::connect ($dsn); I also fill a ersult set at this point $categories = $db->query('SELECT * FROM tblCategory WHERE catParentID = 0 AND catActive = 1'); The error is appearing in another "require_once" file when calling... <code> while ($cat =& $categories->fetchRow()) </code> Anyone any ideas? need more info? |
|
#2
|
||||
|
||||
|
RE: Call to a member function on a non-object in /usr/share/pear/DB.php on line 883
Do you have all your ampersands in place (noticed they are missing in the connect and query methods).
|
![]() |
| Viewing: Codewalkers Forums > PHP Related > PEAR Packages > Call to a member function on a non-object in /usr/share/pear/DB.php on line 883 |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|