ERROR

May 15, 2001 by shawn conrad

Fatal error: Call to undefined function: adodb() in C:\Inetpub\wwwroot\php\adodb\adodb.inc.php on line 28
-----------

This after all the other bugs where squashed and the coffeepot died...

I have went through this situation in which every thing worked great when working w/in UD, but when you view live or view in localhost...this.

I wonder, do I need to set this up on a server to accurately execute the php, or should this work off of PWS?

---------------

RE: ERROR

May 15, 2001 by shawn conrad

/**
  * SET THE VALUE BELOW TO THE DIRECTORY WHERE THIS FILE RESIDES
  * ADODB_RootPath has been renamed ADODB_DIR
  */
 if (!isset($ADODB_DIR))
  $ADODB_DIR = adodb(__FILE__); 

/** This is line 28(above) the (__FILE__) is causing the error and being undefined. I have tried listing the ` $ADODB_DIR = ` to : A.)Absolute path B.) Relative C.) root  D.) All the above

.........

RE: RE: ERROR

May 16, 2001 by Tim Green

If you use the latest version of my extension 'ADODB installer v1.01' in Extensions/App Servers/PHP you won't need to make this manual alteration. This extension uses the latest version of ADODB (v1.01) which automagically works the Document Path out for you.

Alternatively, you can download ADODB v1.01 from http://php.weblogs.com/ADODB.

However, if you do decide to use my extension you will find that whenever ADODB is upgraded, I will upgrade the extension and you can re-apply it at any time to upgrade the version of ADODB in your site painlessly :-)

And to make life that little bit easier, you will always know what version of ADODB you are running because the version number of my extension will be the same as the ADODB version.

Shameless plug I know, but I hope this helps.

Access,DSN - less Connections & Linux Servers

May 16, 2001 by Tim Green

It should also be noted that if your site is hosted on a Linux / Unix server running PHP, and it does not have UnixODBC installed (or similar) you won't be able to make a connection to an Access database.

This is because the current implementation of ODBC in PHP is buggy, and PHP cannot make a successful connection to an Access Database.

If you are running on a Windows-based server then there is no problem, as ADODB makes use of the ADO COM Component, and will successfully connect.

I mention this here, purely for the sake of completeness of this great article.

For further information regarding this subject see http://php.weblogs.com/odbc

See all 8 Comments