[PHP-DEV] locale bug from php4.3.0

2003-03-24 Thread Giuseppe Tanzilli - CSF
Hi,
just porting big 4.2.3 application to 4.3.2rc,
I see something changed from 4.3.0 about locale settings.
Before 4.3.0 locale was used to print out numbers in string format
and to read numbers from string formats.
I mean php uses the decimal delimiter definied in the locale settings.
From 4.3.0 on, php uses the decimal delimiter from locale only to 
output numbers to strings,
not when read numbers from strings.

Why ?

Every other language works the old pre 4.3.0 way.

This way every serious application needs alot of work to run on php 
>=4.3.0

Please explain why this change was made.

I saw in setlocale source  in ext/standard/strings.c,
if ((lc.decimal_point)[0] != '.') {
   /* set locale back to C */
   setlocale(LC_NUMERIC, "C");
   }
this sets  LC_NUMERIC to C in every case
I'm in Italy and here we use comma as decimal delimiter.

bye
Giuseppe


--
---
Giuseppe Tanzilli		[EMAIL PROTECTED]
CSF Sistemi srl			phone ++39 0775 7771
Via del Ciavattino 
Anagni FR
Italy



smime.p7s
Description: S/MIME Cryptographic Signature


[PHP-DEV] please apply ext/java fix for sapi/servlet build on Unix

2003-02-06 Thread Giuseppe Tanzilli - CSF
ciao,
as from subject,
please apply this patch to PHP_4_3 branch.

It is needed to complete the fix to build sapi/servlet on Unix

bye
Giuseppe

--
---
Giuseppe Tanzilli		[EMAIL PROTECTED]
CSF Sistemi srl			phone ++39 0775 7771
Via del Ciavattino 
Anagni FR
Italy

Index: ext/java/config.m4
===
RCS file: /repository/php4/ext/java/Attic/config.m4,v
retrieving revision 1.46.4.1
diff -u -r1.46.4.1 config.m4
--- ext/java/config.m4  29 Nov 2002 13:32:49 -  1.46.4.1
+++ ext/java/config.m4  3 Feb 2003 13:28:02 -
@@ -97,7 +97,7 @@
dnl We have to find everything
dnl
for i in `find $PHP_JAVA/include -type d`; do
- test -f $i/jni.h  && JAVA_INCLUDE=-I$i
+ test -f $i/jni.h  && JAVA_INCLUDE="$JAVA_INCLUDE -I$i"
  test -f $i/jni_md.h   && JAVA_INCLUDE="$JAVA_INCLUDE -I$i"
done
 
@@ -178,6 +178,8 @@
   fi
 
   PHP_SUBST(JAVA_CLASSPATH)
+  PHP_SUBST(JAVA_INCLUDE)
+  PHP_SUBST(JAVA_CFLAGS)
 
   PHP_ADD_MAKEFILE_FRAGMENT
 fi


-- 
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP-DEV] please apply to PHP_4_3 branch: servlet build fix

2003-02-03 Thread Giuseppe Tanzilli - CSF
hi,
committed some fixes to build the servlet sapi,
but have no permission to commit this small fix,
please apply to 4_3 branch

thanks a log
Giuseppe

--
---
Giuseppe Tanzilli		[EMAIL PROTECTED]
CSF Sistemi srl			phone ++39 0775 7771
Via del Ciavattino 
Anagni FR
Italy



--
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-DEV] CVS Account Request: gtanzilli

2003-01-14 Thread Giuseppe Tanzilli
fix sapi/servlet in php4.3 branch


-- 
PHP Development Mailing List 
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP-DEV] patch to sapi/servlet fixes bug 21291 &more, please apply to STABLE/HEAD

2003-01-10 Thread Giuseppe Tanzilli - CSF
hi,
tryng to use the php servlet sapi with Tomcat 4.1,
I found this problems:
-- configure generates a makefile without JAVA_INCLUDES
-- make fails on servlet.c (php_module_startup call)
-- make do not build phpsrvlt.jar
-- got it working, every page start with "HTTP/1.0 200 X"

this patch fixes all this problems,
tested on :
php4-stable / php4-head
RedHat Linux 7.x and 8.0
Sun J2SDK 1.4.1_01
Tomcat 4.1.18

Servlet extension still need the LD_LIBRARY_PATH settings,
still crash sometime, but at least it compile and run.

Who is the maintainer of this sapi module ?

thanks in advance,
Giuseppe


--
---
Giuseppe Tanzilli		[EMAIL PROTECTED]
CSF Sistemi srl			phone ++39 0775 7771
Via del Ciavattino 
Anagni FR
Italy

diff -u -r php-4.3.0_org/ext/java/config.m4 php-4.3.0_test/ext/java/config.m4
--- php-4.3.0_org/ext/java/config.m4Fri Nov 29 14:32:49 2002
+++ php-4.3.0_test/ext/java/config.m4   Fri Jan 10 12:15:28 2003
@@ -97,7 +97,7 @@
dnl We have to find everything
dnl
for i in `find $PHP_JAVA/include -type d`; do
- test -f $i/jni.h  && JAVA_INCLUDE=-I$i
+ test -f $i/jni.h  && JAVA_INCLUDE="$JAVA_INCLUDE -I$i"
  test -f $i/jni_md.h   && JAVA_INCLUDE="$JAVA_INCLUDE -I$i"
done
 
@@ -178,6 +178,8 @@
   fi
 
   PHP_SUBST(JAVA_CLASSPATH)
+  PHP_SUBST(JAVA_INCLUDE)
+  PHP_SUBST(JAVA_CFLAGS)
 
   PHP_ADD_MAKEFILE_FRAGMENT
 fi
diff -u -r php-4.3.0_org/sapi/servlet/Makefile.frag 
php-4.3.0_test/sapi/servlet/Makefile.frag
--- php-4.3.0_org/sapi/servlet/Makefile.fragThu Mar  7 15:19:58 2002
+++ php-4.3.0_test/sapi/servlet/Makefile.frag   Fri Jan 10 12:15:28 2003
@@ -1,19 +1,19 @@
 
-$(builddir)/java.c : $(srcdir)/../../ext/java/java.c
-   @cp $(srcdir)/../../ext/java/java.c $(builddir)
+sapi/servlet/java.c : sapi/servlet/../../ext/java/java.c sapi/servlet/phpsrvlt.jar
+   @cp sapi/servlet/../../ext/java/java.c 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 
+sapi/servlet/../../ext/java/reflect.java
+   $(mkinstalldirs) sapi/servlet/net/php
+   @echo library=php4 > sapi/servlet/net/php/reflect.properties
+   @echo library=php4 > sapi/servlet/net/php/servlet.properties
+   @cp sapi/servlet/formatter.java sapi/servlet/net/php
+   @cp sapi/servlet/servlet.java sapi/servlet/net/php
+   @cp sapi/servlet/../../ext/java/reflect.java sapi/servlet/net/php
+   cd sapi/servlet && javac net/php/reflect.java
+   @test ! -f sapi/servlet/reflect.class || mv sapi/servlet/reflect.class 
+sapi/servlet/net/php # bug in KJC javac
+   cd sapi/servlet && javac -classpath .:$(SERVLET_CLASSPATH):$(CLASSPATH):. 
+net/php/servlet.java
+   @test ! -f sapi/servlet/servlet.class || mv sapi/servlet/servlet.class 
+sapi/servlet/net/php # bug in KJC javac
+   cd sapi/servlet && javac -classpath .:$(SERVLET_CLASSPATH):$(CLASSPATH):. 
+net/php/formatter.java
+   @test ! -f sapi/servlet/formatter.class || mv sapi/servlet/formatter.class 
+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 -r php-4.3.0_org/sapi/servlet/config.m4 php-4.3.0_test/sapi/servlet/config.m4
--- php-4.3.0_org/sapi/servlet/config.m4Thu Mar  7 15:20:00 2002
+++ php-4.3.0_test/sapi/servlet/config.m4   Fri Jan 10 12:36:13 2003
@@ -34,13 +34,15 @@
 AC_DEFINE(SAPI_SERVLET, 1, [Whether you use Servlet])
 
 INSTALL_IT="\$(mkinstalldirs) \$(libdir)"
-INSTALL_IT="$INSTALL_IT; \$(INSTALL) -m 0755 \$(srcdir)/sapi/servlet/phpsrvlt.jar 
\$(libdir)"
+INSTALL_IT="$INSTALL_IT; \$(INSTA

[PHP-DEV] fix for servlet extension make failure

2003-01-03 Thread Giuseppe Tanzilli - CSF
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.0 +0100
+++ php-4.3.0_servlet_compile/sapi/servlet/Makefile.frag2003-01-03 
+14:42:30.0 +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/sa