Bug #55829 [Bgs]: impossible to define a variable S_ALL
| From: | pajoye@php.net | Date: | Sun, 02 Oct 2011 13:28:23 +0000 |
| Subject: | Bug #55829 [Bgs]: impossible to define a variable S_ALL | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-164027@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=55829&edit=1
ID: 55829
Updated by: pajoye@php.net
Reported by: cizek dot milan at seznam dot cz
Summary: impossible to define a variable S_ALL
Status: Bogus
Type: Bug
Package: Scripting Engine problem
Operating System: FreeBSD 8.0-RELEASE
PHP Version: 5.3.8
Block user comment: N
Private report: N
New Comment:
Yet another reason not to use this patch. Also please report bugs only when you
tested it without a patched version of PHP. We cannot provide support for patched
version of PHP.
Previous Comments:
------------------------------------------------------------------------
[2011-10-02 13:15:27] cizek dot milan at seznam dot cz
Yes, you're right.
S_ALL defined in Suhosin-patch (5.3.8-0.9.10), in the file zend_errors.h.diff
+ # define S_ALL (S_MEMORY | S_VARS | S_INCLUDE | S_FILES | S_MAIL | S_SESSION | S_MISC | S_SQL |
S_EXECUTOR)
this is the cause? Thanks.
------------------------------------------------------------------------
[2011-10-02 13:03:40] johannes@php.net
Somewhere else you already have defined S_ALL. So what you are doing is to register a constant using
the value of S_ALL as name. So will have a constant 511.
Try this:
define (S_ALL, 'All');
echo constant("511");
When declaring a constant the first paramter has to be a string with the name, so put it in quites.
define ('S_ALL', 'All');
Will give you an error.
The palce where S_ALL, most likely, is being defined is in the suhoshin extension your system seems
to use.
------------------------------------------------------------------------
[2011-10-02 12:50:56] cizek dot milan at seznam dot cz
When I assign any value to S_ALL, the value is always 511. Example script...
<?php
define (S_ALL,'Hi');
echo S_ALL; //511
define (S_ALL,'asd');
echo S_ALL; //511
?>
FreeBSD 8.0-RELEASE-p3 #0, with php5-5.3.8
------------------------------------------------------------------------
[2011-10-02 04:15:52] laruence@php.net
what do you mean by impossible to define a S_ALL?
<?php
define ("S_ALL", "511");
echo S_ALL;
?>
this works fine to me.
------------------------------------------------------------------------
[2011-10-02 04:15:42] laruence@php.net
what do you mean by impossible to define a S_ALL?
<?php
define ("S_ALL", "511");
echo S_ALL;
?>
this works fine to me.
------------------------------------------------------------------------
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
https://bugs.php.net/bug.php?id=55829
--
Edit this bug report at https://bugs.php.net/bug.php?id=55829&edit=1