-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
A review of the servlet.c send method shows the following code:
/*
* Parse the file
*/
SETSTRING( SG(request_info).path_translated,
pathTranslated );
#ifdef VIRTUAL_DIR
retval = php_fopen_primary_script(&file_handle TSRMLS_CC);
#else
/*
* The java runtime doesn't like the working directory
to be
* changed, so save it and change it back as quickly
as possible
* in the hopes that Java doesn't notice.
*/
getcwd(cwd, MAXPATHLEN);
retval = php_fopen_primary_script(&file_handle TSRMLS_CC);
chdir(cwd);
#endif
if (retval == FAILURE) {
php_request_shutdown((void *) 0);
php_module_shutdown(TSRMLS_C);
ThrowIOException(jenv, file_handle.filename);
return;
}
Relying on timing to make something work is usually not a good
practice and it looks like this code may not be working in my case due
to bad timing. As previously posted I'll try an earlier version of PHP.
-=> Gregg <=-
Gregg Leichtman wrote:
> Thanks for the direction.
>
> This is pretty much what I thought. I'll try moving back to a
> previous version of PHP and see how it goes.
>
> -=> Gregg <=-
>
> Nikola Milutinovic wrote:
>>>> *exception*
>>>>
>>>> java.io.IOException: null net.php.servlet.send(Native Method)
>>>> net.php.servlet.service(servlet.java:207)
>>>> net.php.servlet.service(servlet.java:236)
>>>> javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
>>> This exception is not only generic, but it is also missing the
>>> cause. It is definitely generated in the JNI method, so you'd
>>> have to look in there.
>>>
>>>> I then altered the servlet class to include some debugging
>>>> info just prior to its invocation of the send method:
>>>>
>>>> send(request.getMethod(), request.getQueryString(),
>>>> request.getRequestURI(), contextPath,
>>>> request.getContentType(), request.getContentLength(),
>>>> request.getRemoteUser(), display_source_mode );
>>>>
>>>> Here is the result: request.getMethod() = GET
>>>> request.getQueryString() = null
>>>> request.getRequestURI() = /test.php contextPath
>>>> = /home/gsl/tomcat/apache-tomcat-5.5.15/webapps/ROOT/test.php
>>>> request.getContentType() = null
>>>> request.getContentLength() = -1 request.getRemoteUser()
>>>> = null display_source_mode = false
>>> This looks fine.
>>>
>>>> The corresponding native method appears to be in servlet.c
>>>> as:
>>>>
>>>> JNIEXPORT void JNICALL Java_net_php_servlet_send (JNIEnv
>>>> *jenv, jobject self, jstring requestMethod, jstring
>>>> queryString, jstring requestURI, jstring pathTranslated,
>>>> jstring contentType, jint contentLength, jstring authUser,
>>>> jboolean display_source_mode)
>>>>
>>>> I haven't written JNI code before, but I suspect that the
>>>> first two args are just hidden info. that is typically passed
>>>> to a native method, so I don't see a signature mismatch or
>>>> anything else wrong here.
>>> The error would have been much different, in case of a
>>> signature mismatch.
>>>
>>>> Alternatively, does anyone have any further ideas on what I
>>>> could do to debug this further?
>>>>
>>>> A few other individuals posted this null IOException on the
>>>> net, but no resolution was provided. Being such a generic
>>>> error, their problem might not even be related to what I am
>>>> experiencing.
>>> Well,...
>>>
>>> As I have said above, the exception is thrown in the native
>>> method, so you could go into the source of that method and see
>>> where it could throw an exception. Other than that, you could
>>> try building a different version of PHP, like 5.0 or 5.1
>>> branch. Maybe they will fare better.
>>>
>>> Nix.
>>>
>>> __________________________________________________ Do You
>>> Yahoo!? Tired of spam? Yahoo! Mail has the best spam
>>> protection around http://mail.yahoo.com
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>>> For additional commands, e-mail: [EMAIL PROTECTED]
>>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED] For
> additional commands, e-mail: [EMAIL PROTECTED]
>
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.0 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFEJ88PMcSsEtbyA2cRArZEAKCD5hduIjd14P7jR5QG9qgzK/mCXACfd5pv
eX8UxdsFCjhs7wyoBlD1HMc=
=2GKV
-----END PGP SIGNATURE-----
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]