#40436 [Opn-Fbk]: object references broken in 5.2.1

2007-02-11 Thread tony2001
 ID:   40436
 Updated by:   [EMAIL PROTECTED]
 Reported By:  Jason at V7Studios dot com
-Status:   Open
+Status:   Feedback
 Bug Type: Class/Object related
 Operating System: Windows
 PHP Version:  5.2.1
 New Comment:

Use var_dump() instead of print; set display_errors=On,
error_reporting=E_ALL; make sure you've removed old php5ts.dll; look
into your web-servers log.


Previous Comments:


[2007-02-11 07:50:13] Jason at V7Studios dot com

Description:

A certain object reference situation that my code depends on has been
broken in 5.2.1 on *windows*.  It works on my linux production server
running 5.2.1.

Thanks.

Reproduce code:
---
class Foo 
{
   private $params = array();

   function __set($name, $value){
 $this-params[$name] = $value;
   }
   
   function __get($name){
 return $this-params[$name];
   }
}

$foo = new Foo();
$ref = $foo-bar;
$ref = This is a test;
print($foo-bar);

Expected result:

It should print out This is a test

Actual result:
--
On windows, nothing is printed out.  $foo-bar is not set.





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


#40434 [Opn-Bgs]: Session engine can't access /var/tmp when safe mode is on

2007-02-11 Thread tony2001
 ID:   40434
 Updated by:   [EMAIL PROTECTED]
 Reported By:  r2 at music dot lt
-Status:   Open
+Status:   Bogus
 Bug Type: Session related
 Operating System: FreeBSD
 PHP Version:  5.2.1
 New Comment:

safe mode is on, open_basedir includes /var/tmp,
safe_mode_include_dir is set to /var/tmp

The error message is clear and it has nothing to do with include() or
open_basedir.


Previous Comments:


[2007-02-11 00:04:39] judas dot iscariote at gmail dot com

Is the session save path implicetely defined in a virtual host ,
php.ini or whatever.. if not.. try that

Needed to turn off safe mode.

Do yourself and your customers that favor, safe_mode is **gone**[1], as
it is a broken security measure[2]

[1]
http://cvs.php.net/viewvc.cgi/php-src/NEWS?revision=1.2139view=markuppathrev=HEAD
[2]http://ilia.ws/archives/18-PHPs-safe_mode-or-how-not-to-implement-security.html



[2007-02-10 23:37:39] r2 at music dot lt

Description:

After upgrading from PHP 5.2 to PHP 5.2.1 error log is full of these
lines:

PHP Warning:  session_start() [a
href='function.session-start'function.session-start/a]: SAFE MODE
Restriction in effect.  The script whose uid is 80 is not allowed to
access /var/tmp owned by uid 0 in /file/path.php on line 1038

PHP Fatal error:  session_start() [a
href='function.session-start'function.session-start/a]: Failed to
initialize storage module: files (path: ) in /file/path.php on line
1038

safe mode is on, open_basedir includes /var/tmp, safe_mode_include_dir
is set to /var/tmp

Needed to turn off safe mode.






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


#40425 [Opn]: php_getuid() always return 1.

2007-02-11 Thread tony2001
 ID:   40425
 Updated by:   [EMAIL PROTECTED]
 Reported By:  priappub at yahoo dot fr
 Status:   Open
 Bug Type: Safe Mode/open_basedir
 Operating System: Solaris 10
 PHP Version:  5.2.1
 New Comment:

Then we will have to wait for someone with Solaris 10 to reproduce and
fix it.


Previous Comments:


[2007-02-10 01:35:19] priappub at yahoo dot fr

Unfortunately, this machine is on a private network.

It'a a solaris 10 update 3 with apache 2.0.58 included in 
solaris. PHP is 5.2.1 compiled with:

CFLAGS='-I/usr/sfw/src/mysql/include' \
CC='cc' \
'./configure' \
'--with-apxs2=/usr/apache2/bin/apxs' \
'--with-mysql=/usr/sfw' \
'--enable-dbase' \
'--with-ldap' \
'--enable-ftp' \
'--with-bzip2' \
'--with-openssl=/usr/sfw' \
'--with-jepg' \
'--with-png' \
'--with-zlib' \
'--with-imap' \
'--enable-fastcgi' \
'--enable-mbstring' \
'--with-config-file-path=/etc/apache2' \
'--without-iconv' \
'--with-gettext' \
'--enable-magic-quotes' \
'--enable-safe-mode' \
'--prefix=/usr' \
'--exec-prefix=/usr' \
'--sysconfdir=/etc' \
'--localstatedir=/var' \

I'm using Sun Studio 11 but same result with GCC. I don't 
know if the problem is on x86 too, I have only solaris with 
sparc.

NB: bug 12683 suggests a problem with mod_perl but no 
mod_perl here.



[2007-02-10 00:52:28] [EMAIL PROTECTED]

Cannot reproduce. Please provide an account on this machine.



[2007-02-10 00:44:39] priappub at yahoo dot fr

Description:

On solaris 10 (update 3) on sparc with PHP 5.1.6 or 5.1.2, 
safe mode doesn't work.  I have the message:
SAFE MODE Restriction in effect. The script whose uid/gid 
is 1/10076 is not allowed to access /sites/toto.php owned 
by uid/gid 10076/1000 in Unknown on line 0

The script and the directory have the same UID/GID. It 
seems like in safe_mode.c, php-getuid() always returns 1 
and php_getgid() returns the UID.

NB: same bug as http://bugs.php.net/bug.php?id=7744 or 
http://bugs.php.net/bug.php?id=18500 (they are old and for 
PHP4)






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


#40429 [Opn-Fbk]: headers sent when using php://output + ob_start

2007-02-11 Thread tony2001
 ID:   40429
 Updated by:   [EMAIL PROTECTED]
 Reported By:  nicolas dot grekas+php at gmail dot com
-Status:   Open
+Status:   Feedback
 Bug Type: Streams related
 Operating System: WIN
 PHP Version:  5.2.1
 New Comment:

Cannot reproduce with any of your examples.
Makes sure you're actually using 5.2.1 and not something old.


Previous Comments:


[2007-02-10 12:34:13] nicolas dot grekas+php at gmail dot com

Description:

Opening the php://output stream seams to flag the headers as sent,
event if output buffering is on. Consequently, any call to header()
fails where it shouldn't.

Affects any extension that uses streams.


Reproduce code:
---
?php

ob_start();
$h = fopen('php://output', 'wb');
fclose($h);
ob_end_clean();

header('X-Foo: bar');

?

Or

?php

ob_start();
$dom = new DOMDocument;
$dom-save('php://output');
ob_end_clean();

header('X-Foo: bar');

?

Expected result:

blank page

Actual result:
--
Warning: Cannot modify header information - headers already sent in
C:\[...]\test.php on line 8





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


#40428 [Opn-Asn]: imagepstext() and imagepsbbox() doesn't have optional parameters

2007-02-11 Thread tony2001
 ID:   40428
 Updated by:   [EMAIL PROTECTED]
 Reported By:  v1d4l0k4 at gmail dot com
-Status:   Open
+Status:   Assigned
 Bug Type: GD related
 Operating System: Windows XP SP2
 PHP Version:  5.2.1
-Assigned To:  
+Assigned To:  pajoye


Previous Comments:


[2007-02-10 07:42:55] v1d4l0k4 at gmail dot com

Description:

Manual says:

array imagepstext ( resource $image, string $text, resource $font, int
$size, int $foreground, int $background, int $x, int $y [, int $space
[, int $tightness [, float $angle [, int $antialias_steps )

array imagepsbbox ( string $text, int $font, int $size [, int $space [,
int $tightness [, float $angle]]] )

But... neither of the optional parameters is accepted.

Reproduce code:
---
It's Ok:

?php

header('Content-type: image/png');

$i = imagecreate(468, 60);
$b = imagecolorallocate($i, 0, 0, 0);
$w = imagecolorallocate($i, 255, 255, 255);
$f = imagepsloadfont(realpath('./meta-bold.pfb')); // realpath() is
needed because the function requires full path
imagepstext($i, 'Testing... It worked!', $f, 40, $w, $b, 40, 40);
imagepsfreefont($f);
imagepng($i, null, 9, PNG_NO_FILTER);
imagedestroy($i);

?

It's fail:

?php

header('Content-type: image/png');

$i = imagecreate(468, 60);
$b = imagecolorallocate($i, 0, 0, 0);
$w = imagecolorallocate($i, 255, 255, 255);
$f = imagepsloadfont(realpath('./meta-bold.pfb')); // realpath() is
needed because the function requires full path
imagepstext($i, 'Testing... It worked!', $f, 40, $w, $b, 40, 40, 2);
imagepsfreefont($f);
imagepng($i, null, 9, PNG_NO_FILTER);
imagedestroy($i);

?

Expected result:

A banner with 2 space-unit of space.

Actual result:
--
Warning: Wrong parameter count for imagepstext()





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


#40428 [Asn-Csd]: imagepstext() and imagepsbbox() doesn't have optional parameters

2007-02-11 Thread pajoye
 ID:   40428
 Updated by:   [EMAIL PROTECTED]
 Reported By:  v1d4l0k4 at gmail dot com
-Status:   Assigned
+Status:   Closed
 Bug Type: GD related
 Operating System: Windows XP SP2
 PHP Version:  5.2.1
 Assigned To:  pajoye
 New Comment:

This bug has been fixed in CVS.

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/.
 
Thank you for the report, and for helping us make PHP better.

I fixed imagepstext, imagepsbbox accepts three or six arguments. All
three extra arguments have to be given (is [a,b,c] not [a[,b[,c]]]).

Thanks for your report!


Previous Comments:


[2007-02-10 07:42:55] v1d4l0k4 at gmail dot com

Description:

Manual says:

array imagepstext ( resource $image, string $text, resource $font, int
$size, int $foreground, int $background, int $x, int $y [, int $space
[, int $tightness [, float $angle [, int $antialias_steps )

array imagepsbbox ( string $text, int $font, int $size [, int $space [,
int $tightness [, float $angle]]] )

But... neither of the optional parameters is accepted.

Reproduce code:
---
It's Ok:

?php

header('Content-type: image/png');

$i = imagecreate(468, 60);
$b = imagecolorallocate($i, 0, 0, 0);
$w = imagecolorallocate($i, 255, 255, 255);
$f = imagepsloadfont(realpath('./meta-bold.pfb')); // realpath() is
needed because the function requires full path
imagepstext($i, 'Testing... It worked!', $f, 40, $w, $b, 40, 40);
imagepsfreefont($f);
imagepng($i, null, 9, PNG_NO_FILTER);
imagedestroy($i);

?

It's fail:

?php

header('Content-type: image/png');

$i = imagecreate(468, 60);
$b = imagecolorallocate($i, 0, 0, 0);
$w = imagecolorallocate($i, 255, 255, 255);
$f = imagepsloadfont(realpath('./meta-bold.pfb')); // realpath() is
needed because the function requires full path
imagepstext($i, 'Testing... It worked!', $f, 40, $w, $b, 40, 40, 2);
imagepsfreefont($f);
imagepng($i, null, 9, PNG_NO_FILTER);
imagedestroy($i);

?

Expected result:

A banner with 2 space-unit of space.

Actual result:
--
Warning: Wrong parameter count for imagepstext()





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


#40436 [Fbk-Opn]: object references broken in 5.2.1

2007-02-11 Thread Jason at V7Studios dot com
 ID:   40436
 User updated by:  Jason at V7Studios dot com
 Reported By:  Jason at V7Studios dot com
-Status:   Feedback
+Status:   Open
 Bug Type: Class/Object related
 Operating System: Windows
 PHP Version:  5.2.1
 New Comment:

Seems to be a problem specific to XAMPP's installation of PHP 5.2.1.  I
copied the dlls from the php zip into the installation directory and
then pointed apache to php5apache2_2.dll and it worked.

Why is there a php5apache2.dll (doesn't work) and a php5apache2_2.dll?

Sorry for this erroneous report.  I will never trust a PHP installation
unless I do it myself.


Previous Comments:


[2007-02-11 09:17:50] [EMAIL PROTECTED]

Use var_dump() instead of print; set display_errors=On,
error_reporting=E_ALL; make sure you've removed old php5ts.dll; look
into your web-servers log.



[2007-02-11 07:50:13] Jason at V7Studios dot com

Description:

A certain object reference situation that my code depends on has been
broken in 5.2.1 on *windows*.  It works on my linux production server
running 5.2.1.

Thanks.

Reproduce code:
---
class Foo 
{
   private $params = array();

   function __set($name, $value){
 $this-params[$name] = $value;
   }
   
   function __get($name){
 return $this-params[$name];
   }
}

$foo = new Foo();
$ref = $foo-bar;
$ref = This is a test;
print($foo-bar);

Expected result:

It should print out This is a test

Actual result:
--
On windows, nothing is printed out.  $foo-bar is not set.





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


#40436 [Opn-Bgs]: object references broken in 5.2.1

2007-02-11 Thread tony2001
 ID:   40436
 Updated by:   [EMAIL PROTECTED]
 Reported By:  Jason at V7Studios dot com
-Status:   Open
+Status:   Bogus
 Bug Type: Class/Object related
 Operating System: Windows
 PHP Version:  5.2.1
 New Comment:

Why is there a php5apache2.dll (doesn't work) and a
php5apache2_2.dll?

Apache 2.0.x and Apache 2.2.x require different dlls.


Previous Comments:


[2007-02-11 19:00:52] Jason at V7Studios dot com

Seems to be a problem specific to XAMPP's installation of PHP 5.2.1.  I
copied the dlls from the php zip into the installation directory and
then pointed apache to php5apache2_2.dll and it worked.

Why is there a php5apache2.dll (doesn't work) and a php5apache2_2.dll?

Sorry for this erroneous report.  I will never trust a PHP installation
unless I do it myself.



[2007-02-11 09:17:50] [EMAIL PROTECTED]

Use var_dump() instead of print; set display_errors=On,
error_reporting=E_ALL; make sure you've removed old php5ts.dll; look
into your web-servers log.



[2007-02-11 07:50:13] Jason at V7Studios dot com

Description:

A certain object reference situation that my code depends on has been
broken in 5.2.1 on *windows*.  It works on my linux production server
running 5.2.1.

Thanks.

Reproduce code:
---
class Foo 
{
   private $params = array();

   function __set($name, $value){
 $this-params[$name] = $value;
   }
   
   function __get($name){
 return $this-params[$name];
   }
}

$foo = new Foo();
$ref = $foo-bar;
$ref = This is a test;
print($foo-bar);

Expected result:

It should print out This is a test

Actual result:
--
On windows, nothing is printed out.  $foo-bar is not set.





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


#40437 [NEW]: decompress.bzip2 is broken

2007-02-11 Thread phpbugger dot 5 dot n1 at spamgourmet dot com
From: phpbugger dot 5 dot n1 at spamgourmet dot com
Operating system: Linux
PHP version:  5.2.1
PHP Bug Type: Bzip2 Related
Bug description:  decompress.bzip2 is broken

Description:

(See example code) - when using the bzip2.decompress filter on a
http://-stream, php uses a lot of CPU resources and hangs. Decompressing
with bzdecompress works, however, as does using zlib.decompress filters on
.gz files via HTTP.

Reproduce code:
---
?php

$url = 'http://php.net/backend/notes/all.bz2';
$url =
'http://de.archive.ubuntu.com/ubuntu/dists/edgy/restricted/binary-i386/Packages.bz2';

/* this works: */
$data = bzdecompress(file_get_contents($url));
echo bzdecompress is finished!\n;



/* however, file_get_contents will block while PHP uses a lot of CPU time
*/
$fp = fopen($url,'rb');
stream_filter_append($fp, 'bzip2.decompress');
stream_get_contents($fp);
echo stream_get_contents is finished!\n

?



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


#40437 [Com]: decompress.bzip2 is broken

2007-02-11 Thread mark at mlstuff dot co dot uk
 ID:   40437
 Comment by:   mark at mlstuff dot co dot uk
 Reported By:  phpbugger dot 5 dot n1 at spamgourmet dot com
 Status:   Open
 Bug Type: Bzip2 Related
 Operating System: Linux
 PHP Version:  5.2.1
 New Comment:

Using the read/write parameter STREAM_FILTER_READ seems to fix this.

stream_filter_append($fp, 'bzip2.decompress', STREAM_FILTER_READ);


Previous Comments:


[2007-02-11 21:05:13] phpbugger dot 5 dot n1 at spamgourmet dot com

Description:

(See example code) - when using the bzip2.decompress filter on a
http://-stream, php uses a lot of CPU resources and hangs.
Decompressing with bzdecompress works, however, as does using
zlib.decompress filters on .gz files via HTTP.

Reproduce code:
---
?php

$url = 'http://php.net/backend/notes/all.bz2';
$url =
'http://de.archive.ubuntu.com/ubuntu/dists/edgy/restricted/binary-i386/Packages.bz2';

/* this works: */
$data = bzdecompress(file_get_contents($url));
echo bzdecompress is finished!\n;



/* however, file_get_contents will block while PHP uses a lot of CPU
time */
$fp = fopen($url,'rb');
stream_filter_append($fp, 'bzip2.decompress');
stream_get_contents($fp);
echo stream_get_contents is finished!\n

?







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


#40437 [Opn-Asn]: decompress.bzip2 is broken

2007-02-11 Thread tony2001
 ID:   40437
 Updated by:   [EMAIL PROTECTED]
 Reported By:  phpbugger dot 5 dot n1 at spamgourmet dot com
-Status:   Open
+Status:   Assigned
 Bug Type: Bzip2 Related
 Operating System: Linux
 PHP Version:  5.2.1
-Assigned To:  
+Assigned To:  tony2001


Previous Comments:


[2007-02-11 21:36:04] mark at mlstuff dot co dot uk

Using the read/write parameter STREAM_FILTER_READ seems to fix this.

stream_filter_append($fp, 'bzip2.decompress', STREAM_FILTER_READ);



[2007-02-11 21:05:13] phpbugger dot 5 dot n1 at spamgourmet dot com

Description:

(See example code) - when using the bzip2.decompress filter on a
http://-stream, php uses a lot of CPU resources and hangs.
Decompressing with bzdecompress works, however, as does using
zlib.decompress filters on .gz files via HTTP.

Reproduce code:
---
?php

$url = 'http://php.net/backend/notes/all.bz2';
$url =
'http://de.archive.ubuntu.com/ubuntu/dists/edgy/restricted/binary-i386/Packages.bz2';

/* this works: */
$data = bzdecompress(file_get_contents($url));
echo bzdecompress is finished!\n;



/* however, file_get_contents will block while PHP uses a lot of CPU
time */
$fp = fopen($url,'rb');
stream_filter_append($fp, 'bzip2.decompress');
stream_get_contents($fp);
echo stream_get_contents is finished!\n

?







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


#40418 [Asn-Csd]: PQfreemem does not exist prior to Postgresql 7.4

2007-02-11 Thread iliaa
 ID:   40418
 Updated by:   [EMAIL PROTECTED]
 Reported By:  wdierkes at 5dollarwhitebox dot org
-Status:   Assigned
+Status:   Closed
 Bug Type: PostgreSQL related
 Operating System: Redhat EL 3 (i386 and x86_64)
 PHP Version:  5.2.1
 Assigned To:  iliaa
 New Comment:

This bug has been fixed in CVS.

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/.
 
Thank you for the report, and for helping us make PHP better.




Previous Comments:


[2007-02-09 17:04:25] wdierkes at 5dollarwhitebox dot org

Description:

This is sortof related to a previous bug:

http://bugs.php.net/bug.php?id=33813


However, in that bug report the compile fails due to the 
PQfreemem call.  A patch was submitted to cvs that to check 
for PQfreemem, and if HAVE_PQFREEMEM = 0  use 'efree' 
instead.

As of php-5.2.1 this change seems to have been reverted, and 
systems with Postgresql  7.4 will fail to load php-pgsql 
with the following error (or similar):

PHP Warning:  PHP Startup: Unable to load dynamic library '/
usr/lib/php/modules/pdo_pgsql.so' - /usr/lib/php/modules/
pdo_pgsql.so: undefined symbol: PQfreemem in Unknown on line 
0
PHP Warning:  PHP Startup: Unable to load dynamic library '/
usr/lib/php/modules/pgsql.so' - /usr/lib/php/modules/
pgsql.so: undefined symbol: PQfreemem in Unknown on line 0



php-5.2.0 source used 'free' rather than PQfreemem.  
Therefore, the following is a proposed patch:

http://5dollarwhitebox.org/tmp/php-5.2.1-PQfreemem.patch





Reproduce code:
---
Build php-5.2.1 with '--with-pgsql', install, and run a simple test
with 'php -v' in order to load the pgsql.so.

Expected result:

No errors when loading pgsql.co.

Actual result:
--
[EMAIL PROTECTED] ~/]# php -v

PHP Warning:  PHP Startup: Unable to load dynamic library '/
usr/lib/php/modules/pdo_pgsql.so' - /usr/lib/php/modules/
pdo_pgsql.so: undefined symbol: PQfreemem in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library '/
usr/lib/php/modules/pgsql.so' - /usr/lib/php/modules/pgsql.so: 
undefined symbol: PQfreemem in Unknown on line 0
PHP 5.2.1 (cli) (built: Feb  8 2007 21:37:29) 
Copyright (c) 1997-2007 The PHP Group
Zend Engine v2.2.0, Copyright (c) 1998-2007 Zend Technologies





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


#40438 [NEW]: Use mathematical sets in if conditions

2007-02-11 Thread anmeldung at snowgarden dot ch
From: anmeldung at snowgarden dot ch
Operating system: Irrelevant
PHP version:  5.2.1
PHP Bug Type: Feature/Change Request
Bug description:  Use mathematical sets in if conditions

Description:

It would be nice, if you can use some mathematical sets in if conditions.
This would help to filter input values like integers, string and floats.
For example if you'll check if an input value within your range:
Normal representation - if ($input = 0  $input = 2)
Math. Set representation - if ($input === [0; 2])

You can use braces (but they are used in PHP) to represent sets of string
or numbers like - colors === {'red', 'blue', 'yellow'}

There is also an international standard (ISO 31-11) that defines sets
(http://en.wikipedia.org/wiki/ISO_31-11#Sets)


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


#40439 [NEW]: bit shift error

2007-02-11 Thread xris01 at free dot fr
From: xris01 at free dot fr
Operating system: Debian 3.1
PHP version:  5.2.1
PHP Bug Type: Unknown/Other Function
Bug description:  bit shift error

Description:

When using bit shifting (shift left) operation in 5.2.1, result is
different (and false) compared to 5.1.6

Reproduce code:
---
$z = -2302452860;
$lr_z = (($z)  4);

echo $lr_z;

Expected result:

1815459904

Actual result:
--
0

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


#40440 [NEW]: compile Error on output.c

2007-02-11 Thread n_pairat at yahoo dot com
From: n_pairat at yahoo dot com
Operating system: tru64 v4.0
PHP version:  4.4.4
PHP Bug Type: Compile Failure
Bug description:  compile Error on output.c

Description:

my configure :
./configure \
--with-mysql \
--with-apxs=/usr/local/apache/bin/apxs \
--with-zlib \
--with-gd

my message compile :
/bin/ksh /bbl/usr/npairat/tmp/php-4.4.4/libtool --silent
--preserve-dup-deps --m
ode=compile cc  -Imain/ -I/bbl/usr/npairat/tmp/php-4.4.4/main/
-DPHP_ATOM_INC -I
/bbl/usr/npairat/tmp/php-4.4.4/include
-I/bbl/usr/npairat/tmp/php-4.4.4/main -I/
bbl/usr/npairat/tmp/php-4.4.4
-I/bbl/usr/npairat/tmp/php-4.4.4/ext/xml/expat -I/
bbl/usr/npairat/tmp/php-4.4.4/TSRM -I/bbl/usr/npairat/tmp/php-4.4.4/Zend  
 -g -
ieee   -c /bbl/usr/npairat/tmp/php-4.4.4/main/output.c -o main/output.lo
cc: Warning: /bbl/usr/npairat/tmp/php-4.4.4/main/output.c, line 62: In
this stat
ement, the referenced type of the pointer value php_default_output_func
is fu
nction (pointer to signed char, unsigned int) returning int, which is not
compa
tible with function (pointer to const signed char, unsigned int)
returning int
. (ptrmismatch)
OG(php_body_write) = php_default_output_func;
^
cc: Warning: /bbl/usr/npairat/tmp/php-4.4.4/main/output.c, line 63: In
this stat
ement, the referenced type of the pointer value php_default_output_func
is fu
nction (pointer to signed char, unsigned int) returning int, which is not
compa
tible with function (pointer to const signed char, unsigned int)
returning int
. (ptrmismatch)
OG(php_header_write) = php_default_output_func;
^
cc: Warning: /bbl/usr/npairat/tmp/php-4.4.4/main/output.c, line 88: In
this stat
ement, the referenced type of the pointer value php_ub_body_write is
function
 (pointer to signed char, unsigned int) returning int, which is not
compatible
with function (pointer to const signed char, unsigned int) returning
int. (ptr
mismatch)
OG(php_body_write) = php_ub_body_write;
^
cc: Warning: /bbl/usr/npairat/tmp/php-4.4.4/main/output.c, line 89: In
this stat
ement, the referenced type of the pointer value sapi_module.ub_write is
funct
ion (pointer to signed char, unsigned int) returning int, which is not
compatib
le with function (pointer to const signed char, unsigned int) returning
int. (
ptrmismatch)
OG(php_header_write) = sapi_module.ub_write;
^
cc: Error: /bbl/usr/npairat/tmp/php-4.4.4/main/output.c, line 119: In this
decla
ration, parameter 1 has a different type than specified in an earlier
declaratio
n of this function. (mismatparam)
PHPAPI int php_body_write(const char *str, uint str_length TSRMLS_DC)
---^
cc: Error: /bbl/usr/npairat/tmp/php-4.4.4/main/output.c, line 119: In this
decla
ration, the type of php_body_write is not compatible with the type of a
previo
us declaration of php_body_write at line number 30 in file
/bbl/usr/npairat/tm
p/php-4.4.4/main/php_output.h. (notcompat)
PHPAPI int php_body_write(const char *str, uint str_length TSRMLS_DC)
---^
cc: Error: /bbl/usr/npairat/tmp/php-4.4.4/main/output.c, line 127: In this
decla
ration, parameter 1 has a different type than specified in an earlier
declaratio
n of this function. (mismatparam)
PHPAPI int php_header_write(const char *str, uint str_length TSRMLS_DC)
---^
cc: Error: /bbl/usr/npairat/tmp/php-4.4.4/main/output.c, line 127: In this
decla
ration, the type of php_header_write is not compatible with the type of
a prev
ious declaration of php_header_write at line number 31 in file
/bbl/usr/npaira
t/tmp/php-4.4.4/main/php_output.h. (notcompat)
PHPAPI int php_header_write(const char *str, uint str_length TSRMLS_DC)
---^
cc: Warning: /bbl/usr/npairat/tmp/php-4.4.4/main/output.c, line 145: In
this sta
tement, the referenced type of the pointer value
php_ub_body_write_no_header i
s function (pointer to signed char, unsigned int) returning int, which
is not
compatible with function (pointer to const signed char, unsigned int)
returning
 int. (ptrmismatch)
OG(php_body_write) = php_ub_body_write_no_header;
^
cc: Warning: /bbl/usr/npairat/tmp/php-4.4.4/main/output.c, line 147: In
this sta
tement, the referenced type of the pointer value php_ub_body_write is
functio
n (pointer to signed char, unsigned int) returning int, which is not
compatible
 with function (pointer to const signed char, unsigned int) returning
int. (pt
rmismatch)
OG(php_body_write) = php_ub_body_write;
^
cc: Error: /bbl/usr/npairat/tmp/php-4.4.4/main/output.c, line 169: In this
decla
ration, parameter 1 has a different type than specified in an earlier
declaratio
n of this function. (mismatparam)
PHPAPI int php_start_ob_buffer_named(const char *output_handler_name, uint
chunk
_size, zend_bool erase TSRMLS_DC)
---^
cc: Error: /bbl/usr/npairat/tmp/php-4.4.4/main/output.c, line 169: In this
decla
ration, the type of 

#40439 [Com]: bit shift error

2007-02-11 Thread judas dot iscariote at gmail dot com
 ID:   40439
 Comment by:   judas dot iscariote at gmail dot com
 Reported By:  xris01 at free dot fr
 Status:   Open
 Bug Type: Unknown/Other Function
 Operating System: Debian 3.1
 PHP Version:  5.2.1
 New Comment:

/sapi/cli/php foo.php
-36839245760 64 bit system
 and 0 in 32 bit system here.


Previous Comments:


[2007-02-12 00:36:54] xris01 at free dot fr

Description:

When using bit shifting (shift left) operation in 5.2.1, result is
different (and false) compared to 5.1.6

Reproduce code:
---
$z = -2302452860;
$lr_z = (($z)  4);

echo $lr_z;

Expected result:

1815459904

Actual result:
--
0





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