ID:               50251
 User updated by:  jd at cpanel dot net
 Reported By:      jd at cpanel dot net
 Status:           Bogus
 Bug Type:         PHP options/info functions
 Operating System: Centos 5 AMD64
 PHP Version:      5.3.1
 Assigned To:      jani
 New Comment:

Ahh..  Now I see what happened a little better.  Sorry for saying you
didn't fix the problem.  You actually did.  I was looking at your trunk
commit in 288038 (which doesn't fix the problem but it's not as
noticeable since nothing is marked as deprecated for 6.0.)  You
committed a working fix to the PHP_5_3 branch in that same revision.

288038 was committed on 04 Sep 2009

The PHP 5.3.1 release branch was created in revision 288008 on 03
September 2009 and your fix was never merged into the release branch, so
5.3.1 and trunk still have this bug.  5.3.2 will have the fix.  Sorry I
didn't catch this a during the 5.3.1 RC process.

The only problem that still remains for 5.3.2 is it gives errors about
deprecated php.ini directives at the E_WARNING level instead of the
E_DEPRECATED level.


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

[2009-11-21 15:08:51] [email protected]

It excepted behaviour and will not change. Remove the deprecated
options from your ini and it's done.

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

[2009-11-20 20:11:13] jd at cpanel dot net

Sorry, I don't know how to submit a patch correctly to your BTS.

r...@jd:/usr/local/svn/ea/3/branch/easy_test/targz/Cpanel/Easy/PHP5/3_1#
cat php5-5.3.1-unsupressable-deprecated-warnings.patch 
diff -Nur php-5.3.1.orig/main/main.c php-5.3.1/main/main.c
--- php-5.3.1.orig/main/main.c  2009-10-28 10:19:32.000000000 -0500
+++ php-5.3.1/main/main.c       2009-11-20 13:30:13.000000000 -0600
@@ -1938,6 +1938,12 @@
                return FAILURE;
        }
 
+       /* Register PHP core ini entries */
+       REGISTER_INI_ENTRIES();
+
+       /* Register Zend ini entries */
+       zend_register_standard_ini_entries(TSRMLS_C);
+
        /* Check for deprecated directives */
        {
                static const char *directives[] = {
@@ -1954,7 +1960,7 @@
 
                while (*p) {
                        if (cfg_get_long((char*)*p, &val) == SUCCESS &&
val) {
-                               zend_error(E_WARNING, "Directive '%s'
is deprecated in PHP 5.3 and greater", *p);
+                               zend_error(E_DEPRECATED, "Directive
'%s' is deprecated in PHP 5.3 and greater", *p);
                        }
                        ++p;
                }
@@ -1965,12 +1971,6 @@
                }
        }
 
-       /* Register PHP core ini entries */
-       REGISTER_INI_ENTRIES();
-
-       /* Register Zend ini entries */
-       zend_register_standard_ini_entries(TSRMLS_C);
-
        /* Disable realpath cache if safe_mode or open_basedir are set
*/
        if (PG(safe_mode) || (PG(open_basedir) && *PG(open_basedir)))
{
                CWDG(realpath_cache_size_limit) = 0;

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

[2009-11-20 20:08:45] jd at cpanel dot net

Description:
------------
This is pretty much a duplicate of bug 49362 which was incorrectly
closed.

Jani's fix at revision 288038 doesn't correct the problem.

In a nutshell, it's impossible to configure PHP's error_reporting level
so that it doesn't spit out warnings about deprecated php.ini directives
at startup.  This is because the warnings are displayed before the
error_reporting setting is registered.

Reproduce code:
---------------
r...@rh73 [~]# printf "[PHP]\nerror_reporting = E_ALL & ~E_DEPRECATED &
~E_WARNING\nmagic_quotes_gpc = On\n" >~/php.ini
r...@rh73 [~]# /usr/bin/php -c/root/ -v
PHP Warning:  Directive 'magic_quotes_gpc' is deprecated in PHP 5.3 and
greater in Unknown on line 0
PHP 5.3.1 (cgi-fcgi) (built: Nov 19 2009 18:50:13)
Copyright (c) 1997-2009 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2009 Zend Technologies
r...@rh73 [~]#



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


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

Reply via email to