|
From: <php...@li...> - 2010-05-28 05:47:18
|
Hi,
I used the command line you told me to. I appended the results to the text file attached to this email.
The php_xxx.dll I have came with my PHP distribution so I suppose they're the same version.
Thanks to you telling me to use that command line I realized I hadn't copied php-cgi.exe to WEB-INF/cgi as is stated in php-cgi-x86-windows.exe.MISSING.README (and as you mentioned in your second reply). Doing that solved part of my problem. My php scripts now work perfectly well under Tomcat, except for the ones that use MySQL. I don't know why but it takes too long to connect to the database. This time I'm getting the following error:
HTTP Status 500 - type
Exception report
message
description The
server encountered an internal error () that prevented it from
fulfilling this request.
exception
javax.servlet.ServletException: java.lang.RuntimeException: PHP Fatal error: Maximum execution time of 30 seconds exceeded in C:\Program Files\Apache Software Foundation\Tomcat 6.0\webapps\pcmat\testWmysql.php on line 13
PHP Fatal error: Maximum execution time of 30 seconds exceeded in C:\Program Files\Apache Software Foundation\Tomcat 6.0\webapps\pcmat\java\Java.inc on line 637
php.java.servlet.fastcgi.FastCGIServlet.handle(FastCGIServlet.java:1016)
php.java.servlet.fastcgi.FastCGIServlet.doGet(FastCGIServlet.java:1040)
javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
root cause
java.lang.RuntimeException: PHP Fatal error: Maximum execution time of 30 seconds exceeded in C:\Program Files\Apache Software Foundation\Tomcat 6.0\webapps\pcmat\testWmysql.php on line 13
PHP Fatal error: Maximum execution time of 30 seconds exceeded in C:\Program Files\Apache Software Foundation\Tomcat 6.0\webapps\pcmat\java\Java.inc on line 637
php.java.servlet.fastcgi.FastCGIServlet.parseBody(FastCGIServlet.java:923)
php.java.servlet.fastcgi.FastCGIServlet.execute(FastCGIServlet.java:944)
php.java.servlet.fastcgi.FastCGIServlet.handle(FastCGIServlet.java:991)
php.java.servlet.fastcgi.FastCGIServlet.doGet(FastCGIServlet.java:1040)
javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
I don't think this is related to Tomcat or the PHP/Java Bridge because I copied the script to another location and tried running it from the command line. I got a very similar error:
******************************************************************
PHP Warning: mysql_connect(): [2002] A connection attempt failed because the co
nnected party did not (trying to connect via tcp://localhost:3306) in C:\testWm
ysql.php on line 12
Warning: mysql_connect(): [2002] A connection attempt failed because the connect
ed party did not (trying to connect via tcp://localhost:3306) in C:\testWmysql.
php on line 12
PHP Warning: mysql_connect(): A connection attempt failed because the connected
party did not properly respond after a period of time, or established connectio
n failed because connected host has failed to respond.
in C:\testWmysql.php on line 12
Warning: mysql_connect(): A connection attempt failed because the connected part
y did not properly respond after a period of time, or established connection fai
led because connected host has failed to respond.
in C:\testWmysql.php on line 12
Couldn't connect
******************************************************************
I'm just trying to run a simple connection test script (I made sure MySQL was running) so I don't know what's wrong.
********************************************************************
<?php
$link = mysql_connect('localhost', 'mysql_user', 'mysql_password');
if (!$link) {
die('Could not connect: ' . mysql_error());
}
echo 'Connected successfully';
mysql_close($link);
?>
********************************************************
Any ideas?
Sincerely,
Marta Fernandes
> Date: Thu, 27 May 2010 13:12:29 +0200
> To: php...@li...
> From: php...@li...
> Subject: Re: [Php-java-bridge-users] Getting MySQL to work with Tomcat and PHP
>
> Hi,
>
> the problem is always the same: user has copied php_xxx.dll version
> /p/ into the ext dir which causes PHP version /q/ to crash.
>
>
> > cgi\php-cgi.exe -c
> > cgi\conf.d\mysql.ini -d
> > extension_dir=cgi\ext -i
>
> It might make sense to create such a test script (Unix .sh or Windows
> .bat file) in the WEB-INF/cgi folder and to refuse to start the
> FastCGIServlet if the test script fails.
>
> Furthermore we should move the php_cgi.exe to WEB-INF/cgi/x86-windows,
> WEB-INF/cgi/amd64-windows respectively. And the FastCGIServlet should
> obey the "ProgramFiles" environment setting, which is not necessarily
> set to c:\Program Files\
>
>
> Regards,
> Jost Bökemeier
>
> ------------------------------------------------------------------------------
>
> _______________________________________________
> php-java-bridge-users mailing list
> php...@li...
> https://lists.sourceforge.net/lists/listinfo/php-java-bridge-users
_________________________________________________________________
Hotmail: Powerful Free email with security by Microsoft.
https://signup.live.com/signup.aspx?id=60969 |