Hi All,

Can anyone please help me.
I am trying to connect to a Pervasive SQL v9 database using a PHP script.
I have been trying for hours to make a connection but all my browsers keep loading with no response from the server.
The PHP code is as follows:

$sConnection = odbc_connect("DRIVER={Pervasive ODBC Engine Interface};ServerName=127.0.0.1;DBQ=wmtest;","Master","master");
if(!$sConnection) die("Could not connect<br>");
else die('Connected');

Strangely, i tried using this script on a Windows 7 machine, and it worked but now i am on a Windows Vista, it won't work.

Thanks in advance.

I think i finally solved the problem after some clues from the internet.
Solution:
I had to copy the 4 dll files:
- w3odbcci.dll
- w3odbccs.dll
- w3odbcei.dll
- w3odbces.dll
from the pervasive bin directory to a new folder c:\perv_ext\
I then included this directory in my php.ini file, by altering the 'extension_dir' to also include c:\perv_ext
I restarted my webserver, and i saw my script being executed and the connection had gone through.
Thanks.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.