Welcome Guest, Not a member yet? Register   Sign In
Database classes for SQL Server 2005 and SQL Server 2008 (using php_sqlsrv.dll from the Microsoft Data Programmability t
#11

[eluser]bmeredyk[/eluser]
Julian, I'd be interested in seeing you modified sqlsrv driver since I'm stuck with MSSQL. Also, which version of PHP did you finally get it working with? I too am just getting a blank page.

Thanks
#12

[eluser]JulianM[/eluser]
Hi bmeredyk,

I have used 5.2.6 instead of 5.2.8 (this was the latest stable version at the time I prepared the environment for my project). However, using PHP version 5.2.8 I was not able to run it properly on IIS with sqlsrv, that is why I rolled back to 5.2.6

I will send you my modified version of sqlsrv but please give me a couple of days since I'm not in my location now.

Thanks.

Julian Magnone

[quote author="bmeredyk" date="1235252569"]Julian, I'd be interested in seeing you modified sqlsrv driver since I'm stuck with MSSQL. Also, which version of PHP did you finally get it working with? I too am just getting a blank page.

Thanks[/quote]
#13

[eluser]bmeredyk[/eluser]
Thanks Julian!

I've been trying to get it working with XAMPP and Lighty2Go with I think php 5.2.8 and 5.2.6 respectively. (I don't have access to that computer now either, so I can't check.) It seems that it loads as far as attempting to connect and then just dies.

Brian
#14

[eluser]JulianM[/eluser]
@bmeredyk, BTW I recommend you the following:

- check you are using sqlsrv_ts.dll if you are running in XAMPP (this is the thread safe version).
- look at your Windows Event log to check if there were memory errors.

Thanks,


[quote author="bmeredyk" date="1235252569"]Julian, I'd be interested in seeing you modified sqlsrv driver since I'm stuck with MSSQL. Also, which version of PHP did you finally get it working with? I too am just getting a blank page.

Thanks[/quote]
#15

[eluser]bmeredyk[/eluser]
Thanks for the tip - I'd been using the non-thread safe version. I'll have to try sqlsrv_ts.dll tomorrow and check the logs.
#16

[eluser]bmeredyk[/eluser]
Installed the Sql Server Native Client package (forgot that before) and switched to sqlsrv_ts.dll and it at least connects now. Unfortunately I also get an error about "Call to undefined method CI_DB_sqlsrv_driver::_db_set_charset()" so close, but yet no gold.
#17

[eluser]JulianM[/eluser]
Hi bmeredyk,

I understand your problem. If you were able to solve the charset problem, you would find that next problem comes with 'escape' when you use active record. I remember I solved this doing some modifications to the original sqlsrv driver.

Try this package instead of the original sqlsrv driver.

This is my modified version after I added the following:
- chartset function
- simple escape in queries
- support for Windows Authentication Only (instead of mixed mode)
- simple error support

You can make a diff if you want to know the exact modifications.

Good luck.

Julian Magnone

[quote author="bmeredyk" date="1235426856"]Installed the Sql Server Native Client package (forgot that before) and switched to sqlsrv_ts.dll and it at least connects now. Unfortunately I also get an error about "Call to undefined method CI_DB_sqlsrv_driver::_db_set_charset()" so close, but yet no gold.[/quote]
#18

[eluser]bmeredyk[/eluser]
Thanks Julian I really appreciate the help!

I had started working my way through the parts of the driver that hadn't been included and seem to have gotten it up and running by borrowing from the standard mssql driver. I'll check out your version though since you've probably found more of the missing parts than I have.
#19

[eluser]JulianM[/eluser]
Yes, I understand bmeredyk, I had exactly the same problems that you have reported. I think my changes will work for you, too. Please notice that I have adapted them for my specific case, using SQL Server with Windows Authentication Only, but it should work with mixed mode, too.

I recommend you to run a diff between the original files and the files I provided, there aren't a lot of changes, only a few, but these changes made this work for me.

Good luck.

Julian Magnone


[quote author="bmeredyk" date="1235431030"]Thanks Julian I really appreciate the help!

I had started working my way through the parts of the driver that hadn't been included and seem to have gotten it up and running by borrowing from the standard mssql driver. I'll check out your version though since you've probably found more of the missing parts than I have.[/quote]
#20

[eluser]bmeredyk[/eluser]
Seems to be working now - I did a diff off of what I had already tweaked and it looked like we did pretty much the same stuff although we had pasted in the missing functions in slightly different places. Perhaps after I've used it for a while and worked out the kinks I'll make an entry in the wiki for others to refer to. (Unless you or Jontce want to since you actually did the work Big Grin)

Thanks again!




Theme © iAndrew 2016 - Forum software by © MyBB