Mombu the Php Forum sponsored links

Go Back   Mombu the Php Forum > Php > #38577 : ini settings leak between virtual hosts with Apache 1.3
User Name
Password
REGISTER NOW! Mark Forums Read

sponsored links


Reply
 
1 20th June 06:02
External User
 
Posts: 1
Default #38577 : ini settings leak between virtual hosts with Apache 1.3



ID: 38577
Updated by: tony2001@php.net
-Summary: Changing internal character encoding affects function
overloading
Reported By: php at diptyque dot net
Status: Open
-Bug Type: mbstring related
+Bug Type: Apache related
Operating System: FreeBSD 4.4
PHP Version: 4.4.4
New Comment:

Reclassified as Apache-related issue.


Previous Comments:
------------------------------------------------------------------------

[2006-08-25 13:32:22] php at diptyque dot net

I forgot to mention that mbstring.func_overload is enabled
on a per-vhost basis for some other web sites I'm hosting
on this platform.

------------------------------------------------------------------------

[2006-08-24 16:20:24] php at diptyque dot net

Agreed but I'm not making things up, you know. Something is
obviously wrong on my Apache 1.3.34 setup. Could this be a
conflict with some extension or Apache module? Of course,
no opcode cache is running. Any tip welcome.

This weird behavior has been plaguing me for 2 months now


effectively taking place sporadically while running under
apache SAPI -- strlen() may accept the optional encoding
argument (!?) as shown in the script output below.

http://www.diptyque.net/bugs/mbinfo2.php

http://www.diptyque.net/bugs/mbinfo2.phps
; source code

=begin [diptyque] % GET http://www.diptyque.net/bugs/mbinfo2.php
<pre>int(72208)
string(10) "ISO-8859-1"
string(10) "ISO-8859-1"
string(1) "0"
string(19) "Méthodes de codage"
int(19)
--
bool(true)
string(5) "UTF-8"
string(10) "ISO-8859-1"
string(1) "0"
string(19) "Méthodes de codage"
int(18)
int(19)
--
bool(true)
string(10) "ISO-8859-1"
string(10) "ISO-8859-1"
string(1) "0"
string(19) "Méthodes de codage" int(19) int(18)
</pre>
=end

If I do run the same script through PHP CLI or FastCGI, I
get the following expected warnings:

PHP Warning: Wrong parameter count for strlen() in
/path/to/htdocs/bugs/mbinfo2.php on line 17
PHP Warning: Wrong parameter count for strlen() in
/path/to/htdocs/bugs/mbinfo2.php on line 25

------------------------------------------------------------------------

[2006-08-24 15:15:31] tony2001@php.net

Please try with minimal configuration (like ./configure
--enable-mbstring) and PHP CLI.
If you're still able to reproduce it, you're likely to be the only
person who can help you, since I really doubt anyone else can do it.

------------------------------------------------------------------------

[2006-08-24 15:04:03] php at diptyque dot net

I moved mbstring function overload initial setting (6) from
my php.ini to specific virtual hosts configuration sections
but to no avail.

It would seem that some Apache processes get it right while
others get it wrong (!) This is quite weird -- for example,
process #58902 returns int(18) while #58914 returns
int(19).
[diptyque] % GET http://localhost/bugs/mbinfo2.php
<pre>int(58902)
string(10) "ISO-8859-1"
string(10) "ISO-8859-1"
string(1) "0"
string(19) "Méthodes de codage"
int(19)
--
bool(true)
string(5) "UTF-8"
string(10) "ISO-8859-1"
string(1) "0"
string(19) "Méthodes de codage"
int(18)
--
bool(true)
string(10) "ISO-8859-1"
string(10) "ISO-8859-1"
string(1) "0"
string(19) "Méthodes de codage" int(19)
</pre>
[diptyque] % GET http://localhost/bugs/mbinfo2.php
<pre>int(58914)
string(10) "ISO-8859-1"
string(10) "ISO-8859-1"
string(1) "0"
string(19) "Méthodes de codage"
int(19)
--
bool(true)
string(5) "UTF-8"
string(10) "ISO-8859-1"
string(1) "0"
string(19) "Méthodes de codage"
int(19)
--
bool(true)
string(10) "ISO-8859-1"
string(10) "ISO-8859-1"
string(1) "0"
string(19) "Méthodes de codage" int(19)
</pre>

------------------------------------------------------------------------

[2006-08-24 12:41:06] tony2001@php.net

Right, int(19) is what I get on Linux and FreeBSD 5.4.

------------------------------------------------------------------------

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/38577

--
Edit this bug report at http://bugs.php.net/?id=38577&edit=1
  Reply With Quote


  sponsored links


2 20th June 06:02
php-bugs
External User
 
Posts: 1
Default #38577 : ini settings leak between virtual hosts with Apache 1.3



ID: 38577
Comment by: judas dot iscariote at gmail dot com
Reported By: php at diptyque dot net
Status: Open
Bug Type: Apache related
Operating System: FreeBSD 4.4
PHP Version: 4.4.4
New Comment:

PHP5 produces the same effects for you ?


Previous Comments:
------------------------------------------------------------------------

[2006-08-25 13:39:31] tony2001@php.net

Reclassified as Apache-related issue.

------------------------------------------------------------------------

[2006-08-25 13:32:22] php at diptyque dot net

I forgot to mention that mbstring.func_overload is enabled
on a per-vhost basis for some other web sites I'm hosting
on this platform.

------------------------------------------------------------------------

[2006-08-24 16:20:24] php at diptyque dot net

Agreed but I'm not making things up, you know. Something is
obviously wrong on my Apache 1.3.34 setup. Could this be a
conflict with some extension or Apache module? Of course,
no opcode cache is running. Any tip welcome.

This weird behavior has been plaguing me for 2 months now


effectively taking place sporadically while running under
apache SAPI -- strlen() may accept the optional encoding
argument (!?) as shown in the script output below.

http://www.diptyque.net/bugs/mbinfo2.php

http://www.diptyque.net/bugs/mbinfo2.phps
; source code

=begin [diptyque] % GET http://www.diptyque.net/bugs/mbinfo2.php
<pre>int(72208)
string(10) "ISO-8859-1"
string(10) "ISO-8859-1"
string(1) "0"
string(19) "Méthodes de codage"
int(19)
--
bool(true)
string(5) "UTF-8"
string(10) "ISO-8859-1"
string(1) "0"
string(19) "Méthodes de codage"
int(18)
int(19)
--
bool(true)
string(10) "ISO-8859-1"
string(10) "ISO-8859-1"
string(1) "0"
string(19) "Méthodes de codage" int(19) int(18)
</pre>
=end

If I do run the same script through PHP CLI or FastCGI, I
get the following expected warnings:

PHP Warning: Wrong parameter count for strlen() in
/path/to/htdocs/bugs/mbinfo2.php on line 17
PHP Warning: Wrong parameter count for strlen() in
/path/to/htdocs/bugs/mbinfo2.php on line 25

------------------------------------------------------------------------

[2006-08-24 15:15:31] tony2001@php.net

Please try with minimal configuration (like ./configure
--enable-mbstring) and PHP CLI.
If you're still able to reproduce it, you're likely to be the only
person who can help you, since I really doubt anyone else can do it.

------------------------------------------------------------------------

[2006-08-24 15:04:03] php at diptyque dot net

I moved mbstring function overload initial setting (6) from
my php.ini to specific virtual hosts configuration sections
but to no avail.

It would seem that some Apache processes get it right while
others get it wrong (!) This is quite weird -- for example,
process #58902 returns int(18) while #58914 returns
int(19).
[diptyque] % GET http://localhost/bugs/mbinfo2.php
<pre>int(58902)
string(10) "ISO-8859-1"
string(10) "ISO-8859-1"
string(1) "0"
string(19) "Méthodes de codage"
int(19)
--
bool(true)
string(5) "UTF-8"
string(10) "ISO-8859-1"
string(1) "0"
string(19) "Méthodes de codage"
int(18)
--
bool(true)
string(10) "ISO-8859-1"
string(10) "ISO-8859-1"
string(1) "0"
string(19) "Méthodes de codage" int(19)
</pre>
[diptyque] % GET http://localhost/bugs/mbinfo2.php
<pre>int(58914)
string(10) "ISO-8859-1"
string(10) "ISO-8859-1"
string(1) "0"
string(19) "Méthodes de codage"
int(19)
--
bool(true)
string(5) "UTF-8"
string(10) "ISO-8859-1"
string(1) "0"
string(19) "Méthodes de codage"
int(19)
--
bool(true)
string(10) "ISO-8859-1"
string(10) "ISO-8859-1"
string(1) "0"
string(19) "Méthodes de codage" int(19)
</pre>

------------------------------------------------------------------------

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/38577

--
Edit this bug report at http://bugs.php.net/?id=38577&edit=1
  Reply With Quote
3 20th June 12:08
php-bugs
External User
 
Posts: 1
Default #38577 : ini settings leak between virtual hosts with Apache 1.3


ID: 38577
User updated by: php at diptyque dot net
Reported By: php at diptyque dot net
Status: Open
Bug Type: Apache related
Operating System: FreeBSD 4.4
PHP Version: 4.4.4
New Comment:

Dunno for PHP 5 -- I have to make some tests before trying
to switch -- but I wonder if this bug could be related to
http://bugs.php.net/bug.php?id=37932.


Previous Comments:
------------------------------------------------------------------------

[2006-08-25 15:51:25] judas dot iscariote at gmail dot com

PHP5 produces the same effects for you ?

------------------------------------------------------------------------

[2006-08-25 13:39:31] tony2001@php.net

Reclassified as Apache-related issue.

------------------------------------------------------------------------

[2006-08-25 13:32:22] php at diptyque dot net

I forgot to mention that mbstring.func_overload is enabled
on a per-vhost basis for some other web sites I'm hosting
on this platform.

------------------------------------------------------------------------

[2006-08-24 16:20:24] php at diptyque dot net

Agreed but I'm not making things up, you know. Something is
obviously wrong on my Apache 1.3.34 setup. Could this be a
conflict with some extension or Apache module? Of course,
no opcode cache is running. Any tip welcome.

This weird behavior has been plaguing me for 2 months now


effectively taking place sporadically while running under
apache SAPI -- strlen() may accept the optional encoding
argument (!?) as shown in the script output below.

http://www.diptyque.net/bugs/mbinfo2.php

http://www.diptyque.net/bugs/mbinfo2.phps
; source code

=begin [diptyque] % GET http://www.diptyque.net/bugs/mbinfo2.php
<pre>int(72208)
string(10) "ISO-8859-1"
string(10) "ISO-8859-1"
string(1) "0"
string(19) "Méthodes de codage"
int(19)
--
bool(true)
string(5) "UTF-8"
string(10) "ISO-8859-1"
string(1) "0"
string(19) "Méthodes de codage"
int(18)
int(19)
--
bool(true)
string(10) "ISO-8859-1"
string(10) "ISO-8859-1"
string(1) "0"
string(19) "Méthodes de codage" int(19) int(18)
</pre>
=end

If I do run the same script through PHP CLI or FastCGI, I
get the following expected warnings:

PHP Warning: Wrong parameter count for strlen() in
/path/to/htdocs/bugs/mbinfo2.php on line 17
PHP Warning: Wrong parameter count for strlen() in
/path/to/htdocs/bugs/mbinfo2.php on line 25

------------------------------------------------------------------------

[2006-08-24 15:15:31] tony2001@php.net

Please try with minimal configuration (like ./configure
--enable-mbstring) and PHP CLI.
If you're still able to reproduce it, you're likely to be the only
person who can help you, since I really doubt anyone else can do it.

------------------------------------------------------------------------

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/38577

--
Edit this bug report at http://bugs.php.net/?id=38577&edit=1
  Reply With Quote
4 21st June 14:23
External User
 
Posts: 1
Default #38577 : ini settings leak between virtual hosts with Apache 1.3


ID: 38577
Updated by: tony2001@php.net
Reported By: php at diptyque dot net
-Status: Open
+Status: Feedback
Bug Type: Apache related
Operating System: FreeBSD 4.4
PHP Version: 4.4.4
New Comment:

Please try using this CVS snapshot:

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

For Windows:

http://snaps.php.net/win32/php4-win32-STABLE-latest.zip


Previous Comments:
------------------------------------------------------------------------

[2006-08-28 15:56:47] php at diptyque dot net

Dunno for PHP 5 -- I have to make some tests before trying
to switch -- but I wonder if this bug could be related to
http://bugs.php.net/bug.php?id=37932.

------------------------------------------------------------------------

[2006-08-25 15:51:25] judas dot iscariote at gmail dot com

PHP5 produces the same effects for you ?

------------------------------------------------------------------------

[2006-08-25 13:39:31] tony2001@php.net

Reclassified as Apache-related issue.

------------------------------------------------------------------------

[2006-08-25 13:32:22] php at diptyque dot net

I forgot to mention that mbstring.func_overload is enabled
on a per-vhost basis for some other web sites I'm hosting
on this platform.

------------------------------------------------------------------------

[2006-08-24 16:20:24] php at diptyque dot net

Agreed but I'm not making things up, you know. Something is
obviously wrong on my Apache 1.3.34 setup. Could this be a
conflict with some extension or Apache module? Of course,
no opcode cache is running. Any tip welcome.

This weird behavior has been plaguing me for 2 months now


effectively taking place sporadically while running under
apache SAPI -- strlen() may accept the optional encoding
argument (!?) as shown in the script output below.

http://www.diptyque.net/bugs/mbinfo2.php

http://www.diptyque.net/bugs/mbinfo2.phps
; source code

=begin [diptyque] % GET http://www.diptyque.net/bugs/mbinfo2.php
<pre>int(72208)
string(10) "ISO-8859-1"
string(10) "ISO-8859-1"
string(1) "0"
string(19) "Méthodes de codage"
int(19)
--
bool(true)
string(5) "UTF-8"
string(10) "ISO-8859-1"
string(1) "0"
string(19) "Méthodes de codage"
int(18)
int(19)
--
bool(true)
string(10) "ISO-8859-1"
string(10) "ISO-8859-1"
string(1) "0"
string(19) "Méthodes de codage" int(19) int(18)
</pre>
=end

If I do run the same script through PHP CLI or FastCGI, I
get the following expected warnings:

PHP Warning: Wrong parameter count for strlen() in
/path/to/htdocs/bugs/mbinfo2.php on line 17
PHP Warning: Wrong parameter count for strlen() in
/path/to/htdocs/bugs/mbinfo2.php on line 25

------------------------------------------------------------------------

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/38577

--
Edit this bug report at http://bugs.php.net/?id=38577&edit=1
  Reply With Quote
5 21st June 17:31
php-bugs
External User
 
Posts: 1
Default #38577 : ini settings leak between virtual hosts with Apache 1.3


ID: 38577
User updated by: php at diptyque dot net
Reported By: php at diptyque dot net
-Status: Feedback
+Status: Open
Bug Type: Apache related
Operating System: FreeBSD 4.4
PHP Version: 4.4.4
New Comment:

Just downloaded the latest stable release, built it and ran
the test suite and mb_strlen() test case failed because
AFAIK this version of PHP (4.4.5-dev) doesn't emit
catchable errors yet (E_RECOVERABLE_ERROR). Anyway I'm
going to install it tomorrow morning and will let you know
ASAP if it does fix the ini settings leak between virtual
hosts.

================================================== =========
=====================
/usr/local/src/php4-STABLE-200609061230/ext/mbstring/tests/
mb_strlen.phpt
================================================== =========
=====================

---- EXPECTED OUTPUT
== ASCII ==
40
40
== EUC-JP ==
43
72
== SJIS ==
43
72
== JIS ==
43
90
== UTF-8 ==
43
101
== WRONG PARAMETERS ==
ERR: Notice
5
ERR: Catchable fatal error
ERR: Notice
6
ERR: Warning
---- ACTUAL OUTPUT
== ASCII ==
40
40
== EUC-JP ==
43
72
== SJIS ==
43
72
== JIS ==
43
90
== UTF-8 ==
43
101
== WRONG PARAMETERS ==
ERR: Notice
5
ERR: Notice
6
ERR: Warning
---- FAILED

================================================== =========
=====================
019- ERR: Catchable fatal error
019+ ERR: Notice
020- ERR: Notice
020+ 6
021- 6
021+ ERR: Warning
022- ERR: Warning
================================================== =========
=====================


Previous Comments:
------------------------------------------------------------------------

[2006-09-06 09:58:07] tony2001@php.net

Please try using this CVS snapshot:

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

For Windows:

http://snaps.php.net/win32/php4-win32-STABLE-latest.zip

------------------------------------------------------------------------

[2006-08-28 15:56:47] php at diptyque dot net

Dunno for PHP 5 -- I have to make some tests before trying
to switch -- but I wonder if this bug could be related to
http://bugs.php.net/bug.php?id=37932.

------------------------------------------------------------------------

[2006-08-25 15:51:25] judas dot iscariote at gmail dot com

PHP5 produces the same effects for you ?

------------------------------------------------------------------------

[2006-08-25 13:39:31] tony2001@php.net

Reclassified as Apache-related issue.

------------------------------------------------------------------------

[2006-08-25 13:32:22] php at diptyque dot net

I forgot to mention that mbstring.func_overload is enabled
on a per-vhost basis for some other web sites I'm hosting
on this platform.

------------------------------------------------------------------------

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/38577

--
Edit this bug report at http://bugs.php.net/?id=38577&edit=1
  Reply With Quote
6 21st June 17:31
External User
 
Posts: 1
Default #38577 : ini settings leak between virtual hosts with Apache 1.3


ID: 38577
Updated by: tony2001@php.net
Reported By: php at diptyque dot net
-Status: Open
+Status: Feedback
Bug Type: Apache related
Operating System: FreeBSD 4.4
PHP Version: 4.4.4
New Comment:

Fixed, thanks.
What about your issue?


Previous Comments:
------------------------------------------------------------------------

[2006-09-06 16:13:00] php at diptyque dot net

Just downloaded the latest stable release, built it and ran
the test suite and mb_strlen() test case failed because
AFAIK this version of PHP (4.4.5-dev) doesn't emit
catchable errors yet (E_RECOVERABLE_ERROR). Anyway I'm
going to install it tomorrow morning and will let you know
ASAP if it does fix the ini settings leak between virtual
hosts.

================================================== =========
=====================
/usr/local/src/php4-STABLE-200609061230/ext/mbstring/tests/
mb_strlen.phpt
================================================== =========
=====================

---- EXPECTED OUTPUT
== ASCII ==
40
40
== EUC-JP ==
43
72
== SJIS ==
43
72
== JIS ==
43
90
== UTF-8 ==
43
101
== WRONG PARAMETERS ==
ERR: Notice
5
ERR: Catchable fatal error
ERR: Notice
6
ERR: Warning
---- ACTUAL OUTPUT
== ASCII ==
40
40
== EUC-JP ==
43
72
== SJIS ==
43
72
== JIS ==
43
90
== UTF-8 ==
43
101
== WRONG PARAMETERS ==
ERR: Notice
5
ERR: Notice
6
ERR: Warning
---- FAILED

================================================== =========
=====================
019- ERR: Catchable fatal error
019+ ERR: Notice
020- ERR: Notice
020+ 6
021- 6
021+ ERR: Warning
022- ERR: Warning
================================================== =========
=====================

------------------------------------------------------------------------

[2006-09-06 09:58:07] tony2001@php.net

Please try using this CVS snapshot:

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

For Windows:

http://snaps.php.net/win32/php4-win32-STABLE-latest.zip

------------------------------------------------------------------------

[2006-08-28 15:56:47] php at diptyque dot net

Dunno for PHP 5 -- I have to make some tests before trying
to switch -- but I wonder if this bug could be related to
http://bugs.php.net/bug.php?id=37932.

------------------------------------------------------------------------

[2006-08-25 15:51:25] judas dot iscariote at gmail dot com

PHP5 produces the same effects for you ?

------------------------------------------------------------------------

[2006-08-25 13:39:31] tony2001@php.net

Reclassified as Apache-related issue.

------------------------------------------------------------------------

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/38577

--
Edit this bug report at http://bugs.php.net/?id=38577&edit=1
  Reply With Quote
7 21st June 20:32
php-bugs
External User
 
Posts: 1
Default #38577 : ini settings leak between virtual hosts with Apache 1.3


ID: 38577
User updated by: php at diptyque dot net
Reported By: php at diptyque dot net
-Status: Feedback
+Status: Open
Bug Type: Apache related
Operating System: FreeBSD 4.4
PHP Version: 4.4.4
New Comment:

Sorry but it doesn't make it. Mbstring function overloading
setting is unfortunately persistent once an Apache process
has served content from a vhost where this ini parameter is
assigned a value distinct from zero.


Previous Comments:
------------------------------------------------------------------------

[2006-09-06 16:31:20] tony2001@php.net

Fixed, thanks.
What about your issue?

------------------------------------------------------------------------

[2006-09-06 16:13:00] php at diptyque dot net

Just downloaded the latest stable release, built it and ran
the test suite and mb_strlen() test case failed because
AFAIK this version of PHP (4.4.5-dev) doesn't emit
catchable errors yet (E_RECOVERABLE_ERROR). Anyway I'm
going to install it tomorrow morning and will let you know
ASAP if it does fix the ini settings leak between virtual
hosts.

================================================== =========
=====================
/usr/local/src/php4-STABLE-200609061230/ext/mbstring/tests/
mb_strlen.phpt
================================================== =========
=====================

---- EXPECTED OUTPUT
== ASCII ==
40
40
== EUC-JP ==
43
72
== SJIS ==
43
72
== JIS ==
43
90
== UTF-8 ==
43
101
== WRONG PARAMETERS ==
ERR: Notice
5
ERR: Catchable fatal error
ERR: Notice
6
ERR: Warning
---- ACTUAL OUTPUT
== ASCII ==
40
40
== EUC-JP ==
43
72
== SJIS ==
43
72
== JIS ==
43
90
== UTF-8 ==
43
101
== WRONG PARAMETERS ==
ERR: Notice
5
ERR: Notice
6
ERR: Warning
---- FAILED

================================================== =========
=====================
019- ERR: Catchable fatal error
019+ ERR: Notice
020- ERR: Notice
020+ 6
021- 6
021+ ERR: Warning
022- ERR: Warning
================================================== =========
=====================

------------------------------------------------------------------------

[2006-09-06 09:58:07] tony2001@php.net

Please try using this CVS snapshot:

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

For Windows:

http://snaps.php.net/win32/php4-win32-STABLE-latest.zip

------------------------------------------------------------------------

[2006-08-28 15:56:47] php at diptyque dot net

Dunno for PHP 5 -- I have to make some tests before trying
to switch -- but I wonder if this bug could be related to
http://bugs.php.net/bug.php?id=37932.

------------------------------------------------------------------------

[2006-08-25 15:51:25] judas dot iscariote at gmail dot com

PHP5 produces the same effects for you ?

------------------------------------------------------------------------

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/38577

--
Edit this bug report at http://bugs.php.net/?id=38577&edit=1
  Reply With Quote
8 21st June 20:33
php-bugs
External User
 
Posts: 1
Default #38577 : ini settings leak between virtual hosts with Apache 1.3


ID: 38577
User updated by: php at diptyque dot net
Reported By: php at diptyque dot net
Status: Open
Bug Type: Apache related
Operating System: FreeBSD 4.4
PHP Version: 4.4.4
New Comment:

Antony, I'm not very familiar with Zend Engine 1.3 innards
but I had a look at how Xdebug is overriding both
var_dump() and set_time_limit() functions in
PHP_RINIT_FUNCTION(xdebug) and how it does restore the
original function pointers in
PHP_RSHUTDOWN_FUNCTION(xdebug). Peeking at mbstring
extension source code, this looks a bit more verbose and it
doesn't fiddle directly with
orig->internal_function.handler (!?) to restore the
original function. Instead it calls subsequently
zend_hash_update() and zend_hash_del() using the info it
gathered inside its mb_overload_def struct... IMHO,
mbstring ini settings are properly reset (please see
http://bugs.php.net/bug.php?id=25753) but not the initial
PHP function table state.


Previous Comments:
------------------------------------------------------------------------

[2006-09-07 09:29:53] php at diptyque dot net

Sorry but it doesn't make it. Mbstring function overloading
setting is unfortunately persistent once an Apache process
has served content from a vhost where this ini parameter is
assigned a value distinct from zero.

------------------------------------------------------------------------

[2006-09-06 16:31:20] tony2001@php.net

Fixed, thanks.
What about your issue?

------------------------------------------------------------------------

[2006-09-06 16:13:00] php at diptyque dot net

Just downloaded the latest stable release, built it and ran
the test suite and mb_strlen() test case failed because
AFAIK this version of PHP (4.4.5-dev) doesn't emit
catchable errors yet (E_RECOVERABLE_ERROR). Anyway I'm
going to install it tomorrow morning and will let you know
ASAP if it does fix the ini settings leak between virtual
hosts.

================================================== =========
=====================
/usr/local/src/php4-STABLE-200609061230/ext/mbstring/tests/
mb_strlen.phpt
================================================== =========
=====================

---- EXPECTED OUTPUT
== ASCII ==
40
40
== EUC-JP ==
43
72
== SJIS ==
43
72
== JIS ==
43
90
== UTF-8 ==
43
101
== WRONG PARAMETERS ==
ERR: Notice
5
ERR: Catchable fatal error
ERR: Notice
6
ERR: Warning
---- ACTUAL OUTPUT
== ASCII ==
40
40
== EUC-JP ==
43
72
== SJIS ==
43
72
== JIS ==
43
90
== UTF-8 ==
43
101
== WRONG PARAMETERS ==
ERR: Notice
5
ERR: Notice
6
ERR: Warning
---- FAILED

================================================== =========
=====================
019- ERR: Catchable fatal error
019+ ERR: Notice
020- ERR: Notice
020+ 6
021- 6
021+ ERR: Warning
022- ERR: Warning
================================================== =========
=====================

------------------------------------------------------------------------

[2006-09-06 09:58:07] tony2001@php.net

Please try using this CVS snapshot:

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

For Windows:

http://snaps.php.net/win32/php4-win32-STABLE-latest.zip

------------------------------------------------------------------------

[2006-08-28 15:56:47] php at diptyque dot net

Dunno for PHP 5 -- I have to make some tests before trying
to switch -- but I wonder if this bug could be related to
http://bugs.php.net/bug.php?id=37932.

------------------------------------------------------------------------

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/38577

--
Edit this bug report at http://bugs.php.net/?id=38577&edit=1
  Reply With Quote
9 21st June 20:33
External User
 
Posts: 1
Default #38577 : ini settings leak between virtual hosts with Apache 1.3


ID: 38577
Updated by: tony2001@php.net
Reported By: php at diptyque dot net
-Status: Open
+Status: Feedback
Bug Type: Apache related
Operating System: FreeBSD 4.4
PHP Version: 4.4.4
New Comment:

Please remove all zend_extensions, including XDebug and try again.


Previous Comments:
------------------------------------------------------------------------

[2006-09-07 15:14:49] php at diptyque dot net

Antony, I'm not very familiar with Zend Engine 1.3 innards
but I had a look at how Xdebug is overriding both
var_dump() and set_time_limit() functions in
PHP_RINIT_FUNCTION(xdebug) and how it does restore the
original function pointers in
PHP_RSHUTDOWN_FUNCTION(xdebug). Peeking at mbstring
extension source code, this looks a bit more verbose and it
doesn't fiddle directly with
orig->internal_function.handler (!?) to restore the
original function. Instead it calls subsequently
zend_hash_update() and zend_hash_del() using the info it
gathered inside its mb_overload_def struct... IMHO,
mbstring ini settings are properly reset (please see
http://bugs.php.net/bug.php?id=25753) but not the initial
PHP function table state.

------------------------------------------------------------------------

[2006-09-07 09:29:53] php at diptyque dot net

Sorry but it doesn't make it. Mbstring function overloading
setting is unfortunately persistent once an Apache process
has served content from a vhost where this ini parameter is
assigned a value distinct from zero.

------------------------------------------------------------------------

[2006-09-06 16:31:20] tony2001@php.net

Fixed, thanks.
What about your issue?

------------------------------------------------------------------------

[2006-09-06 16:13:00] php at diptyque dot net

Just downloaded the latest stable release, built it and ran
the test suite and mb_strlen() test case failed because
AFAIK this version of PHP (4.4.5-dev) doesn't emit
catchable errors yet (E_RECOVERABLE_ERROR). Anyway I'm
going to install it tomorrow morning and will let you know
ASAP if it does fix the ini settings leak between virtual
hosts.

================================================== =========
=====================
/usr/local/src/php4-STABLE-200609061230/ext/mbstring/tests/
mb_strlen.phpt
================================================== =========
=====================

---- EXPECTED OUTPUT
== ASCII ==
40
40
== EUC-JP ==
43
72
== SJIS ==
43
72
== JIS ==
43
90
== UTF-8 ==
43
101
== WRONG PARAMETERS ==
ERR: Notice
5
ERR: Catchable fatal error
ERR: Notice
6
ERR: Warning
---- ACTUAL OUTPUT
== ASCII ==
40
40
== EUC-JP ==
43
72
== SJIS ==
43
72
== JIS ==
43
90
== UTF-8 ==
43
101
== WRONG PARAMETERS ==
ERR: Notice
5
ERR: Notice
6
ERR: Warning
---- FAILED

================================================== =========
=====================
019- ERR: Catchable fatal error
019+ ERR: Notice
020- ERR: Notice
020+ 6
021- 6
021+ ERR: Warning
022- ERR: Warning
================================================== =========
=====================

------------------------------------------------------------------------

[2006-09-06 09:58:07] tony2001@php.net

Please try using this CVS snapshot:

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

For Windows:

http://snaps.php.net/win32/php4-win32-STABLE-latest.zip

------------------------------------------------------------------------

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/38577

--
Edit this bug report at http://bugs.php.net/?id=38577&edit=1
  Reply With Quote
10 21st June 20:33
php-bugs
External User
 
Posts: 1
Default #38577 : ini settings leak between virtual hosts with Apache 1.3


ID: 38577
User updated by: php at diptyque dot net
Reported By: php at diptyque dot net
-Status: Feedback
+Status: Open
Bug Type: Apache related
Operating System: FreeBSD 4.4
PHP Version: 4.4.4
New Comment:

FYI, I do *NOT* have any Zend or Xdebug extension
installed... I have downloaded Xdebug only to compare its
overriding technique with the one used in Mbstring
extension.

=begin
[diptyque] % php -m
[PHP Modules]
bz2
ctype
curl
gd
imap
mbstring
mysql
openssl
overload
pcre
posix
readline
session
sqlite
standard
tokenizer
xml
zlib

[Zend Modules]
=end

BTW, I compared source files for apache SAPI
(./sapi/apache/mod_php4.c) and mbstring extension
(./ext/mbstring/mbstring.c) between version 4.4.4 and
latest stable version and did not find anything different
(!?)


Previous Comments:
------------------------------------------------------------------------

[2006-09-07 15:25:39] tony2001@php.net

Please remove all zend_extensions, including XDebug and try again.

------------------------------------------------------------------------

[2006-09-07 15:14:49] php at diptyque dot net

Antony, I'm not very familiar with Zend Engine 1.3 innards
but I had a look at how Xdebug is overriding both
var_dump() and set_time_limit() functions in
PHP_RINIT_FUNCTION(xdebug) and how it does restore the
original function pointers in
PHP_RSHUTDOWN_FUNCTION(xdebug). Peeking at mbstring
extension source code, this looks a bit more verbose and it
doesn't fiddle directly with
orig->internal_function.handler (!?) to restore the
original function. Instead it calls subsequently
zend_hash_update() and zend_hash_del() using the info it
gathered inside its mb_overload_def struct... IMHO,
mbstring ini settings are properly reset (please see
http://bugs.php.net/bug.php?id=25753) but not the initial
PHP function table state.

------------------------------------------------------------------------

[2006-09-07 09:29:53] php at diptyque dot net

Sorry but it doesn't make it. Mbstring function overloading
setting is unfortunately persistent once an Apache process
has served content from a vhost where this ini parameter is
assigned a value distinct from zero.

------------------------------------------------------------------------

[2006-09-06 16:31:20] tony2001@php.net

Fixed, thanks.
What about your issue?

------------------------------------------------------------------------

[2006-09-06 16:13:00] php at diptyque dot net

Just downloaded the latest stable release, built it and ran
the test suite and mb_strlen() test case failed because
AFAIK this version of PHP (4.4.5-dev) doesn't emit
catchable errors yet (E_RECOVERABLE_ERROR). Anyway I'm
going to install it tomorrow morning and will let you know
ASAP if it does fix the ini settings leak between virtual
hosts.

================================================== =========
=====================
/usr/local/src/php4-STABLE-200609061230/ext/mbstring/tests/
mb_strlen.phpt
================================================== =========
=====================

---- EXPECTED OUTPUT
== ASCII ==
40
40
== EUC-JP ==
43
72
== SJIS ==
43
72
== JIS ==
43
90
== UTF-8 ==
43
101
== WRONG PARAMETERS ==
ERR: Notice
5
ERR: Catchable fatal error
ERR: Notice
6
ERR: Warning
---- ACTUAL OUTPUT
== ASCII ==
40
40
== EUC-JP ==
43
72
== SJIS ==
43
72
== JIS ==
43
90
== UTF-8 ==
43
101
== WRONG PARAMETERS ==
ERR: Notice
5
ERR: Notice
6
ERR: Warning
---- FAILED

================================================== =========
=====================
019- ERR: Catchable fatal error
019+ ERR: Notice
020- ERR: Notice
020+ 6
021- 6
021+ ERR: Warning
022- ERR: Warning
================================================== =========
=====================

------------------------------------------------------------------------

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/38577

--
Edit this bug report at http://bugs.php.net/?id=38577&edit=1
  Reply With Quote
Reply


Thread Tools
Display Modes




Copyright © 2006 SmartyDevil.com - Dies Mies Jeschet Boenedoesef Douvema Enitemaus -
666