Link to home
Start Free TrialLog in
Avatar of bob_mechler
bob_mechlerFlag for United States of America

asked on

php btrieve api example

I have an app running in Pervasive 10 where I know the layout and don't need or want DDF'S. Can these files be read using PHP? This would be for Web development.
Avatar of Beverley Portlock
Beverley Portlock
Flag of United Kingdom of Great Britain and Northern Ireland image

Btrieve is not specifically mentioned in the list of database extensions for PHP so I guess that ODBC might be your best bet.

http://us2.php.net/manual/en/refs.database.php

Neither PEAR nor PECL seems to possess a Btrieve package either.
Avatar of bob_mechler

ASKER

The btrieve api access method is really just calls to wbtrv32.dll. So the next question might be, can php make calls to the functions in DLL's that are located in the same directory. They wouldn't have to be managed code would they, since this is basically a CGI setup with php-cgi.exe added as the handler for php in IIS.

Bob
I compiled a proof of concept PHP Extension for Windows to call the Btrieve API years ago.  It was compiled with PHP 4.  It worked as a proof of concept but abandoned it in favor of ODBC.  

I'll see if I can dig it up.  It wasn't difficult.  The biggest issue was actually the security rights.  
ASKER CERTIFIED SOLUTION
Avatar of Mirtheil
Mirtheil
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Thanks for rummaging through your code closet. This gives me what I need to get started making a PHP extension for PHP and btrieve. Now I need to get adept at PHP extensions and how to apply them in a IIS environment.

Bob