Fatal error: Call to a member function on a non-object

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux