| Mantis - Quercus | |||||
| Viewing Issue Advanced Details | |||||
|  | |||||
| ID: | Category: | Severity: | Reproducibility: | Date Submitted: | Last Update: | 
| 3098 | block | always | 11-25-08 13:30 | 03-23-10 07:41 | |
|  | |||||
| Reporter: | catkins | Platform: | |||
| Assigned To: | OS: | ||||
| Priority: | normal | OS Version: | |||
| Status: | new | Product Version: | 3.2.1 | ||
| Product Build: | Resolution: | open | |||
| Projection: | none | ||||
| ETA: | none | Fixed in Version: | |||
|  | |||||
| Summary: | 0003098: mysql_connect hostname substition by mangling jndi name | ||||
| Description: | I have this string in the php: mysql_connect("java:comp/env/jdbc/thecrossingchurch"); What happens is I get this error: Warning: A link to the server could not be established. url=jdbc:mysql://java:3306/?characterEncoding=ISO8859_1 [^] If I change the statement to: mysql_connect("localhost"); Warning: A link to the server could not be established. url=jdbc:mysql://localhost:3306/?characterEncoding=ISO8859_1 [^] In fact, I can change it to anything and have a similar result. However, if a non-word character is put in the string, then that appears to be the terminator as in the first example. I get: "jdbc/thecrossingchurch" is configured in resin.xml. I can confirm this by doing: $conn = jndi_lookup("java:comp/env/jdbc/thecrossingchurch"); print $conn; Which shows the name and this works as well: $db = new PDO("java:comp/env/jdbc/thecrossingchurch"); Returning a connection, but the site design expect a mysql_connect and mysql_select_db call to setup a current database. | ||||
| Steps To Reproduce: | |||||
| Additional Information: | |||||
| Relationships | |||||
| Attached Files: | |||||
| Notes | |||||
|  | |||||
| 
 | 
 | ||||
|  | |||||
| 
 | 
 | ||||
|  | |||||
| 
 | 
 | ||||
|  | |||||
| 
 | 
 | ||||