#45361 [Bgs]: IE / IIS Double form post in case of redirection

2008-07-04 Thread ssruprai at hotmail dot com
 ID:   45361
 User updated by:  ssruprai at hotmail dot com
 Reported By:  ssruprai at hotmail dot com
 Status:   Bogus
 Bug Type: IIS related
 Operating System: Windows 2003, XP
 PHP Version:  5.2.6
 New Comment:

I think I have found what is causing this double post. It is a sapce
between Location: and the url.

Instead of 

header("Location:http://www.google.com";);

header("Location: http://www.google.com";);

should be used to avoid this double posting.

This seems to have solved the problem.


Previous Comments:


[2008-07-02 12:25:44] ssruprai at hotmail dot com

Whatever it is, I am just reporting the problem because it is php
header function which is creating this problem.

I think you should test it yourself as I have provided the code to
reproduce. Most of the people use IE although PHP is rarely used on
Windows.

I think this needs to be solved as it is very common to self post and
redirect.



[2008-07-02 11:37:48] [EMAIL PROTECTED]

"It works with firefox, Apache / PHP combination.
It works with IE / Apache / PHP combination"

So it's IIS vs. IE bug. Not PHP problem -> bogus.


----

[2008-07-01 11:12:54] ssruprai at hotmail dot com

The production server is a fast cgi windows 2003. Behavior is same.



[2008-07-01 09:53:27] [EMAIL PROTECTED]

Instead of using the (buggy) ISAPI module, use the fastcgi approach
instead (supported/preferred also by Microsoft themselves!).

----

[2008-06-25 22:26:46] ssruprai at hotmail dot com

Description:

I am facing a strange problem of IE double posting in case of self
post.  PHP 5.2.6 / IIS 5.1 on windows XP.
 
Before starting I must tell you that:
 
It works with firefox, Apache / PHP combination.
It works with IE / Apache / PHP combination
It works with firefox / IIS / PHP Combination
But it DOES NOT work with  IE/PHP/ IIS
 
 This seems to be the case case with all IE versions (specially IE 6)
and it happens on even the windows 2003 server.
 
 I have a form with just one field which uploads a single file and
posts  back to same PHP file. The file is a csv file and it is properly
read and inserted into database. After it is successfully inserted I
issue a redirect to some other page using
header("Location:other_page.php"). When the header is executed the form
is posted again.


I know that it was posted twice because when I see the database the
records are inserted twice.

I am not sure if it is IIS, PHP or IE Problem.
 
This is not the first time I have experienced this. I had earlier faced
the similar double post problem in case of self post (WITHOUT USING
REDIRECT header but this seems to have been resolved with latest php
ISAPI version. At that time I just switched to apache as most hosting
servers were linux and there was no problem). 

But now the problem is that production server is Windows 2003 server
with IIS. (The version of PHP IIS or windows shouldn't not matter
though)

My application is using all sorts of libraries, from pear db, quickform
to 
smarty so I have just created a simple upload form . Which does nothing
but logs the access to find out about double 
post.

I had tried many different php versions and all produced same result. I
have created a simple form for testing. If you'll upload a small text
file you'll see 
that there are two entries in log file for one access.

The platform to test is IIS (ISAPI) php 5 and Internet explorer 6.  (IE
7 
may not post values twice but it will display some page not found
error.)



Reproduce code:
---
 0)
{   

$fp = fopen('access.txt', 'a');
fwrite($fp, 'Accessed at '. date('d-m-y H:i:s u'). "\r\n");
fclose($fp);

header('Location:http://www.google.com');
exit;

/* if instead of above header, javascript redirect is used then 
it is
not posted twice */

/*echo "\n";
echo "location.replace('<a  rel="nofollow" href="http://www.google.com">http://www.google.com</a>');\n";
echo "";*/

}   
else if ($csv_file['error'] == UPLOAD_ERR_FORM_SIZE ||
$csv_file['error'] == UPLOAD_ERR_INI_SIZE)
{
$err

#45361 [Bgs]: IE / IIS Double form post in case of redirection

2008-07-02 Thread ssruprai at hotmail dot com
 ID:   45361
 User updated by:  ssruprai at hotmail dot com
 Reported By:  ssruprai at hotmail dot com
 Status:   Bogus
 Bug Type: IIS related
 Operating System: Windows 2003, XP
 PHP Version:  5.2.6
 New Comment:

Whatever it is, I am just reporting the problem because it is php
header function which is creating this problem.

I think you should test it yourself as I have provided the code to
reproduce. Most of the people use IE although PHP is rarely used on
Windows.

I think this needs to be solved as it is very common to self post and
redirect.


Previous Comments:


[2008-07-02 11:37:48] [EMAIL PROTECTED]

"It works with firefox, Apache / PHP combination.
It works with IE / Apache / PHP combination"

So it's IIS vs. IE bug. Not PHP problem -> bogus.




[2008-07-01 11:12:54] ssruprai at hotmail dot com

The production server is a fast cgi windows 2003. Behavior is same.



[2008-07-01 09:53:27] [EMAIL PROTECTED]

Instead of using the (buggy) ISAPI module, use the fastcgi approach
instead (supported/preferred also by Microsoft themselves!).



[2008-06-25 22:26:46] ssruprai at hotmail dot com

Description:

I am facing a strange problem of IE double posting in case of self
post.  PHP 5.2.6 / IIS 5.1 on windows XP.
 
Before starting I must tell you that:
 
It works with firefox, Apache / PHP combination.
It works with IE / Apache / PHP combination
It works with firefox / IIS / PHP Combination
But it DOES NOT work with  IE/PHP/ IIS
 
 This seems to be the case case with all IE versions (specially IE 6)
and it happens on even the windows 2003 server.
 
 I have a form with just one field which uploads a single file and
posts  back to same PHP file. The file is a csv file and it is properly
read and inserted into database. After it is successfully inserted I
issue a redirect to some other page using
header("Location:other_page.php"). When the header is executed the form
is posted again.


I know that it was posted twice because when I see the database the
records are inserted twice.

I am not sure if it is IIS, PHP or IE Problem.
 
This is not the first time I have experienced this. I had earlier faced
the similar double post problem in case of self post (WITHOUT USING
REDIRECT header but this seems to have been resolved with latest php
ISAPI version. At that time I just switched to apache as most hosting
servers were linux and there was no problem). 

But now the problem is that production server is Windows 2003 server
with IIS. (The version of PHP IIS or windows shouldn't not matter
though)

My application is using all sorts of libraries, from pear db, quickform
to 
smarty so I have just created a simple upload form . Which does nothing
but logs the access to find out about double 
post.

I had tried many different php versions and all produced same result. I
have created a simple form for testing. If you'll upload a small text
file you'll see 
that there are two entries in log file for one access.

The platform to test is IIS (ISAPI) php 5 and Internet explorer 6.  (IE
7 
may not post values twice but it will display some page not found
error.)



Reproduce code:
---
 0)
{   

$fp = fopen('access.txt', 'a');
fwrite($fp, 'Accessed at '. date('d-m-y H:i:s u'). "\r\n");
fclose($fp);

header('Location:http://www.google.com');
exit;

/* if instead of above header, javascript redirect is used then 
it is
not posted twice */

/*echo "\n";
echo "location.replace('<a  rel="nofollow" href="http://www.google.com">http://www.google.com</a>');\n";
echo "";*/

}   
else if ($csv_file['error'] == UPLOAD_ERR_FORM_SIZE ||
$csv_file['error'] == UPLOAD_ERR_INI_SIZE)
{
$error = "File size exceeds max allowed size of whatever";

}
else
{
$error = "There was error in uploading your file.";

}   

}

?>



test



$error";
}
?>














-- 
Edit this bug report at http://bugs.php.net/?id=45361&edit=1



#45361 [Fbk->Opn]: IE / IIS Double form post in case of redirection

2008-07-01 Thread ssruprai at hotmail dot com
 ID:   45361
 User updated by:  ssruprai at hotmail dot com
 Reported By:  ssruprai at hotmail dot com
-Status:   Feedback
+Status:   Open
 Bug Type: IIS related
 Operating System: Windows 2003, XP
 PHP Version:  5.2.6
 New Comment:

The production server is a fast cgi windows 2003. Behavior is same.


Previous Comments:


[2008-07-01 09:53:27] [EMAIL PROTECTED]

Instead of using the (buggy) ISAPI module, use the fastcgi approach
instead (supported/preferred also by Microsoft themselves!).



[2008-06-25 22:26:46] ssruprai at hotmail dot com

Description:

I am facing a strange problem of IE double posting in case of self
post.  PHP 5.2.6 / IIS 5.1 on windows XP.
 
Before starting I must tell you that:
 
It works with firefox, Apache / PHP combination.
It works with IE / Apache / PHP combination
It works with firefox / IIS / PHP Combination
But it DOES NOT work with  IE/PHP/ IIS
 
 This seems to be the case case with all IE versions (specially IE 6)
and it happens on even the windows 2003 server.
 
 I have a form with just one field which uploads a single file and
posts  back to same PHP file. The file is a csv file and it is properly
read and inserted into database. After it is successfully inserted I
issue a redirect to some other page using
header("Location:other_page.php"). When the header is executed the form
is posted again.


I know that it was posted twice because when I see the database the
records are inserted twice.

I am not sure if it is IIS, PHP or IE Problem.
 
This is not the first time I have experienced this. I had earlier faced
the similar double post problem in case of self post (WITHOUT USING
REDIRECT header but this seems to have been resolved with latest php
ISAPI version. At that time I just switched to apache as most hosting
servers were linux and there was no problem). 

But now the problem is that production server is Windows 2003 server
with IIS. (The version of PHP IIS or windows shouldn't not matter
though)

My application is using all sorts of libraries, from pear db, quickform
to 
smarty so I have just created a simple upload form . Which does nothing
but logs the access to find out about double 
post.

I had tried many different php versions and all produced same result. I
have created a simple form for testing. If you'll upload a small text
file you'll see 
that there are two entries in log file for one access.

The platform to test is IIS (ISAPI) php 5 and Internet explorer 6.  (IE
7 
may not post values twice but it will display some page not found
error.)



Reproduce code:
---
 0)
{   

$fp = fopen('access.txt', 'a');
fwrite($fp, 'Accessed at '. date('d-m-y H:i:s u'). "\r\n");
fclose($fp);

header('Location:http://www.google.com');
exit;

/* if instead of above header, javascript redirect is used then 
it is
not posted twice */

/*echo "\n";
echo "location.replace('<a  rel="nofollow" href="http://www.google.com">http://www.google.com</a>');\n";
echo "";*/

}   
else if ($csv_file['error'] == UPLOAD_ERR_FORM_SIZE ||
$csv_file['error'] == UPLOAD_ERR_INI_SIZE)
{
$error = "File size exceeds max allowed size of whatever";

}
else
{
$error = "There was error in uploading your file.";

}   

}

?>



test



$error";
}
?>














-- 
Edit this bug report at http://bugs.php.net/?id=45361&edit=1



#45361 [NEW]: IE / IIS Double form post in case of redirection

2008-06-25 Thread ssruprai at hotmail dot com
From: ssruprai at hotmail dot com
Operating system: Windows 2003, XP
PHP version:  5.2.6
PHP Bug Type: IIS related
Bug description:  IE / IIS Double form post in case of redirection

Description:

I am facing a strange problem of IE double posting in case of self post. 
PHP 5.2.6 / IIS 5.1 on windows XP.
 
Before starting I must tell you that:
 
It works with firefox, Apache / PHP combination.
It works with IE / Apache / PHP combination
It works with firefox / IIS / PHP Combination
But it DOES NOT work with  IE/PHP/ IIS
 
 This seems to be the case case with all IE versions (specially IE 6) and
it happens on even the windows 2003 server.
 
 I have a form with just one field which uploads a single file and posts 
back to same PHP file. The file is a csv file and it is properly read and
inserted into database. After it is successfully inserted I issue a
redirect to some other page using header("Location:other_page.php"). When
the header is executed the form is posted again.


I know that it was posted twice because when I see the database the
records are inserted twice.

I am not sure if it is IIS, PHP or IE Problem.
 
This is not the first time I have experienced this. I had earlier faced
the similar double post problem in case of self post (WITHOUT USING
REDIRECT header but this seems to have been resolved with latest php ISAPI
version. At that time I just switched to apache as most hosting servers
were linux and there was no problem). 

But now the problem is that production server is Windows 2003 server with
IIS. (The version of PHP IIS or windows shouldn't not matter though)

My application is using all sorts of libraries, from pear db, quickform to

smarty so I have just created a simple upload form . Which does nothing
but logs the access to find out about double 
post.

I had tried many different php versions and all produced same result. I
have created a simple form for testing. If you'll upload a small text file
you'll see 
that there are two entries in log file for one access.

The platform to test is IIS (ISAPI) php 5 and Internet explorer 6.  (IE 7

may not post values twice but it will display some page not found error.)



Reproduce code:
---
 0)
{   

$fp = fopen('access.txt', 'a');
fwrite($fp, 'Accessed at '. date('d-m-y H:i:s u'). "\r\n");
fclose($fp);

header('Location:http://www.google.com');
exit;

/* if instead of above header, javascript redirect is used then 
it is
not posted twice */

/*echo "\n";
echo "location.replace('<a  rel="nofollow" href="http://www.google.com">http://www.google.com</a>');\n";
echo "";*/

}   
else if ($csv_file['error'] == UPLOAD_ERR_FORM_SIZE || 
$csv_file['error']
== UPLOAD_ERR_INI_SIZE)
{
$error = "File size exceeds max allowed size of whatever";

}
else
{
$error = "There was error in uploading your file.";

}   

}

?>



test



$error";
}
?>










-- 
Edit bug report at http://bugs.php.net/?id=45361&edit=1
-- 
Try a CVS snapshot (PHP 5.2): 
http://bugs.php.net/fix.php?id=45361&r=trysnapshot52
Try a CVS snapshot (PHP 5.3): 
http://bugs.php.net/fix.php?id=45361&r=trysnapshot53
Try a CVS snapshot (PHP 6.0): 
http://bugs.php.net/fix.php?id=45361&r=trysnapshot60
Fixed in CVS: http://bugs.php.net/fix.php?id=45361&r=fixedcvs
Fixed in release: 
http://bugs.php.net/fix.php?id=45361&r=alreadyfixed
Need backtrace:   http://bugs.php.net/fix.php?id=45361&r=needtrace
Need Reproduce Script:http://bugs.php.net/fix.php?id=45361&r=needscript
Try newer version:http://bugs.php.net/fix.php?id=45361&r=oldversion
Not developer issue:  http://bugs.php.net/fix.php?id=45361&r=support
Expected behavior:http://bugs.php.net/fix.php?id=45361&r=notwrong
Not enough info:  
http://bugs.php.net/fix.php?id=45361&r=notenoughinfo
Submitted twice:  
http://bugs.php.net/fix.php?id=45361&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=45361&r=globals
PHP 4 support discontinued:   http://bugs.php.net/fix.php?id=45361&r=php4
Daylight Savings: http://bugs.php.net/fix.php?id=45361&r=dst
IIS Stability:http://bugs.php.net/fix.php?id=45361&r=isapi
Install GNU Sed:  http://bugs.php.net/fix.php?id=45361&r=gnused
Floating point limitations:   http://bugs.php.net/fix.php?id=45361&r=float
No Zend Extensions:   http://bugs.php.net/fix.php?id=45361&r=nozend
MySQL Configuration Error:http://bugs.php.net/fix.php?id=45361&r=mysqlcfg



#15702 [Csd]: Segmentation fault (using jdk1.4 with php 4.2.3)

2002-12-05 Thread ssruprai
 ID:   15702
 User updated by:  [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
 Status:   Closed
 Bug Type: Java related
 Operating System: Red Hat Linux 7.1
 PHP Version:  4.2.3
 New Comment:

No I didn't use sablotron last time. I only used --with-java and
nothing else.

Anyway I'll try again enusuring --enable-debug and only --with-java is
used.


Previous Comments:


[2002-12-04 02:18:09] [EMAIL PROTECTED]

This bug has been fixed in CVS.

In case this was a PHP problem, snapshots of the sources are packaged
every three hours; this change will be in the next snapshot. You can
grab the snapshot at http://snaps.php.net/.
 
In case this was a documentation problem, the fix will show up soon at
http://www.php.net/manual/.

In case this was a PHP.net website problem, the change will show
up on the PHP.net site and on the mirror sites in short time.
 
Thank you for the report, and for helping us make PHP better.





[2002-12-03 11:13:17] [EMAIL PROTECTED]

your backtrace is not of much use, but it looks like apache2 does
backtraces differently than apache1.3 (or you didn't use --enable-debug
or you're using threaded mpms within apache2, I have no experience with
apache2...)

but, as I said in my last comment:

"sablotron < 0.97 and jdk >= 1.3 does not work together.
Sablotron 0.97 is not out yet, but there is an RC1 in their CVS (didn't
find a link to download it), which should solve the problem.."

you're obviously (at least it's written in your ./configure lines)
using sablotron. And sablotron <=0.96 does not work together with jdk
>= 1.3... please try your installation without sablotron and see if
that works.

chregu



[2002-12-03 09:22:01] [EMAIL PROTECTED]

http://bugs.php.net/bug.php?id=15702&edit=2 is not accepting my
password. I don't know why so I am posting this as  comment

I think above you meant from java.so to libphp_java.so.
Yes I did create a symbolic link libphp_java.so to java.so. It again
resulted inSegmentation fault. Here is the gdb output.


# export
LD_LIBRARY_PATH=/usr/java/j2sdk1.4.0/jre/lib/i386:/usr/java/j2sdk1.4.0/jre/lib/i386/client


# gdb /wwwroot/bin/httpd 
GNU gdb 5.0rh-5 Red Hat Linux 7.1
Copyright 2001 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and
you are
welcome to change it and/or distribute copies of it under certain
conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for
details.
This GDB was configured as "i386-redhat-linux"...
(gdb) run -X
Starting program: /wwwroot/bin/httpd -X
[New Thread 1024 (LWP 852)]
[New Thread 2049 (LWP 857)]
Delayed SIGSTOP caught for LWP 857.
[New Thread 1026 (LWP 858)]
Delayed SIGSTOP caught for LWP 858.
[New Thread 2051 (LWP 859)]
Delayed SIGSTOP caught for LWP 859.
[New Thread 3076 (LWP 860)]
Delayed SIGSTOP caught for LWP 860.
[New Thread 4101 (LWP 861)]
[New Thread 5126 (LWP 862)]
Delayed SIGSTOP caught for LWP 862.
[New Thread 6151 (LWP 863)]
Delayed SIGSTOP caught for LWP 863.
[New Thread 7176 (LWP 864)]
Delayed SIGSTOP caught for LWP 864.

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 7176 (LWP 864)]
__pthread_mutex_lock (mutex=0x89110898) at mutex.c:99
99  mutex.c: No such file or directory.
in mutex.c
(gdb)



[2002-11-28 07:08:06] [EMAIL PROTECTED]

first. you have to make a symlink from to
libphp_java.so not php_java.so...

second. sablotron < 0.97 and jdk >= 1.3 does not work together.
Sablotron 0.97 is not out yet, but there is an RC1 in their CVS (didn't
find a link to download it), which should solve the problem..

chregu



[2002-11-11 09:41:56] [EMAIL PROTECTED]

As you suggested above changing the extension=php_java.so without
creating a symbolic link doesn't even load the extension.

So I tried it by creating a symbolic link to
/wwwroot/php/lib/php/extensions/no-debug-zts-20020429/java.so as
/wwwroot/php/lib/php/extensions/no-debug-zts-20020429/php_java.so and
used the following setting in php.ini:

[Java]
extension_dir = /wwwroot/php/lib/php/extensions/no-debug-zts-20020429
java.class.path = /wwwroot/php/lib/php/php_java.jar
extension=php_java.so
;java.home = /usr/java/j2sdk1.4.0
;java.library = /usr/java/j2sdk1.4.0/jre/lib/i386/client/libjvm.so
;java.library = /usr/java/j2sdk1.4.0/jre/lib/i386/libjava.so
java.library.path =
/wwwroot/php/lib/php/extensions/no-debug-zts-20020429


PHP loaded the java extension but it still displayed:

Fatal error: java.lang.UnsatisfiedLinkError: no php_java in
java.l

#15702 [Com]: Segmentation fault (using jdk1.4 with php 4.2.3)

2002-12-03 Thread ssruprai
 ID:   15702
 Comment by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
 Status:   Feedback
 Bug Type: Java related
 Operating System: Red Hat Linux 7.1
 PHP Version:  4.2.3
 New Comment:

http://bugs.php.net/bug.php?id=15702&edit=2 is not accepting my
password. I don't know why so I am posting this as  comment

I think above you meant from java.so to libphp_java.so.
Yes I did create a symbolic link libphp_java.so to java.so. It again
resulted inSegmentation fault. Here is the gdb output.


# export
LD_LIBRARY_PATH=/usr/java/j2sdk1.4.0/jre/lib/i386:/usr/java/j2sdk1.4.0/jre/lib/i386/client


# gdb /wwwroot/bin/httpd 
GNU gdb 5.0rh-5 Red Hat Linux 7.1
Copyright 2001 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and
you are
welcome to change it and/or distribute copies of it under certain
conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for
details.
This GDB was configured as "i386-redhat-linux"...
(gdb) run -X
Starting program: /wwwroot/bin/httpd -X
[New Thread 1024 (LWP 852)]
[New Thread 2049 (LWP 857)]
Delayed SIGSTOP caught for LWP 857.
[New Thread 1026 (LWP 858)]
Delayed SIGSTOP caught for LWP 858.
[New Thread 2051 (LWP 859)]
Delayed SIGSTOP caught for LWP 859.
[New Thread 3076 (LWP 860)]
Delayed SIGSTOP caught for LWP 860.
[New Thread 4101 (LWP 861)]
[New Thread 5126 (LWP 862)]
Delayed SIGSTOP caught for LWP 862.
[New Thread 6151 (LWP 863)]
Delayed SIGSTOP caught for LWP 863.
[New Thread 7176 (LWP 864)]
Delayed SIGSTOP caught for LWP 864.

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 7176 (LWP 864)]
__pthread_mutex_lock (mutex=0x89110898) at mutex.c:99
99  mutex.c: No such file or directory.
in mutex.c
(gdb)


Previous Comments:


[2002-11-28 07:08:06] [EMAIL PROTECTED]

first. you have to make a symlink from to
libphp_java.so not php_java.so...

second. sablotron < 0.97 and jdk >= 1.3 does not work together.
Sablotron 0.97 is not out yet, but there is an RC1 in their CVS (didn't
find a link to download it), which should solve the problem..

chregu



[2002-11-11 09:41:56] [EMAIL PROTECTED]

As you suggested above changing the extension=php_java.so without
creating a symbolic link doesn't even load the extension.

So I tried it by creating a symbolic link to
/wwwroot/php/lib/php/extensions/no-debug-zts-20020429/java.so as
/wwwroot/php/lib/php/extensions/no-debug-zts-20020429/php_java.so and
used the following setting in php.ini:

[Java]
extension_dir = /wwwroot/php/lib/php/extensions/no-debug-zts-20020429
java.class.path = /wwwroot/php/lib/php/php_java.jar
extension=php_java.so
;java.home = /usr/java/j2sdk1.4.0
;java.library = /usr/java/j2sdk1.4.0/jre/lib/i386/client/libjvm.so
;java.library = /usr/java/j2sdk1.4.0/jre/lib/i386/libjava.so
java.library.path =
/wwwroot/php/lib/php/extensions/no-debug-zts-20020429


PHP loaded the java extension but it still displayed:

Fatal error: java.lang.UnsatisfiedLinkError: no php_java in
java.library.path in /wwwroot/htdocs/jver.php on line 4

I don't know what it isn't able to find php_java.jar or php_java.so?
PHP is able to find java.so thats why it loads the extension.

I also want to know what is the purpose of java.library.path? What
should be specified here?

Does it work for you or others who use Sun jdk 1.4?

If yes then please try to update the README file in ext/java directory
with settings which use Jdk 1.3 or 1.4 and which work on your own
systems? Because not many these days use jdk 1.2.2.

I must mention that java extension on windows works without any problem
even when using jdk1.4.



[2002-11-05 19:09:17] [EMAIL PROTECTED]

I believe the current answer to this is to make a link to the library
like so:

$extensiondir$/java.so to $extensiondir$/libphp_java.so

You can find more about this in Bug #19327

Does this solve the problem?  I know it's a hack at the moment, but the
other bug details some of the issues with possible solutions.



[2002-11-05 18:24:13] [EMAIL PROTECTED]

Just wanted to change email so that I recevie the notification whenever
this page is updated.



[2002-11-02 17:42:26] [EMAIL PROTECTED]

I used php 4.2.3 this time with apache 2.0.43

Apache
--
./configure --prefix=/wwwroot --enable-so

php

/configure --prefix=/wwwroot/php --with-apxs2=/wwwroot/bin/apxs
--with-java --with-mysql --with-config-file-path=/wwwroot/php

export
LD_LIBRARY_PATH=/usr/java/j2sdk1.4.0/jre/lib/i386:/usr/j

#15703 [Csd->Opn]: Segfault due to missing ZEND_INIT_MODULE_GLOBALS() call

2002-11-11 Thread ssruprai
 ID:   15703
 User updated by:  [EMAIL PROTECTED]
-Reported By:  [EMAIL PROTECTED]
+Reported By:  [EMAIL PROTECTED]
-Status:   Closed
+Status:   Open
 Bug Type: SWF related
 Operating System: Red Hat Linux 7.1
-PHP Version:  4.1.1
+PHP Version:  4.2.3
 New Comment:

I used php 4.2.3 and apache 2.0.43 this time and swf extension is still
causing segmentation fault.

PHP Configure
--
./configure --with-config-file-path=/wwwroot/php
--with-apxs2=/wwwroot/bin/apxs --prefix=/wwwroot/php --enable-trans-sid
--with-java --with-swf --enable-debug


Here is gdb output when a file with phpinfo() is accessed:

[root@sukhwinder php-4.2.3]# gdb /wwwroot/bin/httpd
GNU gdb 5.0rh-5 Red Hat Linux 7.1
Copyright 2001 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and
you are
welcome to change it and/or distribute copies of it under certain
conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for
details.
This GDB was configured as "i386-redhat-linux"...
(gdb) run -X
Starting program: /wwwroot/bin/httpd -X
[New Thread 1024 (LWP 9038)]

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 1024 (LWP 9038)]
0x40454bf9 in zm_activate_swf (type=1, module_number=2,
tsrm_ls=0x8100f60)
at swf.c:173
173 SWFG(use_file) = 0;
(gdb)


Previous Comments:


[2002-05-11 11:59:18] [EMAIL PROTECTED]

This bug has been fixed in CVS. You can grab a snapshot of the
CVS version at http://snaps.php.net/. In case this was a documentation 
problem, the fix will show up soon at http://www.php.net/manual/. 
Thank you for the report.





[2002-04-25 18:27:59] [EMAIL PROTECTED]

This has been hiding as feedback under Apache2, but it's 
most likely not Apache2 related, and I didn't want this 
patch, if valid, to be forgotten.  So I'm reopening and 
reclassifying as SWF related. 
Thanks... 



[2002-04-19 11:41:19] [EMAIL PROTECTED]

Please try again with Apache 2.0.35 (GA) and PHP from
CVS (either the 4.2.0 branch or HEAD).



[2002-03-08 14:46:48] [EMAIL PROTECTED]

I don't know much about cvs and how diff works. So I couldn't make
anything out of these lines. One thing I did was, removed --with-swf
from configure option and everything worked fine. I want to help but I
have a very slow pentium-1 computer and a slow dial up connection (in
punjab-IN) so it takes at least one hour to compile php alone. I know
little C so if you tell me what to add, what to remove and where then I
can make that change and try to compile again and see if that works.



[2002-03-07 18:00:41] [EMAIL PROTECTED]

Hmm .. have you compiled php with thread support?

It seems the swf module is missing an ZEND_INIT_MODULE_GLOBALS() call
in PHP_MINIT_FUNCTION().

Can you test this patch (against current CVS) ?

diff -u -r1.44 swf.c
--- swf.c   11 Dec 2001 15:30:38 -  1.44
+++ swf.c   7 Mar 2002 22:59:37 -
@@ -138,10 +138,19 @@
 }
 /* }}} */
 
+/* {{{ php_swf_init_globals
+ */
+static void php_swf_init_globals(zend_swf_globals *swf_globals) {
+   swf_globals->use_file = 0;
+   swf_globals->tmpfile_name = NULL;
+}
+
 /* {{{ PHP_MINIT_FUNCTION
  */
 PHP_MINIT_FUNCTION(swf)
 {
+   ZEND_INIT_MODULE_GLOBALS(swf, php_swf_init_globals, NULL);
+
REGISTER_LONG_CONSTANT("MOD_COLOR", MOD_COLOR, CONST_CS |
CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("MOD_MATRIX", MOD_MATRIX, CONST_CS |
CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("TYPE_PUSHBUTTON", TYPE_PUSHBUTTON,
CONST_CS | CONST_PERSISTENT);



The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
http://bugs.php.net/15703

-- 
Edit this bug report at http://bugs.php.net/?id=15703&edit=1




#15702 [Fbk->Opn]: Segmentation fault (using jdk1.4 with php 4.2.3)

2002-11-11 Thread ssruprai
 ID:   15702
 User updated by:  [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
-Status:   Feedback
+Status:   Open
 Bug Type: Java related
 Operating System: Red Hat Linux 7.1
 PHP Version:  4.2.3
 New Comment:

As you suggested above changing the extension=php_java.so without
creating a symbolic link doesn't even load the extension.

So I tried it by creating a symbolic link to
/wwwroot/php/lib/php/extensions/no-debug-zts-20020429/java.so as
/wwwroot/php/lib/php/extensions/no-debug-zts-20020429/php_java.so and
used the following setting in php.ini:

[Java]
extension_dir = /wwwroot/php/lib/php/extensions/no-debug-zts-20020429
java.class.path = /wwwroot/php/lib/php/php_java.jar
extension=php_java.so
;java.home = /usr/java/j2sdk1.4.0
;java.library = /usr/java/j2sdk1.4.0/jre/lib/i386/client/libjvm.so
;java.library = /usr/java/j2sdk1.4.0/jre/lib/i386/libjava.so
java.library.path =
/wwwroot/php/lib/php/extensions/no-debug-zts-20020429


PHP loaded the java extension but it still displayed:

Fatal error: java.lang.UnsatisfiedLinkError: no php_java in
java.library.path in /wwwroot/htdocs/jver.php on line 4

I don't know what it isn't able to find php_java.jar or php_java.so?
PHP is able to find java.so thats why it loads the extension.

I also want to know what is the purpose of java.library.path? What
should be specified here?

Does it work for you or others who use Sun jdk 1.4?

If yes then please try to update the README file in ext/java directory
with settings which use Jdk 1.3 or 1.4 and which work on your own
systems? Because not many these days use jdk 1.2.2.

I must mention that java extension on windows works without any problem
even when using jdk1.4.


Previous Comments:


[2002-11-05 19:09:17] [EMAIL PROTECTED]

I believe the current answer to this is to make a link to the library
like so:

$extensiondir$/java.so to $extensiondir$/libphp_java.so

You can find more about this in Bug #19327

Does this solve the problem?  I know it's a hack at the moment, but the
other bug details some of the issues with possible solutions.



[2002-11-05 18:24:13] [EMAIL PROTECTED]

Just wanted to change email so that I recevie the notification whenever
this page is updated.



[2002-11-02 17:42:26] [EMAIL PROTECTED]

I used php 4.2.3 this time with apache 2.0.43

Apache
--
./configure --prefix=/wwwroot --enable-so

php

/configure --prefix=/wwwroot/php --with-apxs2=/wwwroot/bin/apxs
--with-java --with-mysql --with-config-file-path=/wwwroot/php

export
LD_LIBRARY_PATH=/usr/java/j2sdk1.4.0/jre/lib/i386:/usr/java/j2sdk1.4.0/jre/lib/i386/client


php.ini Setting
---
[Java]

java.class.path = /wwwroot/php/lib/php/php_java.jar
extension=java.so
java.home = /usr/java/j2sdk1.4.0
java.library = /usr/java/j2sdk1.4.0/jre/lib/i386/libjava.so
;java.library = /usr/java/j2sdk1.4.0/jre/lib/i386/client/libjvm.so
;java.library.path = /usr/java/j2sdk1.4.0/jre/lib/i386/client


Apache Start

$ export
LD_LIBRARY_PATH=/usr/java/j2sdk1.4.0/jre/lib/i386:/usr/java/j2sdk1.4.0/jre/lib/i386/client

$ /wwwroot/bin/apachectl start


Fatal error: java.lang.UnsatisfiedLinkError: no php_java in
java.library.path in /wwwroot/htdocs/jver.php on line 4

Then I changed java setting in php.ini like this:

[Java]
java.class.path = /wwwroot/php/lib/php/php_java.jar
extension=java.so
java.library.path = /wwwroot/php/lib/php


But same error was displayed.

Fatal error: java.lang.UnsatisfiedLinkError: no php_java in
java.library.path in /wwwroot/htdocs/jver.php on line 4

I also want to know what has to be specified in java.library.path?
In php.ini I also tried to use
java.library.path=/usr/java/j2sdk1.4.0/jre/lib/i386:/usr/java/j2sdk1.4.0/jre/lib/i386/client


But it was unable to find other java libraries and this error was
displayed:

Fatal error: Unable to load Java Library
/usr/java/j2sdk1.4.0/./jre/lib/i386/libjava.so, error: libverify.so:
cannot load shared object file: No such file or
directory in /wwwroot/htdocs/jver.php on line 4

So I had to mannual export LD_LIBRARY_PATH as above and then it
displayed the
unsatisfied link error.



[2002-10-31 01:00:04] [EMAIL PROTECTED]

No feedback was provided for this bug for over 2 weeks, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".



[2002-10-15 22:38:59] [EMAIL PROTECTED]

Please try using this CVS snapshot:

  http://snaps.php.net/php4-latest.tar.gz
 
For Windows

#15702 [Opn]: Segmentation fault (using jdk1.4 with php 4.2.3)

2002-11-05 Thread ssruprai
 ID:   15702
 User updated by:  [EMAIL PROTECTED]
-Reported By:  [EMAIL PROTECTED]
+Reported By:  [EMAIL PROTECTED]
 Status:   Open
 Bug Type: Java related
 Operating System: Red Hat Linux 7.1
 PHP Version:  4.2.3
 New Comment:

Just wanted to change email so that I recevie the notification whenever
this page is updated.


Previous Comments:


[2002-11-02 17:42:26] [EMAIL PROTECTED]

I used php 4.2.3 this time with apache 2.0.43

Apache
--
./configure --prefix=/wwwroot --enable-so

php

/configure --prefix=/wwwroot/php --with-apxs2=/wwwroot/bin/apxs
--with-java --with-mysql --with-config-file-path=/wwwroot/php

export
LD_LIBRARY_PATH=/usr/java/j2sdk1.4.0/jre/lib/i386:/usr/java/j2sdk1.4.0/jre/lib/i386/client


php.ini Setting
---
[Java]

java.class.path = /wwwroot/php/lib/php/php_java.jar
extension=java.so
java.home = /usr/java/j2sdk1.4.0
java.library = /usr/java/j2sdk1.4.0/jre/lib/i386/libjava.so
;java.library = /usr/java/j2sdk1.4.0/jre/lib/i386/client/libjvm.so
;java.library.path = /usr/java/j2sdk1.4.0/jre/lib/i386/client


Apache Start

$ export
LD_LIBRARY_PATH=/usr/java/j2sdk1.4.0/jre/lib/i386:/usr/java/j2sdk1.4.0/jre/lib/i386/client

$ /wwwroot/bin/apachectl start


Fatal error: java.lang.UnsatisfiedLinkError: no php_java in
java.library.path in /wwwroot/htdocs/jver.php on line 4

Then I changed java setting in php.ini like this:

[Java]
java.class.path = /wwwroot/php/lib/php/php_java.jar
extension=java.so
java.library.path = /wwwroot/php/lib/php


But same error was displayed.

Fatal error: java.lang.UnsatisfiedLinkError: no php_java in
java.library.path in /wwwroot/htdocs/jver.php on line 4

I also want to know what has to be specified in java.library.path?
In php.ini I also tried to use
java.library.path=/usr/java/j2sdk1.4.0/jre/lib/i386:/usr/java/j2sdk1.4.0/jre/lib/i386/client


But it was unable to find other java libraries and this error was
displayed:

Fatal error: Unable to load Java Library
/usr/java/j2sdk1.4.0/./jre/lib/i386/libjava.so, error: libverify.so:
cannot load shared object file: No such file or
directory in /wwwroot/htdocs/jver.php on line 4

So I had to mannual export LD_LIBRARY_PATH as above and then it
displayed the
unsatisfied link error.



[2002-10-31 01:00:04] [EMAIL PROTECTED]

No feedback was provided for this bug for over 2 weeks, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".



[2002-10-15 22:38:59] [EMAIL PROTECTED]

Please try using this CVS snapshot:

  http://snaps.php.net/php4-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php4-win32-latest.zip


And use MINIMUM amount of configure options when you test it.




[2002-10-15 11:24:28] [EMAIL PROTECTED]

I think you have not read it properly. My first comment was related
apache 1.3.23 Yes this happens with all versions of apache only when
using any jdk other later than 1.2.2.



[2002-09-09 01:00:04] [EMAIL PROTECTED]

No feedback was provided for this bug for over a month, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".



The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
http://bugs.php.net/15702

-- 
Edit this bug report at http://bugs.php.net/?id=15702&edit=1