On Sep 22, 2006, at 7:41 AM, Nils Meyer wrote:

> Hi,
>
> I have a problem with a small script that basically only calls
> mysql_connect(), mysql_select_db() and mysql_query() to do a small
> query. Every time the query is executed I get the error:
> com.caucho.quercus.QuercusModuleException: Connection is not available
>
> In the mysql log I can see a successful connection attempt. What could
> be the cause for that problem?

A few things to try.

First, turn on full logging and see if there's some kind of  
exception.  Since PHP generally ignores exceptions, Quercus catches  
them and logs them at the FINE level.

If that doesn't show anything, create a <database> with a <spy/> tag  
and make it the configured Quercus database:

<web-app xmlns="http://caucho.com/ns/resin";>

<database jndi-name="jdbc/test" ...>
   <driver type="...">
     ...
   </driver>
   <spy/>
</database>

<servlet-mapping url-pattern="*.php"
            servlet-class="com.caucho.quercus.servlet.QuercusServlet">
   <init database="jdbc/test"/>
</servlet-mapping>

If you have the <init database>, it will override anything in your  
PHP script, which will enable the spy logging in this case.

-- Scott

>
> regards
> Nils
>
> _______________________________________________
> resin-interest mailing list
> resin-interest@caucho.com
> http://maillist.caucho.com/mailman/listinfo/resin-interest


_______________________________________________
resin-interest mailing list
resin-interest@caucho.com
http://maillist.caucho.com/mailman/listinfo/resin-interest

Reply via email to