Re: Fatal error: Call to a member function on a non-object
| From: | Chris | Date: | Thu, 23 Dec 2004 02:34:32 +0000 |
| Subject: | Re: Fatal error: Call to a member function on a non-object | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-205037@lists.php.net to get a copy of this message | ||
Did you upgrade Zend Optimizer when you upgraded to 4.3.10 ? People are seeing quite a few problems when they dont, and this could be releated to that.
Chris
Tim Burgan wrote:
Hello,
I have a database driven (MS Access 2000) PHP website that runs fine on my localhost (Apache, WinXP, PHP 4.3.9), but when I upload it to the web host (IIS, PHP 4.3.10) and try to access a page I receive the following error:
Fatal error: Call to a member function on a non-object in c:\XXX\inc\dbConnOpen.php on line 17
The file in question contains code that forms a connection to the database. I've used this EXACT same code on this same website for the last 8 months (both on localhost and web host) with no problem.. then when I upload the WHOLE site again.. it doesn't work.
Here's the contents of the above file:
/* Open database connection */
$db_connection = new COM("ADODB.Connection") or die("Cannot start ADO");
$db_connstr = "DRIVER={Microsoft Access Driver (*.mdb)};DBQ=" .
realpath("directory/database.mdb") . ";DefaultDir=" .
realpath("directory");
$db_connection->open($db_connstr); // THIS IS LINE 17
Can anyone shed some light onto what this error means in plain english, and possible what I can do.
Thanks for your time.. I'm in a bit of a pickle.
Cheers
Tim