#32075 [NEW]: sockets do not detect disconnect

2005-02-22 Thread mike_harris02135 at yahoo dot com
From: mike_harris02135 at yahoo dot com
Operating system: linux
PHP version:  4.3.10
PHP Bug Type: Sockets related
Bug description:  sockets do not detect disconnect

Description:

Ive been on the forums and noone seems to be able to help with this.

Im writing a jabber client with php.  I connect to the server, send a
message, sleep for 20 seconds (kill the server during this time), then
send another message, and the code used to send the message does not
report any error.

Reproduce code:
---
function WriteToSocket($data)
{
echo "\nIn WriteToSocket: $data\n";
echo "-Socket = " . $this->socket . "\n";

if(socket_last_error($this->socket))
{
print "Detected error\n";
echo socket_strerror(socket_clear_error($this->socket));
}


return socket_write($this->socket, $data, strlen($data));

}

Expected result:

i expect socket_last_error to report that the socket was closed
unexpectedly.  Incidently, when I create the socket i always get an error
with unknown error code, but the server receives the message just fine. 
Or the socket_write method would return 0, or the socket reference would
be null.

Actual result:
--
The code does not indicate any error, and reports that n bytes were
written.

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


#32060 [Opn->Fbk]: configure host type detection broken

2005-02-22 Thread sniper
 ID:   32060
 Updated by:   [EMAIL PROTECTED]
 Reported By:  dg at orbhost dot net
-Status:   Open
+Status:   Feedback
 Bug Type: Compile Failure
 Operating System: tru64 5.1b
 PHP Version:  4CVS-2005-02-22 (stable)
 New Comment:

I was really interested in the whole output, so let's try this again:

#/bin/sh -x configure 2> debug.txt

And send debug.txt file to me via email.

!!!DO NOT add that huge file to this bug report!!!



Previous Comments:


[2005-02-23 04:56:14] dg at orbhost dot net

/bin/sh -x configure tries to display the help info and ends in this:

Libtool:

  --enable-shared[=PKGS]  build shared libraries [default=yes]
  --enable-static[=PKGS]  build static libraries [default=yes]
  --enable-fast-install[=PKGS]  optimize for fast installation
[default=yes]
  --with-gnu-ld   assume the C compiler uses GNU ld
[default=no]
+ test X != Xset 
+ uname 
UNAME=OSF1
lt_cv_sys_path_separator=:
PATH_SEPARATOR=:
SHELL=/bin/sh
echo=echo
+ test X = X--no-reexec 
+ test X = X--fallback-echo 
+ test X = X\t 
+ exec /bin/sh configure --no-reexec 
loading cache ./config.cache
checking host system type... configure: error: can not guess host type;
you must specify one



[2005-02-23 04:53:18] dg at orbhost dot net

sorry, I didn't think about running config.guess, it does guess:

alphaev56-dec-osf5.1

which is the right one



[2005-02-23 04:52:11] [EMAIL PROTECTED]

And if that above command works, run this:

# /bin/sh -x configure




[2005-02-23 04:30:19] [EMAIL PROTECTED]

Let's try again: What does this command _output_ when you run it:

# ./config.guess





[2005-02-22 17:28:59] dg at orbhost dot net

I just grabbed the snapshot php4-STABLE-200502221530.tar.gz
I'm not changing anything in config.guess or anything else.
here's how far it goes:

creating cache ./config.cache
checking host system type... configure: error: can not guess host type;
you must specify one

and config.log has just this:

configure:1653: checking host system type

the host type that should be detected usually is:

alphaev56-dec-osf5.1

If I'm feeding it to the configure line then it allows it to proceed.

What else should I try to track this problem?



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

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


#32060 [Opn]: configure host type detection broken

2005-02-22 Thread dg at orbhost dot net
 ID:   32060
 User updated by:  dg at orbhost dot net
 Reported By:  dg at orbhost dot net
 Status:   Open
 Bug Type: Compile Failure
 Operating System: tru64 5.1b
 PHP Version:  4CVS-2005-02-22 (stable)
 New Comment:

/bin/sh -x configure tries to display the help info and ends in this:

Libtool:

  --enable-shared[=PKGS]  build shared libraries [default=yes]
  --enable-static[=PKGS]  build static libraries [default=yes]
  --enable-fast-install[=PKGS]  optimize for fast installation
[default=yes]
  --with-gnu-ld   assume the C compiler uses GNU ld
[default=no]
+ test X != Xset 
+ uname 
UNAME=OSF1
lt_cv_sys_path_separator=:
PATH_SEPARATOR=:
SHELL=/bin/sh
echo=echo
+ test X = X--no-reexec 
+ test X = X--fallback-echo 
+ test X = X\t 
+ exec /bin/sh configure --no-reexec 
loading cache ./config.cache
checking host system type... configure: error: can not guess host type;
you must specify one


Previous Comments:


[2005-02-23 04:53:18] dg at orbhost dot net

sorry, I didn't think about running config.guess, it does guess:

alphaev56-dec-osf5.1

which is the right one



[2005-02-23 04:52:11] [EMAIL PROTECTED]

And if that above command works, run this:

# /bin/sh -x configure




[2005-02-23 04:30:19] [EMAIL PROTECTED]

Let's try again: What does this command _output_ when you run it:

# ./config.guess





[2005-02-22 17:28:59] dg at orbhost dot net

I just grabbed the snapshot php4-STABLE-200502221530.tar.gz
I'm not changing anything in config.guess or anything else.
here's how far it goes:

creating cache ./config.cache
checking host system type... configure: error: can not guess host type;
you must specify one

and config.log has just this:

configure:1653: checking host system type

the host type that should be detected usually is:

alphaev56-dec-osf5.1

If I'm feeding it to the configure line then it allows it to proceed.

What else should I try to track this problem?



[2005-02-22 08:29:30] [EMAIL PROTECTED]

What does this command run in the source directory output:

# ./config.guess




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

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


#27633 [Opn->Fbk]: Double \r problem on ftp_get in ASCII mode on Win32

2005-02-22 Thread sniper
 ID:   27633
 Updated by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
-Status:   Open
+Status:   Feedback
 Bug Type: FTP related
 Operating System: win32 only
 PHP Version:  4CVS, 5CVS (2005-02-22)
 Assigned To:  iliaa
 New Comment:

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

There was some problem with win32 snapshots again..



Previous Comments:


[2005-02-21 12:20:51] [EMAIL PROTECTED]

I can't see any change:

\n becomes \r\r on 5.1.0-dev (200502210730)
\n becomes \r\r on 5.0.4-dev (200502210930)
\n becomes \r\r\n on 4.3.11-dev (200502210530)

last \n becomes \r\r\n on 5.



[2005-02-17 16:38:41] [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.





[2005-02-03 03:20:09] [EMAIL PROTECTED]

http://www.binam.net/bug-27633.patch




[2004-03-18 07:27:30] [EMAIL PROTECTED]

Description:

ftp_get() translates \n characters wrong in FTP_ASCII mode. Instead of
\r\n, they become \r on Windows. Only newline at the end of a file (if
any) is translated correct.

\r\n on remote server become \r\r.

Reproduce code:
---



Expected result:

\r\nWelcome ...\r\n

Actual result:
--
\rWelcome ...\r\n





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


#32060 [Fbk->Opn]: configure host type detection broken

2005-02-22 Thread dg at orbhost dot net
 ID:   32060
 User updated by:  dg at orbhost dot net
 Reported By:  dg at orbhost dot net
-Status:   Feedback
+Status:   Open
 Bug Type: Compile Failure
 Operating System: tru64 5.1b
 PHP Version:  4CVS-2005-02-22 (stable)
 New Comment:

sorry, I didn't think about running config.guess, it does guess:

alphaev56-dec-osf5.1

which is the right one


Previous Comments:


[2005-02-23 04:52:11] [EMAIL PROTECTED]

And if that above command works, run this:

# /bin/sh -x configure




[2005-02-23 04:30:19] [EMAIL PROTECTED]

Let's try again: What does this command _output_ when you run it:

# ./config.guess





[2005-02-22 17:28:59] dg at orbhost dot net

I just grabbed the snapshot php4-STABLE-200502221530.tar.gz
I'm not changing anything in config.guess or anything else.
here's how far it goes:

creating cache ./config.cache
checking host system type... configure: error: can not guess host type;
you must specify one

and config.log has just this:

configure:1653: checking host system type

the host type that should be detected usually is:

alphaev56-dec-osf5.1

If I'm feeding it to the configure line then it allows it to proceed.

What else should I try to track this problem?



[2005-02-22 08:29:30] [EMAIL PROTECTED]

What does this command run in the source directory output:

# ./config.guess




[2005-02-22 04:46:03] dg at orbhost dot net

Description:

I've been trying to build 4.3.10 on tru64 5.1b and several things are
broken, so I've been trying to build from a daily snapshot for several
days, grabbing the latest snapshot and trying it out. For several days
now, the configure host type detection has been broken, at least on
tru64. It can't guess the host type any more and just stops before
doing anything.
I've been giving it the host type myself to allow it to proceed, and
that works.
I searched the reported bugs for such an issue and couldn't find one,
so here's mine.
More things are broken, but it's with some modules and extensions, so
if I turn them off, I can compile the latest php completely, but
basically all extra stuff has to be turned off, otherwise there are
errors. (that may be a bug report for later)






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


#32060 [Fbk]: configure host type detection broken

2005-02-22 Thread sniper
 ID:   32060
 Updated by:   [EMAIL PROTECTED]
 Reported By:  dg at orbhost dot net
 Status:   Feedback
 Bug Type: Compile Failure
 Operating System: tru64 5.1b
 PHP Version:  4CVS-2005-02-22 (stable)
 New Comment:

And if that above command works, run this:

# /bin/sh -x configure



Previous Comments:


[2005-02-23 04:30:19] [EMAIL PROTECTED]

Let's try again: What does this command _output_ when you run it:

# ./config.guess





[2005-02-22 17:28:59] dg at orbhost dot net

I just grabbed the snapshot php4-STABLE-200502221530.tar.gz
I'm not changing anything in config.guess or anything else.
here's how far it goes:

creating cache ./config.cache
checking host system type... configure: error: can not guess host type;
you must specify one

and config.log has just this:

configure:1653: checking host system type

the host type that should be detected usually is:

alphaev56-dec-osf5.1

If I'm feeding it to the configure line then it allows it to proceed.

What else should I try to track this problem?



[2005-02-22 08:29:30] [EMAIL PROTECTED]

What does this command run in the source directory output:

# ./config.guess




[2005-02-22 04:46:03] dg at orbhost dot net

Description:

I've been trying to build 4.3.10 on tru64 5.1b and several things are
broken, so I've been trying to build from a daily snapshot for several
days, grabbing the latest snapshot and trying it out. For several days
now, the configure host type detection has been broken, at least on
tru64. It can't guess the host type any more and just stops before
doing anything.
I've been giving it the host type myself to allow it to proceed, and
that works.
I searched the reported bugs for such an issue and couldn't find one,
so here's mine.
More things are broken, but it's with some modules and extensions, so
if I turn them off, I can compile the latest php completely, but
basically all extra stuff has to be turned off, otherwise there are
errors. (that may be a bug report for later)






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


#32074 [NEW]: OID's missing from PHP snmpwalk compared with command line snmpwalk

2005-02-22 Thread Gregg dot Nelson at Co dot Ramsey dot MN dot US
From: Gregg dot Nelson at Co dot Ramsey dot MN dot US
Operating system: ReHat 9.0
PHP version:  5.0.3
PHP Bug Type: SNMP related
Bug description:  OID's missing from PHP snmpwalk compared with command line 
snmpwalk

Description:

Running:

PHP-5.0.3
Net-SNMP-5.2.1
Apache-(httpd-2.0.530)

PHP config Line

./configure --with-apxs2=/usr/local/apache2/bin/apxs --with-snmp

No changes to php.ini
---

Executing snmpwalk from command line (RH Linux 9) produces different
results from snmpwalk called from php.

I have a Cisco 6509 configured for Server Load Balancing.
The MIB tree for this starts at OID .1.3.6.1.4.1.9.9.161

With the following command from the Linux shell I get the folowing
results:
---
 snmpwalk -v2c -crmsy 192.168.108.254 .1.3.6.1.4.1.9.9.161

SNMPv2-SMI::enterprises.9.9.161.1.1.1.1.2.0 = Counter32: 49602212
SNMPv2-SMI::enterprises.9.9.161.1.1.1.1.3.0 = Counter64: 49602212
SNMPv2-SMI::enterprises.9.9.161.1.1.1.1.4.0 = Counter32: 2776480
SNMPv2-SMI::enterprises.9.9.161.1.1.1.1.5.0 = Counter64: 2776480
SNMPv2-SMI::enterprises.9.9.161.1.1.1.1.6.0 = Counter32: 26014
SNMPv2-SMI::enterprises.9.9.161.1.1.1.1.7.0 = Counter64: 26014
SNMPv2-SMI::enterprises.9.9.161.1.1.1.1.8.0 = Counter32: 26013
SNMPv2-SMI::enterprises.9.9.161.1.1.1.1.9.0 = Counter64: 26013
SNMPv2-SMI::enterprises.9.9.161.1.1.1.1.10.0 = Counter32: 26014
SNMPv2-SMI::enterprises.9.9.161.1.1.1.1.11.0 = Counter64: 26014
SNMPv2-SMI::enterprises.9.9.161.1.1.1.1.12.0 = Counter32: 6
SNMPv2-SMI::enterprises.9.9.161.1.1.1.1.13.0 = Counter64: 6
SNMPv2-SMI::enterprises.9.9.161.1.1.1.1.14.0 = Counter32: 0
SNMPv2-SMI::enterprises.9.9.161.1.1.1.1.15.0 = Counter64: 0
SNMPv2-SMI::enterprises.9.9.161.1.2.1.1.2.0.8.67.65.70.69.84.69.83.84 =
INTEGER: 1
SNMPv2-SMI::enterprises.9.9.161.1.2.1.1.3.0.8.67.65.70.69.84.69.83.84 =
INTEGER: 3
SNMPv2-SMI::enterprises.9.9.161.1.2.1.1.4.0.8.67.65.70.69.84.69.83.84 =
Gauge32: 2
SNMPv2-SMI::enterprises.9.9.161.1.2.1.1.5.0.8.67.65.70.69.84.69.83.84 =
Gauge32: 0
SNMPv2-SMI::enterprises.9.9.161.1.2.1.1.6.0.8.67.65.70.69.84.69.83.84 =
INTEGER: 1
SNMPv2-SMI::enterprises.9.9.161.1.3.1.1.4.0.8.67.65.70.69.84.69.83.84.192.168.110.15.0
= INTEGER: 2
SNMPv2-SMI::enterprises.9.9.161.1.3.1.1.4.0.8.67.65.70.69.84.69.83.84.192.168.110.46.0
= INTEGER: 2
SNMPv2-SMI::enterprises.9.9.161.1.3.1.1.5.0.8.67.65.70.69.84.69.83.84.192.168.110.15.0
= Gauge32: 0
SNMPv2-SMI::enterprises.9.9.161.1.3.1.1.5.0.8.67.65.70.69.84.69.83.84.192.168.110.46.0
= Gauge32: 0
SNMPv2-SMI::enterprises.9.9.161.1.3.1.1.6.0.8.67.65.70.69.84.69.83.84.192.168.110.15.0
= Gauge32: 0
SNMPv2-SMI::enterprises.9.9.161.1.3.1.1.6.0.8.67.65.70.69.84.69.83.84.192.168.110.46.0
= Gauge32: 0
SNMPv2-SMI::enterprises.9.9.161.1.3.1.1.7.0.8.67.65.70.69.84.69.83.84.192.168.110.15.0
= Gauge32: 4294967295
SNMPv2-SMI::enterprises.9.9.161.1.3.1.1.7.0.8.67.65.70.69.84.69.83.84.192.168.110.46.0
= Gauge32: 4294967295
SNMPv2-SMI::enterprises.9.9.161.1.3.1.1.8.0.8.67.65.70.69.84.69.83.84.192.168.110.15.0
= Gauge32: 8
SNMPv2-SMI::enterprises.9.9.161.1.3.1.1.8.0.8.67.65.70.69.84.69.83.84.192.168.110.46.0
= Gauge32: 8
SNMPv2-SMI::enterprises.9.9.161.1.3.1.1.9.0.8.67.65.70.69.84.69.83.84.192.168.110.15.0
= Gauge32: 8
SNMPv2-SMI::enterprises.9.9.161.1.3.1.1.9.0.8.67.65.70.69.84.69.83.84.192.168.110.46.0
= Gauge32: 8
SNMPv2-SMI::enterprises.9.9.161.1.3.1.1.10.0.8.67.65.70.69.84.69.83.84.192.168.110.15.0
= Gauge32: 0
SNMPv2-SMI::enterprises.9.9.161.1.3.1.1.10.0.8.67.65.70.69.84.69.83.84.192.168.110.46.0
= Gauge32: 0
SNMPv2-SMI::enterprises.9.9.161.1.3.1.1.11.0.8.67.65.70.69.84.69.83.84.192.168.110.15.0
= Gauge32: 1
SNMPv2-SMI::enterprises.9.9.161.1.3.1.1.11.0.8.67.65.70.69.84.69.83.84.192.168.110.46.0
= Gauge32: 1
SNMPv2-SMI::enterprises.9.9.161.1.3.1.1.12.0.8.67.65.70.69.84.69.83.84.192.168.110.15.0
= INTEGER: 360
SNMPv2-SMI::enterprises.9.9.161.1.3.1.1.12.0.8.67.65.70.69.84.69.83.84.192.168.110.46.0
= INTEGER: 360
SNMPv2-SMI::enterprises.9.9.161.1.3.1.1.13.0.8.67.65.70.69.84.69.83.84.192.168.110.15.0
= Gauge32: 1
SNMPv2-SMI::enterprises.9.9.161.1.3.1.1.13.0.8.67.65.70.69.84.69.83.84.192.168.110.46.0
= Gauge32: 1
SNMPv2-SMI::enterprises.9.9.161.1.3.1.1.14.0.8.67.65.70.69.84.69.83.84.192.168.110.15.0
= Gauge32: 1
SNMPv2-SMI::enterprises.9.9.161.1.3.1.1.14.0.8.67.65.70.69.84.69.83.84.192.168.110.46.0
= Gauge32: 1
SNMPv2-SMI::enterprises.9.9.161.1.3.1.1.15.0.8.67.65.70.69.84.69.83.84.192.168.110.15.0
= Gauge32: 0
SNMPv2-SMI::enterprises.9.9.161.1.3.1.1.15.0.8.67.65.70.69.84.69.83.84.192.168.110.46.0
= Gauge32: 0
SNMPv2-SMI::enterprises.9.9.161.1.3.1.1.16.0.8.67.65.70.69.84.69.83.84.192.168.110.15.0
= Counter32: 5
SNMPv2-SMI::enterprises.9.9.161.1.3.1.1.16.0.8.67.65.70.69.84.69.83.84.192.168.110.46.0
= Counter32: 2
SNMPv2-SMI::enterprises.9.9.161.1.3.1.1.17.0.8.67.65.70.69.84.69.83.84.192.168.110.15.0
= INTEGER: 1

#32060 [Opn->Fbk]: configure host type detection broken

2005-02-22 Thread sniper
 ID:   32060
 Updated by:   [EMAIL PROTECTED]
 Reported By:  dg at orbhost dot net
-Status:   Open
+Status:   Feedback
 Bug Type: Compile Failure
 Operating System: tru64 5.1b
 PHP Version:  4CVS-2005-02-22 (stable)
 New Comment:

Let's try again: What does this command _output_ when you run it:

# ./config.guess




Previous Comments:


[2005-02-22 17:28:59] dg at orbhost dot net

I just grabbed the snapshot php4-STABLE-200502221530.tar.gz
I'm not changing anything in config.guess or anything else.
here's how far it goes:

creating cache ./config.cache
checking host system type... configure: error: can not guess host type;
you must specify one

and config.log has just this:

configure:1653: checking host system type

the host type that should be detected usually is:

alphaev56-dec-osf5.1

If I'm feeding it to the configure line then it allows it to proceed.

What else should I try to track this problem?



[2005-02-22 08:29:30] [EMAIL PROTECTED]

What does this command run in the source directory output:

# ./config.guess




[2005-02-22 04:46:03] dg at orbhost dot net

Description:

I've been trying to build 4.3.10 on tru64 5.1b and several things are
broken, so I've been trying to build from a daily snapshot for several
days, grabbing the latest snapshot and trying it out. For several days
now, the configure host type detection has been broken, at least on
tru64. It can't guess the host type any more and just stops before
doing anything.
I've been giving it the host type myself to allow it to proceed, and
that works.
I searched the reported bugs for such an issue and couldn't find one,
so here's mine.
More things are broken, but it's with some modules and extensions, so
if I turn them off, I can compile the latest php completely, but
basically all extra stuff has to be turned off, otherwise there are
errors. (that may be a bug report for later)






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


#32073 [NEW]: Overloading for static methods and properties

2005-02-22 Thread joh at deworks dot net
From: joh at deworks dot net
Operating system: Linux
PHP version:  5CVS-2005-02-23 (dev)
PHP Bug Type: Feature/Change Request
Bug description:  Overloading for static methods and properties

Description:

Currently, it is only possible to overload method calls and member
accesses of an object. The use of static classes with static methods and
members is a good way to organize different parts of an application.
Therefore, it would've be convenient to be able to overload static method
calls and member accesses as you can do on objects. As a static class
member/method cannot have the same name as a normal class member/method,
this should be possible.

This would give the developer finer controll over his/her static
libraries.

In the provided example, the developer could restrict access to the static
member Foo::$readonly.

Reproduce code:
---


Expected result:

Read-only member

Actual result:
--
Fatal error: Cannot access protected property Foo::$readonly ...

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


#32070 [Opn->Fbk]: //. causes php to dump its code to stdout

2005-02-22 Thread tony2001
 ID:   32070
 Updated by:   [EMAIL PROTECTED]
 Reported By:  riseofthethorax at earthlink dot net
-Status:   Open
+Status:   Feedback
 Bug Type: Output Control
 Operating System: Linux cgi30 2.4.29-grsec #4 SMP
 PHP Version:  4.3.10
 New Comment:

Your code gives only "Parse error: syntax error, unexpected
T_VARIABLE".
Please supply more info.


Previous Comments:


[2005-02-23 00:12:39] riseofthethorax at earthlink dot net

Description:

Well my webhost had upgraded from 4.28 to 4.3.10,
and one of my scripts was failing.. I narrowed down the 
bug to this one line.. For some reason it made the difference 
between showning a submission form and dumping what looks like 
a partial dump of all the php code on the script.

//. '' .
$messages['mandatory'] . $messages['incorrect'] .
'' 



Reproduce code:
---



$crap = '' 
. '' . $messages['mandatory'] . $messages['incorrect'] .
'' 
. $button_set 
. "" 
. '' 
. $precrap 
. "" 
. '' 
. "" 
. $button_set 
. '' . $messages['mandatory'] .
$messages['incorrect'] . '' 
//. '' .
$messages['mandatory'] . $messages['incorrect'] .
''
 . '';



Expected result:

IT creates a form by concantenating some 
assoaciative variables together with strings.. 


Actual result:
--
Picture a complete dump of everything in the script.. 

Removal of the line 

//. '' .
$messages['mandatory'] . $messages['incorrect'] .
''

Displays the form as it was intended.. 

Its something having to do with that //. I think.. 






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


#28938 [Fbk->NoF]: foreach statement can be forced to crash PHP

2005-02-22 Thread php-bugs
 ID:   28938
 Updated by:   php-bugs@lists.php.net
 Reported By:  tomas_matousek at hotmail dot com
-Status:   Feedback
+Status:   No Feedback
 Bug Type: Zend Engine 2 problem
 Operating System: WinXP
 PHP Version:  5.0.0RC3
 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:


[2005-02-15 01:24:55] [EMAIL PROTECTED]

Please try using this CVS snapshot:

  http://snaps.php.net/php5-STABLE-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php5.0-win32-latest.zip





[2004-07-13 18:13:23] fixxxer at php5 dot ru

Reproduced on WinXP, latest snap. Could not reproduce on FreeBSD. Seems
to be win32 specific



[2004-06-30 07:10:02] [EMAIL PROTECTED]

here is some output in debug mode:
$a = array(0,1);
foreach ($a as $value)
{
  $a->foo = "bar";
}


PHP Warning:  Attempt to assign property of non-object in
/php/bugs/28938.php on line 6
PHP Warning:  Attempt to assign property of non-object in
/php/bugs/28938.php on line 6
[Wed Jun 30 05:09:40 2004]  Script:  '28938.php'
---
/php/php-src/Zend/zend_execute.c(76) : Block 0x0840AAEC status:
/cvs/php/php-src/Zend/zend_execute.h(61) : Actual location (location
was relayed)
Beginning:  Overrun (magic=0x0006, expected=0x7312F8DC)
  End:  Unknown
---
PHP Warning:  String is not zero-terminated (...)
(source: /cvs/php/php-src/Zend/zend_opcode.c:215) in Unknown on
line 0
[Wed Jun 30 05:09:40 2004]  Script:  '28938.php'
---
/cvs/php/php-src/Zend/zend_opcode.c(215) : Block 0x0840BD18 status:
/cvs/php/php-src/Zend/zend_variables.c(45) : Actual location (location
was relayed)
Beginning:  Cached (allocated on
/cvs/php/php-src/Zend/zend_language_scanner.l:1510, 4 bytes)
  End:  OK
---




[2004-06-28 09:25:32] tomas_matousek at hotmail dot com

Description:

The following code crashes PHP.

Reproduce code:
---
$a = array(0,1,2);
foreach ($a as $value)
{
  $a->foo = "bar";
}

Expected result:

none

Actual result:
--
crash





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


#28828 [Fbk->NoF]: Problem with appending session.use_trans_sid to urls

2005-02-22 Thread php-bugs
 ID:   28828
 Updated by:   php-bugs@lists.php.net
 Reported By:  demjan at elkor dot lv
-Status:   Feedback
+Status:   No Feedback
 Bug Type: Session related
 Operating System: Linux
 PHP Version:  5.0.0RC3
 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:


[2005-02-15 01:40:24] [EMAIL PROTECTED]

Please try using this CVS snapshot:

  http://snaps.php.net/php5-STABLE-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php5.0-win32-latest.zip





[2004-06-18 14:07:06] demjan at elkor dot lv

Description:

Hello!
There is some problem in adding SESSID when "session.use_trans_sid" is
enabled. See code bellow.

Reproduce code:
---



";
?>
test



Expected result:



00
[... a lot of nulls]
test



Actual result:
--


00[... a lot of nulls]
test







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


#28734 [Fbk->NoF]: Operator = changes structure of self-referencing arrays

2005-02-22 Thread php-bugs
 ID:   28734
 Updated by:   php-bugs@lists.php.net
 Reported By:  tomas_matousek at hotmail dot com
-Status:   Feedback
+Status:   No Feedback
 Bug Type: Zend Engine 2 problem
 Operating System: WinXP
 PHP Version:  5.0.0RC2
 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:


[2005-02-15 01:42:35] [EMAIL PROTECTED]

Please try using this CVS snapshot:

  http://snaps.php.net/php5-STABLE-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php5.0-win32-latest.zip

Can't reproduce with latest snapshots and releases under Linux.



[2004-06-13 05:04:26] [EMAIL PROTECTED]

Perhaps this can help track down the problem.
php 5.0.0RC3-dev:

[snip access array ouptut]
   [4] => Array
(
[0] => 1
[1] => 2
[2] => 3
[3] => 4
[4] => Array
 *RECURSION*
)

)

)

)
/usr/home/curt/cvs/php/php-src/Zend/zend_execute.c(662) :  Freeing
0x083C4208 (16 bytes), script=2873.php
/usr/home/curt/cvs/php/php-src/Zend/zend_execute.c(3413) :  Freeing
0x083C4150 (35 bytes), script=2873.php
/usr/home/curt/cvs/php/php-src/Zend/zend_hash.c(377) : Actual location
(location was relayed)
Last leak repeated 3 times
/usr/home/curt/cvs/php/php-src/Zend/zend_execute.c(3382) :  Freeing
0x083C410C (16 bytes), script=2873.php
Last leak repeated 3 times
/usr/home/curt/cvs/php/php-src/Zend/zend_execute.c(3362) :  Freeing
0x083C4A6C (32 bytes), script=2873.php
/usr/home/curt/cvs/php/php-src/Zend/zend_hash.c(157) : Actual location
(location was relayed)
Last leak repeated 1 time
=== Total 11 memory leaks detected ===




[2004-06-11 19:40:24] imprestavel at gameguru dot com dot br

Tested PHP 5.0.0 RC3 and latest build (200406111430) under Windows2000
and had the same problem



[2004-06-11 09:38:37] tomas_matousek at hotmail dot com

Don't know how that is possible in your version of PHP 5.0.0 RC3, but
in mine (I'm testing RC3 available on www.php.net not the latest
version from CVS) the bug is still there (result is the same as I
described in "Actual Result").



[2004-06-11 01:43:58] D dot Kingma at jool dot nl

Results on RC3:

Array
(
[0] => 1
[1] => Z
[2] => 3
[3] => 4
[4] => Array
(
[0] => 1
[1] => Z
[2] => 3
[3] => 4
[4] => Array
 *RECURSION*
)

)

Seems as aspected results



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

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


#28618 [Fbk->NoF]: fpassthru gives script timeout

2005-02-22 Thread php-bugs
 ID:   28618
 Updated by:   php-bugs@lists.php.net
 Reported By:  lapo at lapo dot it
-Status:   Feedback
+Status:   No Feedback
 Bug Type: Filesystem function related
 Operating System: Win2000
 PHP Version:  5.0.0RC2
 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:


[2005-02-15 01:41:15] [EMAIL PROTECTED]

Please try using this CVS snapshot:

  http://snaps.php.net/php5-STABLE-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php5.0-win32-latest.zip





[2004-08-28 22:46:47] ericfabre69 at free dot fr

Hi,

I have the same problem with the 4.3.8 php version.
When I use this script

set_time_limit(0);

$fp = fopen ($path,"r");
$contents = fread($fp,500);
echo $contents;
$fp2 =fopen("temp.txt","w+");
fwrite($fp2,$contents);
fclose($fp);
fclose($fp2);
echo "size : ".filesize("temp.txt");

I try to open a file (size 26ko)
All the time the filesize("temp.txt") result is 4092.
I hadn't this problem with the version 4.2.x.



[2004-06-03 11:05:50] lapo at lapo dot it

Description:

I used to use a little script (see below) to check logs from remote and
it worked like a charm with PHP4.3.2 both on FreeBSD and Win2000 (CGI on
IIS).

Upgrading to PHP5.0.0RC2, on Win2000, it gives timeout when file size
is 'big' (e.g. it does definitely do so with a 5Mb log file).

Of course it should print only the last 5Kb of file, no matter the
filesize.

BTW: using @fread($file, 1024 * $n) instead of @fpassthru($file) works
perfectly and I'm doing so, but @fpassthru($file) SHOULD be more
efficient and I wuold like it to work, anyway.

Reproduce code:
---
$log_file = ini_get('error_log');
$n = 5;
$file = @fopen($log_file, 'r');
@fseek($file, -1024 * $n, SEEK_END);
@fpassthru($file);

Expected result:

Last 5Kb of log file content.

Actual result:
--
CGI timeout.





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


#28327 [Fbk->NoF]: chdir("..") not working in PHP5 on WinNT4

2005-02-22 Thread php-bugs
 ID:   28327
 Updated by:   php-bugs@lists.php.net
 Reported By:  zajdee at seznam dot cz
-Status:   Feedback
+Status:   No Feedback
 Bug Type: Directory function related
 Operating System: Windows NT4
 PHP Version:  5CVS-2004-05-08 (dev)
 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:


[2005-02-15 01:52:52] [EMAIL PROTECTED]

We're still waiting for feedback..



[2005-01-27 08:15:15] zajdee at seznam dot cz

I am not using NT4 anywhere, but will try to set up a virtual machine
in VMware to test it.



[2005-01-26 04:53:57] [EMAIL PROTECTED]

Please try using this CVS snapshot:

  http://snaps.php.net/php5-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php5-win32-latest.zip





[2004-05-09 14:53:17] zajdee at seznam dot cz

Of course, it works fine with Apache2+PHP4.3.6 on the same system...



[2004-05-09 09:31:07] vkatragadda at email dot com

did u run this script on [WinNT4 + PHP4]?



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

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


#29669 [Fbk->NoF]: Setting ADO RecordSet CursorLocation to adUseClient causes query delay

2005-02-22 Thread php-bugs
 ID:   29669
 Updated by:   php-bugs@lists.php.net
 Reported By:  www dot spam at whoah dot net
-Status:   Feedback
+Status:   No Feedback
 Bug Type: COM related
 Operating System: Windows 2000 Professional
 PHP Version:  5.0.1
 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:


[2005-02-15 00:25:00] [EMAIL PROTECTED]

Please try using this CVS snapshot:

  http://snaps.php.net/php5-STABLE-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php5.0-win32-latest.zip





[2004-08-14 04:13:53] www dot spam at whoah dot net

Further:

The delay seems to be related to the size of the results data being
returned. The table referenced by my query has some 11000 records
whereas the same query on another table with only a few records
experiences no delay.

Querying the same table (11000 records) using a server-side cursor
causes no delay.

ASP experiences no such delay using the same COM objects and routines,
on the same server.



[2004-08-14 03:29:38] www dot spam at whoah dot net

Description:

When attempting to use ADODB.RecordSet COM object to query an MS Access
database via a DSNless connection, setting the CursorLocation to
adUseClient causes a significant delay on the processing of a query
execution. 

ASP has no such issue with this, so maybe PHP's support can be improved
(client-side cursor location allows the use of additional RecordSet
features such as ->Sort() and ->Filter(), handy for porting ASP code
that uses it instead of writing a dynamic query).

Any database and query should reproduce this, so please modify the
'reproduce code' appropriately (to point to your own database and use
your own query).

Reproduce code:
---
define("adLockReadOnly",1);
define("adOpenStatic",3);
define("adUseClient",3);

function simpleRS($conn,$q) {
$rs = new COM('ADODB.RecordSet');
$rs->ActiveConnection = $conn;
$rs->LockType = adLockReadOnly;
$rs->CursorLocation = adUseClient; //comment this line to remove the
delay
$rs->CursorType = adOpenStatic;
$rs->Source = $q;
echo 'opening... '; $rs->Open(); echo 'done';
return $rs;
}

$dbconn = new COM('ADODB.Connection');
$dbconn->open('Provider=Microsoft.Jet.OLEDB.4.0; Data Source='.
realpath('../../data/phpbb2.mdb'));
$rsUserList = simpleRS($dbconn,'SELECT * FROM phpbb_users');
$dbconn->close();

Expected result:

opening... *almost instant* done

Actual result:
--
opening... *delay* done





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


#32069 [Opn->Fbk]: Fails when compiling violite.c

2005-02-22 Thread tony2001
 ID:   32069
 Updated by:   [EMAIL PROTECTED]
 Reported By:  leonardo1_rw at yahoo dot com
-Status:   Open
+Status:   Feedback
 Bug Type: Compile Failure
 Operating System: linux red hat 7
 PHP Version:  4.3.10
 New Comment:

Not enough information was provided for us to be able
to handle this bug. Please re-read the instructions at
http://bugs.php.net/how-to-report.php

If you can provide more information, feel free to add it
to this bug and change the status back to "Open".

Thank you for your interest in PHP.





Previous Comments:


[2005-02-22 23:29:20] leonardo1_rw at yahoo dot com

Description:

I'm working with red hat 7, i tried to compile php 4.3.10 but it
throughs a couple of errors when working with the file violite.c. The
errors seem to be absurds. Are related with the formal parameters of a
function.






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


#32070 [NEW]: //. causes php to dump its code to stdout

2005-02-22 Thread riseofthethorax at earthlink dot net
From: riseofthethorax at earthlink dot net
Operating system: Linux cgi30 2.4.29-grsec #4 SMP 
PHP version:  4.3.10
PHP Bug Type: Output Control
Bug description:  //. causes php to dump its code to stdout

Description:

Well my webhost had upgraded from 4.28 to 4.3.10,
and one of my scripts was failing.. I narrowed down the 
bug to this one line.. For some reason it made the difference 
between showning a submission form and dumping what looks like 
a partial dump of all the php code on the script.

//. '' . $messages['mandatory']
. $messages['incorrect'] . '' 



Reproduce code:
---



$crap = '' 
. '' . $messages['mandatory'] . $messages['incorrect'] .
'' 
. $button_set 
. "" 
. '' 
. $precrap 
. "" 
. '' 
. "" 
. $button_set 
. '' . $messages['mandatory'] .
$messages['incorrect'] . '' 
//. '' . $messages['mandatory']
. $messages['incorrect'] . ''
 . '';



Expected result:

IT creates a form by concantenating some 
assoaciative variables together with strings.. 


Actual result:
--
Picture a complete dump of everything in the script.. 

Removal of the line 

//. '' . $messages['mandatory']
. $messages['incorrect'] . ''

Displays the form as it was intended.. 

Its something having to do with that //. I think.. 


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


#29757 [Com]: Sybase compile error

2005-02-22 Thread drbob at TheManFromSPUD dot com
 ID:   29757
 Comment by:   drbob at TheManFromSPUD dot com
 Reported By:  pm at wallit dot net
 Status:   Open
 Bug Type: Compile Failure
 Operating System: Sun Solaris 8
 PHP Version:  5.0.1
 New Comment:

SOLUTION!

In ext/sybase/php_sybase_db.c around line 1112 change the lines:

PHP_FUNCTION(sybase_fetch_object)
{
  php_sybase_fetch_hash(INTERNAL_FUNCTION_PARAM_PASSTHRU);
  if (Z_TYPE_P(return_value)==IS_ARRAY) {
Z_TYPE_P(return_value)=IS_OBJECT;
Z_OBJPROP_P(return_value) = Z_ARRVAL_P(return_value);
Z_OBJCE_P(return_value) = ZEND_STANDARD_CLASS_DEF_PTR;
  }
}

to:

PHP_FUNCTION(sybase_fetch_object)
{
  php_sybase_fetch_hash(INTERNAL_FUNCTION_PARAM_PASSTHRU);
  if (Z_TYPE_P(return_value)==IS_ARRAY) {
object_and_properties_init(
  return_value,
  ZEND_STANDARD_CLASS_DEF_PTR,
  Z_ARRVAL_P(return_value)
);
  }
}

I've tested this on Fedora Core 3 and Solaris 8. Both with gcc 3.4.2.
Works great.


Previous Comments:


[2005-02-22 17:34:44] drbob at TheManFromSPUD dot com

This alswo occurs with PHP 5.0.3 on Fedora Core 3 with Sybase 11.1.1
and 12.5.



[2005-02-04 16:36:18] jpollock at ncbi dot nlm dot nih dot gov

[EMAIL PROTECTED]:/opt/local/src/php-5.0.3$ make
gcc  -Iext/sybase/ -I/opt/local/src/php-5.0.3/ext/sybase/
-DPHP_ATOM_INC -I/opt/local/src/php-5.0.3/include
-I/opt/local/src/php-5.0.3/main -I/opt/local/src/php-5.0.3
-I/opt/local/src/php-5.0.3/Zend -I/usr/local/gnome2/include/libxml2
-I/netopt/Sybase/clients/current/include 
-I/opt/local/src/php-5.0.3/TSRM  -g -O2  -c
/opt/local/src/php-5.0.3/ext/sybase/php_sybase_db.c -o
ext/sybase/php_sybase_db.o  && echo > ext/sybase/php_sybase_db.lo
/opt/local/src/php-5.0.3/ext/sybase/php_sybase_db.c: In function
`zif_sybase_fetch_object':
/opt/local/src/php-5.0.3/ext/sybase/php_sybase_db.c:1112: error:
invalid lvalue in assignment
/opt/local/src/php-5.0.3/ext/sybase/php_sybase_db.c:1113: error:
invalid lvalue in assignment
make: *** [ext/sybase/php_sybase_db.lo] Error 1
[EMAIL PROTECTED]:/opt/local/src/php-5.0.3$

A traceback of the nested macros:

[EMAIL PROTECTED]:/opt/local/src/php-5.0.3$ grep -ri Z_OBJPROP_P . |
grep define
./ext/soap/soap.c:#define FIND_SDL_PROPERTY(ss,tmp)
zend_hash_find(Z_OBJPROP_P(ss), "sdl", sizeof("sdl"), (void **)&tmp)
./Zend/zend_operators.h:#define Z_OBJPROP_P(zval_p)
Z_OBJPROP(*zval_p)
./Zend/zend_operators.h:#define Z_OBJPROP_PP(zval_pp)  
Z_OBJPROP(**zval_pp)
[EMAIL PROTECTED]:/opt/local/src/php-5.0.3$ grep -ri Z_OBJPROP\( . |
grep define
./Zend/zend_operators.h:#define Z_OBJPROP(zval)
Z_OBJ_HT((zval))->get_properties(&(zval) TSRMLS_CC)
./Zend/zend_operators.h:#define Z_OBJPROP_P(zval_p)
Z_OBJPROP(*zval_p)
./Zend/zend_operators.h:#define Z_OBJPROP_PP(zval_pp)  
Z_OBJPROP(**zval_pp)
[EMAIL PROTECTED]:/opt/local/src/php-5.0.3$ grep -ri Z_OBJ_HT\( . |
grep define
./Zend/zend_operators.h:#define Z_OBJ_HT(zval) 
(zval).value.obj.handlers
./Zend/zend_operators.h:#define Z_OBJPROP(zval)
Z_OBJ_HT((zval))->get_properties(&(zval) TSRMLS_CC)
./Zend/zend_operators.h:#define Z_OBJ_HANDLER(zval, hf)
Z_OBJ_HT((zval))->hf
./Zend/zend_operators.h:#define Z_OBJ_HT_P(zval_p) 
Z_OBJ_HT(*zval_p)
./Zend/zend_operators.h:#define Z_OBJ_HT_PP(zval_p)
Z_OBJ_HT(**zval_p)
./Zend/zend_object_handlers.h:#define IS_ZEND_STD_OBJECT(z)  ((z).type
== IS_OBJECT && (Z_OBJ_HT((z))->get_class_entry != NULL))
./Zend/zend_object_handlers.h:#define HAS_CLASS_ENTRY(z)
(Z_OBJ_HT(z)->get_class_entry != NULL)
[EMAIL PROTECTED]:/opt/local/src/php-5.0.3$



[2004-08-19 15:02:04] pm at wallit dot net

Description:

./configure --enable-simplexml --with-sybase=/usr/local/freetds/
--with-mysql --with-apxs=/usr/local/wac/bin/apxs

followed by a "make" results in compile error for Sybase and FreeTDS
support:

/bin/sh /home/php-5.0.1/libtool --silent --preserve-dup-deps
--mode=compile gcc  -Iext/sybase/ -I/home/php-5.0.1/ext/sybase/
-DPHP_ATOM_INC -I/home/php-5.0.1/include -I/home/php-5.0.1/main
-I/home/php-5.0.1 -I/home/php-5.0.1/Zend -I/usr/local/include/libxml2
-I/usr/local/include/mysql -I/usr/local/freetds//include 
-D_POSIX_PTHREAD_SEMANTICS -I/home/php-5.0.1/TSRM  -g -O2  -prefer-pic
-c /home/php-5.0.1/ext/sybase/php_sybase_db.c -o
ext/sybase/php_sybase_db.lo
/home/php-5.0.1/ext/sybase/php_sybase_db.c: In function
`zif_sybase_fetch_object':
/home/php-5.0.1/ext/sybase/php_sybase_db.c:1112: invalid lvalue in
assignment
/home/php-5.0.1/ext/sybase/php_sybase_db.c:1113: invalid lvalue in
assignment
make: *** [ext/sybase/php_sybase_db.lo] Error 1







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


#32069 [NEW]: Fails when compiling violite.c

2005-02-22 Thread leonardo1_rw at yahoo dot com
From: leonardo1_rw at yahoo dot com
Operating system: linux red hat 7
PHP version:  4.3.10
PHP Bug Type: Compile Failure
Bug description:  Fails when compiling violite.c

Description:

I'm working with red hat 7, i tried to compile php 4.3.10 but it throughs
a couple of errors when working with the file violite.c. The errors seem
to be absurds. Are related with the formal parameters of a function.


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


#32068 [Opn->Bgs]: Parse not executed while using the perl comment(#) with patterns

2005-02-22 Thread derick
 ID:   32068
 Updated by:   [EMAIL PROTECTED]
 Reported By:  simon at ruderich dot com
-Status:   Open
+Status:   Bogus
 Bug Type: Output Control
 Operating System: Mac OS X 10.3.8
 PHP Version:  4.3.10
 New Comment:

This line:
  #$pattern = '#\( (( (?>[^()]+) | (?R) )*) \)#isUx';

has a ?> in it, which marks the end of a script block.
No bug here (this is also documented in the manual)



Previous Comments:


[2005-02-22 22:56:29] simon at ruderich dot com

Description:

I wanted to replace a string using the 'preg_replace'-
function. I tried more patterns, so I commented out the 
old patterns. But then it showed me not the replace 
string. This must be a problem with the perl comment (#) 
because if I use /* */ to comment out the old pattern 
the script works.

Reproduce code:
---
 asdf   test   test  
test  asdf  asdf ";

  #$pattern = '#( ( ([^<>])|(?R) )*? )#isx';
  #$pattern = '#( ( (?R)|() )*? )#isx';
  #$pattern = '#\( (( (?>[^()]+) | (?R) )*) \)#isUx';

  $pattern = '#( (.)*? )#isxU';
  $replace = '[a]$1[/a]';

  echo ''."\n";
  echo htmlspecialchars($string);
  echo "\n\n";
  echo htmlspecialchars(preg_replace($pattern, $replace, $string));
  echo ''."\n";

 ?>

Expected result:

  asdf   test   test   
test  asdf  asdf 

 [a] asdf   test   test   
test  asdf  asdf[/
a] 

Actual result:
--
[^()]+) | (?R) )*) \)#isUx';  $pattern = '#( (.)*? 
)#isxU';  $replace = '[a]$1[/a]';  echo '
'."\n";
  echo htmlspecialchars($string);
  echo "\n\n";
  echo htmlspecialchars(preg_replace($pattern, $replace, 
$string));
  echo '
'."\n";  ?>





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


#32067 [Opn->Fbk]: DSO problems

2005-02-22 Thread derick
 ID:   32067
 Updated by:   [EMAIL PROTECTED]
 Reported By:  j dot lammerts at chello dot nl
-Status:   Open
+Status:   Feedback
 Bug Type: *Configuration Issues
 Operating System: AIX 5.2
 PHP Version:  4CVS-2005-02-22 (stable)
 New Comment:

It's most likely because their version string has a different format,
please put the config.log online and provide a link to it here.


Previous Comments:


[2005-02-22 16:14:15] j dot lammerts at chello dot nl

Description:

Hi,
I seem to be unable to get the latetst stable php4 to compile.
I'm using AIX 5.2 and IBM HTTPServer 2.0.47.1
If I try to configure with --apxs=/usr/IBMIHS/bin/apxs
I get the message :
Configuring SAPI modules
checking for AOLserver support... no
checking for Apache 1.x module support via DSO through APXS... expr:
non-numeric argument
yes
Then, at the end :
WARNING: Your /usr/IBMIHS/bin/apxs script is most likely broken.

If I try to configure with --apxs2=/usr/IBMIHS/bin/apxs
I get the message:
checking for Apache 2.0 filter-module support via DSO through APXS...
no
checking for Apache 2.0 handler-module support via DSO through APXS...
expr: non-numeric a
rgument
configure: error: You have enabled Apache 2 support while your server
is Apache 1.3.  Plea
se use the appropiate switch --with-apxs (without the 2)
(although I'm using 2.0.47.1 ??)

Is this due to the fact that IBM messes around with standard Apache
configs, and makes up their own apxs ?

Cheers






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


#32068 [NEW]: Parse not executed while using the perl comment(#) with patterns

2005-02-22 Thread simon at ruderich dot com
From: simon at ruderich dot com
Operating system: Mac OS X 10.3.8
PHP version:  4.3.10
PHP Bug Type: Output Control
Bug description:  Parse not executed while using the perl comment(#) with 
patterns

Description:

I wanted to replace a string using the 'preg_replace'-
function. I tried more patterns, so I commented out the 
old patterns. But then it showed me not the replace 
string. This must be a problem with the perl comment (#) 
because if I use /* */ to comment out the old pattern 
the script works.

Reproduce code:
---
 asdf   test   test  
test  asdf  asdf ";

  #$pattern = '#( ( ([^<>])|(?R) )*? )#isx';
  #$pattern = '#( ( (?R)|() )*? )#isx';
  #$pattern = '#\( (( (?>[^()]+) | (?R) )*) \)#isUx';

  $pattern = '#( (.)*? )#isxU';
  $replace = '[a]$1[/a]';

  echo ''."\n";
  echo htmlspecialchars($string);
  echo "\n\n";
  echo htmlspecialchars(preg_replace($pattern, $replace, $string));
  echo ''."\n";

 ?>

Expected result:

  asdf   test   test   
test  asdf  asdf 

 [a] asdf   test   test   
test  asdf  asdf[/
a] 

Actual result:
--
[^()]+) | (?R) )*) \)#isUx';  $pattern = '#( (.)*? 
)#isxU';  $replace = '[a]$1[/a]';  echo '
'."\n";
  echo htmlspecialchars($string);
  echo "\n\n";
  echo htmlspecialchars(preg_replace($pattern, $replace, 
$string));
  echo '
'."\n";  ?>

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


#28207 [Com]: Wrong output in PHP 5 with XML Parser Functions

2005-02-22 Thread joern_h at gmx dot net
 ID:   28207
 Comment by:   joern_h at gmx dot net
 Reported By:  bart at mediawave dot nl
 Status:   Open
 Bug Type: XML related
 Operating System: Windows 2000
 PHP Version:  5.0.0RC2
 New Comment:

It seems that entity refs do not get expanded when there is a default
handler registered. Instead the default handler gets called with the
name of the entity. Surprisingly this behavior is the same in PHP4 and
PHP5 (tested with latest snapshots).


Previous Comments:


[2005-02-21 21:32:35] bart at mediawave dot nl

Unfortunately still no DTD. 

Also, I believe the entities aren't being translated correctly. In the
DTD &plainEntity; is defined like: 
This means that all occurrences of &plainEntity; need to be transformed
to "FOO entity". (You can check this by opening xmltest.xml in Firefox)

Expected result: (Modified)





]>

 Title FOO entity
 
  
   

 a1b1c1
 a2c2
 a3b3c3

   
  
 
 

]>

   
   test entity
   This is some more PHP code being executed.

 
  About this Document
  
   
   Hi!  This is PHP version 4.3.6
  
 


parse complete


Actual result:
--

 Title &plainEntity;
 
  
   

 a1b1c1
 a2c2
 a3b3c3

   
  
 
 
   
   &testEnt;
   

 
  About this Document
  
   
   Hi!  This is PHP version 5.1.0-dev
  
 


parse complete

---

I had another problem with 5.1 and IIS. (I was unable to run PHP files
in subdirectories) This is fixed now! :)



[2005-02-21 20:14:04] [EMAIL PROTECTED]

Please try using this CVS snapshot:

  http://snaps.php.net/php5-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php5-win32-latest.zip





[2004-04-28 17:18:12] bart at mediawave dot nl

Description:

The stream-oriented XML parser (formerly Expat) produces different
output in PHP 5 than it did in PHP 4. I'm unable to read the 




]>

section of the XML document with PHP 5.

Reproduce code:
---
The code under "Example 3. External Entity Example" at
http://www.php.net/manual/en/ref.xml.php

Expected result:




]>

 Title &plainEntity;
 
  
   

 a1b1c1
 a2c2
 a3b3c3

   
  
 
 

]>

   
   &testEnt;
   This is some more PHP code being executed.

 
  About this Document
  
   
   Hi!  This is PHP version 4.3.6
  
 


parse complete

Actual result:
--
&plainEntity;
 Title &plainEntity;
 
  
   

 a1b1c1
 a2c2
 a3b3c3

   
  
 
 &systemEntity;
 
  About this Document
  
   <-- this is a comment -->
   Hi!  This is PHP version 5.0.0RC2
  
 
XML error: Undeclared entity warning at line 27





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


#32002 [Com]: FATAL erealloc() Restarts

2005-02-22 Thread jonohlsson at hotmail dot com
 ID:   32002
 Comment by:   jonohlsson at hotmail dot com
 Reported By:  tlamay at cte1 dot com
 Status:   Open
 Bug Type: Apache2 related
 Operating System: Windows 2003
 PHP Version:  4CVS-2005-02-17
 New Comment:

must say i have this exact problem myself

running win 2k / apache 1.3.33 / php 4.3.10 / Zend optimizer 2.5.7 and
phpBB forum

the apache log is filled with those erealloc errors and the browser
page goes blank with a "server not found" message

...but i think it only happens if browsing with IE. mozilla works fine.
weird isn't it?

i've also tried changing php.ini memory settings, but this deosn't
affect the apache log at all


Previous Comments:


[2005-02-17 20:46:17] tlamay at cte1 dot com

Okay, after a bit of tweaking I got the latest PHP5 running.  It
crashes within 8-10 minutes.  I have since migrated back to 4.3.10, the
most stable version for me at the moment.

Funny thing about the PHP5...when it crashes, Apache doesn't ever
restart.  The server stays completely down.  I have to physically start
it again.  This behavior doesnt occur in 4.3.x.

Thu Feb 17 14:31:26 2005] [notice] Parent: Created child process 6672
[Thu Feb 17 14:31:26 2005] [notice] Disabled use of AcceptEx() WinSock2
API
[Thu Feb 17 14:31:35 2005] [notice] Child 6672: Child process is
running
[Thu Feb 17 14:31:35 2005] [notice] Child 6672: Acquired the start
mutex.
[Thu Feb 17 14:31:35 2005] [notice] Child 6672: Starting 750 worker
threads.
[Thu Feb 17 14:31:35 2005] [notice] Child 6672: Listening on port 443.
[Thu Feb 17 14:31:35 2005] [notice] Child 6672: Listening on port 443.
[Thu Feb 17 14:31:35 2005] [notice] Child 6672: Listening on port 80.
[Thu Feb 17 14:31:35 2005] [notice] Child 6672: Listening on port 80.
FATAL:  erealloc():  Unable to allocate 98304 bytes
[Thu Feb 17 14:39:29 2005] [notice] Parent: child process exited with
status 1 -- Restarting.



[2005-02-17 05:25:51] [EMAIL PROTECTED]

Please try using this CVS snapshot:

  http://snaps.php.net/php5-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php5-win32-latest.zip

Please try the latest HEAD too so we'll see if this is any better there
(some memleak fixes exist there which were not allowed to be backported
to PHP_4_3 branch)




[2005-02-17 05:10:17] tlamay at cte1 dot com

I tried the very latest one, and as what happened when I tried the CVS
before, it actually makes the problem much worse.  Apache restarts
every 5-10-15 minutes now versus every 30-45m with PHP 4.3.10.

[Wed Feb 16 21:52:39 2005] [notice] Parent: Created child process 3148
[Wed Feb 16 21:52:39 2005] [notice] Disabled use of AcceptEx() WinSock2
API
[Wed Feb 16 21:52:48 2005] [notice] Child 3148: Child process is
running
[Wed Feb 16 21:52:48 2005] [notice] Child 3148: Acquired the start
mutex.
[Wed Feb 16 21:52:48 2005] [notice] Child 3148: Starting 750 worker
threads.
[Wed Feb 16 21:52:48 2005] [notice] Child 3148: Listening on port 443.
[Wed Feb 16 21:52:48 2005] [notice] Child 3148: Listening on port 443.
[Wed Feb 16 21:52:48 2005] [notice] Child 3148: Listening on port 80.
[Wed Feb 16 21:52:48 2005] [notice] Child 3148: Listening on port 80.
FATAL:  erealloc():  Unable to allocate 90112 bytes
[Wed Feb 16 22:03:25 2005] [notice] Parent: child process exited with
status 1 -- Restarting.
[Wed Feb 16 22:03:26 2005] [notice] Parent: Created child process 852
[Wed Feb 16 22:03:26 2005] [notice] Disabled use of AcceptEx() WinSock2
API
[Wed Feb 16 22:03:35 2005] [notice] Child 852: Child process is
running
[Wed Feb 16 22:03:35 2005] [notice] Child 852: Acquired the start
mutex.
[Wed Feb 16 22:03:35 2005] [notice] Child 852: Starting 750 worker
threads.
[Wed Feb 16 22:03:35 2005] [notice] Child 852: Listening on port 443.
[Wed Feb 16 22:03:35 2005] [notice] Child 852: Listening on port 443.
[Wed Feb 16 22:03:35 2005] [notice] Child 852: Listening on port 80.
[Wed Feb 16 22:03:35 2005] [notice] Child 852: Listening on port 80.
FATAL:  erealloc():  Unable to allocate 90112 bytes
[Wed Feb 16 22:09:17 2005] [notice] Parent: child process exited with
status 1 -- Restarting.
[Wed Feb 16 22:09:18 2005] [notice] Parent: Created child process 1792
[Wed Feb 16 22:09:18 2005] [notice] Disabled use of AcceptEx() WinSock2
API
[Wed Feb 16 22:09:27 2005] [notice] Child 1792: Child process is
running
[Wed Feb 16 22:09:27 2005] [notice] Child 1792: Acquired the start
mutex.
[Wed Feb 16 22:09:27 2005] [notice] Child 1792: Starting 750 worker
threads.
[Wed Feb 16 22:09:27 2005] [notice] Child 1792: Listening on port 443.
[Wed Feb 16 22:09:27 2005] [notice] Child 1792: Listening on port 443.
[Wed Feb 16 22:09:27 2005] [notice] Child 1792: Listening on port 80.
[Wed Feb 16 22:09:27 2005] [notice] Child 1792: Listening on port 80.
FATAL:  ere

#31624 [Com]: session_start() causes segmentation fault on complex objects

2005-02-22 Thread eerror at gmail dot com
 ID:   31624
 Comment by:   eerror at gmail dot com
 Reported By:  ericvanblokland at gmail dot com
 Status:   Open
 Bug Type: Session related
 Operating System: Fedora Core 2
 PHP Version:  4CVS-2005-01-22
 New Comment:

for me it segfaults as soon as the code hits session_start.  nothing
complex about the code.  even a 3 line test script will cause it.
box: suse9.1,apache2.0.52, php4.3.10


Previous Comments:


[2005-02-05 18:00:17] ericvanblokland at gmail dot com

This is indeed very interesting, I haven't examined your code
thoroughly yet, but my objects tend to do memory consuming data
processing operations on wakeup. So this issue might be related as
well.

Perhaps you want to post your own bug-report about this, because your
issue is very precise and has its own example code. If you do, please
post a link to your report here, because your issue might as well be
mine.



[2005-02-05 15:45:05] bertrand at toggg dot com

I'm experiencing a simpler segfault on PHP4.3.10 FC2 too this way, just
trying to double and again an array:

$arr = array (str_repeat('X', 65536));
$mem = 0;
while ($loop--) {
for ($i = count($arr); $i; $i--) {
$arr[] = $arr[0];
if ($i%16) {
continue;
}
if ( ( ($nmem = memory_get_usage()) - $mem) > 100) {
$mem = $nmem;
echo 'Count:'.count($arr)." ($mem bytes)\n";
flush();
}
}
echo $loop.':'.count($arr).'/'.memory_get_usage() . "
bytes\n";
flush();
}
echo "\n OK \n";
flush();

For 18 loops it breaks my default memory limit of 8 Mo:
Allowed memory size of 8388608 bytes exhausted as expected.

If I add before the loop:
 if (ini_set ('memory_limit', 16*1048576)) {
 echo "Set memory limit to 16 Mo\n";
 }
It's taking an incredible amount of time
and I get segfault.
What is strange, I get the output: 
Set memory limit to 16 Mo
17:2/87456
<...snip...>
Count:256113 (11380680 bytes)
0:262144/11621952 bytes

what means the end of last loop reached.
But I never get the final acknowledgement.

I understand it's much more simpler as yours,
but result is quite near.



[2005-02-04 13:05:53] ericvanblokland at gmail dot com

Are you sure this is related to my problem? Do you have any data in
your session? If so, it very well might be related, if you experience
the crash always, no matter what, on session_start(); you should look
for a solution elsewhere.

In my case, the segmentation faults are triggered within the
__wakeup(); functions of my objects that exists in the session. Under
certain conditions the compiler messes up when unserializing the
session (In my last test-run yesterday memory leaks where reported with
a compiler with debug enabled and de segfaults disappeared, without the
debug mode enabled the segfaults returned) causing simple variable
assignments to crash php. 

After a lot of testing I found when not putting certain data in the
session, the segfaults would disappear. However this data has nothing
to do with the crashing object. Unless the data has been referenced. It
shouldn't, but http://bugs.php.net/bug.php?id=24485 might be causing a
reference anyway.

Still, the php compiler contains some very serious bugs, that might be
causing, or causing the conditions which result in a segmentation
fault.



[2005-02-04 11:20:15] 1 at movesmountains dot com

Not sure if this is the same bug or not; however, I'm getting a
segfault on every call to session_start(), no matter how trivial the
code (  will do it).
FreeBSD 4.8-STABLE 
Apache/1.3.33 (Unix) mod_ssl/2.8.22 OpenSSL/0.9.7e PHP/4.3.10 

Not sure what other info would be useful to you.



[2005-01-23 16:25:03] ericvanblokland at gmail dot com

Some replies seem to be missing in my report...



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

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


#31955 [Bgs]: Exception message length is limited

2005-02-22 Thread exaton at free dot fr
 ID:   31955
 User updated by:  exaton at free dot fr
 Reported By:  exaton at free dot fr
 Status:   Bogus
 Bug Type: Class/Object related
 Operating System: WinXP Pro SP2
 PHP Version:  5CVS-2005-02-13 (dev)
 New Comment:

Arg ! I know my php.ini directives but never linked this issue to
log_errors_max_len... because it sounds like (and is described as, in
comments) the maximum length of an error message as reproduced in an
errorlog...

'twould be logical to trim the length of error messages in a log so as
to avoid file bloat, without necessarily limiting the length of error
output on a page... Hence my being misled.

Perhaps todo make the php.ini comment for this directive slightly more
explicit ?

Thanks a lot for pointing this out, anyway.


Previous Comments:


[2005-02-22 11:05:28] [EMAIL PROTECTED]

No, *all* error messages are limited to the value of
log_errors_max_len.
For example, this code:

will not output "long string" 1 times, the message you'll see will
be truncated too.

Also, please note that messages are truncated only during the output,
you still can get the original error message with call to
$exception->getMessage() method.

So, you have to change log_errors_max_len option in your php.ini if you
want to see full error messages that are longer than 1024 bytes (that's
default value).
That's expected behaviour.



[2005-02-13 17:20:52] exaton at free dot fr

Description:

[With PHP 5.0.4-dev Feb 13 2005 10:15:43 running on Apache 2.0.52 in
Windows XP SP2]

It appears that Exceptions have some sort of limit on the length of
their messages. When the message is too long, the throwing info is
simply truncated, leaving only the "in  on line " intact at
the end.

Upon causing an Exception thus (sorry for the length, but it's the
whole point) :

throw new
Exception('012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567!
8');

one will notice the truncature described. Adding more figures to the
message will not change the incorrect output (truncature occurs at the
same length). Shortening that message, on the other hand, will
progressively "reveal" the rest of the throwing info.
(N.B. : because of HTML whitespace this is not evident until the
message is shortened by at least 4 or 5 bytes).

In this instance, the limit is of 979 bytes in the message, for a total
of 1127 bytes of HTML-decorated throwing info. These figures vary
however, total throwing info 1161 bytes long, eg., having also been
encountered, in another situation.

Said situation is a complex cause-exceptions handling part of my
company's web development kit (much to long and involuted to present as
reproduce code). Just saying that to explain how I came across such an
error : the throwing info of cause exceptions, nested to arbitrary
depth, can produce a very long message for the top Exception thrown.

Thank you for your time in solving this.






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


#29757 [Com]: Sybase compile error

2005-02-22 Thread drbob at TheManFromSPUD dot com
 ID:   29757
 Comment by:   drbob at TheManFromSPUD dot com
 Reported By:  pm at wallit dot net
 Status:   Open
 Bug Type: Compile Failure
 Operating System: Sun Solaris 8
 PHP Version:  5.0.1
 New Comment:

This alswo occurs with PHP 5.0.3 on Fedora Core 3 with Sybase 11.1.1
and 12.5.


Previous Comments:


[2005-02-04 16:36:18] jpollock at ncbi dot nlm dot nih dot gov

[EMAIL PROTECTED]:/opt/local/src/php-5.0.3$ make
gcc  -Iext/sybase/ -I/opt/local/src/php-5.0.3/ext/sybase/
-DPHP_ATOM_INC -I/opt/local/src/php-5.0.3/include
-I/opt/local/src/php-5.0.3/main -I/opt/local/src/php-5.0.3
-I/opt/local/src/php-5.0.3/Zend -I/usr/local/gnome2/include/libxml2
-I/netopt/Sybase/clients/current/include 
-I/opt/local/src/php-5.0.3/TSRM  -g -O2  -c
/opt/local/src/php-5.0.3/ext/sybase/php_sybase_db.c -o
ext/sybase/php_sybase_db.o  && echo > ext/sybase/php_sybase_db.lo
/opt/local/src/php-5.0.3/ext/sybase/php_sybase_db.c: In function
`zif_sybase_fetch_object':
/opt/local/src/php-5.0.3/ext/sybase/php_sybase_db.c:1112: error:
invalid lvalue in assignment
/opt/local/src/php-5.0.3/ext/sybase/php_sybase_db.c:1113: error:
invalid lvalue in assignment
make: *** [ext/sybase/php_sybase_db.lo] Error 1
[EMAIL PROTECTED]:/opt/local/src/php-5.0.3$

A traceback of the nested macros:

[EMAIL PROTECTED]:/opt/local/src/php-5.0.3$ grep -ri Z_OBJPROP_P . |
grep define
./ext/soap/soap.c:#define FIND_SDL_PROPERTY(ss,tmp)
zend_hash_find(Z_OBJPROP_P(ss), "sdl", sizeof("sdl"), (void **)&tmp)
./Zend/zend_operators.h:#define Z_OBJPROP_P(zval_p)
Z_OBJPROP(*zval_p)
./Zend/zend_operators.h:#define Z_OBJPROP_PP(zval_pp)  
Z_OBJPROP(**zval_pp)
[EMAIL PROTECTED]:/opt/local/src/php-5.0.3$ grep -ri Z_OBJPROP\( . |
grep define
./Zend/zend_operators.h:#define Z_OBJPROP(zval)
Z_OBJ_HT((zval))->get_properties(&(zval) TSRMLS_CC)
./Zend/zend_operators.h:#define Z_OBJPROP_P(zval_p)
Z_OBJPROP(*zval_p)
./Zend/zend_operators.h:#define Z_OBJPROP_PP(zval_pp)  
Z_OBJPROP(**zval_pp)
[EMAIL PROTECTED]:/opt/local/src/php-5.0.3$ grep -ri Z_OBJ_HT\( . |
grep define
./Zend/zend_operators.h:#define Z_OBJ_HT(zval) 
(zval).value.obj.handlers
./Zend/zend_operators.h:#define Z_OBJPROP(zval)
Z_OBJ_HT((zval))->get_properties(&(zval) TSRMLS_CC)
./Zend/zend_operators.h:#define Z_OBJ_HANDLER(zval, hf)
Z_OBJ_HT((zval))->hf
./Zend/zend_operators.h:#define Z_OBJ_HT_P(zval_p) 
Z_OBJ_HT(*zval_p)
./Zend/zend_operators.h:#define Z_OBJ_HT_PP(zval_p)
Z_OBJ_HT(**zval_p)
./Zend/zend_object_handlers.h:#define IS_ZEND_STD_OBJECT(z)  ((z).type
== IS_OBJECT && (Z_OBJ_HT((z))->get_class_entry != NULL))
./Zend/zend_object_handlers.h:#define HAS_CLASS_ENTRY(z)
(Z_OBJ_HT(z)->get_class_entry != NULL)
[EMAIL PROTECTED]:/opt/local/src/php-5.0.3$



[2004-08-19 15:02:04] pm at wallit dot net

Description:

./configure --enable-simplexml --with-sybase=/usr/local/freetds/
--with-mysql --with-apxs=/usr/local/wac/bin/apxs

followed by a "make" results in compile error for Sybase and FreeTDS
support:

/bin/sh /home/php-5.0.1/libtool --silent --preserve-dup-deps
--mode=compile gcc  -Iext/sybase/ -I/home/php-5.0.1/ext/sybase/
-DPHP_ATOM_INC -I/home/php-5.0.1/include -I/home/php-5.0.1/main
-I/home/php-5.0.1 -I/home/php-5.0.1/Zend -I/usr/local/include/libxml2
-I/usr/local/include/mysql -I/usr/local/freetds//include 
-D_POSIX_PTHREAD_SEMANTICS -I/home/php-5.0.1/TSRM  -g -O2  -prefer-pic
-c /home/php-5.0.1/ext/sybase/php_sybase_db.c -o
ext/sybase/php_sybase_db.lo
/home/php-5.0.1/ext/sybase/php_sybase_db.c: In function
`zif_sybase_fetch_object':
/home/php-5.0.1/ext/sybase/php_sybase_db.c:1112: invalid lvalue in
assignment
/home/php-5.0.1/ext/sybase/php_sybase_db.c:1113: invalid lvalue in
assignment
make: *** [ext/sybase/php_sybase_db.lo] Error 1







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


#32060 [Fbk->Opn]: configure host type detection broken

2005-02-22 Thread dg at orbhost dot net
 ID:   32060
 User updated by:  dg at orbhost dot net
 Reported By:  dg at orbhost dot net
-Status:   Feedback
+Status:   Open
 Bug Type: Compile Failure
 Operating System: tru64 5.1b
 PHP Version:  4CVS-2005-02-22 (stable)
 New Comment:

I just grabbed the snapshot php4-STABLE-200502221530.tar.gz
I'm not changing anything in config.guess or anything else.
here's how far it goes:

creating cache ./config.cache
checking host system type... configure: error: can not guess host type;
you must specify one

and config.log has just this:

configure:1653: checking host system type

the host type that should be detected usually is:

alphaev56-dec-osf5.1

If I'm feeding it to the configure line then it allows it to proceed.

What else should I try to track this problem?


Previous Comments:


[2005-02-22 08:29:30] [EMAIL PROTECTED]

What does this command run in the source directory output:

# ./config.guess




[2005-02-22 04:46:03] dg at orbhost dot net

Description:

I've been trying to build 4.3.10 on tru64 5.1b and several things are
broken, so I've been trying to build from a daily snapshot for several
days, grabbing the latest snapshot and trying it out. For several days
now, the configure host type detection has been broken, at least on
tru64. It can't guess the host type any more and just stops before
doing anything.
I've been giving it the host type myself to allow it to proceed, and
that works.
I searched the reported bugs for such an issue and couldn't find one,
so here's mine.
More things are broken, but it's with some modules and extensions, so
if I turn them off, I can compile the latest php completely, but
basically all extra stuff has to be turned off, otherwise there are
errors. (that may be a bug report for later)






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


#32065 [Csd->Bgs]: session_start() ALWAYS makes a new session

2005-02-22 Thread tony2001
 ID:   32065
 Updated by:   [EMAIL PROTECTED]
 Reported By:  mikegmarshall at hotmail dot com
-Status:   Closed
+Status:   Bogus
 Bug Type: IIS related
 Operating System: Windows 2000 IIS5
 PHP Version:  5.0.3
 New Comment:

We mark such reports as bogus.


Previous Comments:


[2005-02-22 16:17:09] mikegmarshall at hotmail dot com

I am a very experienced IT Support/Software Engineer...I spend all day
telling people to "get the latest updates"...you would think I would
listen to my own advice wouldn't ya :)

I did all the updates at windowsupdate.com - no idea which one fixed
it, but there were about 15. One of them did it.

*hangs head in shame*



[2005-02-22 15:06:34] mikegmarshall at hotmail dot com

Description:

When I call session_start() with IIS5, it always creates a new
session.

I have 2 servers - both with PHP 5.0.3, one with IIS 5 and one with
IIS6. php.ini is identical in both (i.e. copied from one to the other).
On the IIS6 machine, the SID echoed never changes if I press refresh. On
the IIS5 machine it generates a new SID every 1-2 mins of inactivity.

I have not yet found a suitable workaround.

Reproduce code:
---


Wait 60 secs or so and press refresh - the SID changes.

Expected result:

The sessionid that is echoed should remain the same.

Actual result:
--
The SID changes.





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


#32062 [Fbk->Opn]: mbstring fails to match encoding with some locale settings

2005-02-22 Thread [EMAIL PROTECTED]
 ID:   32062
 User updated by:  [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
-Status:   Feedback
+Status:   Open
 Bug Type: mbstring related
 Operating System: Irrelevant
 PHP Version:  Irrelevant
 New Comment:

Right, there were typos. The reproduce code should've 
been




Previous Comments:


[2005-02-22 15:25:03] [EMAIL PROTECTED]

tr_TR == Turkish, and ISO-8859-1 is not a valid character set of that
locale, no?



[2005-02-22 06:55:52] [EMAIL PROTECTED]

Description:

mbstring fails to match encoding name against any one of 
the supported encodings with some locale settings.

Irrelevant to bug #29955.

Reproduce code:
---


Expected result:

string(1) "a"
string(1) "a"
string(1) "a"
string(1) "a"

Actual result:
--
string(1) "a"
string(1) "a"

Warning: mb_convert_encoding(): Illegal character 
encoding specified in %s on line %d
string(1) "a"
string(1) "a"





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


#32065 [Opn->Csd]: session_start() ALWAYS makes a new session

2005-02-22 Thread mikegmarshall at hotmail dot com
 ID:   32065
 User updated by:  mikegmarshall at hotmail dot com
 Reported By:  mikegmarshall at hotmail dot com
-Status:   Open
+Status:   Closed
 Bug Type: IIS related
 Operating System: Windows 2000 IIS5
 PHP Version:  5.0.3
 New Comment:

I am a very experienced IT Support/Software Engineer...I spend all day
telling people to "get the latest updates"...you would think I would
listen to my own advice wouldn't ya :)

I did all the updates at windowsupdate.com - no idea which one fixed
it, but there were about 15. One of them did it.

*hangs head in shame*


Previous Comments:


[2005-02-22 15:06:34] mikegmarshall at hotmail dot com

Description:

When I call session_start() with IIS5, it always creates a new
session.

I have 2 servers - both with PHP 5.0.3, one with IIS 5 and one with
IIS6. php.ini is identical in both (i.e. copied from one to the other).
On the IIS6 machine, the SID echoed never changes if I press refresh. On
the IIS5 machine it generates a new SID every 1-2 mins of inactivity.

I have not yet found a suitable workaround.

Reproduce code:
---


Wait 60 secs or so and press refresh - the SID changes.

Expected result:

The sessionid that is echoed should remain the same.

Actual result:
--
The SID changes.





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


#32067 [NEW]: DSO problems

2005-02-22 Thread j dot lammerts at chello dot nl
From: j dot lammerts at chello dot nl
Operating system: AIX 5.2
PHP version:  4CVS-2005-02-22 (stable)
PHP Bug Type: *Configuration Issues
Bug description:  DSO problems

Description:

Hi,
I seem to be unable to get the latetst stable php4 to compile.
I'm using AIX 5.2 and IBM HTTPServer 2.0.47.1
If I try to configure with --apxs=/usr/IBMIHS/bin/apxs
I get the message :
Configuring SAPI modules
checking for AOLserver support... no
checking for Apache 1.x module support via DSO through APXS... expr:
non-numeric argument
yes
Then, at the end :
WARNING: Your /usr/IBMIHS/bin/apxs script is most likely broken.

If I try to configure with --apxs2=/usr/IBMIHS/bin/apxs
I get the message:
checking for Apache 2.0 filter-module support via DSO through APXS... no
checking for Apache 2.0 handler-module support via DSO through APXS...
expr: non-numeric a
rgument
configure: error: You have enabled Apache 2 support while your server is
Apache 1.3.  Plea
se use the appropiate switch --with-apxs (without the 2)
(although I'm using 2.0.47.1 ??)

Is this due to the fact that IBM messes around with standard Apache
configs, and makes up their own apxs ?

Cheers


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


#32066 [NEW]: display_errors=off also suppresses output from php -l

2005-02-22 Thread marcus at synchromedia dot co dot uk
From: marcus at synchromedia dot co dot uk
Operating system: RedHat Enterprise Linux 3
PHP version:  5.0.3
PHP Bug Type: PHP options/info functions
Bug description:  display_errors=off also suppresses output from php -l

Description:

In php5, if php.ini contains a display_errors=off 
directive, it also suppresses error details from 'php 
-l' on a command line. I guess this could be a 
deliberate change in pHP5, but it is really not very 
helpful as php -l will only ever be run by developers.

This is in contrast to php4, which always shows errors 
from php -l, even if display_errors is off.

Reproduce code:
---
execute this script (containing a deliberate error) using php -l on a
command line with display_errors turned off



Expected result:

Parse error: parse error, unexpected ';' in /home/
username/error.php on line 2

Actual result:
--
no output is generated at all.

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


#31288 [Opn->Csd]: mysql_fetch_field() crashes

2005-02-22 Thread iliaa
 ID:   31288
 Updated by:   [EMAIL PROTECTED]
 Reported By:  m dot brachner at gmx dot at
-Status:   Open
+Status:   Closed
 Bug Type: MySQL related
 Operating System: Windows XP
 PHP Version:  5CVS-2004-12-24 (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:


[2005-01-09 19:06:00] kurt at indermaur dot com

Failed for me with a "Segmentation Violation" on freebsd, php 4.3.10
and php 5.0.3 (switched to 5.x after encountering this bug), with mysql
4.0.22. I tracked it down to line 2250 of ext/mysql/php_mysql.c:

add_property_string(return_value,
"def",(mysql_field->def?mysql_field->def
:empty_string), 1);

According to mysql's documentation
(http://dev.mysql.com/doc/mysql/en/C_API_datatypes.html, with my
emphasis added):

char * def - The default value of this field, as a null-terminated
string. ***This is set only if you use mysql_list_fields()***.

My guess is that *def is never initialized, so it may very well not be
null, and then just about any attempt to retrieve its value will result
in a segmentation violation (or whatever your OS calls a reference to
memory outside the program's control).

A simple workaround for me was to comment out line 2250.



[2004-12-25 18:52:13] m dot brachner at gmx dot at

Using CGI Version
Internet Information Server Version 5.1



[2004-12-24 17:18:21] m dot brachner at gmx dot at

Description:

mysql_fetch_field produces an PHP-Crash. A Modal Window pops up (I have
a German XP):
php-cgi.exe Error in Application
The instruction at '0x1000589c' referenced memory at '0x0001'.
The memory could not be read.
Click OK to terminate the program. 

MySQL Version 4.0.18

Reproduce code:
---
\n";
   $meta = mysql_fetch_field($result, $i);
   $i++;
}
mysql_free_result($result);
?> 

Expected result:

mysql_fetch_field should do the documented operations.

Actual result:
--
mysql_fetch_field produces an PHP-Crash. A Modal Window pops up (I have
a German XP):
php-cgi.exe Error in Application
The instruction at '0x1000589c' referenced memory at '0x0001'.
The memory could not be read.
Click OK to terminate the program. 






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


#31347 [Opn->Ver]: is_dir and is_file (incorrectly) return true for any string > 255 characters

2005-02-22 Thread iliaa
 ID:   31347
 Updated by:   [EMAIL PROTECTED]
 Reported By:  gilad dot buzi at concatel dot com
-Status:   Open
+Status:   Verified
 Bug Type: *Directory/Filesystem functions
 Operating System: Windows (2000/XP)
 PHP Version:  5.0.3
 New Comment:

Win32 specific bug, due to the stat() function not having handling in
place for filenames >255 chars.


Previous Comments:


[2005-02-20 16:21:11] smith at backendmedia dot com

You can add file_exists() to the list of functions that have this
error. I tested this with php4-win32-STABLE-200502081330.zip



[2004-12-30 10:43:57] gilad dot buzi at concatel dot com

Description:

is_dir() and is_file() (incorrectly) return true for any string larger
than 255 characters.

I tried this on two different machines, with the out of the box,
precompiled/downloaded Windows version of php 5.0.3.  No changes were
made to the standard php.ini-dist.  No extra extensions were loaded. 
We are using PHP as an Apache2 module (php2apache2.dll).  We also tried
the latest CVS snapshot (5CVS-2004-12-30 (dev)) and got the same
results. 

We tried, and could NOT reproduce this on Linux.  It only failed on
windows platforms.  

Curiously (or maybe not so curious), file_exists() DOES work fine. 

Reproduce code:
---
myfilename is ".strlen($myfilename)." characters long";
echo "is_dir: ".is_dir($myfilename);
echo "file_exists: ".file_exists($myfilename);
echo "is_file: ".is_file($myfilename);

$myfilename="ccsaccss";
echo "myfilename is: $myfilename";
echo "myfilename is ".strlen($myfilename)." characters long";
echo "is_dir: ".is_dir($myfilename);
echo "file_exists: ".file_exists($myfilename);
echo "is_file: ".is_file($myfilename);
?>

Expected result:

is_dir() and is_file() should return false if the file or directory
does not exist, regardless of the length of the string they are
passed.



Actual result:
--
Result for above script is:
myfilename is:
aaaccsaccss
myfilename is 255 characters long
is_dir:
file_exists:
is_file:

myfilename is:
ccsaccss
myfilename is 256 characters long
is_dir: 1
file_exists: 1
is_file:





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


#31969 [Opn->Bgs]: disk_free_space() sometimes return Zero in Samba mounted file systems

2005-02-22 Thread iliaa
 ID:   31969
 Updated by:   [EMAIL PROTECTED]
 Reported By:  lrosa at venus dot it
-Status:   Open
+Status:   Bogus
 Bug Type: Filesystem function related
 Operating System: Linux Fedora Core 3
 PHP Version:  5.0.3
 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. 

Even if you think it is not a bug, we often know better than you,
please consult the support channels first before even considering
to reopen this report.

Thank you for your interest in PHP.

The output returned is the same as the one returned by the underlying C
library function used to retrieve this information.


Previous Comments:


[2005-02-14 12:30:13] lrosa at venus dot it

Description:

I have a Linux box with 20 file system mounted via Samba.
Sometimes, randomly, calling disk_free_space() on some file systems it
retirns zero instead the real value. Reissuing the same command few
minutes later returns the right value. Sometimes happens that the Samba
remote filesystem connection is slow, so this may happen.

It would be nice if disk_free_space() would return a negative value if
it is unable to get the correct value, otherwise it would be impossible
to distinguish between a "real" Zero Bytes Free situation and a
Temporary Timeout Problem situation.






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


#32062 [Opn->Fbk]: mbstring fails to match encoding with some locale settings

2005-02-22 Thread iliaa
 ID:   32062
 Updated by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
-Status:   Open
+Status:   Feedback
 Bug Type: mbstring related
 Operating System: Irrelevant
 PHP Version:  Irrelevant
 New Comment:

tr_TR == Turkish, and ISO-8859-1 is not a valid character set of that
locale, no?


Previous Comments:


[2005-02-22 06:55:52] [EMAIL PROTECTED]

Description:

mbstring fails to match encoding name against any one of 
the supported encodings with some locale settings.

Irrelevant to bug #29955.

Reproduce code:
---


Expected result:

string(1) "a"
string(1) "a"
string(1) "a"
string(1) "a"

Actual result:
--
string(1) "a"
string(1) "a"

Warning: mb_convert_encoding(): Illegal character 
encoding specified in %s on line %d
string(1) "a"
string(1) "a"





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


#32065 [NEW]: session_start() ALWAYS makes a new session

2005-02-22 Thread mikegmarshall at hotmail dot com
From: mikegmarshall at hotmail dot com
Operating system: Windows 2000 IIS5
PHP version:  5.0.3
PHP Bug Type: IIS related
Bug description:  session_start() ALWAYS makes a new session

Description:

When I call session_start() with IIS5, it always creates a new session.

I have 2 servers - both with PHP 5.0.3, one with IIS 5 and one with IIS6.
php.ini is identical in both (i.e. copied from one to the other). On the
IIS6 machine, the SID echoed never changes if I press refresh. On the IIS5
machine it generates a new SID every 1-2 mins of inactivity.

I have not yet found a suitable workaround.

Reproduce code:
---


Wait 60 secs or so and press refresh - the SID changes.

Expected result:

The sessionid that is echoed should remain the same.

Actual result:
--
The SID changes.

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


#32061 [Bgs]: Call to new COM() doesn't work

2005-02-22 Thread stevedar at verizon dot net
 ID:   32061
 User updated by:  stevedar at verizon dot net
 Reported By:  stevedar at verizon dot net
 Status:   Bogus
 Bug Type: COM related
 Operating System: Windows 2000
 PHP Version:  4.3.10
 New Comment:

I appologize.  I did the search, I downloaded the CVS and was pretty
sure I unzipped it over my current PHP environment, but I must not have
done so or something.  The latest CVS does in fact work.


Previous Comments:


[2005-02-22 08:27:38] [EMAIL PROTECTED]

Search first..this has already been reported dozen times and fixed too
in CVS.




[2005-02-22 06:51:59] stevedar at verizon dot net

Description:

The code I want to execute is:

$objCOM = new COM("PFProCOMControl.PFProCOMControl.1"); 
if ( !is_object ( $objCOM ) )
{
echo 'objCOM is not a object';
}

It always comes out saying that $objCOM is not an object & therefore I
cannot work with its methods and so on.  If I call them I get:

objCOM is not a object
Fatal error: Call to a member function on a non-object in
C:\Inetpub\wwwroot\mcr\testpfp.php on line 27

If I switch to this:

$objCOM = com_load("PFProCOMControl.PFProCOMControl.1"); 
if ( !is_object ( $objCOM ) )
{
echo 'objCOM is not a object';
}

It works!  I have an object defined...



Reproduce code:
---
$objCOM = new COM("PFProCOMControl.PFProCOMControl.1"); 
if ( !is_object ( $objCOM ) )
{
echo 'objCOM is not a object';
}


Expected result:

I expect no output because $objCOM IS AN OBJECT!






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


#32054 [Bgs]: bug 31363 confirmed on FreeBSD (not fixed)

2005-02-22 Thread maka3d at yahoo dot com dot br
 ID:   32054
 User updated by:  maka3d at yahoo dot com dot br
 Reported By:  maka3d at yahoo dot com dot br
 Status:   Bogus
 Bug Type: Filesystem function related
 Operating System: FreeBSD
 PHP Version:  5.0.3
 New Comment:

How can I do that? It as for a password, but wasn't me who create the
original entry


Previous Comments:


[2005-02-21 18:35:57] [EMAIL PROTECTED]

Add comments to the original report.



[2005-02-21 15:52:20] maka3d at yahoo dot com dot br

Description:

the bug #31363 is confirmed on FreeBSD too, but not on WinXP.   Not
fixed yet 






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


#31668 [Com]: multi_query works exactly every other time

2005-02-22 Thread camka at email dot ee
 ID:   31668
 Comment by:   camka at email dot ee
 Reported By:  exaton at free dot fr
 Status:   Open
 Bug Type: MySQLi related
 Operating System: WinXP
 PHP Version:  5CVS-2005-01-23 (dev)
 New Comment:

setting query_cache_type to OFF didn't change anything. still the same
error.


Previous Comments:


[2005-02-22 10:55:59] camka at email dot ee

I used exaton at free dot fr 's code to reproduce the problem. And I
succeeded.
The following code works just as it was described above, giving the
"You have an error in your SQL syntax" error or workind just fine.
 multi_query('SELECT 1;SELECT 2');

do {
  $res = $SQL -> store_result();
  if ($SQL -> errno == 0)
  {
while ($arr = $res -> fetch_assoc())
  print_r($arr);
$res -> free();
  }
  else
echo $SQL -> error; // (*)
}
while ($SQL -> next_result());

$SQL -> close();
?>

setting SQL_NO_CACHE directive didn't do the thing as ingmar at
hackthenet dot org suggested. The query_cache_size server variable
value is 0.

mysql> show variables like '%query_cache%';
+--+-+
| Variable_name| Value   |
+--+-+
| have_query_cache | YES |
| query_cache_limit| 1048576 |
| query_cache_min_res_unit | 4096|
| query_cache_size | 0   |
| query_cache_type | ON  |
| query_cache_wlock_invalidate | OFF |
+--+-+
6 rows in set (0.00 sec)

and finally: explicite calling the query method before multy_query
$SQL->query('select 343'); causes the "syntax error" error not to
occure anymore.

i'll try to set query_cache_type to OFF value and share the results
soon.



[2005-02-12 13:25:06] ingmar at hackthenet dot org

hello,
i had a very similar problem.

The MySQL-Server hung up (SHOW PROCESSLIST says process is in the
sleep-state) every time I refreshed the page where $db->multi_query()
was called.

But I found a workaround at least for SELECT-Queries. Simply use
SELECT SQL_NO_CACHE * FROM tbl
instead of
SELECT * FROM tbl.



[2005-02-11 19:11:33] exaton at free dot fr

I'm afraid I can no longer help out here ; I needed to upgrade the DB
layer my comany's web application framework fast, and have therefore
switched to PostgreSQL in the meantime.

camka at email dot ee, I leave this in your hands...



[2005-02-11 16:15:00] [EMAIL PROTECTED]

Does this problem still occur when you disable MySQL's 
query cache? 



[2005-02-11 10:41:27] camka at email dot ee

I'm facing the same problem on Linux environment.
Looking forward to get the bug fixed.



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

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


#29426 [NoF->Csd]: Incomplete/inconsistent functionality

2005-02-22 Thread php at peterrobins dot co dot uk
 ID:   29426
 User updated by:  php at peterrobins dot co dot uk
 Reported By:  php at peterrobins dot co dot uk
-Status:   No Feedback
+Status:   Closed
 Bug Type: SimpleXML related
 Operating System: Linux 2.4
 PHP Version:  5.0.0
 New Comment:

I have now revisited this using 5.0.3. Adding a node still  
doesn't work, but the manual page no longer claims that it  
does! Because of this, I've changed the status to closed.  
However, the manual page is still misleading, as it says 
(Example 7) "The object allows for manipulation of all of 
its elements" which is not really true. There are many 
limitations, as stated in this bug report and in the 
comment from brcavanagh, which says much the same thing. 
I'd suggest the manual page be updated to specify that 
SimpleXML is primarily for reading and simple updates, and 
is not really intended for more complex updating or 
deletion of nodes/nodesets.


Previous Comments:


[2005-02-22 01:00:08] 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".



[2005-02-15 00:33:45] [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 ,
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 to avoid embedding huge scripts into the report.





[2004-10-06 07:14:06] matt dot bevan at marginsoftware dot com

I am also in the position where I need to be able to 
create and insert a SimpleXMLElement before or after an 
arbitrary SimpleXMLElement, then remove the previous 
instance.  This is to move XML elements from one location 
in an XML file into another. 
 
I'll likely be switching to/from a DOM object to 
accomplish this, however.



[2004-09-19 17:40:18] phpbugs at ilibi dot com

Either the documentation for simplexml should be 
clarified about exactly what can and can not be added/
edited. Or the ability to add nodes should be added to 
simplexml.



[2004-08-08 01:18:36] cyberlot at cyberlot dot net

Confirming this bug exists, Have the same problem, I need to add to a
simplexml object on the fly and can't



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

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


#32064 [Opn->Bgs]: session_regenerate_id doesn't remove old session file

2005-02-22 Thread tony2001
 ID:   32064
 Updated by:   [EMAIL PROTECTED]
 Reported By:  michal-bcc at logix dot cz
-Status:   Open
+Status:   Bogus
 Bug Type: Session related
 Operating System: Linux/x86
 PHP Version:  4.3.8
 New Comment:

>IMO it should be removed at the time of session_regenerate_id()
completion.
Why do you think so?
_All_ session files are removed by garbage collection, if you want to
kill your session file explicitly - you have to call
session_destroy().
That's expected behaviour and I don't see any bugs here.


Previous Comments:


[2005-02-22 11:13:20] michal-bcc at logix dot cz

Description:

When regenerating session ID with session_regenerate_id() the file with
old ID is kept in the appropriate directory. 

Say that I create a session with session_start() and get ID=abcd. Then
sess_abcd is created.

Later I decide to generate a different ID for whatever reason, call
session_regenerate_id() and get ID=1234. The old file sess_abcd,
although truncated, is still kept in the filesystem. IMO it should be
removed at the time of session_regenerate_id() completion.

Reproduce code:
---


Expected result:

Only a single file sess_ should be in session dir.

Actual result:
--
However both files are still there...





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


#32064 [NEW]: session_regenerate_id doesn't remove old session file

2005-02-22 Thread michal-bcc at logix dot cz
From: michal-bcc at logix dot cz
Operating system: Linux/x86
PHP version:  4.3.8
PHP Bug Type: Session related
Bug description:  session_regenerate_id doesn't remove old session file

Description:

When regenerating session ID with session_regenerate_id() the file with
old ID is kept in the appropriate directory. 

Say that I create a session with session_start() and get ID=abcd. Then
sess_abcd is created.

Later I decide to generate a different ID for whatever reason, call
session_regenerate_id() and get ID=1234. The old file sess_abcd, although
truncated, is still kept in the filesystem. IMO it should be removed at
the time of session_regenerate_id() completion.

Reproduce code:
---


Expected result:

Only a single file sess_ should be in session dir.

Actual result:
--
However both files are still there...

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


#32063 [Opn->Csd]: mb_convert_encoding ignores named entity 'alpha'

2005-02-22 Thread moriyoshi
 ID:   32063
 Updated by:   [EMAIL PROTECTED]
 Reported By:  webmaster at reddi dot de
-Status:   Open
+Status:   Closed
 Bug Type: mbstring related
 Operating System: linux
 PHP Version:  5.0.3
 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:


[2005-02-22 10:37:47] webmaster at reddi dot de

Description:

if to_encoding is UTF-8
and from_encoding is HTML-ENTITIES,
mb_convert_encoding leaves named entity 'alpha' unconverted.

This is pesky!




Reproduce code:
---



Expected result:

ΑΒαβ

Actual result:
--
ΑΒαβ





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


#29955 [Opn->Ana]: mb_strtoupper() / lower() broken with some locale

2005-02-22 Thread moriyoshi
 ID:   29955
 Updated by:   [EMAIL PROTECTED]
-Summary:  mb_strtoupper() / lower() broken with iso-8859-9
 Reported By:  jan at horde dot org
-Status:   Open
+Status:   Analyzed
 Bug Type: mbstring related
 Operating System: Linux
 PHP Version:  4CVS-2004-09-02 (stable)
 New Comment:

It turned out this is because mbstring doesn't take the 
locale into consideration.




Previous Comments:


[2005-02-21 20:51:07] jan at horde dot org

No, this didn't change anything.



[2005-02-21 11:02:02] [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-09-02 17:15:42] jan at horde dot org

Description:

In ISO-8859-9 (Turkish) the uppercase letter of "i" is a dotted
uppercase "I", the lowercase letter of "I" is a dotless "i". But
mb_strtolower() und mb_strtoupper() simply return the ASCII uppercase
or lowercase counterparts.

You get the correct result with:
setlocale(LC_ALL, 'tr_TR');
echo strtoupper('i');
echo strtolower('I');

But the wrong results with:
echo mb_strtoupper('i', 'iso-8859-9');
echo mb_strtolower('I', 'iso-8859-9');







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


#31955 [Opn->Bgs]: Exception message length is limited

2005-02-22 Thread tony2001
 ID:   31955
 Updated by:   [EMAIL PROTECTED]
 Reported By:  exaton at free dot fr
-Status:   Open
+Status:   Bogus
 Bug Type: Class/Object related
 Operating System: WinXP Pro SP2
 PHP Version:  5CVS-2005-02-13 (dev)
 New Comment:

No, *all* error messages are limited to the value of
log_errors_max_len.
For example, this code:

will not output "long string" 1 times, the message you'll see will
be truncated too.

Also, please note that messages are truncated only during the output,
you still can get the original error message with call to
$exception->getMessage() method.

So, you have to change log_errors_max_len option in your php.ini if you
want to see full error messages that are longer than 1024 bytes (that's
default value).
That's expected behaviour.


Previous Comments:


[2005-02-13 17:20:52] exaton at free dot fr

Description:

[With PHP 5.0.4-dev Feb 13 2005 10:15:43 running on Apache 2.0.52 in
Windows XP SP2]

It appears that Exceptions have some sort of limit on the length of
their messages. When the message is too long, the throwing info is
simply truncated, leaving only the "in  on line " intact at
the end.

Upon causing an Exception thus (sorry for the length, but it's the
whole point) :

throw new
Exception('012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567!
8');

one will notice the truncature described. Adding more figures to the
message will not change the incorrect output (truncature occurs at the
same length). Shortening that message, on the other hand, will
progressively "reveal" the rest of the throwing info.
(N.B. : because of HTML whitespace this is not evident until the
message is shortened by at least 4 or 5 bytes).

In this instance, the limit is of 979 bytes in the message, for a total
of 1127 bytes of HTML-decorated throwing info. These figures vary
however, total throwing info 1161 bytes long, eg., having also been
encountered, in another situation.

Said situation is a complex cause-exceptions handling part of my
company's web development kit (much to long and involuted to present as
reproduce code). Just saying that to explain how I came across such an
error : the throwing info of cause exceptions, nested to arbitrary
depth, can produce a very long message for the top Exception thrown.

Thank you for your time in solving this.






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


#31668 [Com]: multi_query works exactly every other time

2005-02-22 Thread camka at email dot ee
 ID:   31668
 Comment by:   camka at email dot ee
 Reported By:  exaton at free dot fr
 Status:   Open
 Bug Type: MySQLi related
 Operating System: WinXP
 PHP Version:  5CVS-2005-01-23 (dev)
 New Comment:

I used exaton at free dot fr 's code to reproduce the problem. And I
succeeded.
The following code works just as it was described above, giving the
"You have an error in your SQL syntax" error or workind just fine.
 multi_query('SELECT 1;SELECT 2');

do {
  $res = $SQL -> store_result();
  if ($SQL -> errno == 0)
  {
while ($arr = $res -> fetch_assoc())
  print_r($arr);
$res -> free();
  }
  else
echo $SQL -> error; // (*)
}
while ($SQL -> next_result());

$SQL -> close();
?>

setting SQL_NO_CACHE directive didn't do the thing as ingmar at
hackthenet dot org suggested. The query_cache_size server variable
value is 0.

mysql> show variables like '%query_cache%';
+--+-+
| Variable_name| Value   |
+--+-+
| have_query_cache | YES |
| query_cache_limit| 1048576 |
| query_cache_min_res_unit | 4096|
| query_cache_size | 0   |
| query_cache_type | ON  |
| query_cache_wlock_invalidate | OFF |
+--+-+
6 rows in set (0.00 sec)

and finally: explicite calling the query method before multy_query
$SQL->query('select 343'); causes the "syntax error" error not to
occure anymore.

i'll try to set query_cache_type to OFF value and share the results
soon.


Previous Comments:


[2005-02-12 13:25:06] ingmar at hackthenet dot org

hello,
i had a very similar problem.

The MySQL-Server hung up (SHOW PROCESSLIST says process is in the
sleep-state) every time I refreshed the page where $db->multi_query()
was called.

But I found a workaround at least for SELECT-Queries. Simply use
SELECT SQL_NO_CACHE * FROM tbl
instead of
SELECT * FROM tbl.



[2005-02-11 19:11:33] exaton at free dot fr

I'm afraid I can no longer help out here ; I needed to upgrade the DB
layer my comany's web application framework fast, and have therefore
switched to PostgreSQL in the meantime.

camka at email dot ee, I leave this in your hands...



[2005-02-11 16:15:00] [EMAIL PROTECTED]

Does this problem still occur when you disable MySQL's 
query cache? 



[2005-02-11 10:41:27] camka at email dot ee

I'm facing the same problem on Linux environment.
Looking forward to get the bug fixed.



[2005-01-23 16:39:31] exaton at free dot fr

Hilarity continues :

First off I copy-pasted a second iteration of the code above right
after it, and I constate as expected that the first run through the
code does not work, whereas the second one does (alternation).

The FUN thing is, that if I continue my copy-pasting until I have n
copies of that code block in succession, then the first one still fails
9 times out of 10, with the same error, and then all subsequent blocks
work correctly.

Next up, I decided to give up on resultsets and do other things in my
multi queries ; consider the following block of code :

if (!$SQL -> multi_query('
  INSERT faq SET question = "q1", answer = "a1";
  INSERT faq SET question = "q2", answer = "a2";
  INSERT faq SET question = "q3", answer = "a3"
'))
  echo 'ERR i : #'.$SQL -> errno.' : '.$SQL -> error.''; (*)

The i on line (*) is hard-coded to correspond to the i-th block in a
new copy-paste sequence. Indeed, the minimum number of times you want
to copy-paste that block of code is twice, for a total a three blocks.
Then :

The first block fails with the same specious concatenation problem as
before :

"ERR 1 : #1064 : You have an error in your SQL syntax; check the manual
that corresponds to your MySQL server version for the right syntax to
use near '; INSERT faq SET question = "q2", answer = "a2"; INSERT faq
SET question =' at line 1"

Then the second block executes correctly, no error reported.

Then the third block manifestedly executes correctly (I do end up with
TWO sets of [q1,a1 ; q2,a2 ; q3,a3] in my table), BUT multi_query()
must return FALSE because I get :

"ERR 3 : #2013 : Lost connection to MySQL server during query"

And THEN, if I try to do anything else SQL-related, like for example a
simple :

$SQL -> query('DELETE FROM faq WHERE question = "q1"');

Then I log a very hilarious error for that query (which does not get
executed) :

"#2006 : MySQL server has gone away"

I love that.

OK, so I thought, let's look for a simple way of stopping a FIRST
multi_query from failing. Well all it takes is a very simple query to

#32063 [NEW]: mb_convert_encoding ignores named entity 'alpha'

2005-02-22 Thread webmaster at reddi dot de
From: webmaster at reddi dot de
Operating system: linux 
PHP version:  5.0.3
PHP Bug Type: mbstring related
Bug description:  mb_convert_encoding ignores named entity 'alpha'

Description:

if to_encoding is UTF-8
and from_encoding is HTML-ENTITIES,
mb_convert_encoding leaves named entity 'alpha' unconverted.

This is pesky!




Reproduce code:
---



Expected result:

ΑΒαβ

Actual result:
--
ΑΒαβ

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


#32007 [Bgs]: problem with GD + freetype2

2005-02-22 Thread bernard dot prevosto at ifremer dot fr
 ID:   32007
 User updated by:  bernard dot prevosto at ifremer dot fr
 Reported By:  bernard dot prevosto at ifremer dot fr
 Status:   Bogus
 Bug Type: GD related
 Operating System: solaris 5.8
 PHP Version:  4CVS-2005-02-17
 New Comment:

I add the path from this library and it'good
whith gd+freetype2+imap

you can close the call

Thanks


Previous Comments:


[2005-02-22 08:56:15] [EMAIL PROTECTED]

This bug system cut that url, but you'll see easily what letter is
missing from word solaris in it. :)




[2005-02-22 08:55:13] [EMAIL PROTECTED]

You will find couple of solutions by using this search:

http://www.google.com/search?q=%22libgcc_s.so.1%3A+open+failed%22+solaris

This is NOT any bug in PHP, just a broken installation of gcc on your
system. 




[2005-02-22 08:44:25] bernard dot prevosto at ifremer dot fr

The debug.log file:
--

CONFIGURE:   './configure' '--with-gd'
'--with-zlib-dir=/home/services/bibli/zlib'
'--with-jpeg-dir=/home/services/bibli/jpeglib'
'--with-png-dir=/home/services/bibli/pnglib'
'--with-tiff-dir=/home/services/bibli/tifflib'
'--with-freetype-dir=/home/services/bibli/freetype2'
CC: gcc
CFLAGS: -g -O2
CPPFLAGS:-D_POSIX_PTHREAD_SEMANTICS
CXX:
CXXFLAGS:   
INCLUDES:-I$(top_builddir)/Zend -I/home/services/bibli/zlib/include
-I/home/services/bibli/jpeglib/include
-I/home/services/bibli/pnglib/include
-I/home/services/bibli/freetype2/include
-I/home/services/bibli/freetype2/include/freetype2
LDFLAGS: -R/usr/ucblib -L/usr/ucblib
-R/home/services/logiciels/compilateurs/gcc-3.3/lib/gcc-lib/sparc-sun-solaris2.7/3.3
-L/home/services/logiciels/compilateurs/gcc-3.3/lib/gcc-lib/sparc-sun-solaris2.7/3.3
-R/home/services/bibli/zlib/lib -L/home/services/bibli/zlib/lib
-R/home/services/bibli/jpeglib/lib -L/home/services/bibli/jpeglib/lib
-R/home/services/bibli/pnglib/lib -L/home/services/bibli/pnglib/lib
-R/home/services/bibli/freetype2/lib
-L/home/services/bibli/freetype2/lib
LIBS:   -lfreetype -lpng -lz -ljpeg -lz -lresolv -lm -ldl -lnsl
-lsocket  -lgcc
DLIBS:  
SAPI:   cgi
PHP_RPATHS:  /usr/ucblib
/home/services/logiciels/compilateurs/gcc-3.3/lib/gcc-lib/sparc-sun-solaris2.7/3.3
/home/services/bibli/zlib/lib /home/services/bibli/jpeglib/lib
/home/services/bibli/pnglib/lib /home/services/bibli/freetype2/lib
uname -a:   SunOS iletudy 5.8 Generic_108528-29 sun4u sparc
SUNW,Sun-Fire-880

gcc -o conftest -g -O2  -D_POSIX_PTHREAD_SEMANTICS  -R/usr/ucblib
-L/usr/ucblib
-R/home/services/logiciels/compilateurs/gcc-3.3/lib/gcc-lib/sparc-sun-solaris2.7/3.3
-L/home/services/logiciels/compilateurs/gcc-3.3/lib/gcc-lib/sparc-sun-solaris2.7/3.3
-R/home/services/bibli/zlib/lib -L/home/services/bibli/zlib/lib
-R/home/services/bibli/jpeglib/lib -L/home/services/bibli/jpeglib/lib
-R/home/services/bibli/pnglib/lib -L/home/services/bibli/pnglib/lib
-R/home/services/bibli/freetype2/lib
-L/home/services/bibli/freetype2/lib conftest.c -lfreetype -lpng -lz
-ljpeg -lz -lresolv -lm -ldl -lnsl -lsocket  -lgcc 1>&5
ld.so.1: ./conftest: fatal: libgcc_s.so.1: open failed: No such file or
directory



[2005-02-21 19:43:31] [EMAIL PROTECTED]

Well, what was in the debug.log file...?




[2005-02-17 14:19:12] bernard dot prevosto at ifremer dot fr

Sorry

without IMAP i have:

checking for extended DES crypt... no
checking for MD5 crypt... no
Killed
checking for Blowfish crypt... no
checking whether flush should be called explicitly after a buffered
io... yes

without freetype2 or GD i have not tke ligne KILLED

at the end of configure in this case i have:
++
|   *** ATTENTION ***|
||
| Something is likely to be messed up here, because the configure|
| script was not able to detect a simple feature on your platform.   |
| This is often caused by incorrect configuration parameters. Please |
| see the file debug.log for error messages. |
||
| If you are unable to fix this, send the file debug.log to the  |
| php-install@lists.php.net mailing list and include appropiate  |
| information about your setup.  |

i have not without freetype2 or  GD



but the make work fine



The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug repo