Skip to main content

GlassFish with Quercus PHP fails JNDI Lookup of a JDBC Pool?

3 replies [Last post]
acehlis
Offline
Joined: 2008-11-08

Does anyone out there have a procedure or lessons learned to get Quercus PHP engine to do a JNDI lookup and retrieve a JDBC connection pool in GlassFish? I've been unable to get either of the following to work successfully:

new PDO("java:comp/env/jdbc/myDatabase") or
mysql_connect("java:comp/env/jdbc/myDatabase")

Thanks,

Adam

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
acehlis
Offline
Joined: 2008-11-08

It appears to be working with the web.xml & sun-web.xml file as follows. Thanks to all who responded.

Adam

[b]web.xml[/b]

  
 &nbsp  Caucho Quercus PHP5 Engine 3.1.6
 &nbsp  Quercus Servlet
 &nbsp  com.caucho.quercus.servlet.QuercusServlet
 &nbsp  
 &nbsp &nbsp  
database  &nbsp &nbsp  
jdbc/myDatabase  &nbsp  

  

  
    Quercus Servlet
    *.php
  

  
    MySQL JDBC DataSource
    jdbc/myDatabase
    javax.sql.DataSource
    Container
    Shareable
  

[b]sun-web.xml[/b]

  
    jdbc/myDatabase
      jdbc/myDatabase
    

Dick Davies

When I tried quercus, you just set it a tag in the quercus web.xml.
Then any calls to mysql_connect return a connection from the pool.

On Tue, Nov 18, 2008 at 7:43 PM, wrote:
> Does anyone out there have a procedure to get Quercus PHP engine to do a JNDI lookup and retrieve a JDBC connection pool in GlassFish? I've been unable to get:
>
> new PDO("java:comp/env/jdbc/myDatabase") or
> mysql_connect("java:comp/env/jdbc/myDatabase")
>
> to work successfully.
> [Message sent by forum member 'acehlis' (acehlis)]
>
> http://forums.java.net/jive/thread.jspa?messageID=317416
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@glassfish.dev.java.net
> For additional commands, e-mail: users-help@glassfish.dev.java.net
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@glassfish.dev.java.net
For additional commands, e-mail: users-help@glassfish.dev.java.net

sm157516
Offline
Joined: 2005-03-28

Could you try to use just jdbc/myDatabase ?