Reply to Problem with php & com objects on hosting provider

Your name:

Reply:


Posted by Ray on 06/16/05 10:22

Hi

I need to access an access db via php.

My hosting provider is using php version 4.3.10 on a windows 2003 platform.
I think that php was installed with the Plesk for windows package/control
panel.

The scripts work on my dev box (winxp with iis5) but yet when I upload the
scripts to my hosting provider I get the following error

*Fatal error*: Call to a member function on a non-object in
*C:\xxx\xxx\xxxx\httpdocs\test.php* on line *12*

This error comes up when I call the database connection. I tried 2 different
connection strings including setting up and using an obdc connection both a
user and a system dsn connection but with no luck...

I am using standard php functions to connect...

Sample::

$db = realpath("./data/mydatabase.mdb");

$conn = new COM("ADODB.Connection");
$rs = new COM("ADODB.Recordset");
$dsn = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" .$db.";User
Id=ddd;Password=xxx;" ;
//$dsn = "DRIVER={Microsoft Access Driver (*.mdb)};DBQ=" .$db;
//$dsn="DSN = Prop"; $conn->Open($dsn);
$rs = $conn->Execute("select * from mytable");

The 3 different connection strings are defined under the $dsn variable...

Has anyone else had a similar problem to this or got a solution..

It almost sounds like php can't call on a com object...

My hosting provider can't seem to find a solution...

Any suggestions will be greatly appreciated...


Thanks
Ray

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация