Hi all,
I have been having real troubles trying to compile php as a servlet to
work under tomcat.
I have followed the guide here:
http://wiki.apache.org/tomcat/UsingPhp

and can patch up the necessary files but am having trouble in the 'make'
step.

I've tried several different combinations but it still fails. It
configures ok, but then fails and I have included both the configure
command and the error below it (note my username on this computer is
erkel)

../configure --with-servlet --with-java
Error: /Users/erkel/Desktop/php-4.4.1/sapi/servlet/servlet.c:19:17: error:
jni.h: No such file or directory

../configure --with-servlet=$CATALINA_HOME --with-java=$JAVA_HOME
/Users/erkel/Desktop/php-4.4.1/sapi/servlet/servlet.c:19:17: error: jni.h:
No such file or directory

../configure --with-servlet=$CATALINA_HOME --with-java=$JAVA_HOME
--with-mysql=$MYSQL_HOME
/Users/erkel/Desktop/php-4.4.1/sapi/servlet/servlet.c:19:17: error: jni.h:
No such file or directory

../configure --with-servlet=$CATALINA_HOME --with-java=$JAVA_HOME
--with-mysql=$MYSQL_HOME --includedir=$JAVA_HOME/include
/Users/erkel/Desktop/php-4.4.1/sapi/servlet/servlet.c:19:17: error: jni.h:
No such file or directory

../configure --with-servlet=$CATALINA_HOME --with-java=$JAVA_HOME
--with-mysql=$MYSQL_HOME
--includedir=/System/Library/Frameworks/JavaVM.framework/Headers/
then I got this error:
sapi/servlet/net/php
make: sapi/servlet/net/php: Command not found

I tried symbolically linking jni.h into a common include place like
/usr/include, but it then complained about other files, like jni_md.h. I
then linked that file but it complained as well. Surely there is a simple
way to do this. Have I got everything right?

My environment variables are so:

CATALINA_HOME=/usr/local/tomcat
JAVA_HOME=/System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home
PHP_HOME=/usr/local/php
CLASSPATH=/System/Library/Frameworks/JavaVM.Framework/Versions/1.4.2/Classes/classes.jar:/usr/local/jakarta-tomcat-5.5.9/common/lib/servlet-api.jar:/usr/local/jakarta-tomcat-5.5.9/common/lib/jsp-api.jar:/usr/local/jakarta-tomcat-5.5.9/shared/lib/mysql-connector-java-3.1.11-bin.jar
MYSQL_HOME=/usr/local/mysql

I am using Java 1.4.2, Tomcat 5.5.9 and MySQL 4.1.14 for OSX. 

Could anyone help me? This is so frustrating!

Thanks.


Steve 

Reply via email to