Mantis Bugtracker

Viewing Issue Simple Details Jump to Notes ] View Advanced ] Issue History ] Print ]
ID Category Severity Reproducibility Date Submitted Last Update
0003011 [Quercus] feature always 10-19-08 21:47 10-27-08 20:52
Reporter ckchris View Status public  
Assigned To
Priority normal Resolution open  
Status new   Product Version 3.1.8
Summary 0003011: Feature Request for DB connect strings
Description This is rather trivial, but some PHP applications use the mysql_connect($host, $user, $password, $dbname) method call to connect to the database. The web application form will then ask for this information and doesn't provide you a way to specify a JNDI datasource to use. Thus, when you enter the JNDI datasource as the $host, connection will fail from the Quercus side.

It's true that it's easy to just change the mysql_connect in the PHP file to use the one-argument mysql_connect version. However, since this is specifically a Quercus PHP-Java bridging edge case, I think it may not be a bad idea to have Quercus check for the following edge case in mysql_connect function:

*) If mysql_connect($host,$user,$password,$dbname) is used AND the $host is a JNDI string that starts with "java:", then ignore all the rest of the parameters and accept this as a JNDI string.

I think this will make Quercus even more compatible with existing php apps without having to modify any source files.
Additional Information
Attached Files

- Relationships

- Notes
10-27-08 20:52

I just realized that mysql_connect() does not accept a JNDI URL to connect using the JNDI.

Quercus documentation at : [^]

specifies that you can use mysql_connect(<jndi_string>) to connect. I tried it and it doesn't work. I checked quercus source code and it doesn't look like this is even supported.

So what's the primary verdict here? The documentation is misleading.

- Issue History
Date Modified Username Field Change
10-19-08 21:48 ckchris New Issue
10-19-08 21:48 ckchris Issue Monitored: ckchris
10-27-08 20:52 ckchris Note Added: 0003519

Mantis 1.0.0rc3[^]
Copyright © 2000 - 2005 Mantis Group
29 total queries executed.
25 unique queries executed.
Powered by Mantis Bugtracker