ciao, this is my first post to the list, so please excuse me if I'm wrong....
I'm tryng to use the servlet extension, but it seems to be broken in 4.3 and last 4.4 snapshots (in php-4.2.3 build correctly but get the same problem). My dev system is based on: Redhat8/sun jdk 1.4.1/tomcat 4.1.18 I cannot get it compile, but fixed this looking to php4.2.3 :-)) I attached the patch, that make it compile. After fixing the make configure/make failure, I get tomcat execute php files !! I see phpinfo data in the example script, I get echo command executed, but it crash at the end of php function calls, whith this error: An unexpected exception has been detected in native code outside the VM. Unexpected Signal : 11 occurred at PC=0x4DECD1A6 Function=zend_hash_index_update_or_next_insert+0x3A Library=/usr/java/j2sdk1.4.1_01/jre/lib/i386/libphp4.so Current Java thread: at net.php.reflect.setResultFromObject(Native Method) at net.php.reflect.setResult(reflect.java:105) at net.php.servlet.readCookies(servlet.java:92) at net.php.servlet.send(Native Method) at net.php.servlet.service(servlet.java:188) at net.php.servlet.service(servlet.java:212) I do not know enought php source to fix this, can you suggest where to start ? Can u check if zend_hash_index_update_or_next_insert in ext/java/java.c is used correctly ? thanks in advance, Giuseppe -- ------------------------------------------------------- Giuseppe Tanzilli [EMAIL PROTECTED] CSF Sistemi srl phone ++39 0775 7771 Via del Ciavattino Anagni FR Italy
diff -u php-4.3.0_orig/sapi/servlet/Makefile.frag php-4.3.0_servlet_compile/sapi/servlet/Makefile.frag --- php-4.3.0_orig/sapi/servlet/Makefile.frag 2002-03-07 15:19:58.000000000 +0100 +++ php-4.3.0_servlet_compile/sapi/servlet/Makefile.frag 2003-01-03 +14:42:30.000000000 +0100 @@ -1,19 +1,19 @@ -$(builddir)/java.c : $(srcdir)/../../ext/java/java.c - @cp $(srcdir)/../../ext/java/java.c $(builddir) +sapi/servlet/java.c : ext/java/java.c + @cp $(top_srcdir)/ext/java/java.c $(top_srcdir)/sapi/servlet -$(builddir)/phpsrvlt.jar : $(srcdir)/servlet.java $(srcdir)/../../ext/java/reflect.java - $(mkinstalldirs) $(builddir)/net/php - @echo library=php4 > $(builddir)/net/php/reflect.properties - @echo library=php4 > $(builddir)/net/php/servlet.properties - @cp $(builddir)/formatter.java $(builddir)/net/php - @cp $(builddir)/servlet.java $(builddir)/net/php - @cp $(srcdir)/../../ext/java/reflect.java $(builddir)/net/php - cd $(builddir) && javac net/php/reflect.java - @test ! -f $(builddir)/reflect.class || mv $(builddir)/reflect.class $(builddir)/net/php # bug in KJC javac - javac -classpath .:$(SERVLET_CLASSPATH):$(CLASSPATH) $(builddir)/net/php/servlet.java - @test ! -f $(builddir)/servlet.class || mv $(builddir)/servlet.class $(builddir)/net/php # bug in KJC javac - javac -classpath .:$(SERVLET_CLASSPATH):$(CLASSPATH) $(builddir)/net/php/formatter.java - @test ! -f $(builddir)/formatter.class || mv $(builddir)/formatter.class $(builddir)/net/php # bug in KJC javac - cd $(builddir)/ && $(JAVA_JAR) phpsrvlt.jar net/php/*.class net/php/*.properties - @rm -rf $(builddir)/net +sapi/servlet/phpsrvlt.jar : sapi/servlet/servlet.java ext/java/reflect.java + $(mkinstalldirs) $(top_builddir)/sapi/servlet/net/php + @echo library=php4 > $(top_builddir)/sapi/servlet/net/php/reflect.properties + @echo library=php4 > $(top_builddir)/sapi/servlet/net/php/servlet.properties + @cp $(top_builddir)/sapi/servlet/formatter.java +$(top_builddir)/sapi/servlet/net/php + @cp $(top_builddir)/sapi/servlet/servlet.java +$(top_builddir)/sapi/servlet/net/php + @cp $(top_srcdir)/ext/java/reflect.java $(top_builddir)/sapi/servlet/net/php + cd $(top_builddir)/sapi/servlet && javac net/php/reflect.java + @test ! -f $(top_builddir)/sapi/servlet/reflect.class || mv +$(top_builddir)/sapi/servlet/reflect.class $(top_builddir)/sapi/servlet/net/php # bug +in KJC javac + cd sapi/servlet && javac -classpath .:$(SERVLET_CLASSPATH):$(CLASSPATH) +net/php/servlet.java + @test ! -f $(top_builddir)/sapi/servlet/servlet.class || mv +$(top_builddir)/sapi/servlet/servlet.class $(top_builddir)/sapi/servlet/net/php # bug +in KJC javac + cd sapi/servlet && javac -classpath .:$(SERVLET_CLASSPATH):$(CLASSPATH) +net/php/formatter.java + @test ! -f $(top_builddir)/sapi/servlet/formatter.class || mv +$(top_builddir)/sapi/servlet/formatter.class $(top_builddir)/sapi/servlet/net/php # +bug in KJC javac + cd sapi/servlet && $(JAVA_JAR) phpsrvlt.jar net/php/*.class +net/php/*.properties + @rm -rf sapi/servlet/net diff -u php-4.3.0_orig/sapi/servlet/servlet.c php-4.3.0_servlet_compile/sapi/servlet/servlet.c --- php-4.3.0_orig/sapi/servlet/servlet.c 2002-10-24 15:14:49.000000000 +0200 +++ php-4.3.0_servlet_compile/sapi/servlet/servlet.c 2003-01-03 14:33:36.000000000 ++0100 @@ -71,11 +71,6 @@ extern zend_module_entry java_module_entry; -static zend_module_entry *additional_php_extensions[] = { - &java_module_entry -}; - -#define EXTCOUNT (sizeof(additional_php_extensions)/sizeof(zend_module_entry *)) /***************************************************************************/ @@ -261,7 +256,7 @@ sapi_startup(&servlet_sapi_module); - if (php_module_startup(&servlet_sapi_module, additional_php_extensions, EXTCOUNT)==FAILURE) { + if (php_module_startup(&servlet_sapi_module, &java_module_entry, 1)==FAILURE) { ThrowServletException(jenv,"module startup failure"); return; }
-- PHP Development Mailing List <http://www.php.net/> To unsubscribe, visit: http://www.php.net/unsub.php