G'day
I'd like to propose a change for when PHP starts to throw an
E_DEPRECATED
notice for each of the deprecated ini directives (such as
register_globals, safe_mode ect.) like in HEAD where they just throw a
warning (more about that below). I have attached a patch for this in
5.3 (which is the only branch this patch really relates to).
As you can see in the patch, I've also changed the
zend.ze1_compatibility_mode to throw an fatal error instead of a
previously warning which forces people to update their php.ini or
refactor their script to use newer and better behavior. Speaking of
changing to a fatal error, I would also like to propose to do the same
in HEAD (which I've also attached a patch to).
I'd like to include this in the next 5.3 release, whether its Beta 2
or RC1, feedback are welcome!
--
Kalle Sommer Nielsen
2009/2/6 Kalle Sommer Nielsen kalle@php.net:
G'day
[snip]
--
Kalle Sommer Nielsen
Resending the patch, as Felipe said it wasn't there for some odd
reason because of the file extension and for the sake of sanity:
http://paste2.org/p/142865 - PHP_5_3
http://paste2.org/p/142866 - HEAD
--
Kalle Sommer Nielsen
All right!I think, there win't be any rejections.
Let's deploy it ;-D
2009/2/6 Kalle Sommer Nielsen kalle@php.net
2009/2/6 Kalle Sommer Nielsen kalle@php.net:
G'day
[snip]
--
Kalle Sommer NielsenResending the patch, as Felipe said it wasn't there for some odd
reason because of the file extension and for the sake of sanity:http://paste2.org/p/142865 - PHP_5_3
http://paste2.org/p/142866 - HEAD--
Kalle Sommer Nielsen
I'd like to propose a change for when PHP starts to throw an
E_DEPRECATED
notice for each of the deprecated ini directives (such as
register_globals, safe_mode ect.) like in HEAD where they just throw a
warning (more about that below). I have attached a patch for this in
5.3 (which is the only branch this patch really relates to).
Yeah.
Good thing to notice the user of bad configuration. I'm wondering a bit
how we can educate people about magic_quotes_gpc ... people who blindly
disable them probably break stuff which is "secure" by accident. This is
not only relevant to this patch though. The best idea I have is a clear
pointer to the docs from the message ...
johannes
2009/4/22 Johannes Schlüter johannes@php.net:
I'd like to propose a change for when PHP starts to throw an
E_DEPRECATED
notice for each of the deprecated ini directives (such as
register_globals, safe_mode ect.) like in HEAD where they just throw a
warning (more about that below). I have attached a patch for this in
5.3 (which is the only branch this patch really relates to).Yeah.
Good thing to notice the user of bad configuration. I'm wondering a bit
how we can educate people about magic_quotes_gpc ... people who blindly
disable them probably break stuff which is "secure" by accident. This is
not only relevant to this patch though. The best idea I have is a clear
pointer to the docs from the message ...
There are couple of issues with throwing errors at startup:
- They are thrown so damn early that the user will never see them
- run-tests.php gets very confused and starts expecting HTTP headers
in the EXPECT section
If we could delay the checks until after php_module_startup()..
-Hannes
2009/4/22 Hannes Magnusson hannes.magnusson@gmail.com:
There are couple of issues with throwing errors at startup:
- They are thrown so damn early that the user will never see them
- run-tests.php gets very confused and starts expecting HTTP headers
in the EXPECT sectionIf we could delay the checks until after php_module_startup()..
The patch is just like the one in HEAD (for E_WARNINGS about removed
configurations), meaning that we may need to change it after there
aswell.
-Hannes
--
Kalle Sommer Nielsen
kalle@php.net
2009/2/6 Kalle Sommer Nielsen kalle@php.net:
G'day
I'd like to propose a change for when PHP starts to throw an
E_DEPRECATED
notice for each of the deprecated ini directives (such as
register_globals, safe_mode ect.) like in HEAD where they just throw a
warning (more about that below). I have attached a patch for this in
5.3 (which is the only branch this patch really relates to).
Implemented in RC2
--
Kalle Sommer Nielsen
--
Kalle Sommer Nielsen
kalle@php.net
2009/2/6 Kalle Sommer Nielsen kalle@php.net:
G'day
I'd like to propose a change for when PHP starts to throw an
E_DEPRECATED
notice for each of the deprecated ini directives (such as
register_globals, safe_mode ect.) like in HEAD where they just throw a
warning (more about that below). I have attached a patch for this in
5.3 (which is the only branch this patch really relates to).Implemented in RC2
Now that 5.3.0 is out, are you looking into fixing run-tests.php or all tests?
Like I warned about; if you enable any of these features in your
php.ini and then run the test suite.. there are only a handful of
tests that actually pass.
-Hannes
On Tue, Jun 30, 2009 at 16:30, Hannes
Magnussonhannes.magnusson@gmail.com wrote:
Now that 5.3.0 is out, are you looking into fixing run-tests.php or all tests?
Like I warned about; if you enable any of these features in your
php.ini and then run the test suite.. there are only a handful of
tests that actually pass.
Indeed. Going to install it on the CA2 mirror server this morning
brought up a ton of failed and skip messages, which I mentioned to
Hannes. Here's the grep'd output:
====
root@december [/dls/php/php-5.3.0]# make test | grep PASS
PHP Warning: Directive 'magic_quotes_gpc' is deprecated in PHP 5.3
and greater in Unknown on line 0
PHP Warning: Directive 'magic_quotes_gpc' is deprecated in PHP 5.3
and greater in Unknown on line 0
PHP Warning: Directive 'magic_quotes_gpc' is deprecated in PHP 5.3
and greater in Unknown on line 0
PASS Error messages are shown [tests/run-test/test006.phpt]
PASS Testing $argc and $argv handling (cli) [tests/basic/012.phpt]
PASS Bug #28213 (crash in debug_print_backtrace in static methods)
[tests/lang/bug28213.phpt]
PASS Bug #39763 (filter applies magic_quotes twice in parse_str()
)
[ext/filter/tests/bug39763.phpt]
PASS Test phpinfo()
displays gettext support
[ext/gettext/tests/gettext_phpinfo.phpt]
PASS Bug #43293 (Multiple segfaults in getopt()
)
[ext/standard/tests/general_functions/bug43293_3.phpt]
PASS Test get_magic_quotes_gpc()
function
[ext/standard/tests/general_functions/get_magic_quotes_gpc.phpt]
PASS getopt [ext/standard/tests/general_functions/getopt.phpt] t]
PASS getopt#002 [ext/standard/tests/general_functions/getopt_002.phpt]
PASS getopt#003 [ext/standard/tests/general_functions/getopt_003.phpt]
PASS getopt#004 (Optional values)
[ext/standard/tests/general_functions/getopt_004.phpt]
PASS getopt#005 (Required values)
[ext/standard/tests/general_functions/getopt_005.phpt]
FAIL Test parse_url()
function: Parse a load of URLs without
specifying PHP_URL_PASS
as the URL component
[ext/standard/tests/url/parse_url_basic_006.phpt]
PASS Test phpinfo()
displays xsl info [ext/xsl/tests/xsl-phpinfo.phpt]
Test parse_url()
function: Parse a load of URLs without specifying
PHP_URL_PASS
as the URL component
[ext/standard/tests/url/parse_url_basic_006.phpt]
root@december [/dls/php/php-5.3.0]# uname -a
Linux december.pilotpig.net 2.6.18-128.1.1.el5.028stab062.3 #1 SMP Tue
May 5 17:31:34 MSD 2009 i686 i686 i386 GNU/Linux
====
The rest of the 9,400+ tests all came back with undesired results.
There were no other problems on any of the dev boxes I tried this
morning, just the test results.
--
</Daniel P. Brown>
daniel.brown@parasane.net || danbrown@php.net
http://www.parasane.net/ || http://www.pilotpig.net/
Ask me about our fully-managed servers and proactive management
clusters starting at just $200/mo.!
I had the same this morning when I compiled PHP on my solaris machine. The
php.ini from my system-wide lib folder was used for the tests. In my case it
claimed about the deprecated *_long_arrays setting (or something like that).
Almost no test worked until I edited my global php.ini.
Tests should use a local php.ini in the build directory.
Uwe Schindler
H.-H.-Meier-Allee 63, D-28213 Bremen
http://www.thetaphi.de
eMail: uwe@thetaphi.de
-----Original Message-----
From: parasane@gmail.com [mailto:parasane@gmail.com] On Behalf Of Daniel
Brown
Sent: Tuesday, June 30, 2009 11:31 PM
To: Hannes Magnusson
Cc: Kalle Sommer Nielsen; Internals
Subject: Re: [PHP-DEV] Re: ThrowingE_DEPRECATED
on startupOn Tue, Jun 30, 2009 at 16:30, Hannes
Magnussonhannes.magnusson@gmail.com wrote:Now that 5.3.0 is out, are you looking into fixing run-tests.php or all
tests?Like I warned about; if you enable any of these features in your
php.ini and then run the test suite.. there are only a handful of
tests that actually pass.Indeed. Going to install it on the CA2 mirror server this morning
brought up a ton of failed and skip messages, which I mentioned to
Hannes. Here's the grep'd output:====
root@december [/dls/php/php-5.3.0]# make test | grep PASS
PHP Warning: Directive 'magic_quotes_gpc' is deprecated in PHP 5.3
and greater in Unknown on line 0
PHP Warning: Directive 'magic_quotes_gpc' is deprecated in PHP 5.3
and greater in Unknown on line 0
PHP Warning: Directive 'magic_quotes_gpc' is deprecated in PHP 5.3
and greater in Unknown on line 0
PASS Error messages are shown [tests/run-test/test006.phpt]
PASS Testing $argc and $argv handling (cli) [tests/basic/012.phpt]
PASS Bug #28213 (crash in debug_print_backtrace in static methods)
[tests/lang/bug28213.phpt]
PASS Bug #39763 (filter applies magic_quotes twice inparse_str()
)
[ext/filter/tests/bug39763.phpt]
PASS Testphpinfo()
displays gettext support
[ext/gettext/tests/gettext_phpinfo.phpt]
PASS Bug #43293 (Multiple segfaults ingetopt()
)
[ext/standard/tests/general_functions/bug43293_3.phpt]
PASS Testget_magic_quotes_gpc()
function
[ext/standard/tests/general_functions/get_magic_quotes_gpc.phpt]
PASS getopt [ext/standard/tests/general_functions/getopt.phpt] t]
PASS getopt#002 [ext/standard/tests/general_functions/getopt_002.phpt]
PASS getopt#003 [ext/standard/tests/general_functions/getopt_003.phpt]
PASS getopt#004 (Optional values)
[ext/standard/tests/general_functions/getopt_004.phpt]
PASS getopt#005 (Required values)
[ext/standard/tests/general_functions/getopt_005.phpt]
FAIL Testparse_url()
function: Parse a load of URLs without
specifyingPHP_URL_PASS
as the URL component
[ext/standard/tests/url/parse_url_basic_006.phpt]
PASS Testphpinfo()
displays xsl info [ext/xsl/tests/xsl-phpinfo.phpt]
Testparse_url()
function: Parse a load of URLs without specifying
PHP_URL_PASS
as the URL component
[ext/standard/tests/url/parse_url_basic_006.phpt]root@december [/dls/php/php-5.3.0]# uname -a
Linux december.pilotpig.net 2.6.18-128.1.1.el5.028stab062.3 #1 SMP Tue
May 5 17:31:34 MSD 2009 i686 i686 i386 GNU/Linux====
The rest of the 9,400+ tests all came back with undesired results.
There were no other problems on any of the dev boxes I tried this
morning, just the test results.--
</Daniel P. Brown>
daniel.brown@parasane.net || danbrown@php.net
http://www.parasane.net/ || http://www.pilotpig.net/
Ask me about our fully-managed servers and proactive management
clusters starting at just $200/mo.!
Uwe Schindler wrote:
I had the same this morning when I compiled PHP on my solaris machine. The
php.ini from my system-wide lib folder was used for the tests. In my case it
claimed about the deprecated *_long_arrays setting (or something like that).
Almost no test worked until I edited my global php.ini.Tests should use a local php.ini in the build directory.
Well, actually they do use local ini. It's just sanitized version of
your global one.
--Jani
2009/6/30 Hannes Magnusson hannes.magnusson@gmail.com:
Now that 5.3.0 is out, are you looking into fixing run-tests.php or all tests?
run-tests.php seems most reasonable to fix, and then those tests that
fail (aka. those who havnt been updated to catch these warnings).
Like I warned about; if you enable any of these features in your
php.ini and then run the test suite.. there are only a handful of
tests that actually pass.
I can see us passing -n parameter to the binary when executing a test,
as most tests rely on the default builtin values in php.
--
regrads,
Kalle Sommer Nielsen
kalle@php.net
2009/6/30 Hannes Magnusson hannes.magnusson@gmail.com:
Like I warned about; if you enable any of these features in your
php.ini and then run the test suite.. there are only a handful of
tests that actually pass.I can see us passing -n parameter to the binary when executing a test,
as most tests rely on the default builtin values in php.
That defeats the point of the tests. They need to be tested under
various configurations.
For those tests that require special INI settings we have the --INI--
section to make sure those are set the way the test requires it.
Everything else should work under other configurations.
-Hannes