This topic is locked

Problem with PHPRunner4 on PHP4/Win/MSSQL

7/4/2007 5:45:31 PM
PHPRunner General questions
M
mlapo author

Hi,
I am evaluating the latest PHPRunner version 4 on our intranet and I was not able to have it work properly. We are using PHP 4.3.2 on Windows and MSSQL. I found out that the dbconnection file that was called (dbconnection.mssql.win.php) contain code that is compatible with PHP4. I first try to see if I could rewrite part of it but it would have needed a complete rewrite. I then looked at the unix version of this file and found out that it used native PHP MSSQL calls instead of the ADO db connections in the windows db file. Since we already use native MSSQL functions on our intranet, I just renamed the unix file to replace the win file and everything worked without a glitch at the first try.
This should work for anyone provided that the MSSQL PHP extention is loaded on the server.
Now that I have a working workaround, I will continue my evaluation (replacing the dbconnection file everytime I generate the pages).
Thanks

Alexey admin 7/5/2007

Michel,
mssql... functions in PHP under Windows use DBLIB interface which is deprecated.

I.e. it doesn't support NVARCHAR datatype.
So the proper way to work with MSSQL server under Windows is using OLEDB. However it's supported by PHP5 only.
Since mssql
... functions work fine for you use dbconnection.mssql.unix.php file.
Here is what you can do to avoid copying the file after each build.

Modify dbconnection.mssql.php file in C:\Program Files\PHPRunner4.0\source\include folder.

Find this line there:

if(strtoupper(substr(PHP_OS,0,3))=="WIN")

and replace it with:

if(strtoupper(substr(PHP_OS,0,3))=="WIN" && substr(PHP_VERSION,0,1)>'4')


We'll apply this modification to the next update of PHPRunner.