Caucho Forums  

This forum is permanently closed because of spam. For free community support, please visit Google Groups:

Go Back   Caucho Forums > Quercus

Thread Tools Display Modes
Old 07-27-2010, 11:15 PM
fasslej fasslej is offline
Junior Member
Join Date: Jul 2010
Posts: 1
Question Microsoft SQL Server Supported?

Hello everyone. I'm looking to potentially do a Wordpress implementation using Quercus. However, we use Microsoft SQL Server for our database backend. Is Microsoft SQL Server supported by Quercus?

I haven't been able to find anyone who has done this. Has this been done yet? Is it possible?

If it is possible, but has yet to be done, what should I be looking at in order to complete this? I see that Microsoft has a "PHP Driver" for MSSQL Server, and obviously Microsoft has JDBC drivers on the Java side.
Reply With Quote
Old 10-11-2010, 06:28 PM
alex alex is offline
Join Date: Aug 2009
Posts: 218

Resin certainly supports MS Sql JDBC driver, so it should be possible. You need to configure the datasource used for WordPress with Ms SQL jdbc driver: WEB-INF/resin-web.xml:

<database jndi-name="jdbc/blog">
<driver type="net.sourceforge.jtds.jdbc.Driver">
Reply With Quote
Old 06-19-2013, 07:05 AM
fifi fifi is offline
Junior Member
Join Date: Jun 2013
Posts: 2

Hello, sorry to refresh old thread but I have problem with what alex posted.
I try to connect to MSSQL 2008 R2 database called "test" on my localhost using Quercus/PHP

To the web.xml i added:
<database jndi-name="jdbc/sqlserver">
 <driver type="net.sourceforge.jtds.jdbc.Driver">
In my .php file i have:
PHP Code:
$db = new PDO("java:comp/env/jdbc/sqlserver"); 
And it gives me following error:
Fatal Error: 'java:comp/env/jdbc/sqlserver' is an unknown PDO JNDI data source.
I copied the jtds-1.3.1.jar to the lib folder. Do I need to do anything more to make this work?
Reply With Quote
Old 06-25-2013, 12:33 PM
fifi fifi is offline
Junior Member
Join Date: Jun 2013
Posts: 2

If anyone is interested I solved the problem:
Using Tomcat 7, i replaced the jtds driver with MS sqljdbc4 and added to the conf/context.xml following code:

<Resource name="jdbc/sqlserver" auth="Container" type="javax.sql.DataSource" username="username" password="password" driverClassName="" url="jdbc:sqlserver://localhost;databaseName=test"/>
Declaration of <database> in web.xml is now not required. It's maybe not the best solution but it seems to work fine with PDO.
Reply With Quote

java, microsoft sql server, php, quercus, wordpress

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

All times are GMT. The time now is 11:21 PM.

Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.