Tomcat/PHP null IOException Solved [message #31084] |
Thu, 30 March 2006 21:50 |
gsl1
Messages: 1 Registered: February 2006
Karma:
|
Junior Member |
|
|
I am posting this in the hopes that it may help someone else who accidentally wanders down this path. Based upon a search of the net, others have in the past but no solution was presented. I ran into the following problem while attempting to get the PHP java servlet running inside Tomcat 5.5.15 prior to installing FUDforum:
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 occurred while attempting to go to URL:
http://localhost:8080/test.php
where test.php contained:
<?php phpinfo(); ?>
Without going into all the gory details, the bottom line is that I mistakenly placed the test.php file directly under Tomcat's webapps directory instead of the webapps/ROOT directory. This causesd a file not found IO error when the C code attempted an fopen which bubbled up as the exception shown above. Anyone who is interested in the details can look in the Tomcat users newsgroup archive under subject "PHP Servlet Fails in Tomcat 5.5.15".
I was using:
Suse Linux 9.3
gsl@aragorn:~/tomcat/apache-tomcat-5.5.15/logs> uname -a
Linux aragorn 2.6.11.4-21.10-default #1 Tue Nov 29 14:32:49 UTC 2005
i686 i686 i386 GNU/Linux
gsl@aragorn:~/tomcat/apache-tomcat-5.5.15/logs> java -version
java version "1.5.0_04"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_04-b05)
Java HotSpot(TM) Client VM (build 1.5.0_04-b05, mixed mode, sharing)
Tomcat 5.5.15 installed under my home directory to avoid any
permissions problems.
gsl@aragorn:~> php -i | less
phpinfo()
PHP Version => 4.3.10
System => Linux aragorn 2.6.11.4-21.10-default #1 Tue Nov 29 14:32:49 UTC 2005 i686
Build Date => Apr 23 2005 03:44:40
Configure Command => './configure' '--prefix=/usr' '--datadir=/usr/share/php' '--mandir=/usr/share/man' '--bin
dir=/usr/bin' '--libdir=/usr/share' '--includedir=/usr/include' '--sysconfdir=/etc' '--with-_lib=lib' '--with-c
onfig-file-path=/etc' '--with-exec-dir=/usr/lib/php/bin' '--disable-debug' '--enable-inline-optimization' '--en
able-memory-limit' '--enable-magic-quotes' '--enable-safe-mode' '--enable-sigchild' '--disable-ctype' '--disabl
e-session' '--without-mysql' '--disable-cli' '--without-pear' '--with-openssl' '--enable-force-cgi-redirect' '-
-enable-discard-path' '--enable-cli' '--with-pear' 'i586-suse-linux'
Server API => Command Line Interface
Virtual Directory Support => disabled
Configuration File (php.ini) Path => /etc/php.ini
PHP API => 20020918
PHP Extension => 20020429
Zend Extension => 20021010
Debug Build => no
Thread Safety => disabled
Registered PHP Streams => php, http, ftp, https, ftps, compress.zlib
This program makes use of the Zend Scripting Language Engine:
Zend Engine v1.3.0, Copyright (c) 1998-2004 Zend Technologies
...
-=> Gregg <=-
|
|
|