#30527 [NoF-Opn]: magic_quotes_gpc does not work per-directory

2004-12-02 Thread andrew at crannog-software dot com
 ID:   30527
 User updated by:  andrew at crannog-software dot com
 Reported By:  andrew at crannog-software dot com
-Status:   No Feedback
+Status:   Open
 Bug Type: PHP options/info functions
 Operating System: Windows 2000
 PHP Version:  4.3.9
 New Comment:

The problem occurs when using PHP as an ISAPI module.


Previous Comments:


[2004-12-02 01:00:04] php-bugs at lists dot php dot net

No feedback was provided for this bug for over a week, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to Open.



[2004-11-29 19:23:07] hans at velum dot net

For me the issue appears when using PHP as ISAPI module w/ IIS.



[2004-11-24 16:23:12] [EMAIL PROTECTED]

See also bug #30813




[2004-11-24 00:47:53] [EMAIL PROTECTED]

Using PHP as CGI binary or ISAPI module?



[2004-11-21 18:42:39] hans at velum dot net

I can confirm this on Windows 2003 w/ IIS 6 also.  Note that the
magic_quotes_sybase INI setting is also being ignored.  Basically it's
always doing magic_quotes_gpc -- despite the phpinfo() / ini_get
showing the desired per-directory values.



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

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


#30446 [Fbk-Opn]: virtual() includes files out of sequence

2004-12-02 Thread per at computer dot org
 ID:   30446
 User updated by:  per at computer dot org
 Reported By:  per at computer dot org
-Status:   Feedback
+Status:   Open
 Bug Type: Apache related
 Operating System: linux 2.4.26
 PHP Version:  4.3.9
 New Comment:

I'm currently using 2.0.52, but I believe I reproduced this with 2.0.50
as well. The problem does not occur in php 4.3.8 with either apache
version.


Previous Comments:


[2004-12-02 03:30:40] [EMAIL PROTECTED]

What Apache version are you using?




[2004-11-24 13:36:13] per at computer dot org

Also present in 4.3.10RC1



[2004-10-25 12:13:19] michele at borioli dot net

Got the same error on Win 2k platform.
OS: Windows 2000 SP3 (5.00.2195)
PHP: 5.0.1
APACHE: 2.0.1



[2004-10-16 00:46:05] kulphp at akaukul dot co dot uk

This I have found this only happens when using multiviews
(content-negotiation), and the same(both examples below) as a .shtml
works correctly.

?php virtual(/inc/_menu.html.en);?  works ok and places the content
in the correct place (NOT using mutliviews)

?php virtual(/inc/_menu);? places the content at the very beginning
of the output, and in front(very top of results) of where it was called
(using mutliviews).



[2004-10-15 12:25:38] per at computer dot org

Description:

virtual() seems to put included code/text in the wrong place.  I'm
guessing this is possibly related to bug#30445. 

Reproduce code:
---
html
headtitle/title/head
body
pLine0/p1
?php
virtual(i1);
?
pLine2/p
/body


i1.html:
pLine1/p


Expected result:

html
headtitle/title/head
body
pLine0/p
pLine1/p
pLine2/p
/body

Actual result:
--
pLine1/p
html
headtitle/title/head
body
pLine0/p
pLine2/p
/body





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


#30957 [NEW]: filesystem functions and object destructor

2004-12-02 Thread rueycheng at gmail dot com
From: rueycheng at gmail dot com
Operating system: Windows XP
PHP version:  5.0.1
PHP Bug Type: Class/Object related
Bug description:  filesystem functions and object destructor

Description:

Some filesystem functions, like file_put_contents() or fwrite(), don't
work properly in the destructor __destruct().  The following scenario may
looks a bit weird: it appeared that the file is not overwritten or even
created, but PHP does 'read' the content of the imaginary file!

If you uncomment the last line of the code, everything would works fine.

Thanks.

$ diff php.ini php.ini-dist
288c288
 error_reporting  =  E_ALL
---
 error_reporting  =  E_ALL  ~E_NOTICE  ~E_STRICT
436c436
 include_path = .;c:\php-5.0.1\PEAR
---
 ;include_path = .;c:\php\includes
450c450
 extension_dir = c:\php-5.0.1\ext
---
 extension_dir = ./
571,573c571,573
 extension=php_mbstring.dll
 extension=php_mcrypt.dll
 extension=php_mhash.dll
---
 ;extension=php_mbstring.dll
 ;extension=php_mcrypt.dll
 ;extension=php_mhash.dll
578c578
 extension=php_mysql.dll
---
 ;extension=php_mysql.dll

Reproduce code:
---
?
class Bug
{
private $filename;

public function __construct($filename) {
$this-filename = $filename;
}

public function __destruct() {
echo [;
file_put_contents($this-filename, 'Gotcha!');
echo file_get_contents($this-filename);
echo ];
}
}

$bug = new Bug('.bugtest');
//unset($bug);
?

Expected result:

[Gotcha!]

(And the file .bugtest under working directory should be created.)

$ cat .bugtest
Gotcha!

Actual result:
--
[Gotcha!]

$ cat .bugtest
cat: .bugtest: No such file or directory

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


#30958 [NEW]: Wrong instance returned with 2 singletons

2004-12-02 Thread schaa101 at tech dot nhl dot nl
From: schaa101 at tech dot nhl dot nl
Operating system: Windows XP Pro SP2
PHP version:  5.0.2
PHP Bug Type: Class/Object related
Bug description:  Wrong instance returned with 2 singletons

Description:

When you use 2 singletons, the second singeleton also returns the instance
of the first.
If you change the name of the variables, that store the instance of the
singleton class, inside the singletons and make them both unique, the
problem is solved though.

Reproduce code:
---
http://klaas.fiskaaf.com/singleton-bug.rar

or try

http://klaas.fiskaaf.com/singleton-bug.zip

Expected result:

Singleton1 - Singleton1
Singleton2 - Singleton2

Actual result:
--
Singleton1 - Singleton1
Singleton1 - Singleton2

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


#30958 [Opn-Fbk]: Wrong instance returned with 2 singletons

2004-12-02 Thread derick
 ID:   30958
 Updated by:   [EMAIL PROTECTED]
 Reported By:  schaa101 at tech dot nhl dot nl
-Status:   Open
+Status:   Feedback
 Bug Type: Class/Object related
 Operating System: Windows XP Pro SP2
 PHP Version:  5.0.2
 New Comment:

Please post the code here.


Previous Comments:


[2004-12-02 11:09:30] schaa101 at tech dot nhl dot nl

Description:

When you use 2 singletons, the second singeleton also returns the
instance of the first.
If you change the name of the variables, that store the instance of the
singleton class, inside the singletons and make them both unique, the
problem is solved though.

Reproduce code:
---
http://klaas.fiskaaf.com/singleton-bug.rar

or try

http://klaas.fiskaaf.com/singleton-bug.zip

Expected result:

Singleton1 - Singleton1
Singleton2 - Singleton2

Actual result:
--
Singleton1 - Singleton1
Singleton1 - Singleton2





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


#30957 [Opn]: filesystem functions bugs in destructor (under gc condition)

2004-12-02 Thread rueycheng at gmail dot com
 ID:   30957
 User updated by:  rueycheng at gmail dot com
-Summary:  filesystem functions and object destructor
 Reported By:  rueycheng at gmail dot com
 Status:   Open
 Bug Type: Class/Object related
 Operating System: Windows XP
 PHP Version:  5.0.1
 New Comment:

The garbage collector may clean up the object prior to its __destruct()
invocation.  Nothing would go wrong if you explicitly *destroy* the
object.

By the way, I tested the code on Redhat 7.3 with the following
configuration.  

$ cat config.nice
#! /bin/sh
#
# Created by configure

'./configure' \
'--with-apxs=/usr/local/apache/bin/apxs' \
'--with-mysql=/usr/local/mysql/' \
'--with-libxml-dir' \
'--enable-dba' \
'--enable-mbstring' \
$@

$ diff php.ini ../src/php-5.0.1/php.ini-recommended
353c353
 display_errors = On
---
 display_errors = Off
407c407
 ;error_log = /var/log/php.log
---
 ;error_log = filename
491c491
 include_path = .:/usr/local/lib/php
---
 ;include_path = .:/php/includes


As a result, two warnings are generated.

[
Warning: file_put_contents(./.bugtest) [function.file-put-contents]:
failed to open stream: Permission denied in
/home/httpd/html/testbed/bugtest.php on line 12

Warning: file_get_contents(./.bugtest) [function.file-get-contents]:
failed to open stream: No such file or directory in
/home/httpd/html/testbed/bugtest.php on line 13
]

Actually I've already enabled the write-permission for the directory. 
The execution of these filesystem functions outside of __destruct() is
OK.


Previous Comments:


[2004-12-02 11:01:33] rueycheng at gmail dot com

Description:

Some filesystem functions, like file_put_contents() or fwrite(), don't
work properly in the destructor __destruct().  The following scenario
may looks a bit weird: it appeared that the file is not overwritten or
even created, but PHP does 'read' the content of the imaginary file!

If you uncomment the last line of the code, everything would works
fine.

Thanks.

$ diff php.ini php.ini-dist
288c288
 error_reporting  =  E_ALL
---
 error_reporting  =  E_ALL  ~E_NOTICE  ~E_STRICT
436c436
 include_path = .;c:\php-5.0.1\PEAR
---
 ;include_path = .;c:\php\includes
450c450
 extension_dir = c:\php-5.0.1\ext
---
 extension_dir = ./
571,573c571,573
 extension=php_mbstring.dll
 extension=php_mcrypt.dll
 extension=php_mhash.dll
---
 ;extension=php_mbstring.dll
 ;extension=php_mcrypt.dll
 ;extension=php_mhash.dll
578c578
 extension=php_mysql.dll
---
 ;extension=php_mysql.dll

Reproduce code:
---
?
class Bug
{
private $filename;

public function __construct($filename) {
$this-filename = $filename;
}

public function __destruct() {
echo [;
file_put_contents($this-filename, 'Gotcha!');
echo file_get_contents($this-filename);
echo ];
}
}

$bug = new Bug('.bugtest');
//unset($bug);
?

Expected result:

[Gotcha!]

(And the file .bugtest under working directory should be created.)

$ cat .bugtest
Gotcha!

Actual result:
--
[Gotcha!]

$ cat .bugtest
cat: .bugtest: No such file or directory





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


#30942 [Fbk-Opn]: imageCreateFromPng() gives fatal error

2004-12-02 Thread hkh at netnords dot dk
 ID:   30942
 User updated by:  hkh at netnords dot dk
 Reported By:  hkh at netnords dot dk
-Status:   Feedback
+Status:   Open
 Bug Type: GD related
 Operating System: win XP
 PHP Version:  4.3.8
 Assigned To:  pajoye
 New Comment:

I found out witch pictures, who gives this error. It's png's created
with acdsee (used to convert bmp's to png's). I have experinced no
trouble with these png's in other programs.


I also found out, some of the png's gives a
bFatal error/b:  imagecreatefrompng(): gd-png:  fatal libpng error:
Too many IDAT's found


Run a phpinfo() who tells me
   GD Version  bundled (2.0.23 compatible)  


The ini file contains this
   extension=php_gd2.dll


Previous Comments:


[2004-11-30 13:49:53] [EMAIL PROTECTED]

Are you using the bundled gd library (configure --with-gd and not
--with-gd=/path/to/gd).

Cannot reproduce it with all branches and 4.3.8.

--Pierre



[2004-11-30 13:20:51] hkh at netnords dot dk

Description:

Sometimes when calling imageCreateFromPng() it produces a fatal error
instead of returning an empty string.


Reproduce code:
---
/*
 *  The code are placed inside this function 
 *  getImage($IfilePathName)
 */
return imageCreateFromPng($IfilePathName);





Expected result:

An empty string.


After the documentation the function should return a resource on
succes, and on error an empty string.



Actual result:
--
bFatal error/b:  imagecreatefrompng(): gd-png:  fatal libpng error:
Invalid chunk length. in b
C:\Documents and Settings\hkh\Desktop\php\desktop\bmpNoget.inc.php/b
on line b98/bbr /





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


#30942 [Opn]: imageCreateFromPng() gives fatal error

2004-12-02 Thread pajoye
 ID:   30942
 Updated by:   [EMAIL PROTECTED]
 Reported By:  hkh at netnords dot dk
 Status:   Open
 Bug Type: GD related
 Operating System: win XP
 PHP Version:  4.3.8
 Assigned To:  pajoye
 New Comment:

Please provide an url with these images please (if possible both bmp
and png).

--Pierre


Previous Comments:


[2004-12-02 11:19:31] hkh at netnords dot dk

I found out witch pictures, who gives this error. It's png's created
with acdsee (used to convert bmp's to png's). I have experinced no
trouble with these png's in other programs.


I also found out, some of the png's gives a
bFatal error/b:  imagecreatefrompng(): gd-png:  fatal libpng error:
Too many IDAT's found


Run a phpinfo() who tells me
   GD Version  bundled (2.0.23 compatible)  


The ini file contains this
   extension=php_gd2.dll



[2004-11-30 13:49:53] [EMAIL PROTECTED]

Are you using the bundled gd library (configure --with-gd and not
--with-gd=/path/to/gd).

Cannot reproduce it with all branches and 4.3.8.

--Pierre



[2004-11-30 13:20:51] hkh at netnords dot dk

Description:

Sometimes when calling imageCreateFromPng() it produces a fatal error
instead of returning an empty string.


Reproduce code:
---
/*
 *  The code are placed inside this function 
 *  getImage($IfilePathName)
 */
return imageCreateFromPng($IfilePathName);





Expected result:

An empty string.


After the documentation the function should return a resource on
succes, and on error an empty string.



Actual result:
--
bFatal error/b:  imagecreatefrompng(): gd-png:  fatal libpng error:
Invalid chunk length. in b
C:\Documents and Settings\hkh\Desktop\php\desktop\bmpNoget.inc.php/b
on line b98/bbr /





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


#30942 [Opn]: imageCreateFromPng() gives fatal error

2004-12-02 Thread hkh at netnords dot dk
 ID:   30942
 User updated by:  hkh at netnords dot dk
 Reported By:  hkh at netnords dot dk
 Status:   Open
 Bug Type: GD related
 Operating System: win XP
 PHP Version:  4.3.8
 Assigned To:  pajoye
 New Comment:

http://www.hanskejserhansen.dk/png/

I don't have the original pictures. They was saved from a homepage via
a browser (Don't know witch because i use four different) to my
harddesk.

I tried to find the original pictures, but now they are jpg's not
bmp's. sorry.


Previous Comments:


[2004-12-02 11:35:38] [EMAIL PROTECTED]

Please provide an url with these images please (if possible both bmp
and png).

--Pierre



[2004-12-02 11:19:31] hkh at netnords dot dk

I found out witch pictures, who gives this error. It's png's created
with acdsee (used to convert bmp's to png's). I have experinced no
trouble with these png's in other programs.


I also found out, some of the png's gives a
bFatal error/b:  imagecreatefrompng(): gd-png:  fatal libpng error:
Too many IDAT's found


Run a phpinfo() who tells me
   GD Version  bundled (2.0.23 compatible)  


The ini file contains this
   extension=php_gd2.dll



[2004-11-30 13:49:53] [EMAIL PROTECTED]

Are you using the bundled gd library (configure --with-gd and not
--with-gd=/path/to/gd).

Cannot reproduce it with all branches and 4.3.8.

--Pierre



[2004-11-30 13:20:51] hkh at netnords dot dk

Description:

Sometimes when calling imageCreateFromPng() it produces a fatal error
instead of returning an empty string.


Reproduce code:
---
/*
 *  The code are placed inside this function 
 *  getImage($IfilePathName)
 */
return imageCreateFromPng($IfilePathName);





Expected result:

An empty string.


After the documentation the function should return a resource on
succes, and on error an empty string.



Actual result:
--
bFatal error/b:  imagecreatefrompng(): gd-png:  fatal libpng error:
Invalid chunk length. in b
C:\Documents and Settings\hkh\Desktop\php\desktop\bmpNoget.inc.php/b
on line b98/bbr /





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


#30958 [Fbk-Opn]: Wrong instance returned with 2 singletons

2004-12-02 Thread schaa101 at tech dot nhl dot nl
 ID:   30958
 User updated by:  schaa101 at tech dot nhl dot nl
 Reported By:  schaa101 at tech dot nhl dot nl
-Status:   Feedback
+Status:   Open
 Bug Type: Class/Object related
 Operating System: Windows XP Pro SP2
 PHP Version:  5.0.2
 New Comment:

?php

  class Singleton1
  {
private $instance = null;

private function __Construct()
{ }

public function  GetInstance()
{
  if( $this-instance == null )
$this-instance = new Singleton1();
  
  return $this-instance;
}

public function Write( $message )
{
  print Singleton1 -  . $message;
}

  }

  class Singleton2
  {
private $instance = null;

private function __Construct()
{ }

public function  GetInstance()
{
  if( $this-instance == null )
$this-instance = new Singleton2();

  return $this-instance;
}

public function Write( $message )
{
  print Singleton2 -  . $message;
}

  }
  
  class Main
  {
public function __Construct()
{
  Singleton1::GetInstance()-Write( Singleton1 );
  echo br/;
  Singleton2::GetInstance()-Write( Singleton2 );
}
  
  }

  new Main();
?


Previous Comments:


[2004-12-02 11:10:41] [EMAIL PROTECTED]

Please post the code here.



[2004-12-02 11:09:30] schaa101 at tech dot nhl dot nl

Description:

When you use 2 singletons, the second singeleton also returns the
instance of the first.
If you change the name of the variables, that store the instance of the
singleton class, inside the singletons and make them both unique, the
problem is solved though.

Reproduce code:
---
http://klaas.fiskaaf.com/singleton-bug.rar

or try

http://klaas.fiskaaf.com/singleton-bug.zip

Expected result:

Singleton1 - Singleton1
Singleton2 - Singleton2

Actual result:
--
Singleton1 - Singleton1
Singleton1 - Singleton2





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


#30835 [Bgs-Csd]: PHP5 won't configure with mysqli support on Intel EM64T

2004-12-02 Thread noethen at daad dot de
 ID:   30835
 User updated by:  noethen at daad dot de
 Reported By:  noethen at daad dot de
-Status:   Bogus
+Status:   Closed
 Bug Type: Compile Failure
 Operating System: SuSE Linux Enterprise Server 9
 PHP Version:  5.0.2
 New Comment:

I've made a symlink from /usr/lib64/mysql to /usr/lib/mysql and now the
configuration and compiling works.

So this is really not a bug. Thanks for helping me to find the
problem.

Sascha


Previous Comments:


[2004-12-01 17:36:29] noethen at daad dot de

I have only one version of mysql_config.

I have /usr/lib64/mysql/ which contains

libheap.a
libmyisam.a
libmysqlclient.la
libmystrings.a
libvio.a
libmerge.a
libmyisammrg.a
libmysqlclient_r.a
libmysys.a
mysqld.sym
libdbug.a
libmygcc.a
libmysqlclient.a
libmysqlclient_r.la
libnisam.a

and I have /usr/lib/mysql which is empty ... probably because I had
meanwhile installed MySQL 4.0 from SLES9 distribution package. But I
have uninstalled that before and reinstalled the 4.1.7 RPM packages
from the MySQL website.

But the output 

  -L/usr/lib/mysql -lmysqlclient -lcrypt -lnsl -lm -lz

comes from the mysql_config that I just sent to you.



[2004-12-01 17:24:46] [EMAIL PROTECTED]

Are you sure? You sent me a mysql_config before, which 
shows: 
 
-L/usr/lib64/mysql -lmysqlclient -lcrypt -lnsl -lm -lz 
 
Do you have 2 different versions ? 



[2004-12-01 17:06:35] noethen at daad dot de

Here comes the output of

mysql_config --libs

-L/usr/lib/mysql -lmysqlclient -lcrypt -lnsl -lm -lz



[2004-12-01 17:00:36] [EMAIL PROTECTED]

And the MySQL-devel package is also installed?  What's the output of:

$ mysql_config --libs





[2004-12-01 10:51:51] noethen at daad dot de

I _am_ using a native x86_64 build of MySQL
(MySQL-server-4.1.7-0.glibc23.x86_64.rpm).



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

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


#30959 [NEW]: __call does not return by reference

2004-12-02 Thread joel at zmail dot pt
From: joel at zmail dot pt
Operating system: WinXP, Debian Sarge
PHP version:  5.0.2
PHP Bug Type: Zend Engine 2 problem
Bug description:  __call does not return by reference

Description:

__call doesn't return by reference



Reproduce code:
---
class A{
private $x = 123;
public function   __call($m,$a){
return $this-x;
}
}
$a = new A();
$x =  $a-UndefMethod();
$x = 789;
$y =  $a-UndefMethod();

Expected result:

$y should be 789, but it is 123


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


#30835 [Csd-Bgs]: PHP5 won't configure with mysqli support on Intel EM64T

2004-12-02 Thread derick
 ID:   30835
 Updated by:   [EMAIL PROTECTED]
 Reported By:  noethen at daad dot de
-Status:   Closed
+Status:   Bogus
 Bug Type: Compile Failure
 Operating System: SuSE Linux Enterprise Server 9
 PHP Version:  5.0.2
 New Comment:

As it is no bug, we set the status to Bogus.


Previous Comments:


[2004-12-02 12:38:58] noethen at daad dot de

I've made a symlink from /usr/lib64/mysql to /usr/lib/mysql and now the
configuration and compiling works.

So this is really not a bug. Thanks for helping me to find the
problem.

Sascha



[2004-12-01 17:36:29] noethen at daad dot de

I have only one version of mysql_config.

I have /usr/lib64/mysql/ which contains

libheap.a
libmyisam.a
libmysqlclient.la
libmystrings.a
libvio.a
libmerge.a
libmyisammrg.a
libmysqlclient_r.a
libmysys.a
mysqld.sym
libdbug.a
libmygcc.a
libmysqlclient.a
libmysqlclient_r.la
libnisam.a

and I have /usr/lib/mysql which is empty ... probably because I had
meanwhile installed MySQL 4.0 from SLES9 distribution package. But I
have uninstalled that before and reinstalled the 4.1.7 RPM packages
from the MySQL website.

But the output 

  -L/usr/lib/mysql -lmysqlclient -lcrypt -lnsl -lm -lz

comes from the mysql_config that I just sent to you.



[2004-12-01 17:24:46] [EMAIL PROTECTED]

Are you sure? You sent me a mysql_config before, which 
shows: 
 
-L/usr/lib64/mysql -lmysqlclient -lcrypt -lnsl -lm -lz 
 
Do you have 2 different versions ? 



[2004-12-01 17:06:35] noethen at daad dot de

Here comes the output of

mysql_config --libs

-L/usr/lib/mysql -lmysqlclient -lcrypt -lnsl -lm -lz



[2004-12-01 17:00:36] [EMAIL PROTECTED]

And the MySQL-devel package is also installed?  What's the output of:

$ mysql_config --libs





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

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


#30961 [NEW]: Wrong linenumber in ReflectionClass getStartLine()

2004-12-02 Thread michiel at trendserver dot nl
From: michiel at trendserver dot nl
Operating system: Debian
PHP version:  5.0.2
PHP Bug Type: Zend Engine 2 problem
Bug description:  Wrong linenumber in ReflectionClass getStartLine()

Description:

The Reflection API has a (minor) bug regarding the getStartLine() function
in ReflectionClass. When the reflected class is not a subclass and does not
implement any interfaces, the result of getStartLine() is one line off.

Reproduce code:
---
?
class a
{
}

class b extends a
{
}

$ref1 = new ReflectionClass('a');
$ref2 = new ReflectionClass('b');
echo $ref1-getStartLine() . \n;
echo $ref2-getStartLine() . \n;
?

Expected result:

2
6

Actual result:
--
3
6

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


#30942 [Opn-Asn]: imageCreateFromPng() gives fatal error

2004-12-02 Thread pajoye
 ID:   30942
 Updated by:   [EMAIL PROTECTED]
 Reported By:  hkh at netnords dot dk
-Status:   Open
+Status:   Assigned
 Bug Type: GD related
 Operating System: win XP
 PHP Version:  4.3.8
 Assigned To:  pajoye
 New Comment:

The fact is you will not be able to read these images without using
another libpng (1.0.6 and later), compiled with:
   #define PNG_SETJMP_NOT_SUPPORTED
   #define PNG_ABORT()

The png files are not valid.

The fix will be to change the error to a warning and return false.

--Pierre





Previous Comments:


[2004-12-02 12:01:05] hkh at netnords dot dk

http://www.hanskejserhansen.dk/png/

I don't have the original pictures. They was saved from a homepage via
a browser (Don't know witch because i use four different) to my
harddesk.

I tried to find the original pictures, but now they are jpg's not
bmp's. sorry.



[2004-12-02 11:35:38] [EMAIL PROTECTED]

Please provide an url with these images please (if possible both bmp
and png).

--Pierre



[2004-12-02 11:19:31] hkh at netnords dot dk

I found out witch pictures, who gives this error. It's png's created
with acdsee (used to convert bmp's to png's). I have experinced no
trouble with these png's in other programs.


I also found out, some of the png's gives a
bFatal error/b:  imagecreatefrompng(): gd-png:  fatal libpng error:
Too many IDAT's found


Run a phpinfo() who tells me
   GD Version  bundled (2.0.23 compatible)  


The ini file contains this
   extension=php_gd2.dll



[2004-11-30 13:49:53] [EMAIL PROTECTED]

Are you using the bundled gd library (configure --with-gd and not
--with-gd=/path/to/gd).

Cannot reproduce it with all branches and 4.3.8.

--Pierre



[2004-11-30 13:20:51] hkh at netnords dot dk

Description:

Sometimes when calling imageCreateFromPng() it produces a fatal error
instead of returning an empty string.


Reproduce code:
---
/*
 *  The code are placed inside this function 
 *  getImage($IfilePathName)
 */
return imageCreateFromPng($IfilePathName);





Expected result:

An empty string.


After the documentation the function should return a resource on
succes, and on error an empty string.



Actual result:
--
bFatal error/b:  imagecreatefrompng(): gd-png:  fatal libpng error:
Invalid chunk length. in b
C:\Documents and Settings\hkh\Desktop\php\desktop\bmpNoget.inc.php/b
on line b98/bbr /





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


#30962 [NEW]: Space being returned for NULL columns

2004-12-02 Thread richard dot quadling at bandvulc dot co dot uk
From: richard dot quadling at bandvulc dot co dot uk
Operating system: Windows XP Pro SP2
PHP version:  5.0.2
PHP Bug Type: MSSQL related
Bug description:  Space being returned for NULL columns

Description:

This bug has been reported before but repeatedly closed as a bogus bug.

It is NOT bogus. It is NOT a problem in the library. It IS a bug in the
PHP code.

The problem is for any column where the content is NULL, the value
retrieved by PHP is ' '. That is a single space.

The bug is in php_mssql.c (/* $Id: php_mssql.c,v 1.137.2.4 2004/11/15
23:35:50 iliaa Exp $ */)

Lines 798 to 810 are currently ...

case SQLTEXT: {
int length;
char *data = charcol(offset);

length=dbdatlen(mssql_ptr-link,offset);
#if ilia_0
while (length0  data[length-1] == ' ') { /* nuke 
trailing whitespace
*/
length--;
}
#endif
ZVAL_STRINGL(result, data, length, 1); 
break;
}


The problem is that length is never tested to see if it is zero, as per
the Microsoft documentation (Online books and look for dbdata). It says
...

dbdata ... returns a BYTE pointer to the data for the column. A NULL BYTE
pointer is returned if there is no such column or if the data has a null
value. To make sure that the data is really a null value, check for a
return of 0 from dbdatlen.

and ...

Remarks. The data is not null-terminated. To get the length of the data,
use dbdatlen.

I would propose that the php_mssql.c code would be as follows ...

case SQLTEXT: {
int length;
char *data = charcol(offset);

length=dbdatlen(mssql_ptr-link,offset);
if (length == 0) {
ZVAL_EMPTY_STRING(result); // Force the return 
of an empty string if
the length is 0 as data MAY not be NULL.
} else {
#if ilia_0
while (length0  data[length-1] == ' ') { /* 
nuke trailing
whitespace */
length--;
}
#endif  ZVAL_STRINGL(result, data, length, 1); 
}
break;
}


Unfortunately, I am not in a position to test this (well, I have
MSVC++V6.0 Standard, but cannot get PHP to compile. I am not very familiar
with MSVC++ and its setup to know what is missing).

If someone can explain how I can submit this to the actual source online
for compilation, then I'd be very grateful.

I'd be even more grateful if someone could help me get PHP compiled. Even
money may be sent, though I'd rather buy beer or something fizzy for the
ladies.


This possible fix does not interfere with the removing of trailing spaces,
though I wonder what would happen if 


Regards,

Richard Quadling.


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


#30437 [Csd-Opn]: include fails to open file from parent directory of include path

2004-12-02 Thread gabe at mudbuginfo dot com
 ID:   30437
 User updated by:  gabe at mudbuginfo dot com
 Reported By:  gabe at mudbuginfo dot com
-Status:   Closed
+Status:   Open
 Bug Type: *Directory/Filesystem functions
 Operating System: linux 2.4.26
 PHP Version:  4.3.9
 New Comment:

Bug is different from 30881:

This bug does not refer to the CLI SAPI, and refers to 
files from the include_path and not the current working 
directory.

Prehaps the documentation should be updated to mention 
that when including a file in a parent directory (eg: 
'../blah.php'), paths within the  include_path will not 
be searched.


Previous Comments:


[2004-11-27 16:46:11] [EMAIL PROTECTED]

Same as #30881, which is already documented.



[2004-10-14 22:22:51] gabe at mudbuginfo dot com

Easier test case:

Say for example, your include path is: /usr/local/lib/
php (most people have this or something similar)

?php
echo including normal DB\n;
include 'DB.php';
echo including ../php DB\n;
include '../php/DB.php';
?

The second include statement will fail with:
including normal DB
including ../php DB

Warning: main(../php/DB.php): failed to open stream: No 
such file or directory in /tmp/x.php on line 5

Warning: main(): Failed opening '../php/DB.php' for 
inclusion (include_path='.:/usr/local/lib/php:/usr/
local/lib/mis:/usr/local/lib/eclipse') in /tmp/x.php on 
line 5



[2004-10-14 22:06:53] gabe at mudbuginfo dot com

Note, open_basedir is not set anywhere for this site.



[2004-10-14 18:23:32] gabe at mudbuginfo dot com

Description:

This site prepends the full path to the site's directory 
for site-specific include files with the following code 
in the file /files/client/
global_fellowship_search/proto1/include/init.php

$site_include_path = dirname(__FILE__);
$sys_include_path = ini_get('include_path');
ini_set('include_path', $site_include_path . ':' .  
$sys_include_path);

which creates an include path of '/files/
client/global_fellowship_search/proto1/include:.:/usr/
local/lib/php:/usr/local/lib/mis:/usr/local/lib/
eclipse'

When attempting to include the file /files/
client/global_fellowship_search/proto1/mail/
forgot_pass.mail relative to the site's prepended 
include directory with include_once '../mail/
forgot_pass.mail';, PHP fails to find the file.  
Supplying an absolute path to the file works.  It just 
seems like PHP will not respect crawling up a '..' 
parent directory link for any path within the 
include_path except for '.'

Note that this code was placed in the 'index2.php' file 
just for simplicity in demonstration; in implementation 
this inclusion code is held within another file in the 
include/ directory which is included several different 
directory levels.

Reproduce code:
---
(Within /files/client/
global_fellowship_search/proto1/index2.php)

include_once '../mail/forgot_pass.mail';

Expected result:

Inclusion of /files/client/
global_fellowship_search/proto1/mail/forgot_pass.mail

Actual result:
--
Warning: main(../mail/forgot_pass.mail): failed to open 
stream: No such file or directory in /files/client/
global_fellowship_search/proto1/index2.php on line 5

Warning: main(): Failed opening '../mail/
forgot_pass.mail' for inclusion (include_path='/files/
client/global_fellowship_search/proto1/include:.:/usr/
local/lib/php:/usr/local/lib/mis:/usr/local/lib/
eclipse') in /files/client/global_fellowship_search/
proto1/index2.php on line 5





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


#30964 [NEW]: Wrong display of special characters

2004-12-02 Thread pitchoune at vbulletin-fr dot org
From: pitchoune at vbulletin-fr dot org
Operating system: Windows
PHP version:  5CVS-2004-12-02 (dev)
PHP Bug Type: XML related
Bug description:  Wrong display of special characters

Description:

When you want to display phrases or words with special characters in ISO
format by XML, the special characters are not displayed correctly.

Reproduce code:
---
?
error_reporting(E_ALL  ~E_NOTICE);

$xml = '?xml version=1.0 encoding=ISO-8859-1?xTest with some
special characters: é è ù ô à/x';

$p = xml_parser_create();
xml_parser_set_option($p, XML_OPTION_CASE_FOLDING, 0);
xml_set_element_handler($p, 'start_elem', 'end_elem');
xml_set_character_data_handler($p, 'cdata');
xml_parse($p, $xml, true);
xml_parser_free($p);

function start_elem($parser, $tagname, $attributes){}

function end_elem($parser, $tagname){}

function cdata($parser, $data){ echo $data; }
?

Expected result:

Test with some special characters: é è ù ô à

Actual result:
--
Test with some special characters: é è ù ô Ã

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


#30965 [NEW]: php 5.0.3RC1 fails to compile with freetds

2004-12-02 Thread jon dot bertsch at ucop dot edu
From: jon dot bertsch at ucop dot edu
Operating system: Mac OS 10.3.6
PHP version:  5CVS-2004-12-02 (dev)
PHP Bug Type: Compile Failure
Bug description:  php 5.0.3RC1 fails to compile with freetds

Description:

When I configure with freetds for mssql configure fails 
with the following warning:

configure: error: Could not find /usr/local/lib/
libtds.a|so

But the file libtds.a exists at /usr/local/lib/libtds.a. 
The identical configure worked for 5.0.0

/usr/local/lib] jonb% ls
libct.2.0.0.dylib   libpng.dylib
libtds.dyliblibxml2.2.6.6.dylib
libct.2.dylib   libpng12.0.1.2.5.dylib  
libtds.la   libxml2.2.dylib
libct.a libpng12.0.dylib
libtdsodbc.0.0.0.dylib  libxml2.a
libct.dylib libpng12.a  
libtdsodbc.0.dylib  libxml2.dylib
libct.lalibpng12.dylib  
libtdsodbc.alibxml2.la
libexslt.0.8.0.dyliblibsybdb.4.0.0.dylib
libtdsodbc.dyliblibxslt.1.1.0.dylib
libexslt.0.dyliblibsybdb.4.dylib
libtdsodbc.la   libxslt.1.dylib
libexslt.a  libsybdb.a  
libtdssrv.1.0.0.dylib   libxslt.a
libexslt.dylib  libsybdb.dylib  
libtdssrv.1.dylib   libxslt.dylib
libexslt.la libsybdb.la 
libtdssrv.a libxslt.la
libpng.3.1.2.5.dyliblibtds.3.0.0.dylib  
libtdssrv.dylib pkgconfig
libpng.3.dylib  libtds.3.dylib  
libtdssrv.laxml2Conf.sh
libpng.alibtds.a
libxml2.2.5.11.dylibxsltConf.sh


I checked the file ext/mssql/config.m4 spelling and it 
seems correct but it is not recognizing the file name 
for some reason.

Without the mssql extension it compiles fine.

By the way, you need a drop-down option for 5.0.3RC1 on 
the form.

Reproduce code:
---

 '--with-mssql=/usr/local'

Actual result:
--
configure fails

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


#30963 [NEW]: pdf issue with printer

2004-12-02 Thread ahossain at psisite dot com
From: ahossain at psisite dot com
Operating system: winxp
PHP version:  5.0.2
PHP Bug Type: *General Issues
Bug description:  pdf issue with printer

Description:

How I can send my pdf file to the printer?

$_SESSION['PrintBuffer']= $this-buffer;  // in buffer my pdf
$handle=printer_open(); printer_set_option($handle, PRINTER_MODE, raw);
printer_write($handle, $_SESSION['PrintBuffer']); printer_close($handle);


unfortunately it prints all ascii char but i want my pdf page printout. If
anyone have solution please let me know.


Reproduce code:
---
ascii

Expected result:

only pdf page printout (that i see by adobe acrobate reader)


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


#29761 [Com]: token_get_all()

2004-12-02 Thread fpoeydomenge at free dot fr
 ID:   29761
 Comment by:   fpoeydomenge at free dot fr
 Reported By:  steemann at globalpark dot de
 Status:   Open
 Bug Type: Scripting Engine problem
 Operating System: Linux 2.4.22
 PHP Version:  4.3.8
 New Comment:

Same problem with PHP 5.0.2, but I only get the version where :

T_OPEN_TAG: 'lt;?php ' 

is replaced by :

 
? 
T_STRING: 'php'


Previous Comments:


[2004-10-19 21:58:52] bloudon at townnews dot com

Bug is reproducible only when tokenizer is loaded dynamically.
If tokenizer is compiled into PHP then the bug does not occur.

Same behavior on Linux 2.4.24 and Linux 2.6.8.1.



[2004-10-04 11:11:22] guth at fiifo dot u-psud dot fr

Same problem with PHP 5.0.*, with any PHP script.



[2004-08-19 17:48:22] steemann at globalpark dot de

Description:

Don't know if it's a tokenizer issue or something else: 
 
I just wanted to check out the token_get_all() function. 
I tried the test code from the manual page (see code 
below). I am using token_get_all() with a constant input. 
 
Unfortunately, on my box, the result for the test code is 
varying, i. e. tokening a constant string has two 
different results. I found this out it by simple hitting 
reload in the browser multiple times. I've put both 
results I've gotten in the Actual result textarea. The 
possibility for each result seems to be about 50%. 
 
 
Environment: 
Configure Command =  './configure' 
'--with-apxs=/opt/pdp/apache/bin/apxs' 
'--prefix=/opt/pdp/php' '--with-mysql=/opt/pdp/mysql/' 
'--with-config-file-path=/opt/pdp/' 
'--with-iconv=/opt/pdp/iconv/' 
'--with-imagick=/opt/pdp/ImageMagick/' '--with-zlib' 
'--with-gd' '--with-freetype-dir=/usr' 
'--enable-gd-native-ttf' '--enable-gd-imgstrttf' 
'--with-jpeg-dir=/usr' '--with-png-dir=/usr' '--with-dom' 
'--with-dom-xslt' '--with-dom-exslt' '--enable-sysvsem' 
'--enable-sysvshm' '--disable-debug' '--enable-sockets' 
PHP API = 20020918 
PHP Extension = 20020429 
Zend Extension = 20021010 
Debug Build = no 
Thread Safety = disabled 
 
 
Maybe my box is f**ked up?? 

Reproduce code:
---
$data=?php ob_start(); ?;
foreach(token_get_all($data) as $c)
{
  if(is_array($c))
  {
print(token_name($c[0]) . : '.htmlentities($c[1]).'\n);
  }
  else
  {
print($c\n);
  }
}


Expected result:

T_OPEN_TAG: 'lt;?php ' 
T_STRING: 'ob_start' 
( 
) 
; 
T_WHITESPACE: ' ' 
T_CLOSE_TAG: '?gt;' 

Actual result:
--
In about 50% I get: 
 
 
? 
T_STRING: 'php' 
T_WHITESPACE: ' ' 
T_STRING: 'ob_start' 
( 
) 
; 
T_WHITESPACE: ' ' 
T_CLOSE_TAG: '?gt;' 
 
 
 
 
the other 50% I get: 
 
T_OPEN_TAG: 'lt;?php ' 
T_STRING: 'ob_start' 
( 
) 
; 
T_WHITESPACE: ' ' 
T_CLOSE_TAG: '?gt;' 
 





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


#30587 [Csd-Ana]: Array assignment with array_multisort

2004-12-02 Thread tony2001
 ID:   30587
 Updated by:   [EMAIL PROTECTED]
 Reported By:  ian_mclaughlin at blueyonder dot co dot uk
-Status:   Closed
+Status:   Analyzed
-Bug Type: Scripting Engine problem
+Bug Type: Arrays related
 Operating System: Win32
 PHP Version:  4.3.9


Previous Comments:


[2004-11-19 17:57:52] [EMAIL PROTECTED]

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.

Yes, I was wrong, sorry.
This is fixed by now.



[2004-11-16 11:44:21] ian_mclaughlin at blueyonder dot co dot uk

Thanks for your response. 

Variables (master_A and master_B) change even though I have performed
no operation on them since assignment. All the documentation I can find
does not support this behaviour. If this actually is the expected
behaviour, please explain why.



[2004-11-04 11:09:07] [EMAIL PROTECTED]

Sorry, but your problem does not imply a bug in PHP itself.  For a
list of more appropriate places to ask for help using PHP, please
visit http://www.php.net/support.php as this bug system is not the
appropriate forum for asking support questions. 

Thank you for your interest in PHP.

.



[2004-10-27 20:09:56] ian_mclaughlin at blueyonder dot co dot uk

Description:

this code gives the impression that array assignment is actually done
by pointer sharing, when it should be done by copying.

Reproduce code:
---
?php
//
$master_A=array(1,2,4,3);
$master_B=array(1,3,2,4);
$A = $master_A;
$B = $master_B;
echobr/BEFORE MULTISORT;
echobr/master_Abr/;
print_r($master_A);
echobr/master_Bbr/;
print_r($master_B);
array_multisort($A, $B); 
echobr/AFTER MULTISORT;
echobr/master_Abr/;
print_r($master_A);
echobr/master_Bbr/;
print_r($master_B);
?

Expected result:

BEFORE MULTISORT
master_A
Array ( [0] = 1 [1] = 2 [2] = 4 [3] = 3 )
master_B
Array ( [0] = 1 [1] = 3 [2] = 2 [3] = 4 )
AFTER MULTISORT
master_A
Array ( [0] = 1 [1] = 2 [2] = 4 [3] = 3 )
master_B
Array ( [0] = 1 [1] = 3 [2] = 2 [3] = 4 )


Actual result:
--
BEFORE MULTISORT
master_A
Array ( [0] = 1 [1] = 2 [2] = 4 [3] = 3 )
master_B
Array ( [0] = 1 [1] = 3 [2] = 2 [3] = 4 )
AFTER MULTISORT
master_A
Array ( [0] = 1 [1] = 2 [2] = 3 [3] = 4 )
master_B
Array ( [0] = 1 [1] = 3 [2] = 4 [3] = 2 )





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


#30964 [Opn-Bgs]: Wrong display of special characters

2004-12-02 Thread derick
 ID:   30964
 Updated by:   [EMAIL PROTECTED]
 Reported By:  pitchoune at vbulletin-fr dot org
-Status:   Open
+Status:   Bogus
 Bug Type: XML related
 Operating System: Windows
 PHP Version:  5CVS-2004-12-02 (dev)
 New Comment:

Please do not submit the same bug more than once. An existing
bug report already describes this very problem. Even if you feel
that your issue is somewhat different, the resolution is likely
to be the same. 

Thank you for your interest in PHP.

See #30951


Previous Comments:


[2004-12-02 17:53:07] pitchoune at vbulletin-fr dot org

Description:

When you want to display phrases or words with special characters in
ISO format by XML, the special characters are not displayed correctly.

Reproduce code:
---
?
error_reporting(E_ALL  ~E_NOTICE);

$xml = '?xml version=1.0 encoding=ISO-8859-1?xTest with some
special characters: é è ù ô à/x';

$p = xml_parser_create();
xml_parser_set_option($p, XML_OPTION_CASE_FOLDING, 0);
xml_set_element_handler($p, 'start_elem', 'end_elem');
xml_set_character_data_handler($p, 'cdata');
xml_parse($p, $xml, true);
xml_parser_free($p);

function start_elem($parser, $tagname, $attributes){}

function end_elem($parser, $tagname){}

function cdata($parser, $data){ echo $data; }
?

Expected result:

Test with some special characters: é è ù ô à

Actual result:
--
Test with some special characters: é è ù ô Ã





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


#30963 [Opn-Bgs]: pdf issue with printer

2004-12-02 Thread derick
 ID:   30963
 Updated by:   [EMAIL PROTECTED]
 Reported By:  ahossain at psisite dot com
-Status:   Open
+Status:   Bogus
 Bug Type: *General Issues
 Operating System: winxp
 PHP Version:  5.0.2
 New Comment:

Sorry, but your problem does not imply a bug in PHP itself.  For a
list of more appropriate places to ask for help using PHP, please
visit http://www.php.net/support.php as this bug system is not the
appropriate forum for asking support questions. 

Thank you for your interest in PHP.

.


Previous Comments:


[2004-12-02 17:05:25] ahossain at psisite dot com

Description:

How I can send my pdf file to the printer?

$_SESSION['PrintBuffer']= $this-buffer;  // in buffer my pdf
$handle=printer_open(); printer_set_option($handle, PRINTER_MODE,
raw); printer_write($handle, $_SESSION['PrintBuffer']);
printer_close($handle); 

unfortunately it prints all ascii char but i want my pdf page printout.
If anyone have solution please let me know.


Reproduce code:
---
ascii

Expected result:

only pdf page printout (that i see by adobe acrobate reader)






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


#30965 [Opn-Fbk]: php 5.0.3RC1 fails to compile with freetds

2004-12-02 Thread derick
 ID:   30965
 Updated by:   [EMAIL PROTECTED]
 Reported By:  jon dot bertsch at ucop dot edu
-Status:   Open
+Status:   Feedback
 Bug Type: Compile Failure
 Operating System: Mac OS 10.3.6
 PHP Version:  5CVS-2004-12-02 (dev)
 New Comment:

Please check in config.log for reasons why it might have failed, if
possible provide a link to it here.


Previous Comments:


[2004-12-02 17:58:52] jon dot bertsch at ucop dot edu

Description:

When I configure with freetds for mssql configure fails 
with the following warning:

configure: error: Could not find /usr/local/lib/
libtds.a|so

But the file libtds.a exists at /usr/local/lib/libtds.a. 
The identical configure worked for 5.0.0

/usr/local/lib] jonb% ls
libct.2.0.0.dylib   libpng.dylib
libtds.dyliblibxml2.2.6.6.dylib
libct.2.dylib   libpng12.0.1.2.5.dylib  
libtds.la   libxml2.2.dylib
libct.a libpng12.0.dylib
libtdsodbc.0.0.0.dylib  libxml2.a
libct.dylib libpng12.a  
libtdsodbc.0.dylib  libxml2.dylib
libct.lalibpng12.dylib  
libtdsodbc.alibxml2.la
libexslt.0.8.0.dyliblibsybdb.4.0.0.dylib
libtdsodbc.dyliblibxslt.1.1.0.dylib
libexslt.0.dyliblibsybdb.4.dylib
libtdsodbc.la   libxslt.1.dylib
libexslt.a  libsybdb.a  
libtdssrv.1.0.0.dylib   libxslt.a
libexslt.dylib  libsybdb.dylib  
libtdssrv.1.dylib   libxslt.dylib
libexslt.la libsybdb.la 
libtdssrv.a libxslt.la
libpng.3.1.2.5.dyliblibtds.3.0.0.dylib  
libtdssrv.dylib pkgconfig
libpng.3.dylib  libtds.3.dylib  
libtdssrv.laxml2Conf.sh
libpng.alibtds.a
libxml2.2.5.11.dylibxsltConf.sh


I checked the file ext/mssql/config.m4 spelling and it 
seems correct but it is not recognizing the file name 
for some reason.

Without the mssql extension it compiles fine.

By the way, you need a drop-down option for 5.0.3RC1 on 
the form.

Reproduce code:
---

 '--with-mssql=/usr/local'

Actual result:
--
configure fails





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


#30967 [NEW]: Extending a class that extends mysqli

2004-12-02 Thread rbro at hotmail dot com
From: rbro at hotmail dot com
Operating system: Linux
PHP version:  5CVS-2004-12-02 (dev)
PHP Bug Type: MySQLi related
Bug description:  Extending a class that extends mysqli

Description:

I'm running into a problem when trying to extend a class that extends
mysqli.  I cannot access any of the properties.  This is related to bug
28430 except here I am extending the class one level further.

Reproduce code:
---
?php
error_reporting(E_ALL);

class a extends mysqli { }

class b extends a { }

$mysqli = new mysqli('localhost', 'username', 'password', 'db');
echo $mysqli-warning_count.\n;

$a = new a('localhost', 'username', 'password', 'db');
echo $a-warning_count.\n;

$b = new b('localhost', 'username', 'password', 'db');
echo $b-warning_count.\n;
?


Expected result:

0
0
0


Actual result:
--
0
0

Notice: Undefined property:  b::$warning_count in /var/www/html/test.php
on line 15

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


#30966 [NEW]: set_attribute with namespace breaks xml

2004-12-02 Thread [EMAIL PROTECTED]
From: [EMAIL PROTECTED]
Operating system: Linux
PHP version:  4.3.9
PHP Bug Type: DOM XML related
Bug description:  set_attribute with namespace breaks xml

Description:

When using $node-set_attribute on a previously existing attribute with a
namespace, the attribute gets doubled rather then updated - interestingly
enough, a second update does update the doubled attribute just fine...

Additionally, $node-remove_attribute('test:attrib'); doesn't work with
the previously existing attribute either while it removes the newly
doubled attribute.

Reproduce code:
---
$dom=domxml_open_mem('?xml version=1.0 ?foo:root
xmlns:test=http://test.de/xml; xmlns:foo=http://test.de/foo;
test:attrib=0 /');

 $root = $dom-document_element();  
 $root-set_attribute('test:attrib','1');
 $root-set_attribute('test:attrib','2');
 
 echo $dom-dump_mem();

Expected result:

?xml version=1.0?
foo:root xmlns:test=http://test.de/xml; xmlns:foo=http://test.de/foo;
test:attrib=2/

Actual result:
--
?xml version=1.0?
foo:root xmlns:test=http://test.de/xml; xmlns:foo=http://test.de/foo;
test:attrib=0 test:attrib=2/


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


#30966 [Opn]: set_attribute with namespace breaks xml

2004-12-02 Thread [EMAIL PROTECTED]
 ID:   30966
 User updated by:  [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
 Status:   Open
 Bug Type: DOM XML related
 Operating System: Linux
 PHP Version:  4.3.9
 New Comment:

LibXML2 Version is 2.6.16


Previous Comments:


[2004-12-02 21:02:00] [EMAIL PROTECTED]

Description:

When using $node-set_attribute on a previously existing attribute with
a namespace, the attribute gets doubled rather then updated -
interestingly enough, a second update does update the doubled
attribute just fine...

Additionally, $node-remove_attribute('test:attrib'); doesn't work with
the previously existing attribute either while it removes the newly
doubled attribute.

Reproduce code:
---
$dom=domxml_open_mem('?xml version=1.0 ?foo:root
xmlns:test=http://test.de/xml; xmlns:foo=http://test.de/foo;
test:attrib=0 /');

 $root = $dom-document_element();  
 $root-set_attribute('test:attrib','1');
 $root-set_attribute('test:attrib','2');
 
 echo $dom-dump_mem();

Expected result:

?xml version=1.0?
foo:root xmlns:test=http://test.de/xml;
xmlns:foo=http://test.de/foo; test:attrib=2/

Actual result:
--
?xml version=1.0?
foo:root xmlns:test=http://test.de/xml;
xmlns:foo=http://test.de/foo; test:attrib=0 test:attrib=2/






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


#30966 [Opn]: set_attribute with namespace breaks xml

2004-12-02 Thread [EMAIL PROTECTED]
 ID:   30966
 User updated by:  [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
 Status:   Open
 Bug Type: DOM XML related
 Operating System: Linux
 PHP Version:  4.3.9
 New Comment:

Just found a workaround to avoid invalid xml:

  $root-remove_attribute('attrib');  

That will remove the original attribute. Yes, without the
namespace-prefix!


Previous Comments:


[2004-12-02 21:03:36] [EMAIL PROTECTED]

LibXML2 Version is 2.6.16



[2004-12-02 21:02:00] [EMAIL PROTECTED]

Description:

When using $node-set_attribute on a previously existing attribute with
a namespace, the attribute gets doubled rather then updated -
interestingly enough, a second update does update the doubled
attribute just fine...

Additionally, $node-remove_attribute('test:attrib'); doesn't work with
the previously existing attribute either while it removes the newly
doubled attribute.

Reproduce code:
---
$dom=domxml_open_mem('?xml version=1.0 ?foo:root
xmlns:test=http://test.de/xml; xmlns:foo=http://test.de/foo;
test:attrib=0 /');

 $root = $dom-document_element();  
 $root-set_attribute('test:attrib','1');
 $root-set_attribute('test:attrib','2');
 
 echo $dom-dump_mem();

Expected result:

?xml version=1.0?
foo:root xmlns:test=http://test.de/xml;
xmlns:foo=http://test.de/foo; test:attrib=2/

Actual result:
--
?xml version=1.0?
foo:root xmlns:test=http://test.de/xml;
xmlns:foo=http://test.de/foo; test:attrib=0 test:attrib=2/






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


#30412 [Fbk-Opn]: Apache Segmentation Fault (11)

2004-12-02 Thread subscription at nazarenko dot net
 ID:   30412
 User updated by:  subscription at nazarenko dot net
 Reported By:  subscription at nazarenko dot net
-Status:   Feedback
+Status:   Open
 Bug Type: OCI8 related
 Operating System: SuSE Linux 8.2
-PHP Version:  5.0.2
+PHP Version:  5.0.3RC1
 New Comment:

Let me confirm it again after some more testing today that I still do
get segfaults, but not that often than before.

Also, let me point out that it seems to be exclusively Apache/PHP
problem. The same script is run from the shell environment with no
problems at all.

Now to the example that you have asked for. It is really simple. In
fact *any* Oracle query will cause occasional browser hanging. Here
is a bit of code I used today for testing:

?php

$db_conn = ocilogon( user, password,
(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=myoracle)(PORT=1521)))(CONNECT_DATA=(SERVICE_NAME=CRPT
 or die(Critical Error: No connection to Oracle!);

$cmdstr = 
SELECT DISTINCT
TRIM(XM.X_MEMBER_ID)  MEMBER_ID,
S.X_MEMBER_IDDBS_ID
FROM
TABLE_SITE_PART  SP,
TABLE_SITE_PART SP2,
TABLE_X_MEMBERDATA   XM,
TABLE_SITES
WHERE
SP2.X_CLASS_KEY = 9
AND SP2.LEVEL_TO_BIN IN (0,1,2,3,4,5)
AND SP2.SITE_PART2SITE_PART = SP.OBJID
AND SP2.X_SITE_PART2MEMBERDATA = XM.OBJID
AND SP.ALL_SITE_PART2SITE = S.OBJID
AND XM.X_STATUS = 'Active'
AND S.STATUS = '0'
ORDER BY
TRIM(XM.X_MEMBER_ID)
;
$parsed = ociparse($db_conn, $cmdstr);
ociexecute($parsed);
$boxrows = ocifetchstatement($parsed, $listbox);
OCIFreeStatement($parsed);

print_r($listbox);

?


Most of the times this would work fine returning me an array of data.
But sometimes the browser would just wait with nothing happening. And
very rarely the page would fail immediately (producing a segfault in
apache's error log)

Hope this helps.


Previous Comments:


[2004-12-02 01:20:38] [EMAIL PROTECTED]

[Thu Dec 02 00:57:47 2004] [warn] child process 18167 still did not
exit, sending a SIGTERM
I don't think PHP/OCI8 is causing this.
I saw this problem many times without OCI8 enabled or even without any
module enabled at all.

Some page loads are unsuccessful, but there
is no segfault! The browser just keeps waiting and waiting 
and nothing

I would be very thankful if you provide tiny reproduce script, that I
can use to reproduce your problem.
happens.



[2004-12-02 01:05:47] subscription at nazarenko dot net

Marking it as open...



[2004-12-02 01:02:06] subscription at nazarenko dot net

Hello again,

Today I tried PHP 5.0.3RC1 with Apache 2.0.52 Worker and Oracle 9.2.0.4
Client for Linux.

I'd say there has been improvement made! But not perfect.
In fact the Bug #28603 which was reported by me some time ago and later
marked as Bogus has been fixed with this new release!!

What I mean is that Apache does not crash on graceful restart anymore.
Even the Apache-Worker behaves fine. I am getting debug messages in the
error log file, but I guess that will be removed in the release
version:

[Thu Dec 02 00:42:28 2004] [notice] Apache/2.0.52 (Linux/SUSE)
configured -- resuming normal operations
[Thu Dec 02 00:43:28 2004] [notice] SIGUSR1 received.  Doing graceful
restart
OCIDebug: START php_mshutdown_ocibr /
OCIDebug: END   php_mshutdown_ocibr /
OCIDebug: START php_mshutdown_ocibr /
OCIDebug: END   php_mshutdown_ocibr /
OCIDebug: START php_mshutdown_ocibr /
OCIDebug: END   php_mshutdown_ocibr /
OCIDebug: START php_mshutdown_ocibr /
OCIDebug: END   php_mshutdown_ocibr /
[Thu Dec 02 00:43:29 2004] [notice] Apache/2.0.52 (Linux/SUSE)
configured -- resuming normal operations
OCIDebug: START php_mshutdown_ocibr /
OCIDebug: END   php_mshutdown_ocibr /
OCIDebug: START php_mshutdown_ocibr /
OCIDebug: END   php_mshutdown_ocibr /

It is somewhat strange that I get some OCIDebug START and END messages
*after* the Apache has started, as shown above.

If I do full restart via /etc/init.d/apache2 restart, then sometimes
I get the following:


OCIDebug: START php_mshutdown_ocibr /
OCIDebug: END   php_mshutdown_ocibr /
OCIDebug: START php_mshutdown_ocibr /
OCIDebug: END   php_mshutdown_ocibr /
OCIDebug: START php_mshutdown_ocibr /
OCIDebug: END   php_mshutdown_ocibr /
[Thu Dec 02 00:57:47 2004] [warn] child process 18167 still did not
exit, sending a SIGTERM
[Thu Dec 02 00:57:47 2004] [warn] child process 18259 still did not
exit, sending a SIGTERM
[Thu Dec 02 00:57:51 2004] [error] child process 18167 still did not
exit, sending a SIGKILL
[Thu Dec 02 

#30965 [Fbk-Opn]: php 5.0.3RC1 fails to compile with freetds

2004-12-02 Thread jon dot bertsch at ucop dot edu
 ID:   30965
 User updated by:  jon dot bertsch at ucop dot edu
 Reported By:  jon dot bertsch at ucop dot edu
-Status:   Feedback
+Status:   Open
 Bug Type: Compile Failure
 Operating System: Mac OS 10.3.6
 PHP Version:  5CVS-2004-12-02 (dev)
 New Comment:

I put the config.log up as a text file at:

webdev.ucop.edu/ph/config.log.txt


Previous Comments:


[2004-12-02 21:19:20] [EMAIL PROTECTED]

Please check in config.log for reasons why it might have failed, if
possible provide a link to it here.



[2004-12-02 17:58:52] jon dot bertsch at ucop dot edu

Description:

When I configure with freetds for mssql configure fails 
with the following warning:

configure: error: Could not find /usr/local/lib/
libtds.a|so

But the file libtds.a exists at /usr/local/lib/libtds.a. 
The identical configure worked for 5.0.0

/usr/local/lib] jonb% ls
libct.2.0.0.dylib   libpng.dylib
libtds.dyliblibxml2.2.6.6.dylib
libct.2.dylib   libpng12.0.1.2.5.dylib  
libtds.la   libxml2.2.dylib
libct.a libpng12.0.dylib
libtdsodbc.0.0.0.dylib  libxml2.a
libct.dylib libpng12.a  
libtdsodbc.0.dylib  libxml2.dylib
libct.lalibpng12.dylib  
libtdsodbc.alibxml2.la
libexslt.0.8.0.dyliblibsybdb.4.0.0.dylib
libtdsodbc.dyliblibxslt.1.1.0.dylib
libexslt.0.dyliblibsybdb.4.dylib
libtdsodbc.la   libxslt.1.dylib
libexslt.a  libsybdb.a  
libtdssrv.1.0.0.dylib   libxslt.a
libexslt.dylib  libsybdb.dylib  
libtdssrv.1.dylib   libxslt.dylib
libexslt.la libsybdb.la 
libtdssrv.a libxslt.la
libpng.3.1.2.5.dyliblibtds.3.0.0.dylib  
libtdssrv.dylib pkgconfig
libpng.3.dylib  libtds.3.dylib  
libtdssrv.laxml2Conf.sh
libpng.alibtds.a
libxml2.2.5.11.dylibxsltConf.sh


I checked the file ext/mssql/config.m4 spelling and it 
seems correct but it is not recognizing the file name 
for some reason.

Without the mssql extension it compiles fine.

By the way, you need a drop-down option for 5.0.3RC1 on 
the form.

Reproduce code:
---

 '--with-mssql=/usr/local'

Actual result:
--
configure fails





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


#30966 [Opn-WFx]: set_attribute with namespace breaks xml

2004-12-02 Thread chregu
 ID:   30966
 Updated by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
-Status:   Open
+Status:   Wont fix
 Bug Type: DOM XML related
 Operating System: Linux
 PHP Version:  4.3.9
 New Comment:

Namespace Support is pretty week in PHP 4...

If your solution works for you, fine. But it's not the DOM way to do
it. It would be -set_attribute_ns($namespaceURL,$attributeName)
But that doesn't exits in domxml in php4

That's all fixed in php5 and dom.



Previous Comments:


[2004-12-02 21:07:00] [EMAIL PROTECTED]

Just found a workaround to avoid invalid xml:

  $root-remove_attribute('attrib');  

That will remove the original attribute. Yes, without the
namespace-prefix!



[2004-12-02 21:03:36] [EMAIL PROTECTED]

LibXML2 Version is 2.6.16



[2004-12-02 21:02:00] [EMAIL PROTECTED]

Description:

When using $node-set_attribute on a previously existing attribute with
a namespace, the attribute gets doubled rather then updated -
interestingly enough, a second update does update the doubled
attribute just fine...

Additionally, $node-remove_attribute('test:attrib'); doesn't work with
the previously existing attribute either while it removes the newly
doubled attribute.

Reproduce code:
---
$dom=domxml_open_mem('?xml version=1.0 ?foo:root
xmlns:test=http://test.de/xml; xmlns:foo=http://test.de/foo;
test:attrib=0 /');

 $root = $dom-document_element();  
 $root-set_attribute('test:attrib','1');
 $root-set_attribute('test:attrib','2');
 
 echo $dom-dump_mem();

Expected result:

?xml version=1.0?
foo:root xmlns:test=http://test.de/xml;
xmlns:foo=http://test.de/foo; test:attrib=2/

Actual result:
--
?xml version=1.0?
foo:root xmlns:test=http://test.de/xml;
xmlns:foo=http://test.de/foo; test:attrib=0 test:attrib=2/






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


#30968 [NEW]: Incorrect foreach() behavior

2004-12-02 Thread cow at neondragon dot net
From: cow at neondragon dot net
Operating system: Windows XP
PHP version:  4.3.10RC1
PHP Bug Type: Arrays related
Bug description:  Incorrect foreach() behavior

Description:

I'm pretty sure this isn't supposed to happen - it didn't happen with
earlier versions of PHP, and nothing in the manual documents it. It
happens with the RC of 4.3.10. 

Reproduce code:
---
?php
$foo = array(1,2,3);
foreach ($foo as $i) {
print_r($i);
}

/*
Result of code:
Array ( [0] = 1 [1] = 0 )
Array ( [0] = 2 [1] = 1 )
Array ( [0] = 3 [1] = 2 )
*/
?

Expected result:

The string 1, then string 2, then string 3 - not arrays each time.


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


#30968 [Opn-Fbk]: Incorrect foreach() behavior

2004-12-02 Thread derick
 ID:   30968
 Updated by:   [EMAIL PROTECTED]
 Reported By:  cow at neondragon dot net
-Status:   Open
+Status:   Feedback
 Bug Type: Arrays related
 Operating System: Windows XP
 PHP Version:  4.3.10RC1
 New Comment:

Works fine here, please remove all Zend extensions from your
configuration, and try again.


Previous Comments:


[2004-12-02 23:30:33] cow at neondragon dot net

Description:

I'm pretty sure this isn't supposed to happen - it didn't happen with
earlier versions of PHP, and nothing in the manual documents it. It
happens with the RC of 4.3.10. 

Reproduce code:
---
?php
$foo = array(1,2,3);
foreach ($foo as $i) {
print_r($i);
}

/*
Result of code:
Array ( [0] = 1 [1] = 0 )
Array ( [0] = 2 [1] = 1 )
Array ( [0] = 3 [1] = 2 )
*/
?

Expected result:

The string 1, then string 2, then string 3 - not arrays each time.






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


#30969 [NEW]: XSLTProcessor Not Recognizing DOMDocument Root

2004-12-02 Thread c dot d at earthlink dot net
From: c dot d at earthlink dot net
Operating system: Mac OS X 10.3.6
PHP version:  5.0.2
PHP Bug Type: XSLT related
Bug description:  XSLTProcessor Not Recognizing DOMDocument Root

Description:

If xml is created via a DOMDocument and then sent to a XSLTProcessor with
a XSL file, the following xsl code doesn't  find the root node:
xsl:template match=/
   xsl:value-of select=childofroot/
/xsl:template

You have to create a template for the root element (using it's name) and
use an apply-templates tag instead of value-of tag(s) in the root template
(such as above).

If identical xml is loaded from a file via DOMDocument-load the XSLT
processor processes the root element correctly.

Reproduce code:
---
?php
$temp_DOM = new DomDocument(1.0);
$root = $temp_DOM-createElement(root);
$root = $temp_DOM-appendChild($root);
$element = $temp_DOM-createElement(fullname);
$element = $root-appendChild($element);
$text = $temp_DOM-createTextNode(John Doe);
$text = $element-appendChild($text);
$xsl_DOM = new DOMDocument;
$xsl_DOM-load(test.xsl);
$xslt = new XSLTProcessor();
$xslt-importStylesheet($xsl_DOM);
echo $xslt-transformToXML($temp_DOM);
?

Contents of XSL File

?xml version=1.0 encoding=ISO-8859-1?
xsl:stylesheet xmlns:xsl=http://www.w3.org/1999/XSL/Transform;
version=1.0
xsl:output method=xml/
xsl:template match=/
xsl:value-of select=fullname/
/xsl:template
/xsl:stylesheet

Expected result:

Should output xml declaration and value of fullname element.

Actual result:
--
Only outputs xml declaration. Value of fullname element is not output.

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


#30970 [NEW]: 32bits not supported?

2004-12-02 Thread wboring at qualys dot com
From: wboring at qualys dot com
Operating system: linux
PHP version:  5.0.2
PHP Bug Type: Scripting Engine problem
Bug description:  32bits not supported?

Description:

If I set an integer to a value of 0x8000, it works properly in php4,
but in php5 the value becomes 0x7FFF.


My configure line:
./configure \
--with-oci8=/u01/app/oracle/product/8.1.7 \
--enable-sigchild \
--with-mcrypt \
--with-gd \
--with-png-dir=/usr \
--with-jpeg-dir=/usr \
--with-zlib-dir=/usr \
--enable-sysvsem \
--enable-sysvshm \
--enable-shmop \
--with-xml \
--with-zlib \
--with-gdbm \
--with-dom \
--with-curl=/usr \
--with-mysql=/usr \
--enable-mbstring \
--enable-tokenizer \
--enable-sockets \
--with-kerberos=/usr/kerberos \
--with-openssl \
--disable-cgi \
--with-xsl \
--with-bz2 \
--with-mhash \
--enable-soap \
--with-flatfile \
--with-inifile \
--with-curlwrappers \
--with-apxs=/usr/local/apache/bin/apxs







Reproduce code:
---
?php
  $n = 0x8000;
  printf('%b', $n);
?


Expected result:

php4.3.9: 1000
php5.0.2: 1000
 

Actual result:
--
php4.3.9: 1000
php5.0.2: 111

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


#30971 [NEW]: highlight_string chokes bad when parsing strings containing newline escapes

2004-12-02 Thread jed at jed dot bz
From: jed at jed dot bz
Operating system: *
PHP version:  Irrelevant
PHP Bug Type: Unknown/Other Function
Bug description:  highlight_string chokes bad when parsing strings containing 
newline escapes

Description:

Bug 25725 was marked bogus due to a bad example. I am reopening it here
because this is a particularly annoying bug that needs to be fixed,
regardless of 'this is not an issue' sentiment within the PHP community.

When the highlight_string() engine encounters ANY \ character, even one
prefixing an escape like \n (which are LEGAL, as some astute Quick Fix
posters have ignored), the parser interjects warnings into
highlight_string()'s output. The catch? This only happens randomly.

We rely on highlight_string() for our IRC pastebin, and I am sure this
function is used a lot elsewhere. I have submitted another entry to our
pastebin and was quite disappointed to see the bug's problem at once:

 http://labs.jed.bz/phpbug3.png
  Screenshot taken from
 http://dalphp.shoggoth.net/pastebin_view.php?533

I have highlighted the problem for the QA reviewers with itchy Quick Fix
fingers. Notice the 'n' sitting on a line all by itself? That's the back
end of a \n sequence, and the PHP parser is erring on the \ itself. It's
as if the tokenizer, when used under highlight_string(), isn't glomming \
onto its following character.

It is also only doing it on some newlines. As you can see, the newlines
next to '019' (the bottom of the highlight) are parsed fine! As you can
also see, the colors in the rest of the code, even on keywords that should
be highlighted green like 'static' and 'function', are all messed up.

This isn't the first time we've run into this. I've taken screenshots to
append to Bug 25725, but they were ignored as well. I rewind and replay
them here for community benefit.

   CORRECT: http://labs.jed.bz/phpbug2.png
   NOT: http://labs.jed.bz/phpbug.png
Source URL: http://dalphp.shoggoth.net/pastebin_view.php?356

Nothing changed on the server between these two requests. I just refreshed
until the output changed. And these are legal newlines. The example on Bug
25725 brought the itchy Quick Fix fingers out, but the submitter presented
a valid point, which I reiterate here.

Highlighted fine:

$x = 0
$y = 1
$z = 2

Not highlighted fine:

$x = 0;
\;
$z = 2;

And as I've demonstrated, this isn't highlighted fine either:

printf(\n);

The randomness of this problem suggests a leak or black magic within PHP
itself, and I have a gut feeling this is a little more problematic than it
appears at first hand. The reproduce code below is what is supposed to be
highlighted in phpbug3.png.

Note: Do not flood dalphp.shoggoth.net with refresh requests, trust my
screenshots.

Reproduce code:
---
?php
/**
 * The beefiest exceptioner evar.
 */

public static function ErrorHandler(Exception $e) {
// FIXME //
if(file_exists($e-getFile())) {
$line = file($e-getFile());
$line = trim($line[$e-getLine() - 1]);
}
else $line = ?;
printf(\n\nSTOP. Uncaught exception \%s\ in %s:%u\n .
   %s\n .
  Message: (%u) %s\n  Backtrace:\n, get_class($e),
$e-getFile(),
$e-GetLine(), $line, $e-getCode(), $e-getMessage());
$i = 0;
foreach($e-getTrace() as $bt)
printf( (#%u) %s()\n, ++$i, $bt['class'] . $bt['type'] .
$bt['function'],
$bt['file'], $bt['line']);

printf(\n\n);
exit(0xFE);
} 

Expected result:

http://labs.jed.bz/phpbug4.png

Actual result:
--
http://labs.jed.bz/phpbug3.png
(Sporadically)

-- 
Edit bug report at http://bugs.php.net/?id=30971edit=1
-- 
Try a CVS snapshot (php4):   http://bugs.php.net/fix.php?id=30971r=trysnapshot4
Try a CVS snapshot (php5.0): 
http://bugs.php.net/fix.php?id=30971r=trysnapshot50
Try a CVS snapshot (php5.1): 
http://bugs.php.net/fix.php?id=30971r=trysnapshot51
Fixed in CVS:http://bugs.php.net/fix.php?id=30971r=fixedcvs
Fixed in release:http://bugs.php.net/fix.php?id=30971r=alreadyfixed
Need backtrace:  http://bugs.php.net/fix.php?id=30971r=needtrace
Need Reproduce Script:   http://bugs.php.net/fix.php?id=30971r=needscript
Try newer version:   http://bugs.php.net/fix.php?id=30971r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=30971r=support
Expected behavior:   http://bugs.php.net/fix.php?id=30971r=notwrong
Not enough info: 
http://bugs.php.net/fix.php?id=30971r=notenoughinfo
Submitted twice: 
http://bugs.php.net/fix.php?id=30971r=submittedtwice
register_globals:http://bugs.php.net/fix.php?id=30971r=globals
PHP 3 support discontinued:  http://bugs.php.net/fix.php?id=30971r=php3
Daylight Savings:http://bugs.php.net/fix.php?id=30971r=dst
IIS Stability:   http://bugs.php.net/fix.php?id=30971r=isapi
Install GNU Sed: 

#30831 [Fbk-NoF]: fwrite

2004-12-02 Thread php-bugs
 ID:   30831
 Updated by:   [EMAIL PROTECTED]
 Reported By:  parser at 21cn dot com
-Status:   Feedback
+Status:   No Feedback
 Bug Type: Filesystem function related
 Operating System: redhat linux
 PHP Version:  4.3.8
 New Comment:

No feedback was provided for this bug for over a week, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to Open.


Previous Comments:


[2004-11-18 21:52:41] [EMAIL PROTECTED]

Thank you for this bug report. To properly diagnose the problem, we
need a short but complete example script to be able to reproduce
this bug ourselves. 

A proper reproducing script starts with ?php and ends with ?,
is max. 10-20 lines long and does not require any external 
resources such as databases, etc.

If possible, make the script source available online and provide
an URL to it here. Try avoid embedding huge scripts into the report.





[2004-11-18 17:30:58] parser at 21cn dot com

Description:

PHP version:php-4.3.4
BUG:The function fwrite()
use fwrite() will have error,but use error_log() is right

Reproduce code:
---
$handle=fopen($DirName.src_visit.txt,a);
$rs=fwrite($handle, $LOG_STRING);
fflush($handle);
fclose($handle);


Expected result:

Don't always like this(error):

2004111215  d41d8cd98f00b204e9800998ecf8427e

5   3   3   http://wap.unimoco.cn/hj/index.jsp  
wap.unimoco.cn  /hj/index.jsp   ID=3ROOTID=5ColumnID=33   
Mozilla/4.0
(compatible; MSIE 6.0; Windows NT 5.0; MyIE2)


Actual result:
--
The right result same to :


20041112151233  NULL133 459 12055   13525   0   
http://wap.unimoco.cn/hj/list.jsp   wap.unimoco.cn  /hj/list.jsp
FeeFlag=hjID=13525ROOTID=12055PT=12055   13677   0   
http://wap.unimoco.cn/hj/list.jsp   wap.unimoco.cn  /hj/list.jsp
FeeFlag=hjID=13677ROOTID=12055PT=2   MOT-C510/1.01
UP.Browser/6.2.2.5 (GUI) MMP/1.0 UP.Link/5.1.2.9






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


#30970 [Opn]: 32bits not supported?

2004-12-02 Thread wboring at qualys dot com
 ID:   30970
 User updated by:  wboring at qualys dot com
 Reported By:  wboring at qualys dot com
 Status:   Open
 Bug Type: Scripting Engine problem
 Operating System: linux
 PHP Version:  5.0.2
 New Comment:

If I do a simple var_dump( 0x8000 ); in php4 and 5 I get the same
result of float(2147483648).

If I try and do something like

$n ^= 0x8000;  //to flip the high bit, then it breaks.

?php 
  $n = -1979053311;
  var_dump( sprintf('%32b',$n).'  '.$n);
  $n ^= 0x8000; // flip the high (sign) bit
  var_dump( sprintf('%32b',$n).'  '.$n );
?

php4.3.9 : 
string(45) 10001010101010110001  -1979053311
string(43) 1010101010110001  168430337

php5.0.2 :
string(32) 10001010101010110001  -1979053311 
string(44) 0101010101001110 -168430338


Previous Comments:


[2004-12-03 00:46:39] wboring at qualys dot com

Description:

If I set an integer to a value of 0x8000, it works properly in
php4, but in php5 the value becomes 0x7FFF.


My configure line:
./configure \
--with-oci8=/u01/app/oracle/product/8.1.7 \
--enable-sigchild \
--with-mcrypt \
--with-gd \
--with-png-dir=/usr \
--with-jpeg-dir=/usr \
--with-zlib-dir=/usr \
--enable-sysvsem \
--enable-sysvshm \
--enable-shmop \
--with-xml \
--with-zlib \
--with-gdbm \
--with-dom \
--with-curl=/usr \
--with-mysql=/usr \
--enable-mbstring \
--enable-tokenizer \
--enable-sockets \
--with-kerberos=/usr/kerberos \
--with-openssl \
--disable-cgi \
--with-xsl \
--with-bz2 \
--with-mhash \
--enable-soap \
--with-flatfile \
--with-inifile \
--with-curlwrappers \
--with-apxs=/usr/local/apache/bin/apxs







Reproduce code:
---
?php
  $n = 0x8000;
  printf('%b', $n);
?


Expected result:

php4.3.9: 1000
php5.0.2: 1000
 

Actual result:
--
php4.3.9: 1000
php5.0.2: 111





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


#30946 [Opn-Csd]: Cant rename directories across partitions

2004-12-02 Thread iliaa
 ID:   30946
 Updated by:   [EMAIL PROTECTED]
 Reported By:  paul at paulbaranowski dot org
-Status:   Open
+Status:   Closed
 Bug Type: Filesystem function related
 Operating System: Redhat Enterprise Linux v3.0
 PHP Version:  4.3.8
 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:


[2004-11-30 22:02:50] paul at paulbaranowski dot org

# mkdir /tmp/test
# touch /tmp/test/foo.txt
# emacs test.php
?
rename(/tmp/test, /root/test);
?

# /usr/local/php-4.3.8/bin/php test.php

Warning: rename(/tmp/test,/root/test): Is a directory in /root/test.php
on line 2.

(A empty file test has now been created in /root directory)
# rm test
# mkdir /root/test
# touch /root/test/foo.txt
# emacs test.php
?
rename(/root/test, /root/test2);
?
# /usr/local/php-4.3.8/bin/php test.php
( /root/test directory renamed to /root/test2)

# emacs test.php
?
rename(/tmp/test, /tmp/test2);
?
# /usr/local/php-4.3.8/bin/php test.php
(/tmp/test directory renamed to /tmp/test2)



[2004-11-30 21:52:20] [EMAIL PROTECTED]

Please, provide a reproduce code so we can reproduce it ourselves.



[2004-11-30 21:37:21] paul at paulbaranowski dot org

I tried it with that snapshot and the problem is still there.



[2004-11-30 19:12:59] [EMAIL PROTECTED]

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





[2004-11-30 19:06:57] paul at paulbaranowski dot org

Description:

The rename function says that renaming across partitions was fixed in
4.3.3, but it appears that it is broken in 4.3.8.

I have three partitions on my system:
/
/dev/shm
/tmp

I'm not sure if it matters, but the disk is mirrored with RAID level
1.

Trying to rename a directory that resides in /tmp to the / file
system results in:

Warning: rename(from, to): Is a directory in script on line
XX.

and the to directory name is created as an empty file.

I moved the from directory to the / partition and then tried the
rename again (using the same PHP code) and everything worked fine.








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


#30962 [Opn-Csd]: Space being returned for NULL columns

2004-12-02 Thread iliaa
 ID:   30962
 Updated by:   [EMAIL PROTECTED]
 Reported By:  richard dot quadling at bandvulc dot co dot uk
-Status:   Open
+Status:   Closed
 Bug Type: MSSQL related
 Operating System: Windows XP Pro SP2
 PHP Version:  5.0.2
 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:


[2004-12-02 14:36:14] richard dot quadling at bandvulc dot co dot uk

Description:

This bug has been reported before but repeatedly closed as a bogus
bug.

It is NOT bogus. It is NOT a problem in the library. It IS a bug in the
PHP code.

The problem is for any column where the content is NULL, the value
retrieved by PHP is ' '. That is a single space.

The bug is in php_mssql.c (/* $Id: php_mssql.c,v 1.137.2.4 2004/11/15
23:35:50 iliaa Exp $ */)

Lines 798 to 810 are currently ...

case SQLTEXT: {
int length;
char *data = charcol(offset);

length=dbdatlen(mssql_ptr-link,offset);
#if ilia_0
while (length0  data[length-1] == ' ') { /* nuke 
trailing
whitespace */
length--;
}
#endif
ZVAL_STRINGL(result, data, length, 1); 
break;
}


The problem is that length is never tested to see if it is zero, as
per the Microsoft documentation (Online books and look for dbdata). It
says ...

dbdata ... returns a BYTE pointer to the data for the column. A NULL
BYTE pointer is returned if there is no such column or if the data has
a null value. To make sure that the data is really a null value, check
for a return of 0 from dbdatlen.

and ...

Remarks. The data is not null-terminated. To get the length of the
data, use dbdatlen.

I would propose that the php_mssql.c code would be as follows ...

case SQLTEXT: {
int length;
char *data = charcol(offset);

length=dbdatlen(mssql_ptr-link,offset);
if (length == 0) {
ZVAL_EMPTY_STRING(result); // Force the return 
of an empty string
if the length is 0 as data MAY not be NULL.
} else {
#if ilia_0
while (length0  data[length-1] == ' ') { /* 
nuke trailing
whitespace */
length--;
}
#endif  ZVAL_STRINGL(result, data, length, 1); 
}
break;
}


Unfortunately, I am not in a position to test this (well, I have
MSVC++V6.0 Standard, but cannot get PHP to compile. I am not very
familiar with MSVC++ and its setup to know what is missing).

If someone can explain how I can submit this to the actual source
online for compilation, then I'd be very grateful.

I'd be even more grateful if someone could help me get PHP compiled.
Even money may be sent, though I'd rather buy beer or something fizzy
for the ladies.


This possible fix does not interfere with the removing of trailing
spaces, though I wonder what would happen if 


Regards,

Richard Quadling.






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


#30972 [NEW]: Casting an empty single node SimpleXML object to boolean returns false

2004-12-02 Thread dtorop932 at gmail dot com
From: dtorop932 at gmail dot com
Operating system: GNU/Linux 2.4.27
PHP version:  5CVS-2004-12-03 (dev)
PHP Bug Type: SimpleXML related
Bug description:  Casting an empty single node SimpleXML object to boolean 
returns false

Description:

According to http://www.php.net/manual/en/language.types.boolean.php it
seems that in PHP 5 all objects should return TRUE when cast to boolean. 
But if one creates a SimpleXML object from the string 'goodxml/', then
casts it to boolean, the result is FALSE.

As a comparison, running DOMDocument::loadxml() on goodxml/ and
casting the result to boolean returns TRUE.

This is important if one is doing what seems to be a quick test for
failure of SimpleXML parsing, e.g. the following doesn't work as
expected:

if (!simplexml_load_string($anyxml)) {
  return FALSE;  // this always executes, even for good XML
}

Reproduce code:
---
?php
foreach (array('badxml', 'goodxml/', 'goodxmlCONTENT/goodxml') as
$xml) {
  $dom = @simplexml_load_string($xml);
  print \n\$dom from '$xml'\n;
  print '  ((boolean) $dom) = '; var_dump((boolean) $dom);
}
?


Expected result:


$dom from 'badxml'
  ((boolean) $dom) = bool(false)

$dom from 'goodxml/'
  ((boolean) $dom) = bool(true)

$dom from 'goodxmlCONTENT/goodxml'
  ((boolean) $dom) = bool(true)


Actual result:
--

$dom from 'badxml'
  ((boolean) $dom) = bool(false)

$dom from 'goodxml/'
  ((boolean) $dom) = bool(false)

$dom from 'goodxmlCONTENT/goodxml'
  ((boolean) $dom) = bool(true)


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


#30970 [Opn-Csd]: 32bits not supported?

2004-12-02 Thread pollita
 ID:   30970
 Updated by:   [EMAIL PROTECTED]
 Reported By:  wboring at qualys dot com
-Status:   Open
+Status:   Closed
 Bug Type: Scripting Engine problem
 Operating System: linux
 PHP Version:  5.0.2
 New Comment:

Yes PHP supports 32-bit ints, but the higest bit is a sign, so the
largest meaningful int *IS* 0x7FFF, after that the number must be
expressed as a float, attempting to express as a long results in
undefined behavior.

5.0.2 introduced a patch to truncate float to lval conversion to no
more than 0x7FFF.  Don't worry, it's been reverted.  Take a look at
5.0.3RC1 or a snapshot from snaps.php.net



Previous Comments:


[2004-12-03 01:36:34] wboring at qualys dot com

If I do a simple var_dump( 0x8000 ); in php4 and 5 I get the same
result of float(2147483648).

If I try and do something like

$n ^= 0x8000;  //to flip the high bit, then it breaks.

?php 
  $n = -1979053311;
  var_dump( sprintf('%32b',$n).'  '.$n);
  $n ^= 0x8000; // flip the high (sign) bit
  var_dump( sprintf('%32b',$n).'  '.$n );
?

php4.3.9 : 
string(45) 10001010101010110001  -1979053311
string(43) 1010101010110001  168430337

php5.0.2 :
string(32) 10001010101010110001  -1979053311 
string(44) 0101010101001110 -168430338



[2004-12-03 00:46:39] wboring at qualys dot com

Description:

If I set an integer to a value of 0x8000, it works properly in
php4, but in php5 the value becomes 0x7FFF.


My configure line:
./configure \
--with-oci8=/u01/app/oracle/product/8.1.7 \
--enable-sigchild \
--with-mcrypt \
--with-gd \
--with-png-dir=/usr \
--with-jpeg-dir=/usr \
--with-zlib-dir=/usr \
--enable-sysvsem \
--enable-sysvshm \
--enable-shmop \
--with-xml \
--with-zlib \
--with-gdbm \
--with-dom \
--with-curl=/usr \
--with-mysql=/usr \
--enable-mbstring \
--enable-tokenizer \
--enable-sockets \
--with-kerberos=/usr/kerberos \
--with-openssl \
--disable-cgi \
--with-xsl \
--with-bz2 \
--with-mhash \
--enable-soap \
--with-flatfile \
--with-inifile \
--with-curlwrappers \
--with-apxs=/usr/local/apache/bin/apxs







Reproduce code:
---
?php
  $n = 0x8000;
  printf('%b', $n);
?


Expected result:

php4.3.9: 1000
php5.0.2: 1000
 

Actual result:
--
php4.3.9: 1000
php5.0.2: 111





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


#30969 [Opn-Bgs]: XSLTProcessor Not Recognizing DOMDocument Root

2004-12-02 Thread chregu
 ID:   30969
 Updated by:   [EMAIL PROTECTED]
 Reported By:  c dot d at earthlink dot net
-Status:   Open
+Status:   Bogus
 Bug Type: XSLT related
 Operating System: Mac OS X 10.3.6
 PHP Version:  5.0.2
 New Comment:

Your XSLT is wrong.. It needs to be 

xsl:value-of select=root/fullname/

Your approach doesn't even work with xsltproc on the commandline.

and
If identical xml is loaded from a file via DOMDocument-load the XSLT
processor processes the root element correctly.

Definitively not here on my system 


Previous Comments:


[2004-12-03 00:46:35] c dot d at earthlink dot net

Description:

If xml is created via a DOMDocument and then sent to a XSLTProcessor
with a XSL file, the following xsl code doesn't  find the root node:
xsl:template match=/
   xsl:value-of select=childofroot/
/xsl:template

You have to create a template for the root element (using it's name)
and use an apply-templates tag instead of value-of tag(s) in the root
template (such as above).

If identical xml is loaded from a file via DOMDocument-load the XSLT
processor processes the root element correctly.

Reproduce code:
---
?php
$temp_DOM = new DomDocument(1.0);
$root = $temp_DOM-createElement(root);
$root = $temp_DOM-appendChild($root);
$element = $temp_DOM-createElement(fullname);
$element = $root-appendChild($element);
$text = $temp_DOM-createTextNode(John Doe);
$text = $element-appendChild($text);
$xsl_DOM = new DOMDocument;
$xsl_DOM-load(test.xsl);
$xslt = new XSLTProcessor();
$xslt-importStylesheet($xsl_DOM);
echo $xslt-transformToXML($temp_DOM);
?

Contents of XSL File

?xml version=1.0 encoding=ISO-8859-1?
xsl:stylesheet xmlns:xsl=http://www.w3.org/1999/XSL/Transform;
version=1.0
xsl:output method=xml/
xsl:template match=/
xsl:value-of select=fullname/
/xsl:template
/xsl:stylesheet

Expected result:

Should output xml declaration and value of fullname element.

Actual result:
--
Only outputs xml declaration. Value of fullname element is not
output.





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


#30952 [Opn-Bgs]: libpng.so.3 error after compiling php5.0.3rc1 with gd

2004-12-02 Thread jorton
 ID:   30952
 Updated by:   [EMAIL PROTECTED]
 Reported By:  iansutherland75 at gmail dot com
-Status:   Open
+Status:   Bogus
 Bug Type: GD related
 Operating System: Fedora Core 3
 PHP Version:  5.0.2
 New Comment:

That's an SELinux labelling issue - run: 

 # fixfiles restore

or disable enforcement of the Apache/SELinux policy:

 # setsebool httpd_disable_trans 1



Previous Comments:


[2004-12-01 20:44:34] iansutherland75 at gmail dot com

Description:

I get this error message whenever I try to start apache now that I've
compiled PHP5.0.3rc1 with GD. 



quote: 


Failed to start apache : 
Starting httpd: Syntax error on line 190 of /etc/httpd/conf/httpd.conf:

Cannot load /usr/lib/httpd/modules/libphp5.so into server: libpng.so.3:
failed to map segment from shared object: Permission denied 
[FAILED] 





My server is Fedora core 3, and I've got libgd, libgd-devel,
libgd-progs, libpng, libpng-devel, libjpeg, and libjpeg-devel all
installed. 

I've confirmed that libpng.so.3 is in my /usr/lib/ folder and I even
chmod'd it to 777 to make sure I had ok permissions. 








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


#30967 [Opn-Csd]: Extending a class that extends mysqli

2004-12-02 Thread georg
 ID:   30967
 Updated by:   [EMAIL PROTECTED]
 Reported By:  rbro at hotmail dot com
-Status:   Open
+Status:   Closed
 Bug Type: MySQLi related
 Operating System: Linux
 PHP Version:  5CVS-2004-12-02 (dev)
 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:


[2004-12-02 21:34:42] rbro at hotmail dot com

Description:

I'm running into a problem when trying to extend a class that extends
mysqli.  I cannot access any of the properties.  This is related to bug
28430 except here I am extending the class one level further.

Reproduce code:
---
?php
error_reporting(E_ALL);

class a extends mysqli { }

class b extends a { }

$mysqli = new mysqli('localhost', 'username', 'password', 'db');
echo $mysqli-warning_count.\n;

$a = new a('localhost', 'username', 'password', 'db');
echo $a-warning_count.\n;

$b = new b('localhost', 'username', 'password', 'db');
echo $b-warning_count.\n;
?


Expected result:

0
0
0


Actual result:
--
0
0

Notice: Undefined property:  b::$warning_count in
/var/www/html/test.php on line 15





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