#35009 [Ver-Asn]: mysql_pconnect() crashes when mysql is compiled shared and ZTS is enabled

2005-11-06 Thread sniper
 ID:   35009
 Updated by:   [EMAIL PROTECTED]
 Reported By:  glen at delfi dot ee
-Status:   Verified
+Status:   Assigned
-Bug Type: MySQL related
+Bug Type: Scripting Engine problem
 Operating System: *
 PHP Version:  5CVS-2005-11-06 (cvs)
-Assigned To:  
+Assigned To:  dmitry
 New Comment:

Seems to happen with any shared extension's persistent resources.
Dmitry, can you check this out please?


Previous Comments:


[2005-11-06 15:30:37] [EMAIL PROTECTED]

Verified. Reproducing steps:

# ./configure --disable-all --with-mysql=shared --enable-maintainer-zts
--enable-debug
# make
# gdb --args sapi/cli/php -dextension_dir=.
-dextension=modules/mysql.so -r '$f = mysql_pconnect();'
(gdb) run




[2005-11-01 16:42:25] glen at delfi dot ee

yes. appears so: 
 
$ ./configure --disable-all --with-mysql 
--enable-maintainer-zts --enable-debug 
$ make 
$ ./sapi/cli/php  -r '$r = mysql_pconnect(heart);echo 
$r\n;'; echo rc=$? 
Resource id #4 
rc=0 
$ ./sapi/cli/php -m 
[PHP Modules] 
date 
mysql 
standard 
 
[Zend Modules] 
 
code used: php5-200510281630



[2005-11-01 11:39:45] [EMAIL PROTECTED]

What if you configure the mysql extension as static, does it work then?



[2005-10-28 19:05:48] glen at delfi dot ee

Description:

$ php -r 'mysql_pconnect();'
Segmentation fault

you will need to specify proper auth strings for the connection to
succeed.

bug is present in php 4.4.0, php 5.0.5 with both ZTS enabled. on same
system disabling ZTS with php 4.4.0 the crash didn't occour.

also used php5-STABLE-200510281434 snapshot. and crash was
reproducible.


Reproduce code:
---
$ gdb --args php -r 'mysql_pconnect();'
GNU gdb 6.3
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and
you are
welcome to change it and/or distribute copies of it under certain
conditions.
Type show copying to see the conditions.
There is absolutely no warranty for GDB.  Type show warranty for
details.
This GDB was configured as --host= --target=i686-pld-linux...Using
host libthread_db library /lib/tls/libthread_db.so.1.

(gdb) run
Starting program: /usr/bin/php -r mysql_pconnect\(\)\;

Program received signal SIGSEGV, Segmentation fault.
0xb7879948 in ?? ()
(gdb) bt
#0  0xb7879948 in ?? ()
#1  0xb7f0d549 in plist_entry_destructor (ptr=0x80dbb00)
at
/home/builder/rpm/BUILD/php5-STABLE-200510281434/Zend/zend_list.c:210
#2  0xb7f0b53f in zend_hash_apply_deleter (ht=0x8052c60, p=0x80e3f40)
at
/home/builder/rpm/BUILD/php5-STABLE-200510281434/Zend/zend_hash.c:574
#3  0xb7f0b790 in zend_hash_graceful_reverse_destroy (ht=0x8052c60)
at
/home/builder/rpm/BUILD/php5-STABLE-200510281434/Zend/zend_hash.c:640
#4  0xb7f0d665 in zend_destroy_rsrc_list (ht=0x8052c60,
tsrm_ls=0x804f0a8)
at
/home/builder/rpm/BUILD/php5-STABLE-200510281434/Zend/zend_list.c:240
#5  0xb7f0146a in zend_shutdown (tsrm_ls=0x804f0a8) at
/home/builder/rpm/BUILD/php5-STABLE-200510281434/Zend/zend.c:714
#6  0xb7eaa3e3 in php_module_shutdown (tsrm_ls=0x804f0a8)
at
/home/builder/rpm/BUILD/php5-STABLE-200510281434/main/main.c:1529
#7  0x0804be44 in main (argc=3, argv=0xbfcb04a4)
at
/home/builder/rpm/BUILD/php5-STABLE-200510281434/sapi/cli/php_cli.c:1058
(gdb)






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


#35125 [Opn-Bgs]: touch often gives incorrect file modification time

2005-11-06 Thread sniper
 ID:   35125
 Updated by:   [EMAIL PROTECTED]
 Reported By:  dmceo415 at yahoo dot com
-Status:   Open
+Status:   Bogus
 Bug Type: Filesystem function related
 Operating System: Windows XP
 PHP Version:  5.0.5
 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.  Due to the volume
of reports we can not explain in detail here why your report is not
a bug.  The support channels will be able to provide an explanation
for you.

Thank you for your interest in PHP.

We only attach to the libc function. If windows misbehaves - not our
problem, report to Microsoft.



Previous Comments:


[2005-11-06 15:08:29] dmceo415 at yahoo dot com

Description:

I am  backing up a file (the path  filename of which are stored in 
$original; the path  filename of the copy are stored in $bkup). I 
would also like to copy the file modification time of $original, so, 
after copying the file itself, I use:

touch($bkup, filemtime($original));

However, after I use the above touch function, filemtime($original)
and filemtime($bkup) are often slightly different. For example, I might
have:

echo filemtime($original); // gives 1126191599

echo filemtime($bkup); // gives 1126191600

The touch function seems to be giving a slightly incorrect file
modification time.






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


#35125 [Bgs]: touch often gives incorrect file modification time

2005-11-06 Thread sniper
 ID:   35125
 Updated by:   [EMAIL PROTECTED]
 Reported By:  dmceo415 at yahoo dot com
 Status:   Bogus
 Bug Type: Filesystem function related
 Operating System: Windows XP
 PHP Version:  5.0.5
 New Comment:

Also note that filemtime() result is cached. (RTFM)



Previous Comments:


[2005-11-06 15:39:21] [EMAIL PROTECTED]

Sorry, but your problem does not imply a bug in PHP itself.  For a
list of more appropriate places to ask for help using PHP, please
visit http://www.php.net/support.php as this bug system is not the
appropriate forum for asking support questions.  Due to the volume
of reports we can not explain in detail here why your report is not
a bug.  The support channels will be able to provide an explanation
for you.

Thank you for your interest in PHP.

We only attach to the libc function. If windows misbehaves - not our
problem, report to Microsoft.




[2005-11-06 15:08:29] dmceo415 at yahoo dot com

Description:

I am  backing up a file (the path  filename of which are stored in 
$original; the path  filename of the copy are stored in $bkup). I 
would also like to copy the file modification time of $original, so, 
after copying the file itself, I use:

touch($bkup, filemtime($original));

However, after I use the above touch function, filemtime($original)
and filemtime($bkup) are often slightly different. For example, I might
have:

echo filemtime($original); // gives 1126191599

echo filemtime($bkup); // gives 1126191600

The touch function seems to be giving a slightly incorrect file
modification time.






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


#35115 [Opn-Asn]: MSSQL query fails when retrieving date field

2005-11-06 Thread sniper
 ID:   35115
 Updated by:   [EMAIL PROTECTED]
 Reported By:  freetds228 at lewenberg dot com
-Status:   Open
+Status:   Assigned
 Bug Type: MSSQL related
 Operating System: RedHat Enterprise Linux 3
-PHP Version:  5CVS, 4.4.1
+PHP Version:  5CVS, 4CVS (2005-11-06) (snap)
-Assigned To:  
+Assigned To:  fmk
 New Comment:

Frank, check this out please.


Previous Comments:


[2005-11-06 15:09:24] freetds228 at lewenberg dot com

I downloaded the newest version of the snapshot and it compiled, but I
am still getting this error: 

[Sun Nov  6 08:07:02 2005]  Script:  'testfreetds.php'
---
/root/tmp/php5-200511061330/Zend/zend_variables.h(35) : Block
0x09CC6D78 status:
/root/tmp/php5-200511061330/Zend/zend_variables.c(36) : Actual location
(locatio
n was relayed)
Beginning:  OK (allocated on
/root/tmp/php5-200511061330/ext/mssql/php_mssql
.c:907, 19 bytes)
  End:  Overflown (magic=0x2A8FCC00 instead of 0x2A8FCC84)
1 byte(s) overflown
---

Maybe it is a problem with some low-level library on my system. Is
there a way to tell which system call is dying?



[2005-11-06 03:59:56] [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

I fixed the compile error, so please try again.



[2005-11-06 03:03:55] freetds228 at lewenberg dot com

I tried to compile the snapshot but got this error: 

/root/tmp/php5-200511052330/ext/mssql/php_mssql.c:2312:2: #endif
without #if
make: *** [ext/mssql/php_mssql.lo] Error 1

I noticed I got this when I tried to compile the stable version of
php5, also.



[2005-11-05 20:01: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





[2005-11-05 19:19:49] freetds228 at lewenberg dot com

Description:

When running a simple SELECT select query against an MS SQL server, if
the result set has a field with a non-NULL date, we are getting the
following error (with --enable-debug flag on): 

[Sat Nov  5 11:26:07 2005]  Script:  '/www-s/testfreetds.php'
---
/root/tmp/php-4.4.1/ext/mssql/php_mssql.c(191) : Block 0x093CA2E0
status:
/root/tmp/php-4.4.1/Zend/zend_variables.c(44) : Actual location 
(location was relayed)
Beginning:  OK (allocated on 
/root/tmp/php-4.4.1/ext/mssql/php_mssql.c:904, 19 bytes)
   End:  Overflown (magic=0x31383A34 instead of 0x2A8FCC84)
 At least 4 bytes overflown
---

The query returns only a single row and field (a date). Note that Perl
running the same query using the same freetds libraries has no errors.


We have compiled 4.4.1 against freetds 0.63 using the --with-mssql
option. 

Reproduce code:
---
$db = mssql_connect('mssqlserver', 'user', 'secret') ;

$rs = mssql_query('SELECT DateLastModified FROM Table WHERE rid = 1',
$db) ;



Expected result:

The date should be accessible in the result set. 

Actual result:
--
[Sat Nov  5 11:26:07 2005]  Script:  '/www-s/testfreetds.php'
---
/root/tmp/php-4.4.1/ext/mssql/php_mssql.c(191) : Block 0x093CA2E0
status:
/root/tmp/php-4.4.1/Zend/zend_variables.c(44) : Actual location 
(location was relayed)
Beginning:  OK (allocated on 
/root/tmp/php-4.4.1/ext/mssql/php_mssql.c:904, 19 bytes)
   End:  Overflown (magic=0x31383A34 instead of 0x2A8FCC84)
 At least 4 bytes overflown
---





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


#35096 [Opn-Fbk]: still trouble with mod_rewrite/apache2

2005-11-06 Thread sniper
 ID:   35096
 Updated by:   [EMAIL PROTECTED]
 Reported By:  rob at burningsoda dot com
-Status:   Open
+Status:   Feedback
 Bug Type: Apache2 related
 Operating System: *
 PHP Version:  5CVS, 4CVS (2005-11-04) (snap)
 New Comment:

Exactly how can we reproduce this? It works just fine for me when I
have this .htaccess file:

RewriteEngine on
RewriteRule ^(.+)/$ index.php?myarg=$1 [L]

So what else do we need?



Previous Comments:


[2005-11-06 04:01:51] rob at burningsoda dot com

doh!

PHP 5.1.0RC5-dev (cli) (built: Nov  6 2005 03:52:41)

I just tried a php5-snapshot. Same problem here. :(



[2005-11-05 09:45:15] tmelzer at tomesoft dot de

Further analyzes have shown me that the fix in 4.4.x-dev was in
sapi/apache2handler/sapi_apache2.c in function php_handler to guard
against the member 'handler' on struct request_rec of beeing NULL and
then accessing it. This was fixed in only one case where around line
518 
'if (parent_req  parent_req-handler  ...'. After I added an
r-handler  strcmp ... to the other places where the structure member
is used the crash went away but I got a 404 - file not found error. I
think this is related to the fact that I'm not sure what to do if
several of this if () statements are evalute false i.e. what to place
in the else block.



[2005-11-04 22:57:08] [EMAIL PROTECTED]

I want you to try the PHP 5 snapshot because I want to be sure this is
only happening with PHP 4. In which case we have better chance of
figuring out what fix to backport from PHP 5.

On the other hand, if this also happens with PHP 5, we really need to
know since we're about to release PHP 5.1 and it would be nice to fix
this kind of things before the release..




[2005-11-04 20:04:37] rob at burningsoda dot com

sniper,

This problem occurs only when using PHP 4.4.1 and the PHP 4-snapshots
_and_ apache 2.x. Why should I try a 5.x-snapshot? Do I misunderstand
you?



[2005-11-04 09:25:24] [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





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

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


#35126 [Opn-Fbk]: v 4.4.0-4 cURL Problem

2005-11-06 Thread sniper
 ID:   35126
 Updated by:   [EMAIL PROTECTED]
 Reported By:  mike at phpeeb dot com
-Status:   Open
+Status:   Feedback
 Bug Type: cURL related
 Operating System: Unix
 PHP Version:  4.4.1
 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-11-06 15:59:41] mike at phpeeb dot com

Description:

cURL no longer executes, script just dies. Happened with new
installation of 4.4.0-4 my webhost installed. I cannot upgrade PHP
myself, hence my choosing 4.4.1

PHP Version: 4.4.0-4
cURL Version: 7.15.0



Reproduce code:
---
$ch = curl_init($host_string);
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_URL, $host_string);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $xml);
curl_setopt($ch, CURLOPT_SSLCERT, $cert);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 0);
curl_setopt($ch, CURLOPT_REFERER, $curl_ref);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
$result = curl_exec($ch);
curl_close($ch);

Expected result:

var $result should either return Array of data or error.

Actual result:
--
$result returns nothing, script dies after curl_exec(). Even die() or
echo commands written beneath curl_exec() do not show up. Possible PHP
crash?





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


#35131 [Opn-Asn]: stream_select() in conjuntion with popen() does not appear to work

2005-11-06 Thread sniper
 ID:   35131
 Updated by:   [EMAIL PROTECTED]
 Reported By:  larryjadams at comcast dot net
-Status:   Open
+Status:   Assigned
 Bug Type: Scripting Engine problem
 Operating System: WindowsXP Pro SP2
 PHP Version:  5.0.5
-Assigned To:  
+Assigned To:  wez
 New Comment:

Assigned to the author of this part.


Previous Comments:


[2005-11-06 22:07:19] larryjadams at comcast dot net

Description:

If I call $my_fd = popen(mycommand, rb); to a function that
hangs/suspends and then subsquently call:

stream_select(...) using $read=array($my_fd) with a timeout, the
steam_select returns immediately, event if I have set $my_fd as
blocking using stream_set_blocking();

I would like stream_select to wait on output from the pipe prior to
firing, or to drive a timeout.

Thanks,

Larry Adams
The Cacti Group

Reproduce code:
---
if (function_exists(stream_select)) {
  if ($config[cacti_server_os] == unix)  {
$fp = popen($command, r);
  }else{
$fp = popen($command, rb);
  }

  /* set script server timeout */
  $script_timeout = read_config_option(script_timeout);

  /* establish timeout variables */
  $to_sec = floor($script_timeout/1000);
  $to_usec = ($script_timeout%1000)*1000;

  /* Prepare the read array */
  $read = array($fp);

  stream_set_blocking ($fp, 1);
  if (false === ($num_changed_streams = stream_select($read, $write =
NULL, $except = NULL, $to_sec, $to_usec))) {
cacti_log(WARNING: SERVER POPEN Timed out.);
$output = U;
  }elseif ($num_changed_streams  0) {
$output = fgets($fp, 4096);
  }

  pclose($fp);
}else{
  $output = `$command`;
}

$command = a file with the following:

?php sleep(20); echo Hello:20.00\n; ?

The stream_select timeout is 5 seconds.


Expected result:

popen will be called, stream_select will block until timeout has
expired, the number of fd's changed will be 0 and my result will be as
expected.

Actual result:
--
stream_select returns immediately.





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


#35098 [Asn-Csd]: Problem still exists with nightly

2005-11-06 Thread sniper
 ID:   35098
 Updated by:   [EMAIL PROTECTED]
 Reported By:  spam2 at rhsoft dot net
-Status:   Assigned
+Status:   Closed
 Bug Type: Zlib Related
 Operating System: Windows XP
 PHP Version:  5.1.0RC4
 Assigned To:  iliaa
 New Comment:

I reverted the bad fix that caused this problem.


Previous Comments:


[2005-11-04 09:27:24] [EMAIL PROTECTED]

Ilia, there is apparently something wrong with the fix for the leak?



[2005-11-04 04:34:58] spam2 at rhsoft dot net

Description:

The last Nightlys PHP 5.1 (RC5) have on some pages troubles with
zlib_outputcompression = On which RC4 hast not.

Strange caracters will occur - looks like compressed output not
decompressed by browser (firefox)

This is not really reproduceable but in fact on my dev-machine when i
downgrade all pages will work, its a cms-system and some other
dev-hosts with the same scripts will running ... 






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


#35126 [Opn-Bgs]: v 4.4.0-4 cURL Problem

2005-11-06 Thread sniper
 ID:   35126
 Updated by:   [EMAIL PROTECTED]
 Reported By:  mike at phpeeb dot com
-Status:   Open
+Status:   Bogus
 Bug Type: cURL related
 Operating System: Unix
-PHP Version:  4.4.1
+PHP Version:  4.4.0
 New Comment:

You can read, can't you? 

a) Your example script is useless.
b) Used PHP version is too old.
c) PHP 5.1 + Curl 7.15.0 works just fine for me.

In future, ask your administrator to file bug reports.



Previous Comments:


[2005-11-06 18:10:33] mike at phpeeb dot com

What more information do you need?
This version of PHP and cURL appear to be incompatible. I was told by
my server admin that they use Debian package.

Executing cURL in this version seems to crash PHP, as any instruction
written after curl_exec() does not get followed, even die()
instructions.



[2005-11-06 17:46:26] [EMAIL PROTECTED]

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.






[2005-11-06 15:59:41] mike at phpeeb dot com

Description:

cURL no longer executes, script just dies. Happened with new
installation of 4.4.0-4 my webhost installed. I cannot upgrade PHP
myself, hence my choosing 4.4.1

PHP Version: 4.4.0-4
cURL Version: 7.15.0



Reproduce code:
---
$ch = curl_init($host_string);
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_URL, $host_string);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $xml);
curl_setopt($ch, CURLOPT_SSLCERT, $cert);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 0);
curl_setopt($ch, CURLOPT_REFERER, $curl_ref);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
$result = curl_exec($ch);
curl_close($ch);

Expected result:

var $result should either return Array of data or error.

Actual result:
--
$result returns nothing, script dies after curl_exec(). Even die() or
echo commands written beneath curl_exec() do not show up. Possible PHP
crash?





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


#35128 [Opn-Bgs]: imageDashedline horizontal don't work

2005-11-06 Thread sniper
 ID:   35128
 Updated by:   [EMAIL PROTECTED]
 Reported By:  swolf at x-project dot net
-Status:   Open
+Status:   Bogus
 Bug Type: GD related
 Operating System: Gentoo ~X86
-PHP Version:  4CVS-2005-11-06 (snap)
+PHP Version:  5CVS-2005-11-06 (snap)
 New Comment:

You say you used PHP 5 snapshot, yet you reported this as '4CVS..' ?
Which one is it? Also, you have used weird function names. They're all
lower cased in PHP. And if I copy'n'paste that script, it only outputs
the content of the script.
(hint: most sane people have short-tag disabled!)

Feel free to submit better report in future, this is not acceptable.



Previous Comments:


[2005-11-06 17:58:56] swolf at x-project dot net

Description:

I use a selfcompiled version from PHP Version 5.1.0RC5-dev

Only vertical lines you can create, the horizontal lines are not
visible

Reproduce code:
---
?
$pic = ImageCreate (150, 50);
$bg = ImageColoralLocate($pic, 230,230,230);
$dl = ImageColoralLocate($pic, 50, 50, 50);

ImageDashedLine($pic, 1, 36, 149, 36, $dl); // don't work

imageDashedline($pic, 37, 2, 37, 49, $dl); // works
header('Content-Type: image/jpeg');
imagegif($pic); 
?

Expected result:

You can only show the vertical lines!!!

Actual result:
--
PHP don't crash!!





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


#35105 [Asn-Fbk]: stream_set_timeout() has no effect on SSL stream

2005-11-06 Thread sniper
 ID:   35105
 Updated by:   [EMAIL PROTECTED]
 Reported By:  wckits at rit dot edu
-Status:   Assigned
+Status:   Feedback
 Bug Type: Sockets related
 Operating System: SunOS 5.9
 PHP Version:  5.0.5
 Assigned To:  wez
 New Comment:

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




Previous Comments:


[2005-11-04 16:25:24] [EMAIL PROTECTED]

Assigned to the streams author and maintainer.




[2005-11-04 15:07:58] wckits at rit dot edu

Description:

A stream opened with stream_socket_client(ssl://. will not timeout
when reading.

This may have a similar underlying cause to bug #23618 but it is
exposed differently, and is still a problem in 5.0.5.

Reproduce code:
---
#!/bin/php-5.0.5/sapi/cli/php
?
//First connect and do something to prove that we are properly
connected.

print Setting up context\n;
$ctx = stream_context_create(array(
'ssl'=array(
'verify_peer' = false,
'allow_self_signed' = true,
)
));
print Creating socket\n;
$socket = stream_socket_client( ssl://www.rit.edu:443, $errno,
$errstr, 10, STREAM_CLIENT_CONNECT, $ctx );
print Setting timeout\n;
var_dump(stream_set_timeout( $socket, 5 ));
print Sending bogus request\n;
fwrite($socket, GET nourl Cupcakes/2.5\n\n\n\n );
print Reading Result\n;
var_dump(fgets( $socket));

//Now conenct and read when we know the server isnt going to send
anything

print Creating NEW socket\n;
$socket = stream_socket_client( ssl://www.rit.edu:443, $errno,
$errstr, 10, STREAM_CLIENT_CONNECT, $ctx );
print Setting timeout\n;
var_dump(stream_set_timeout( $socket, 5 ));
print Sending NO request\n;
print Read should time out in 5\n;
var_dump(fgets( $socket));
?


Expected result:

The first section will run and print an HTTP error. The second section
will run and timeout after printing Read should timeout in 5...

Actual result:
--
Read does not time out.

I suspect that the read timeout on SSL connections is just not
implemented, because it is hard, but if that is the case the
stream_set_timeout should return false to indicate the error.

If its just not implemented I'd be willing to patch it up if there is
one place to fix it. If there are ssl reads all over the php source I
don't think I'd have the time to track them all down.

I have seen people say just use select in response to stream timeout
problems. That does not work with ssl, or at least it may not always
work with ssl. Select can be used if you have access to the native SSL
interface (ie: it could be done right in C) but you need to be able to
check for the WANT_READ condition





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


#35131 [Asn-Fbk]: stream_select() in conjuntion with popen() does not appear to work

2005-11-06 Thread sniper
 ID:   35131
 Updated by:   [EMAIL PROTECTED]
 Reported By:  larryjadams at comcast dot net
-Status:   Assigned
+Status:   Feedback
 Bug Type: *General Issues
 Operating System: WindowsXP Pro SP2
 PHP Version:  5.0.5
 Assigned To:  wez
 New Comment:

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




Previous Comments:


[2005-11-06 23:09:04] [EMAIL PROTECTED]

Assigned to the author of this part.



[2005-11-06 22:07:19] larryjadams at comcast dot net

Description:

If I call $my_fd = popen(mycommand, rb); to a function that
hangs/suspends and then subsquently call:

stream_select(...) using $read=array($my_fd) with a timeout, the
steam_select returns immediately, event if I have set $my_fd as
blocking using stream_set_blocking();

I would like stream_select to wait on output from the pipe prior to
firing, or to drive a timeout.

Thanks,

Larry Adams
The Cacti Group

Reproduce code:
---
if (function_exists(stream_select)) {
  if ($config[cacti_server_os] == unix)  {
$fp = popen($command, r);
  }else{
$fp = popen($command, rb);
  }

  /* set script server timeout */
  $script_timeout = read_config_option(script_timeout);

  /* establish timeout variables */
  $to_sec = floor($script_timeout/1000);
  $to_usec = ($script_timeout%1000)*1000;

  /* Prepare the read array */
  $read = array($fp);

  stream_set_blocking ($fp, 1);
  if (false === ($num_changed_streams = stream_select($read, $write =
NULL, $except = NULL, $to_sec, $to_usec))) {
cacti_log(WARNING: SERVER POPEN Timed out.);
$output = U;
  }elseif ($num_changed_streams  0) {
$output = fgets($fp, 4096);
  }

  pclose($fp);
}else{
  $output = `$command`;
}

$command = a file with the following:

?php sleep(20); echo Hello:20.00\n; ?

The stream_select timeout is 5 seconds.


Expected result:

popen will be called, stream_select will block until timeout has
expired, the number of fd's changed will be 0 and my result will be as
expected.

Actual result:
--
stream_select returns immediately.





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


#35003 [Asn-Csd]: Warning: PDOStatement::fetch(): column 0 data was too large for buffer and was

2005-11-06 Thread sniper
 ID:   35003
 Updated by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
-Status:   Assigned
+Status:   Closed
 Bug Type: Oracle related
 Operating System: Linux - Fedora Core 1
 PHP Version:  5.1.0RC3
 Assigned To:  wez


Previous Comments:


[2005-10-28 17:02:53] [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-10-27 18:59:24] vs at ez dot no

Note that the query result is wrong. There actually should have been 0
instead of . This is probably caused by the same problem.



[2005-10-27 18:22:56] [EMAIL PROTECTED]

Description:

Strange warning when fetching data from an Oracle DB with PDO:
column N data was too large for buffer and was truncated to fit it


Reproduce code:
---
Environment:

PHP version: 5.1.0RC3
Server version: Oracle9i Enterprise Edition Release 9.2.0.4.0 -
Production
Client libraries: oracle-instantclient 10.1.0.4
OS: Fedora Core 1

How to reproduce:
=

1. Execute the following query on your Oracle database:
CREATE TABLE pdotest (some_num INTEGER DEFAULT 0 NOT NULL);

2. Run the following script:
===
?
$query=SELECT data_default FROM user_tab_columns WHERE
table_name='PDOTEST';
$db = new PDO('oci:dbname=orcl', 'trunk', 'tiger');
$sth = $db-query( $query );
for( $i=0; ( $row = $sth-fetch( PDO::FETCH_ASSOC ) ); $i++ )
var_dump( $row );
echo $i rows fetched.\n;
?
===


Expected result:

No warnings.


Actual result:
--
Warning: PDOStatement::fetch(): column 0 data was too large for buffer
and was truncated to fit it in /path/to/test.php on
line 7
array(1) {
  [DATA_DEFAULT]=
  string(0) 
}
1 rows fetched.






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


#34972 [Asn-Fbk]: STDIN won't allow nonblocking.

2005-11-06 Thread sniper
 ID:   34972
 Updated by:   [EMAIL PROTECTED]
 Reported By:  VJTD3 at VJTD3 dot com
-Status:   Assigned
+Status:   Feedback
 Bug Type: CGI related
 Operating System: Windows/Linux
 PHP Version:  5.0.5
 Assigned To:  wez
 New Comment:

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




Previous Comments:


[2005-10-31 16:38:53] [EMAIL PROTECTED]

Assigned to the streams maintainer.




[2005-10-25 04:23:31] VJTD3 at VJTD3 dot com

?php

 # Make life easier to test bothe versions
 # option:
 #  1: Yahoo HTTP example
 #  2: STDIN example.
 $test = 1;

 # note for php4 or lower:
 #  STDIN isn't a defined constant so uncomment this.
 #define('STDIN', fopen('php://stdin', 'r'));

 # ment to paste fread was playing with other methods and
 #  just pasted the wrong version. The result is the same.

 # notice how after the data is done it's still going and
 #  not blocked.
 if($test == '1') {
  $demo = fsockopen('yahoo.com', 80);
  stream_set_blocking($demo, FALSE);
  fwrite($demo, 'GET /'.\n\n);
  while (1) {
   $data = fread($demo, 1500);
   echo (strlen($data) ? 'read:'.$data : \nread:.'empty'.\n);
   sleep(1);
  }
 }

 # same code with fread and blocked reguardless of setting
 #  to nonblocked.
 if($test == '2') {
  echo 'Watch me stall till you type enter I\'m blocking you!'.\n;
  stream_set_blocking(STDIN, FALSE);
  while (1) {
   $data = fread(STDIN, 10);
   # I do know I could use trim, but if blocking was
   #  working it will act weird if it's mid of a end of
   #  line.
   $data = str_replace(\n, '', $data);
   $data = str_replace(\r, '', $data);
   echo (strlen($data) ? 'read:'.$data : \nread:.'empty'.\n);
   sleep(1);
  }
 }

 # stream_select() can't be used, when i try the file
 #  descriptor just gets locks and all future selects won't
 #  work. and there is no reason to even select i know what
 #  resource to monitor i just need blocking to stop so i
 #  can monitor and process as i need just liek in the
 #  yahoo http example.

?



[2005-10-25 01:26:58] [EMAIL PROTECTED]

FYI, using fgets() with a non-blocking resource makes no sense.

To implement what you're after, use stream_select() and fread(); these
work on stdin just fine.



[2005-10-24 23:07:00] VJTD3 at VJTD3 dot com

Description:

STDIN won't allow nonblocking.

Reproduce code:
---
?php

 stream_set_blocking(STDIN, FALSE);
 while (1) {
  echo 'infinate loop showing nonblocking problem'.\n;
  echo 'said:'.fgets(STDIN, 1024);
 }

?

Expected result:

The test code should be a infinate loop with infinate loop showing
nonblocking problem said trillions of times fast like a infinate loop
is suposto do when you make a boo boo. instead it will say it once then
wait for input then wait again etc as a blocked resource is expected.
but stream_set_blocking(STDIN, FALSE); should be allowing it to do
the loop unblocked resulting in major screen flooding yet unblocking
the resource is ignored.

This means you can't do something like a client program in your shell
that is interactive like a Telnet client or similar.

I can dig the whole not reading as typing because that would be too
raw for common usage... [ie phrasing the backspaces etc though maybe
a seperate abaility? this would allow arrow key kinda stuff and
similar...] But waiting for a \n or whatever file ending shouldn't
have any effect on that loop. It should act just like a TCP or any
other connection when unblocked there the resource just has a return of
no data.

php -f test.php I use to run it.

Actual result:
--
uses blocking when stream_set_blocking(STDIN, FALSE); was used.





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


#34647 [Asn-Fbk]: mssql.timeout has no affect

2005-11-06 Thread sniper
 ID:   34647
 Updated by:   [EMAIL PROTECTED]
 Reported By:  j dot geusebroek at intellit dot nl
-Status:   Assigned
+Status:   Feedback
 Bug Type: MSSQL related
 Operating System: Suse 9.3
 PHP Version:  5.0.5
 Assigned To:  fmk
 New Comment:

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




Previous Comments:


[2005-09-26 18:51:57] j dot geusebroek at intellit dot nl

Description:

mssql.timeout has no affect, a query will wait an infinite time and the
scripts hangs.

I'm using the FreeTDS library, version 6.3 but i also tried
latest FreeTDS CVS.

FreeTDS debug file shows that a timeout has occured (i also set the
timeout in the FreeTDS client) but PHP keeps running.

(dblib.c:4010:in dbsqlok()
net.c:327:exceeded query timeout: 10
net.c:327:exceeded query timeout: 10
net.c:327:exceeded query timeout: 10
net.c:327:exceeded query timeout: 10
net.c:327:exceeded query timeout: 10
net.c:327:exceeded query timeout: 10
)

Reproduce code:
---
Perform any query that outlasts your mssql.timeout setting.

Expected result:

PHP exiting with a fatal error.

Actual result:
--
Infinite wait.





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


#33220 [Asn-Opn]: GIF image with errors makes imagecreatefromgif() go into infinite loop

2005-11-06 Thread sniper
 ID:   33220
 Updated by:   [EMAIL PROTECTED]
 Reported By:  phpbugs at pureftpd dot org
-Status:   Assigned
+Status:   Open
 Bug Type: GD related
 Operating System: *
 PHP Version:  5CVS-2005-08-17
 Assigned To:  pajoye


Previous Comments:


[2005-09-24 16:42:01] [EMAIL PROTECTED]

Patch applied in all active branches. I keep this bug as 'assigned' as
there is other cases which cause an infinite loop.



[2005-09-24 12:23:44] [EMAIL PROTECTED]

I've made a patch to fix this problem:
http://mega.ist.utl.pt/~ncpl/php_gd_patch.txt

The problem: GetDataBlock_() returns -1 on error, but most calls to
that function were checking only == 0, thus creating the infinite loop.
changing those to =0 fixes the problems.



[2005-06-02 15:11:16] phpbugs at pureftpd dot org

Description:

The following (invalid) picture triggers an infinite loop  
in gdImageCreateFromGif() with 100% CPU usage.  
  
Tested on Linux and OpenBSD, PHP4 with GD 1 and PHP5 with 
built-in GD. 

Reproduce code:
---
?php
imagecreatefromgif('kaboom-gd.gif');
?

Get kaboom-gd.gif from ftp://ftp.00f.net/misc/kaboom-gd.gif


Expected result:

No 100% CPU usage. 

Actual result:
--
100% CPU usage, infinite loop. 





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


#33220 [Opn-Asn]: GIF image with errors makes imagecreatefromgif() go into infinite loop

2005-11-06 Thread sniper
 ID:   33220
 Updated by:   [EMAIL PROTECTED]
 Reported By:  phpbugs at pureftpd dot org
-Status:   Open
+Status:   Assigned
 Bug Type: GD related
 Operating System: *
 PHP Version:  5CVS-2005-08-17
 Assigned To:  pajoye
 New Comment:

Pierre, are there still open issues in this report? If not, close this.
Open separate reports for separate issues!



Previous Comments:


[2005-09-24 16:42:01] [EMAIL PROTECTED]

Patch applied in all active branches. I keep this bug as 'assigned' as
there is other cases which cause an infinite loop.



[2005-09-24 12:23:44] [EMAIL PROTECTED]

I've made a patch to fix this problem:
http://mega.ist.utl.pt/~ncpl/php_gd_patch.txt

The problem: GetDataBlock_() returns -1 on error, but most calls to
that function were checking only == 0, thus creating the infinite loop.
changing those to =0 fixes the problems.



[2005-06-02 15:11:16] phpbugs at pureftpd dot org

Description:

The following (invalid) picture triggers an infinite loop  
in gdImageCreateFromGif() with 100% CPU usage.  
  
Tested on Linux and OpenBSD, PHP4 with GD 1 and PHP5 with 
built-in GD. 

Reproduce code:
---
?php
imagecreatefromgif('kaboom-gd.gif');
?

Get kaboom-gd.gif from ftp://ftp.00f.net/misc/kaboom-gd.gif


Expected result:

No 100% CPU usage. 

Actual result:
--
100% CPU usage, infinite loop. 





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


#35062 [Opn-Asn]: socket_read() produces warnings on non blocking sockets

2005-11-06 Thread sniper
 ID:   35062
 Updated by:   [EMAIL PROTECTED]
 Reported By:  dima at dimych dot sumy dot ua
-Status:   Open
+Status:   Assigned
 Bug Type: Sockets related
 Operating System: FreeBSD 4.9-STABLE #0
 PHP Version:  4.4.1RC1
-Assigned To:  
+Assigned To:  nlopess
 New Comment:

Nuno, since you seem to know the problem, feel free to fix it.


Previous Comments:


[2005-11-05 22:13:26] [EMAIL PROTECTED]

opening it again, as this seems a different issue.
We should have the EAGAIN constant and use it for non-blocking sockets.
returning false isnt't a good idea.



[2005-11-04 16:23:08] [EMAIL PROTECTED]

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

Thank you for your interest in PHP.

See bug #21197



[2005-11-04 14:53:52] dima at dimych dot sumy dot ua

I`m look everyware in the Internet and don`t find any workaround for
this problem. And error logs still growing...

This code decreases count of warnings:
-- code --
$startTime = microtime_float(true);
socket_send($socket, $package, strLen($package), 0);
socket_set_block($socket);
$to = array('sec' = 0, 'usec' = 50);
socket_set_option($socket, SOL_SOCKET, SO_RCVTIMEO, $to);
if (socket_read($socket, 4096)) {
  socket_close($socket);
  return microtime_float() - $startTime;
}
socket_close($socket);
-- end of code --
my ping function launches once per 5 minutes for around 50 hosts, but
not all of them alive. Dead hosts causes warnings.



[2005-11-02 14:37:46] dima at dimych dot sumy dot ua

I`m not agree what it is bogus

part of code from ext/sockets/sockets.c:
-- code --
if (type == PHP_NORMAL_READ) {
retval = php_read(php_sock-bsd_socket, tmpbuf, length,
0);
} else {
retval = recv(php_sock-bsd_socket, tmpbuf, length,
0);
}

if (retval == -1) {
PHP_SOCKET_ERROR(php_sock, unable to read from
socket, errno);
efree(tmpbuf);
RETURN_FALSE;
}
-- end of code --
As you can see any processing for EAGAIN not exists. Warning will be
generated in any case. 

1. I`m developing icmp ping function and no reply is not an error in
my program.
2. Function, what can say is any data to receive, not exists.
3. I do not want to turn warnings off. Because I need them in other
places.



[2005-11-02 08:52:06] dima at dimych dot sumy dot ua

Description:

Use of socket_read() on non blocking sockets produces warinigs like:
socket_read() unable to read from socket [35]: Resource temporarily
unavailable

I`m storing all php errors in log file /var/log/php.log.
This warning causes overflow of /var partition because socket_read()
called to wait icmp message. 


Reproduce code:
---
$socket = socket_create(AF_INET, SOCK_RAW, 1);
socket_connect($socket, $host, null);
$startTime = microtime_float(true);
socket_send($socket, $data, strLen($data), 0);
socket_set_nonblock($socket);
while((microtime_float() - $startTime)  0.5) {
  $mt = microtime_float();
  if (socket_read($socket, 255)) {
 break;
  }
}
socket_close($socket);


Expected result:

no warnings in php.log

Actual result:
--
I`m receive huge count of warinigs in my php.log file like this:
socket_read() unable to read from socket [35]: Resource temporarily
unavailable






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


#34955 [Opn-Asn]: PEAR install fails

2005-11-06 Thread sniper
 ID:   34955
 Updated by:   [EMAIL PROTECTED]
 Reported By:  squasar at eternalviper dot net
-Status:   Open
+Status:   Assigned
 Bug Type: Compile Failure
 Operating System: MacOS X 10.4.3,i686-pc-linux-gnu
 PHP Version:  5.1.0RC4
 Assigned To:  cellog
 New Comment:

Greg, try with enabling the multibyte thingie, this is not MacOSX
specifix problem.



Previous Comments:


[2005-11-06 18:40:32] squasar at eternalviper dot net

I found the issue. Adding --enable-zend-multibyte to ./
configure fails both the PEAR install and Zend/tests/
halt02.phpt. Removing it makes both work correctly. I've run 
the test several times using a number of different 
configurations on both OS X 10.4.3 and i686-pc-linux-gnu; it 
always succeeds with Zend multibyte off and always fails 
with it on, both the halt02.phpt test and the PEAR install, 
on both systems.

Although succeeds is a relative term. The PEAR install 
runs, but spits this out at me (5.1.0RC4, latest .phar):


[PEAR] Archive_Tar- installed: 1.3.1
[PEAR] Console_Getopt - installed: 1.2
pear/PEAR can optionally use package pear/XML_RPC (version 
= 1.4.0)

Warning: PEAR_Installer_Role::factory(PEAR/Installer/Role/
Php.php): failed to open stream: No such file or directory 
in phar://install-pear-nozlib.phar/PEAR/Installer/Role.php 
on line 80

Fatal error: PEAR_Installer_Role::factory(): Failed opening 
required 'PEAR/Installer/Role/Php.php' (include_path='.:/
Users/gwynne/Desktop/Web/php/lib/php') in phar://install-
pear-nozlib.phar/PEAR/Installer/Role.php on line 80
make[1]: *** [install-pear-installer] Error 255
make: *** [install-pear] Error 2



[2005-11-05 17:37:32] [EMAIL PROTECTED]

I have reports of many users successfully running this on Mac OS X, so
I am inclined to think it is a problem with your setup.

Please try with the latest install-pear-nozlib.phar, just in case this
makes any difference.



[2005-11-03 22:41:11] [EMAIL PROTECTED]

Greg, perhaps we should remove PEAR totally from PHP and keep it
separate. This thing has always slowed the releases of PHP
and it should really end by now..




[2005-10-27 13:30:26] squasar at eternalviper dot net

No; PEAR does not install. As far as I can tell, install-pear-
nozlib.phar never runs at all; php parses it and spits out 
800K worth of ? characters.



[2005-10-27 05:29:23] [EMAIL PROTECTED]

I can't reproduce this on gentoo linux.

Does PEAR actually install?



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

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


#34834 [Opn-Ver]: array_merge_recursive() merges arrays with objects with arrays

2005-11-06 Thread sniper
 ID:   34834
 Updated by:   [EMAIL PROTECTED]
 Reported By:  tomas_matousek at hotmail dot com
-Status:   Open
+Status:   Verified
 Bug Type: Arrays related
 Operating System: *
 PHP Version:  5CVS-2005-11-02 (cvs)


Previous Comments:


[2005-10-11 23:35:21] tomas_matousek at hotmail dot com

Description:

Although one cannot pass obejects to array_merge_recursive() function,
it looks like it doesn't ignore objects at all.
If objects are contained in the array it merges them as if they were
arrays of fields. I think it is not good to treat objects in this way
when other array functions doesn't do so (e.g. array_walk_recursive
doesn't step to fields of objects).

Reproduce code:
---
class A 
{ 
  var $field = array(1);
}

$a = new A;
$x = array(a = $a);

$y = array(a = array(field = array(2)));

var_dump(array_merge_recursive($x,$y));

Expected result:

array(1) {
  [a]=
  array(2) {
[0]=
object(A)#1 (1) {
  [field]=
  array(1) {
[0]=
int(1)
  }
}
[field]=
array(1) {
  [0]=
  int(2)
}
  }
}


Actual result:
--
array(1) {
  [a]=
  array(1) {
[field]=
array(2) {
  [0]=
  int(1)
  [1]=
  int(2)
}
  }
}






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


#33309 [Asn-Fbk]: mssql_query crashes php

2005-11-06 Thread sniper
 ID:   33309
 Updated by:   [EMAIL PROTECTED]
 Reported By:  alexander dot merz at gmail dot com
-Status:   Assigned
+Status:   Feedback
 Bug Type: MSSQL related
 Operating System: Windows XP Home
 PHP Version:  5.0.4
 Assigned To:  fmk
 New Comment:

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




Previous Comments:


[2005-06-13 13:17:45] alexander dot merz at gmail dot com

The latest php version (5.1.0) crashes also.



[2005-06-11 20:12:00] alexander dot merz at gmail dot com

I would agree, but a much more complex java app works perfectly on the
beta using a jdbc driver older then the beta version!

I will test it with a newer version of php next monday.

But, this seems to be definitly a bug in the php extension, especialy
how it fetches the result set. I made some further tests.

I create a test table containing one record and run the small script
again:
 $c = mssql_connect(ALEX, amerz, amerz);
 mssql_select_db(text_test, $c);
 var_dump(mssql_query('SELECT text1, text2  FROM texttable', $c));
 mssql_close($c);

The result: It prints
resource(5) of type (mssql result)

and then php crashes...



[2005-06-11 17:29:32] [EMAIL PROTECTED]

The same code works fine with previous versions of MS SQL Server.
MS SQL Server 2005 Beta is not a stable target to test against.




[2005-06-11 15:25:05] [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





[2005-06-11 14:14:06] alexander dot merz at gmail dot com

Description:

Running the current PEAR::MDB2 testsuite in CVS against MS SQLServer
2005 Beta causes a crash of php.

The source causing the crash reduced to a minimum is given in the
Reproduced code section.

The crash does also happend if you list the field names directly:
'SELECT user_name, user_password, subscribed, user_id, quota, weight,
access_date, access_time, approved  FROM users'

It does crash too, if the statment above contains only the first two
fields (user_name, user_password) and *one* of the others, ie:
'SELECT user_name, user_password, subscribed FROM users'

It *works*, if the field list does NOT contain the user_password field,
independed of length of the field list, ie:
'SELECT user_name, subscribed, user_id, quota, weight, access_date,
access_time, approved  FROM users'

user_password is of the type 'text'.

The table is empty, and the statement works like a charm in the SQL
Query console of Server Management Studio.

Reproduce code:
---
 $c = mssql_connect(ALEX, amerz, amerz);
 mssql_select_db(driver_test, $c);
 mssql_query('SELECT *  FROM users');
 mssql_close($c);

Expected result:

No crash :)

Actual result:
--
a crash :(





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


#33201 [Asn-Fbk]: segfault in _emalloc called from php_mssql_get_column_content_with_type

2005-11-06 Thread sniper
 ID:   33201
 Updated by:   [EMAIL PROTECTED]
 Reported By:  skissane at iips dot mq dot edu dot au
-Status:   Assigned
+Status:   Feedback
 Bug Type: MSSQL related
 Operating System: Linux
 PHP Version:  5.0.4
 Assigned To:  fmk
 New Comment:

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




Previous Comments:


[2005-05-31 13:53:08] skissane at iips dot mq dot edu dot au

Description:

Segmentation fault.



Reproduce code:
---
?
$q = mssql_connect(server,username,password);
$i = mssql_query(SELECT * FROM MSSQLTrace_99,$q);
while (mssql_fetch_row($i) !== FALSE);

Where the  MSSQLTrace_99 table is created by the following MSSQL script
(a bit too big for a bug database):
http://www.iips.mq.edu.au/php_mssql_bug.txt

Expected result:

No output.

Actual result:
--
Backtrace:
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 16384 (LWP 29878)]
0x40440bef in _int_malloc () from /lib/i686/libc.so.6
(gdb) bt
#0  0x40440bef in _int_malloc () from /lib/i686/libc.so.6
#1  0x404422ac in malloc () from /lib/i686/libc.so.6
#2  0x0815ac58 in _emalloc (size=1078913472) at
/home/skissane/php-5.0.4/Zend/zend_alloc.c:182
#3  0x0809151e in php_mssql_get_column_content_with_type
(mssql_ptr=0x827079c, offset=1078913472, result=0x828319c,
column_type=1078910980)
at /home/skissane/php-5.0.4/ext/mssql/php_mssql.c:877
#4  0x08091daf in _mssql_fetch_batch (mssql_ptr=0x827079c,
result=0x826b5cc, retvalue=-1) at
/home/skissane/php-5.0.4/ext/mssql/php_mssql.c:1104
#5  0x0809222e in zif_mssql_query (ht=33, return_value=0x8270a54,
this_ptr=0x0, return_value_used=1) at
/home/skissane/php-5.0.4/ext/mssql/php_mssql.c:1225
#6  0x081882ce in zend_do_fcall_common_helper (execute_data=0xbfffd510,
opline=0x826f980, op_array=0x826b53c)
at /home/skissane/php-5.0.4/Zend/zend_execute.c:2727
#7  0x081858ca in execute (op_array=0x826b53c) at
/home/skissane/php-5.0.4/Zend/zend_execute.c:1406
#8  0x0816b79f in zend_execute_scripts (type=8, retval=0x0,
file_count=3) at /home/skissane/php-5.0.4/Zend/zend.c:1069
#9  0x0813eb73 in php_execute_script (primary_file=0xb8d0) at
/home/skissane/php-5.0.4/main/main.c:1632
#10 0x0818ebe8 in main (argc=2, argv=0xb954) at
/home/skissane/php-5.0.4/sapi/cli/php_cli.c:946
#11 0x403f3912 in __libc_start_main () from /lib/i686/libc.so.6





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


#32854 [Asn-Fbk]: mssql_pconnect fails under load and doesn't recover

2005-11-06 Thread sniper
 ID:   32854
 Updated by:   [EMAIL PROTECTED]
 Reported By:  gerritgiliomee at hotmail dot com
-Status:   Assigned
+Status:   Feedback
 Bug Type: MSSQL related
 Operating System: Windows 2000 sp4
 PHP Version:  5.0.4
 Assigned To:  fmk
 New Comment:

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




Previous Comments:


[2005-04-27 13:09:17] gerritgiliomee at hotmail dot com

Description:

Using mssql_pconnect to connect to a MS SQL2000 server on another box. 
Everything works a treat until I put some load on.  When I go above a
certain threshhold, e.g. using Apache Benchmark, 20 concurrent users,
500 requests, mssql_pconnect fails with this error:

Warning: mssql_pconnect() [function.mssql-pconnect]: Unable to connect
to server: servername

This is understandable as things will break above a certain point,
however, after this happens, mssql_pconnect seems to have hung, even if
I change the connection details, or try using mssql_connect, I still get
the same error.

The only thing that resolves it is restarting IIS.

Using Win2K (sp4), IIS5, MS SQL 200 (sp2).

PS: I have made sure I'm using the right version of ntwdblib.dll.

It's also worth noting that my phpinfo() reports Library Version: 7.0
instead of the presumed 8.0.  Not sure if this is connected to the SQL
version though.

I've toggled around and have these mssql settings in my php.ini
[MSSQL]
; Allow or prevent persistent links.
mssql.allow_persistent = On

; Maximum number of persistent links.  -1 means no limit.
mssql.max_persistent = 100

; Maximum number of links (persistent+non persistent).  -1 means no
limit.
mssql.max_links = 100

; Minimum error severity to display.
mssql.min_error_severity = 10

; Minimum message severity to display.
mssql.min_message_severity = 10

; Compatability mode with old versions of PHP 3.0.
mssql.compatability_mode = Off

; Connect timeout
mssql.connect_timeout = 5

; Query timeout
mssql.timeout = 60

; Valid range 0 - 2147483647.  Default = 4096.
mssql.textlimit = 4096

; Valid range 0 - 2147483647.  Default = 4096.
mssql.textsize = 4096

; Limits the number of records in each batch.  0 = all records in one
batch.
mssql.batchsize = 0

; Specify how datetime and datetim4 columns are returned
; On = Returns data converted to SQL server settings
; Off = Returns values as -MM-DD hh:mm:ss
;DEV - used to be completely commented out
mssql.datetimeconvert = Off

; Use NT authentication when connecting to the server
mssql.secure_connection = Off

; Specify max number of processes. Default = 25
mssql.max_procs = 25



Any help will be much appreciated.






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


#32962 [Asn-Opn]: Installer puts php.ini in wrong location

2005-11-06 Thread sniper
 ID:   32962
 Updated by:   [EMAIL PROTECTED]
 Reported By:  ash at theleys dot net
-Status:   Assigned
+Status:   Open
 Bug Type: IIS related
 Operating System: Windows Server 2003
 PHP Version:  5.0.4
 Assigned To:  phildriscoll


Previous Comments:


[2005-05-09 11:38:37] ash at theleys dot net

Under this comment are all the environment variables, - there isn't a
win one, but windir is pointing to the correct folder. - This was
installed with me using a terminal services session, but that's not
been a problem before. (the comp. names have been changed here for
privacy)

ALLUSERSPROFILE=C:\Documents and Settings\All Users
APPDATA=C:\Documents and Settings\Administrator\Application Data
CLIENTNAME=CHANGEDTOPROTECTSERVER
ClusterLog=C:\WINDOWS\Cluster\cluster.log
CommonProgramFiles=C:\Program Files\Common Files
COMPUTERNAME=CHANGEDTOPROTECTSERVER
ComSpec=C:\WINDOWS\system32\cmd.exe
HOMEDRIVE=C:
HOMEPATH=\Documents and Settings\Administrator
LOGONSERVER=\\HENRYV
NUMBER_OF_PROCESSORS=4
OS=Windows_NT
Path=C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem
PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH
PROCESSOR_ARCHITECTURE=x86
PROCESSOR_IDENTIFIER=x86 Family 15 Model 2 Stepping 9, GenuineIntel
PROCESSOR_LEVEL=15
PROCESSOR_REVISION=0209
ProgramFiles=C:\Program Files
PROMPT=$P$G
SESSIONNAME=RDP-Tcp#1
SystemDrive=C:
SystemRoot=C:\WINDOWS
TEMP=C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\1
TMP=C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\1
USERDOMAIN=HENRYV
USERNAME=Administrator
USERPROFILE=C:\Documents and Settings\Administrator
windir=C:\WINDOWS



[2005-05-09 11:01:08] [EMAIL PROTECTED]

I don't have Windows Server 2003, and I can't reproduce 
the problem on W2K Advanced Server (the only Windows 
machine I have). Can you tell me what the value of the WIN 
environment variable is when you are logged in as 
administrator? 
 
Thanks 



[2005-05-07 06:14:01] [EMAIL PROTECTED]

Assigning to the author of the installer.




[2005-05-06 13:18:01] ash at theleys dot net

Description:

Using the php-5.0.4-installer.exe puts php.ini into
c:\docssettings\administrator\WINDOWS\ - not in c:\windows, therefore
it's not available, and causes 500 errors. - Found this out by
parsing from php -i and noticing Configuration File (php.ini) Path was
set wrongly.

Expected result:

phpinfo (or whatever the web page contains)

Actual result:
--
500 CGI Error





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


#32962 [Opn-Asn]: Installer puts php.ini in wrong location

2005-11-06 Thread sniper
 ID:   32962
 Updated by:   [EMAIL PROTECTED]
 Reported By:  ash at theleys dot net
-Status:   Open
+Status:   Assigned
 Bug Type: IIS related
 Operating System: Windows Server 2003
 PHP Version:  5.0.4
 Assigned To:  phildriscoll
 New Comment:

Phil, there's the feedback you asked. (given same day, but you didn't
notice?)


Previous Comments:


[2005-05-09 11:38:37] ash at theleys dot net

Under this comment are all the environment variables, - there isn't a
win one, but windir is pointing to the correct folder. - This was
installed with me using a terminal services session, but that's not
been a problem before. (the comp. names have been changed here for
privacy)

ALLUSERSPROFILE=C:\Documents and Settings\All Users
APPDATA=C:\Documents and Settings\Administrator\Application Data
CLIENTNAME=CHANGEDTOPROTECTSERVER
ClusterLog=C:\WINDOWS\Cluster\cluster.log
CommonProgramFiles=C:\Program Files\Common Files
COMPUTERNAME=CHANGEDTOPROTECTSERVER
ComSpec=C:\WINDOWS\system32\cmd.exe
HOMEDRIVE=C:
HOMEPATH=\Documents and Settings\Administrator
LOGONSERVER=\\HENRYV
NUMBER_OF_PROCESSORS=4
OS=Windows_NT
Path=C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem
PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH
PROCESSOR_ARCHITECTURE=x86
PROCESSOR_IDENTIFIER=x86 Family 15 Model 2 Stepping 9, GenuineIntel
PROCESSOR_LEVEL=15
PROCESSOR_REVISION=0209
ProgramFiles=C:\Program Files
PROMPT=$P$G
SESSIONNAME=RDP-Tcp#1
SystemDrive=C:
SystemRoot=C:\WINDOWS
TEMP=C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\1
TMP=C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\1
USERDOMAIN=HENRYV
USERNAME=Administrator
USERPROFILE=C:\Documents and Settings\Administrator
windir=C:\WINDOWS



[2005-05-09 11:01:08] [EMAIL PROTECTED]

I don't have Windows Server 2003, and I can't reproduce 
the problem on W2K Advanced Server (the only Windows 
machine I have). Can you tell me what the value of the WIN 
environment variable is when you are logged in as 
administrator? 
 
Thanks 



[2005-05-07 06:14:01] [EMAIL PROTECTED]

Assigning to the author of the installer.




[2005-05-06 13:18:01] ash at theleys dot net

Description:

Using the php-5.0.4-installer.exe puts php.ini into
c:\docssettings\administrator\WINDOWS\ - not in c:\windows, therefore
it's not available, and causes 500 errors. - Found this out by
parsing from php -i and noticing Configuration File (php.ini) Path was
set wrongly.

Expected result:

phpinfo (or whatever the web page contains)

Actual result:
--
500 CGI Error





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


#33073 [Asn-Opn]: PHP Windows Installer does not set Verify File Exists for IIS 6.

2005-11-06 Thread sniper
 ID:   33073
 Updated by:   [EMAIL PROTECTED]
 Reported By:  webmaster at cyberdogtech dot com
-Status:   Assigned
+Status:   Open
 Bug Type: IIS related
 Operating System: Windows Server 2003
 PHP Version:  5.0.4
 Assigned To:  phildriscoll


Previous Comments:


[2005-05-20 10:34:06] [EMAIL PROTECTED]

Assigned the person behind the installer.. =)




[2005-05-20 00:31:02] webmaster at cyberdogtech dot com

Description:

I discovered this bug while using the PHP Windows Installer with 5.0.4
under IIS6 on Windows Server 2003 SP1.  The installer adds the ISAPI
extension to IIS for .php files, linking them to php-cgi.exe.  The
problem is, it does not set the option of Verify that File Exists. 
This option causes IIS to validate the presence of the requested file. 
Without it set, as it stands now, php will always return an html page
even for non-existent files!  For example if I request
www.website.com/nothing.php (a file which doesn't exist), PHP will
still return empty HTML tags instead of the usual 404.  By activating
this IIS option, however, a 404 is returned properly instead of
invoking PHP on the missing file name.






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


#33073 [Opn-Asn]: PHP Windows Installer does not set Verify File Exists for IIS 6.

2005-11-06 Thread sniper
 ID:   33073
 Updated by:   [EMAIL PROTECTED]
 Reported By:  webmaster at cyberdogtech dot com
-Status:   Open
+Status:   Assigned
 Bug Type: IIS related
 Operating System: Windows Server 2003
 PHP Version:  5.0.4
 Assigned To:  phildriscoll
 New Comment:

Phil, are you aware of this issue?


Previous Comments:


[2005-05-20 10:34:06] [EMAIL PROTECTED]

Assigned the person behind the installer.. =)




[2005-05-20 00:31:02] webmaster at cyberdogtech dot com

Description:

I discovered this bug while using the PHP Windows Installer with 5.0.4
under IIS6 on Windows Server 2003 SP1.  The installer adds the ISAPI
extension to IIS for .php files, linking them to php-cgi.exe.  The
problem is, it does not set the option of Verify that File Exists. 
This option causes IIS to validate the presence of the requested file. 
Without it set, as it stands now, php will always return an html page
even for non-existent files!  For example if I request
www.website.com/nothing.php (a file which doesn't exist), PHP will
still return empty HTML tags instead of the usual 404.  By activating
this IIS option, however, a 404 is returned properly instead of
invoking PHP on the missing file name.






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



#32861 [Asn-Fbk]: timeout is ignored in stream_select function

2005-11-06 Thread sniper
 ID:   32861
 Updated by:   [EMAIL PROTECTED]
 Reported By:  lew at mailduct dot com
-Status:   Assigned
+Status:   Feedback
 Bug Type: Filesystem function related
 Operating System: FreeBSD 4.11-REL
 PHP Version:  5.0.4, 4.3.10
 Assigned To:  pollita
 New Comment:

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




Previous Comments:


[2005-07-29 01:56:21] [EMAIL PROTECTED]

Assigning to Sara who knows this stuff..




[2005-07-28 20:26:32] lew at mailduct dot com

After testing with the latest php5 release, this still has a problem. 
Let me try to be more succinct in summarizing...

When operating with wrapper_type of 'plainfile' (such as when tailing
one or more files), the tv_sec and tv_usec (timeout) are ignored...
because stream_select insists on classifying FEOF as an important
event.  While this may be true for a socket event (socket close, for
example... which is why we have socket_select instead), it is not true
for a plainfile event.

Ask yourself this question -- How would you make use of the 'timeout'
parameter when reading from a plainfile wrapper?  It would never come
into play if FEOF awakens the stream_select call!  The purpose of
stream_select is to let you multiplex streams... so you can WAIT for an
action to take place on a stream (or a timeout).  If FEOF is allowed to
awaken the select (rather than waiting for a timeout or for data to
become available), then there's not much point to using that call... 
You're forcing it to do [expensive] polling instead of relying on the
select() interrupt structure to do the work for you.

My second argument is this:  Let's assume you insist FEOF should awaken
the select.  If that's the case, then it still is not working
correctly... because if I *add data* to a file after the select
detected EOF, and then do a select again, it *still* thinks no data is
available (and that we're still at EOF even though we're not).

This is VERY broken.



[2005-05-27 00:04:54] lew at mailduct dot com

I have now tested this using both PHP 4.3.11 and 5.0.4, and the bug
remains.  My same prior notes apply.  Please review.



[2005-04-28 07:45:59] lew at mailduct dot com

I believe that under the OS and PHP version given in the headers of
this report, the stream timeout function is not working when used with
fgets as well.  However, I will load the current PHP on the box and
test again, to ensure I provide you with accurate and complete
information and I'll open a new pr if necessary.

Let's close this one as Bogus.



[2005-04-28 00:35:16] [EMAIL PROTECTED]

From the stream_select() manual page:

The streams listed in the read array will be watched to see if
characters become available for reading (more precisely, to see if a
read will not block - in particular, a stream resource is also ready on
end-of-file, in which case an fread() will return a zero length string).






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

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


#33011 [Asn-Opn]: [PATCH] shmop: can still open segment for reading after shmop_delete

2005-11-06 Thread sniper
 ID:   33011
 Updated by:   [EMAIL PROTECTED]
 Reported By:  joe at bs0 dot com
-Status:   Assigned
+Status:   Open
 Bug Type: Semaphore related
 Operating System: win32 only
 PHP Version:  5.0.4, 4.3.11
 Assigned To:  iliaa


Previous Comments:


[2005-05-19 23:33:39] joe at bs0 dot com

patch:http://www.bs0.com/~joe/php/tsrm/tsrm_win32.diff
complete: http://www.bs0.com/~joe/php/tsrm/tsrm_win32.c
changes:  http://www.bs0.com/~joe/php/tsrm/changes.txt



[2005-05-18 14:29:34] [EMAIL PROTECTED]

Put a patch on the web, and provide the URL here please. (And if you
can, provide a summary why it was wrong and how you fixed it).



[2005-05-15 02:34:02] joe at bs0 dot com

as short as I can make it:

?php
$toWrite = 'test string';   
$shm_len = strlen($toWrite);

$shm_id = shmop_open(0xff3, c, 0644, $shm_len);

shmop_write($shm_id, $toWrite, 0);
shmop_close($shm_id);

$shm_id = shmop_open(0xff3, a, 0, 0); 
$data = shmop_read($shm_id, 0, $shm_len);   
shmop_close($shm_id);

$shm_id = shmop_open(0xff3, w, 0, 0); 

if (!shmop_delete($shm_id)) {
echo Couldn't mark shared memory block for deletion.br/;
}
else {
echo shared memory block marked for deletion.br/;   
}

shmop_close($shm_id);
echo 'block closed.br/';

$shm_id = shmop_open(0xff3, a, 0, 0); 

if($shm_id) {
$data = shmop_read($shm_id, 0, $shm_len);   
shmop_close($shm_id);   

echo 'ERROR: Previously deleted block able to be opened.br/';
echo 'Data read : ' . $data . '';
}
else {
echo 'Could not open previously deleted block.br/';
}
?



[2005-05-12 04:33:53] joe at bs0 dot com

Description:

Tested with iis/php5.0.4, iis/php4.3.11, apache2/php4.3.11 - same
problem.  after a succesful call to shmop_delete, the shared memory can
still be opened, and the previous values read in.  Delete call seems to
have no effect.

Each step is done in new request:
1)Create shared memory block, populate with string.
2)open block, read in string
3)open block, call shmop_delete (returns true)
4)open block, read in string - should not be able to open block for
reading at this point.


looks to be the same as Bug #28965, this bug has status of No Feedback,
so opening a new one.

Reproduce code:
---
Code to reproduce:
http://bs0.com/shmop/shmop_test.php.txt

Expected result:

leave only one step uncommented at a time, at step 4, the open should
fail and no data should be read in.

Actual result:
--
After step 4, memory is still opened/data is read in.





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


#33011 [Opn-Asn]: [PATCH] shmop: can still open segment for reading after shmop_delete

2005-11-06 Thread sniper
 ID:   33011
 Updated by:   [EMAIL PROTECTED]
 Reported By:  joe at bs0 dot com
-Status:   Open
+Status:   Assigned
 Bug Type: Semaphore related
 Operating System: win32 only
 PHP Version:  5.0.4, 4.3.11
 Assigned To:  iliaa
 New Comment:

Ilia, have you checked the patch in this report yet?



Previous Comments:


[2005-05-19 23:33:39] joe at bs0 dot com

patch:http://www.bs0.com/~joe/php/tsrm/tsrm_win32.diff
complete: http://www.bs0.com/~joe/php/tsrm/tsrm_win32.c
changes:  http://www.bs0.com/~joe/php/tsrm/changes.txt



[2005-05-18 14:29:34] [EMAIL PROTECTED]

Put a patch on the web, and provide the URL here please. (And if you
can, provide a summary why it was wrong and how you fixed it).



[2005-05-15 02:34:02] joe at bs0 dot com

as short as I can make it:

?php
$toWrite = 'test string';   
$shm_len = strlen($toWrite);

$shm_id = shmop_open(0xff3, c, 0644, $shm_len);

shmop_write($shm_id, $toWrite, 0);
shmop_close($shm_id);

$shm_id = shmop_open(0xff3, a, 0, 0); 
$data = shmop_read($shm_id, 0, $shm_len);   
shmop_close($shm_id);

$shm_id = shmop_open(0xff3, w, 0, 0); 

if (!shmop_delete($shm_id)) {
echo Couldn't mark shared memory block for deletion.br/;
}
else {
echo shared memory block marked for deletion.br/;   
}

shmop_close($shm_id);
echo 'block closed.br/';

$shm_id = shmop_open(0xff3, a, 0, 0); 

if($shm_id) {
$data = shmop_read($shm_id, 0, $shm_len);   
shmop_close($shm_id);   

echo 'ERROR: Previously deleted block able to be opened.br/';
echo 'Data read : ' . $data . '';
}
else {
echo 'Could not open previously deleted block.br/';
}
?



[2005-05-12 04:33:53] joe at bs0 dot com

Description:

Tested with iis/php5.0.4, iis/php4.3.11, apache2/php4.3.11 - same
problem.  after a succesful call to shmop_delete, the shared memory can
still be opened, and the previous values read in.  Delete call seems to
have no effect.

Each step is done in new request:
1)Create shared memory block, populate with string.
2)open block, read in string
3)open block, call shmop_delete (returns true)
4)open block, read in string - should not be able to open block for
reading at this point.


looks to be the same as Bug #28965, this bug has status of No Feedback,
so opening a new one.

Reproduce code:
---
Code to reproduce:
http://bs0.com/shmop/shmop_test.php.txt

Expected result:

leave only one step uncommented at a time, at step 4, the open should
fail and no data should be read in.

Actual result:
--
After step 4, memory is still opened/data is read in.





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


#33115 [Asn-Opn]: Windows Install Silent Option breaks OS environment path variable

2005-11-06 Thread sniper
 ID:   33115
 Updated by:   [EMAIL PROTECTED]
 Reported By:  john dot jantjes at gmail dot com
-Status:   Assigned
+Status:   Open
 Bug Type: IIS related
 Operating System: Windows XP
 PHP Version:  5.0.4, 4.3.11
 Assigned To:  phildriscoll


Previous Comments:


[2005-05-24 04:20:36] john dot jantjes at gmail dot com

If the installer is used normally, not silent, the issue does not
appear.



[2005-05-24 04:16:42] john dot jantjes at gmail dot com

Description:

I have been using the windows installer, with the /s option for a
silent install, and have found that it breaks the OS environment
variable.

For example

Instread of path being

path=c:\windows;c:\windows\system32; .

It becomes

path=%SystemRoot%;%SystemRoot%\system32;..

It set the path variable to reference another variable, which just does
not seem to work.  Only the windows and windows system entries in path
are effected.






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


#33115 [Opn-Asn]: Windows Install Silent Option breaks OS environment path variable

2005-11-06 Thread sniper
 ID:   33115
 Updated by:   [EMAIL PROTECTED]
 Reported By:  john dot jantjes at gmail dot com
-Status:   Open
+Status:   Assigned
 Bug Type: IIS related
 Operating System: Windows XP
 PHP Version:  5.0.4, 4.3.11
 Assigned To:  phildriscoll
 New Comment:

Phil, have you checked this report yet..?


Previous Comments:


[2005-05-24 04:20:36] john dot jantjes at gmail dot com

If the installer is used normally, not silent, the issue does not
appear.



[2005-05-24 04:16:42] john dot jantjes at gmail dot com

Description:

I have been using the windows installer, with the /s option for a
silent install, and have found that it breaks the OS environment
variable.

For example

Instread of path being

path=c:\windows;c:\windows\system32; .

It becomes

path=%SystemRoot%;%SystemRoot%\system32;..

It set the path variable to reference another variable, which just does
not seem to work.  Only the windows and windows system entries in path
are effected.






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


#32979 [Asn-Fbk]: socket stream opened with stream_socket_client doesnt work with stream_select

2005-11-06 Thread sniper
 ID:   32979
 Updated by:   [EMAIL PROTECTED]
 Reported By:  mjpph at stardust dot fi
-Status:   Assigned
+Status:   Feedback
 Bug Type: Network related
 Operating System: Linux (Fedora Core 3)
 PHP Version:  5CVS-2005-05-08 (dev)
 Assigned To:  wez
 New Comment:

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




Previous Comments:


[2005-07-28 01:50:49] lew at mailduct dot com

wez -- the problems reported here are all due to a previously fixed bug
which has crept back into PHP.  It has to do with how the PHP library
treats EOF under FreeBSD vs Linux.

You worked on this problem previously...  please take a look at the
currently active Bug #32858 reported by me, as well as your prior fix
in Bug #25649.

Thanks
Lew Payne



[2005-05-30 22:11:28] mjpph at stardust dot fi

I haven't had problems with different kernels. Only the combination of
x86_64, stream_socket_client() or stream_socket_server(),
stream_select() and PHP OpenSSL-support seem to reproduce this every
time.



[2005-05-30 21:57:34] fox dot 69 at gmx dot net

i experience a similar problem since the latest standard kernel update
with yum (host.domain.com point to the main server IP) :

?
$url=http://host.domain.com;;
$fp = fopen ($url,r);
$buffer=fread($fp,8192);
fclose($fp);
echo $buffer;
?

booted with kernel-2.6.11-1.14_FC3 package: OK
booted with kernel-2.6.11-1.27_FC3 package: NOT OK (timeout)

NOTE: but only if host.domain.com point to the executing host itself
- same with localhost - for all others it seem to be fine



[2005-05-30 16:58:42] mjpph at stardust dot fi

Also trying to compile valgrind on x86_64 results in:
checking for a supported CPU... no (x86_64)
configure: error: Unsupported host architecture. Sorry



[2005-05-30 16:56:03] mjpph at stardust dot fi

I could, but I get this:
valgrind: Can only handle 32-bit executables

On a 32bit executable and with openssl stream_select() worked ok. On a
64bit PHP executable it doesn'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/32979

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


#35107 [Opn-Fbk]: compile failure with PHP 5.1 + MySQL 5

2005-11-05 Thread sniper
 ID:   35107
 Updated by:   [EMAIL PROTECTED]
 Reported By:  alex at whitewhale dot net
-Status:   Open
+Status:   Feedback
 Bug Type: Compile Failure
 Operating System: MacOS X 10.4.3
 PHP Version:  5.1.0RC4
 New Comment:

So now we've found out that the problem isn't in ext/mysqli.
Try this configure line (with the usual rm config.cache and make
clean, which are only needed if you're not using fresh sources
everytime)

# ./configure --disable-all --enable-pdo --with-pdo-mysql


Previous Comments:


[2005-11-05 02:17:26] alex at whitewhale dot net

Actually, I ran make clean several times in trying to 
diagnose this. Also, as I said, I tried compiling a fresh 
snapshot this morning to no avail.

I was finally able to compile it with your suggested, 
stripped-down config line after both rm config.cache and 
make clean but the moment I tried it with my normal config 
line, it failed again with the original error.

Just to be clear, the following sequence does *not* work for 
me (on my Mac, it works on my Linux box):

rm config.cache
make clean
./configure --with-apxs=/usr/sbin/apxs --prefix=/usr --
enable-inline-optimization --with-libxml-dir=/sw --with-
mysqli=/usr/local/mysql/bin/mysql_config --with-gd --with-
jpeg-dir=/sw --with-png-dir=/sw --with-zlib-dir=/usr --with-
pdo-mysql --with-xmlrpc --with-mm=/usr/local --disable-debug 
--with-ldap --enable-soap
make



[2005-11-04 18:20:06] [EMAIL PROTECTED]

Does this configure line work any better:

# rm config.cache
# ./configure --disable-all --with-apxs=/usr/sbin/apxs \
--with-mysqli=/usr/local/mysql/bin/mysql_config




[2005-11-04 17:40:02] alex at whitewhale dot net

Description:

Not very knowledgeable about compiler issues, but: getting a 
compile failure on MacOS X related to MySQL. PHP 5.1 RC3 
compiled with MySQL 5 successfully, but RC4 and a snapshot 
from this morning both fail using the following configure 
line:

./configure --with-apxs=/usr/sbin/apxs --prefix=/usr --enable-
inline-optimization --with-libxml-dir=/sw --with-mysqli=/usr/
local/mysql/bin/mysql_config --with-gd --with-jpeg-dir=/sw --
with-png-dir=/sw --with-zlib-dir=/usr --with-pdo-mysql --with-
xmlrpc --with-mm=/usr/local --disable-debug --with-ldap --
enable-soap

Reproduce code:
---
make

Expected result:

a successful compile

Actual result:
--
/usr/bin/ld: warning multiple definitions of symbol _regcomp
/usr/sbin/httpd definition of _regcomp
/usr/lib/gcc/powerpc-apple-darwin8/4.0.0/../../../libm.dylib
(regcomp.So) definition of _regcomp
/usr/bin/ld: warning multiple definitions of symbol _regexec
/usr/sbin/httpd definition of _regexec
/usr/lib/gcc/powerpc-apple-darwin8/4.0.0/../../../libm.dylib
(regexec.So) definition of _regexec
/usr/bin/ld: warning multiple definitions of symbol _regfree
/usr/sbin/httpd definition of _regfree
/usr/lib/gcc/powerpc-apple-darwin8/4.0.0/../../../libm.dylib
(regfree.So) definition of _regfree
/usr/bin/ld: Undefined symbols:
_mysql_get_character_set_info
_mysql_set_character_set
collect2: ld returned 1 exit status
make: *** [libs/libphp5.bundle] Error 1





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


#35076 [Asn-Fbk]: Sometimes the log file shows: The session id contains illegal characters, ..etc

2005-11-05 Thread sniper
 ID:   35076
 Updated by:   [EMAIL PROTECTED]
 Reported By:  vincent_f40 at hotmail dot com
-Status:   Assigned
+Status:   Feedback
 Bug Type: Session related
 Operating System: Linux RHEL4, 2.6.9-11.ELsmp
 PHP Version:  5.0.5
 Assigned To:  cellog
 New Comment:

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

And ignore the PEAR errors. (just add --without-pear to your configure
line)


Previous Comments:


[2005-11-05 01:00:13] vincent_f40 at hotmail dot com

Hi Sniper,

Oki...and what about my initial error. The error down here:
Is this then a know issue and will be solved in the latest php release
?

Thu Nov  3 00:49:10 2005] [error] PHP Warning:  session_start() [a
href='function.session-start'function.session-start/a]: The session
id contains illegal characters, valid characters are a-z, A-Z, 0-9 and
'-,' in /home/httpd/html/includes/session_init.inc on line 70
[Thu Nov  3 00:49:11 2005] [error] PHP Warning:  Unknown: The session
id
contains illegal characters, valid characters are a-z, A-Z, 0-9 and
'-,'
in Unknown on line 0
[Thu Nov  3 00:49:11 2005] [error] PHP Warning:  Unknown: Failed to
write session data (files). Please verify that the current setting of
session.save_path is correct () in Unknown on line 0

Thanks,
Vince.



[2005-11-03 02:27:52] vincent_f40 at hotmail dot com

Description:

[Thu Nov  3 00:49:10 2005] [error] PHP Warning:  session_start() [a
href='function.session-start'function.session-start/a]: The session
id contains illegal characters, valid characters are a-z, A-Z, 0-9 and
'-,' in /home/httpd/html/includes/session_init.inc on line 70
[Thu Nov  3 00:49:11 2005] [error] PHP Warning:  Unknown: The session
id contains illegal characters, valid characters are a-z, A-Z, 0-9 and
'-,' in Unknown on line 0
[Thu Nov  3 00:49:11 2005] [error] PHP Warning:  Unknown: Failed to
write session data (files). Please verify that the current setting of
session.save_path is correct () in Unknown on line 0

1) Cant reproduce the errors. As the site works fine, only sometimes
the above error appears in the log files.
2) session_write_close() is being used.
3) session_name() uses only the characters [a-z].
4) As the site works /tmp is oke as well.(perms, etc.)
5) There is enough free disk space in /tmp as well.

a) using apache 1.3.34, php compiled as module(apxs)
b) Kernel: 2.6.9-11.ELsmp (double processor)

Is this a bug or a php programming error ?
As it happens not always, just random/sometimes.

Search the net for hours...no luck in finding the explanation. Hope to
find some clue here.

Thanks.






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


#35111 [Opn-Bgs]: Compile fails for GD Library

2005-11-05 Thread sniper
 ID:   35111
 Updated by:   [EMAIL PROTECTED]
 Reported By:  elik at hostforweb dot com
-Status:   Open
+Status:   Bogus
 Bug Type: Compile Failure
 Operating System: CentOS 4.2 x86_64
 PHP Version:  4.4.1
 New Comment:

Like said before, the 64bit support is new to PHP 5.1.
It will NOT be backported.


Previous Comments:


[2005-11-05 16:23:39] elik at hostforweb dot com

Description:

Greetings,

   It seems the bug came back in 4.4.1 that was not in 4.4.0 for
compiling the libjpeg, libpng into PHP dispite it been symblinked into
the /usr/lib from /usr/lib64.

checking for GD support... yes
checking for the location of libjpeg... /usr
checking for the location of libpng... /usr
checking for the location of libXpm... /usr/X11R6
checking for FreeType 1.x support... yes
checking for FreeType 2... /usr
checking for T1lib support... no
checking whether to enable truetype string function in GD... yes
checking whether to enable JIS-mapped Japanese font support in GD...
no
checking for fabsf... no
checking for floorf... no
checking for jpeg_read_header in -ljpeg... no
configure: error: Problem with libjpeg.(a|so). Please check config.log
for more information.

Directory Listing:
[EMAIL PROTECTED] [/usr/lib]# ls -la libjpeg* libpng*
lrwxrwxrwx  1 root root 18 Nov  5 07:15 libjpeg.a -
../lib64/libjpeg.a
lrwxrwxrwx  1 root root 19 Nov  5 07:15 libjpeg.la -
../lib64/libjpeg.la*
lrwxrwxrwx  1 root root 19 Nov  5 07:15 libjpeg.so -
../lib64/libjpeg.so*
lrwxrwxrwx  1 root root 22 Nov  5 07:22 libjpeg.so.62 -
../lib64/libjpeg.so.62*
lrwxrwxrwx  1 root root 26 Nov  5 07:22 libjpeg.so.62.0.0 -
../lib64/libjpeg.so.62.0.0*
lrwxrwxrwx  1 root root 19 Nov  5 07:49 libpng12.a -
../lib64/libpng12.a
lrwxrwxrwx  1 root root 20 Nov  5 07:49 libpng12.so -
../lib64/libpng12.so*
lrwxrwxrwx  1 root root  9 Nov  5 07:42 libpng12.so.0 - libpng.so*
lrwxrwxrwx  1 root root 28 Nov  5 07:49 libpng12.so.0.1.2.7 -
../lib64/libpng12.so.0.1.2.7*
lrwxrwxrwx  1 root root 17 Nov  5 07:16 libpng.a - ../lib64/libpng.a
lrwxrwxrwx  1 root root 18 Nov  5 07:16 libpng.so -
../lib64/libpng.so*
lrwxrwxrwx  1 root root 20 Nov  5 07:49 libpng.so.3 -
../lib64/libpng.so.3*
lrwxrwxrwx  1 root root 26 Nov  5 07:49 libpng.so.3.1.2.7 -
../lib64/libpng.so.3.1.2.7*


Reproduce code:
---
config.nice

LDFLAGS='-L/usr/X11R6/lib64 -lstdc++' \
'./configure' \
'--with-pic' \
'--with-prefix=/usr' \
'--with-xml' \
'--enable-bcmath' \
'--enable-calendar' \
'--with-curl' \
'--with-dom' \
'--enable-xslt' \
'--with-dom-xslt' \
'--with-dom-exslt' \
'--with-xslt-sablot' \
'--enable-exif' \
'--enable-ftp' \
'--with-gd' \
'--with-jpeg-dir=/usr' \
'--with-png-dir=/usr' \
'--with-xpm-dir=/usr/X11R6' \
'--with-gettext' \
'--with-imap' \
'--with-imap-ssl' \
'--with-kerberos' \
'--enable-mbstring' \
'--enable-mbstr-enc-trans' \
'--enable-mbregex' \
'--with-mcrypt' \
'--with-mhash' \
'--enable-magic-quotes' \
'--with-mysqli' \
'--with-openssl' \
'--enable-discard-path' \
'--enable-sockets' \
'--enable-track-vars' \
'--with-ttf' \
'--enable-gd-native-ttf' \
'--with-freetype-dir=/usr' \
'--enable-wddx' \
'--with-zip' \
'--with-zlib' \
'--with-bz2' \
'--enable-dba' \
'--with-flatfile' \
'--with-pspell' \
'--with-tsrm-pthreads' \
'--with-mm' \
'--enable-sysvmsg' \
'--enable-sysvsem' \
'--enable-sysvshm' \
$@


Expected result:

Expected the code to compile all the way.






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


#35106 [Opn-Asn]: nested foreach fails when the array was sometime before referenced

2005-11-05 Thread sniper
 ID:   35106
 Updated by:   [EMAIL PROTECTED]
 Reported By:  olympnn at nm dot ru
-Status:   Open
+Status:   Assigned
-Bug Type: Arrays related
+Bug Type: Scripting Engine problem
-Operating System: Windows XP Sp2
+Operating System: *
-PHP Version:  5.0.5
+PHP Version:  5CVS-2005-11-05 (cvs)
-Assigned To:  
+Assigned To:  dmitry
 New Comment:

Verified. Dmitry, check this out.


Previous Comments:


[2005-11-04 16:57:11] olympnn at nm dot ru

Description:

When I execute the code, it seems that the outer foreach is executed
only once. When I comment any of lines marked *, the (outer) foreach
executes twice.

This bug seems to be very like to bug # 21702, but here the situation
is much more strange: I do not use $b in foreaches at all! So it's very
strange that the foreach behavior differs when the array was referenced
sometime or not.

Thanks.

Reproduce code:
---
?
$a=array(1,2);
$b=$a;//*
foreach($a as $i){
print($i);
foreach($a as $p);//*
}
?

Expected result:

12

Actual result:
--
1





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


#35107 [Opn-Asn]: compile failure with PHP 5.1 + MySQL 5

2005-11-05 Thread sniper
 ID:   35107
 Updated by:   [EMAIL PROTECTED]
 Reported By:  alex at whitewhale dot net
-Status:   Open
+Status:   Assigned
-Bug Type: Compile Failure
+Bug Type: PDO related
 Operating System: MacOS X 10.4.3
 PHP Version:  5CVS-2005-11-05 (snap)
-Assigned To:  
+Assigned To:  wez
 New Comment:

Assigned to the PDO maintainer.


Previous Comments:


[2005-11-05 15:42:33] alex at whitewhale dot net

Okay, using that configure line I now get:

In file included from /Users/sahara/Documents/LAMP/php/
php5-200511041330/ext/pdo_mysql/pdo_mysql.c:31:
/Users/sahara/Documents/LAMP/php/php5-200511041330/ext/
pdo_mysql/php_pdo_mysql_int.h:25:19: error: mysql.h: No such 
file or directory
In file included from /Users/sahara/Documents/LAMP/php/
php5-200511041330/ext/pdo_mysql/pdo_mysql.c:31:
/Users/sahara/Documents/LAMP/php/php5-200511041330/ext/
pdo_mysql/php_pdo_mysql_int.h:36: error: parse error before 
'MYSQL'
/Users/sahara/Documents/LAMP/php/php5-200511041330/ext/
pdo_mysql/php_pdo_mysql_int.h:36: warning: no semicolon at 
end of struct or union
/Users/sahara/Documents/LAMP/php/php5-200511041330/ext/
pdo_mysql/php_pdo_mysql_int.h:38: error: parse error before 
':' token
/Users/sahara/Documents/LAMP/php/php5-200511041330/ext/
pdo_mysql/php_pdo_mysql_int.h:39: error: parse error before 
':' token
/Users/sahara/Documents/LAMP/php/php5-200511041330/ext/
pdo_mysql/php_pdo_mysql_int.h:40: error: parse error before 
':' token
/Users/sahara/Documents/LAMP/php/php5-200511041330/ext/
pdo_mysql/php_pdo_mysql_int.h:43: error: parse error before 
'}' token
/Users/sahara/Documents/LAMP/php/php5-200511041330/ext/
pdo_mysql/php_pdo_mysql_int.h:43: warning: data definition 
has no type or storage class
/Users/sahara/Documents/LAMP/php/php5-200511041330/ext/
pdo_mysql/php_pdo_mysql_int.h:46: error: parse error before 
'MYSQL_FIELD'
/Users/sahara/Documents/LAMP/php/php5-200511041330/ext/
pdo_mysql/php_pdo_mysql_int.h:46: warning: no semicolon at 
end of struct or union
/Users/sahara/Documents/LAMP/php/php5-200511041330/ext/
pdo_mysql/php_pdo_mysql_int.h:47: warning: data definition 
has no type or storage class
/Users/sahara/Documents/LAMP/php/php5-200511041330/ext/
pdo_mysql/php_pdo_mysql_int.h:50: error: parse error before 
'pdo_mysql_db_handle'
/Users/sahara/Documents/LAMP/php/php5-200511041330/ext/
pdo_mysql/php_pdo_mysql_int.h:50: warning: no semicolon at 
end of struct or union
/Users/sahara/Documents/LAMP/php/php5-200511041330/ext/
pdo_mysql/php_pdo_mysql_int.h:51: warning: data definition 
has no type or storage class
/Users/sahara/Documents/LAMP/php/php5-200511041330/ext/
pdo_mysql/php_pdo_mysql_int.h:52: error: parse error before 
'*' token
/Users/sahara/Documents/LAMP/php/php5-200511041330/ext/
pdo_mysql/php_pdo_mysql_int.h:52: warning: data definition 
has no type or storage class
/Users/sahara/Documents/LAMP/php/php5-200511041330/ext/
pdo_mysql/php_pdo_mysql_int.h:53: error: parse error before 
'current_data'
/Users/sahara/Documents/LAMP/php/php5-200511041330/ext/
pdo_mysql/php_pdo_mysql_int.h:53: warning: data definition 
has no type or storage class
/Users/sahara/Documents/LAMP/php/php5-200511041330/ext/
pdo_mysql/php_pdo_mysql_int.h:69: error: parse error before 
'}' token
/Users/sahara/Documents/LAMP/php/php5-200511041330/ext/
pdo_mysql/php_pdo_mysql_int.h:69: warning: data definition 
has no type or storage class
make: *** [ext/pdo_mysql/pdo_mysql.lo] Error 1



[2005-11-05 12:39:07] [EMAIL PROTECTED]

So now we've found out that the problem isn't in ext/mysqli.
Try this configure line (with the usual rm config.cache and make
clean, which are only needed if you're not using fresh sources
everytime)

# ./configure --disable-all --enable-pdo --with-pdo-mysql



[2005-11-05 02:17:26] alex at whitewhale dot net

Actually, I ran make clean several times in trying to 
diagnose this. Also, as I said, I tried compiling a fresh 
snapshot this morning to no avail.

I was finally able to compile it with your suggested, 
stripped-down config line after both rm config.cache and 
make clean but the moment I tried it with my normal config 
line, it failed again with the original error.

Just to be clear, the following sequence does *not* work for 
me (on my Mac, it works on my Linux box):

rm config.cache
make clean
./configure --with-apxs=/usr/sbin/apxs --prefix=/usr --
enable-inline-optimization --with-libxml-dir=/sw --with-
mysqli=/usr/local/mysql/bin/mysql_config --with-gd --with-
jpeg-dir=/sw --with-png-dir=/sw --with-zlib-dir=/usr --with-
pdo-mysql --with-xmlrpc --with-mm=/usr/local --disable-debug 
--with-ldap --enable-soap
make



[2005-11-04 18:20:06] [EMAIL PROTECTED]

Does 

#35112 [Opn-Asn]: Pear Install Error - Call to undefined function: getversion()

2005-11-05 Thread sniper
 ID:   35112
 Updated by:   [EMAIL PROTECTED]
 Reported By:  jason at extremeoverclocking dot com
-Status:   Open
+Status:   Assigned
 Bug Type: Compile Failure
-Operating System: RH EL 3
+Operating System: RH EL 4CVS, 3
 PHP Version:  4CVS-2005-11-05 (snap)
-Assigned To:  
+Assigned To:  cellog
 New Comment:

Assigned to the PEAR maintainer. Greg, don't you people test anything
you commit?



Previous Comments:


[2005-11-05 16:43:52] jason at extremeoverclocking dot com

Description:

Doing a make install caused the error below, so I installed everything
except pear, then ran the following but it still would not work.

[root php4-STABLE-200511051406]# make install-pear
Installing PEAR environment:  /usr/lib/php/

Fatal error: Call to undefined function:  getversion() in
/root/php4-STABLE-200511051406/pear/install-pear.php on line 118
make[1]: *** [install-pear-installer] Error 255
make: *** [install-pear] Error 2






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


#35074 [Opn-Fbk]: Call to virtual() causes Segmentation fault

2005-11-05 Thread sniper
 ID:   35074
 Updated by:   [EMAIL PROTECTED]
 Reported By:  jeff dot potter at hp dot com
-Status:   Open
+Status:   Feedback
 Bug Type: Apache2 related
 Operating System: Linux (Redhat EL 3 i386)
 PHP Version:  5CVS, 4CVS (2005-11-04) (snap)
 New Comment:

Does the GDB backtrace differ to the one with PHP 4?



Previous Comments:


[2005-11-03 23:42:20] jeff dot potter at hp dot com

php5-latest.tar.gz (php5-200511031930)  Also fails with a Segmentation
fault.

[Thu Nov 03 16:05:08 2005] [notice] child pid 21281 exit signal
Segmentation fault (11)

[Thu Nov 03 16:05:10 2005] [notice] child pid 21317 exit signal
Segmentation fault (11)

Summary:

php-4.3.11 - No issue
php-4.4.0  - No issue
php-4.4.1  - SEGMENTATION FAULT
php4-STABLE-200511031356 - SEGMENTATION FAULT
php5-200511031930 - SEGMENTATION FAULT



[2005-11-03 21:53:30] [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





[2005-11-03 17:16:34] jeff dot potter at hp dot com

php4-STABLE-latest (php4-STABLE-200511031356) still appears to have the
same symptoms as php-4.4.1

[Thu Nov 03 09:41:35 2005] [notice] child pid 4209 exit signal
Segmentation fault (11)
[Thu Nov 03 09:41:37 2005] [notice] child pid 4264 exit signal
Segmentation fault (11)



[2005-11-03 09:10:15] [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



[2005-11-03 00:29:49] jeff dot potter at hp dot com

Description:

Just compiled and integrated PHP v4.4.1, and I get an immediate
Segmentation fault on my first virtual() call. Same code works fine in
PHP 4.3.11  PHP 4.4.0.

Configure script:

./configure $php_dbg_flag --prefix=/opt/hp/hpsmh/php
--with-apxs2=/opt/hp/hpsmh/sbin/apxs \
--with-dom=/opt/hp/hpsmh  --with-zlib --enable-bcmath --enable-calendar
--enable-wddx --enable-ftp
make
make install

Platform:

RedHat Enterprise Linux Advanced Server 3 Update 2
Apache 2.0.48 with security patches


Reproduce code:
---
Just call virtual(some_uri).

Expected result:

My page rendered on the screen.

Actual result:
--
It looks like the rr-main structure in PHP_FUNCTION(virtual)is all
zeros. 

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread -1469858896 (LWP 13252)]
ap_rflush (r=0x82ef088) at protocol.c:1561
1561bb = apr_brigade_create(r-pool, c-bucket_alloc);

(gdb) bt
#0  ap_rflush (r=0x82ef088) at protocol.c:1561
#1  0xb71eba7f in zif_virtual (ht=1, return_value=0x839d264,
this_ptr=0x0, return_value_used=0, tsrm_ls=0x8363dd8)
at
/usr/src/redhat/BUILD/cleansweep-2.1.14-10139/php-4.4.1/sapi/apache2handler/php_functions.c:101
#2  0xb71e2b59 in execute (op_array=0x83987b4, tsrm_ls=0x8363dd8)
at
/usr/src/redhat/BUILD/cleansweep-2.1.14-10139/php-4.4.1/Zend/zend_execute.c:1675
#3  0xb71cea6c in zend_execute_scripts (type=8, tsrm_ls=0x8363dd8,
retval=0x0, file_count=3)
at
/usr/src/redhat/BUILD/cleansweep-2.1.14-10139/php-4.4.1/Zend/zend.c:938
#4  0xb71a5d3e in php_execute_script (primary_file=0xa863b830,
tsrm_ls=0x8363dd8)
at
/usr/src/redhat/BUILD/cleansweep-2.1.14-10139/php-4.4.1/main/main.c:1743
#5  0xb71eb3ce in php_handler (r=0x82b8e50)
at
/usr/src/redhat/BUILD/cleansweep-2.1.14-10139/php-4.4.1/sapi/apache2handler/sapi_apache2.c:572
#6  0x080a5b1e in ap_run_handler (r=0x82b8e50) at config.c:151
#7  0x080a6039 in ap_invoke_handler (r=0x82b8e50) at config.c:358
#8  0x080a1d8f in ap_process_request (r=0x82b8e50) at
http_request.c:246
#9  0x0809dd04 in ap_process_http_connection (c=0x82abf18) at
http_core.c:250
#10 0x080adeca in ap_run_process_connection (c=0x82abf18) at
connection.c:42
#11 0x080a2d3f in process_socket (p=0x82abdf0, sock=0x82abe28,
my_child_num=0, my_thread_num=22,
bucket_alloc=0x82addf8) at worker.c:520
#12 0x080a3332 in worker_thread (thd=0x81dbac8, dummy=0x82a5040) at
worker.c:834
#13 0xb747551c in dummy_worker (opaque=0x81dbac8) at thread.c:88
#14 0xb744adec in start_thread () from /lib/tls/libpthread.so.0
#15 0xb7370e8a in clone () from /lib/tls/libc.so.6
(gdb)


Frame #0 Code

#0  ap_rflush (r=0x82ef088) at protocol.c:1561
1561bb = apr_brigade_create(r-pool, c-bucket_alloc);

(gdb) print bb
$1 = (apr_bucket_brigade *) 0x839d264
(gdb) print *bb
$2 = {p = 0x0, list = {next = 0x0, prev = 0x1}, bucket_alloc =
0x0}

gdb) print c-bucket_alloc
Cannot access memory at address 0x50
(gdb) print *c-bucket_alloc

#35114 [Opn-Fbk]: fetch mail timeout and make CPU loading 100%

2005-11-05 Thread sniper
 ID:   35114
 Updated by:   [EMAIL PROTECTED]
 Reported By:  wiseguy at wiseguy dot idv dot tw
-Status:   Open
+Status:   Feedback
 Bug Type: *Mail Related
 Operating System: Fedora Core 4
 PHP Version:  4.4.1
 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




Previous Comments:


[2005-11-05 17:12:54] wiseguy at wiseguy dot idv dot tw

Description:

I use the Squirrel Mail v1.4.5 as my web mail system under the Apache
1.3.34 + PHP 4.4.0 structure. It is working normally.

After I upgrade the PHP to version 4.4.1, I can't read the mail. The
mail reading program was executing timeout. When the program was
running, the CPU loading was 100%.

The following is my configure parameters :
./configure \
--prefix=/usr/local \
--with-apxs=/apps/apache/bin/apxs \
--with-dom \
--with-dom-exslt \
--with-dom-xslt \
--with-png-dir=/usr \
--with-imap \
--with-gd \
--with-iconv \
--with-freetype-dir=/usr \
--with-mcrypt \
--with-jpeg-dir=/usr \
--with-zlib \
--with-mysql=/apps/mysql \
--with-mime-magic \
--with-xpm-dir=/usr \
--enable-mbstring=all \
--enable-gd-native-ttf \
--enable-mbregex \
--enable-shmop \
--disable-tokenizer \
--disable-debug \
--disable-ipv6






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


#35117 [Opn-Fbk]: $_SERVER auto-global not in global scope in included file

2005-11-05 Thread sniper
 ID:   35117
 Updated by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
-Status:   Open
+Status:   Feedback
 Bug Type: Variables related
 Operating System: Debian sarge
 PHP Version:  5.1.0RC4
 New Comment:

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

I can't reproduce this. And what configure line did you use?


Previous Comments:


[2005-11-05 19:39:04] [EMAIL PROTECTED]

Description:

I noticed the following error after moving a Web site's code to a
machine running PHP 5.1RC4:

PHP Notice:  Undefined variable: _SERVER in
/data/home/ramsey/public_html/file.inc on line 2

This didn't make any sense, however for two reasons: 1) I'm able to use
$_SERVER in other scripts, and 2) this variable should be an
auto-global. The difference with this script, though, is that it is an
.inc file that is included and executed within a parent script.

If I place global $_SERVER; at the top of the included file, then it
has access to the $_SERVER auto-global array--on the first load of the
page only. Each subsequent load of the page again produces the PHP
Notice above.

I haven't tested this with other auto-globals, so I don't know whether
they have the same problems.

I created two simple test scripts to reproduce this (shown in the
reproduce code section). 

I noticed that the first time I loaded the page, it showed the $_SERVER
array just fine, but on each subsequent load, it generates the undefined
variable notice given above.

Everytime I make a change (any change) to the page and load it, the
array shows up on the first load only. With this in mind, I realized
that the problem was probably not with the auto-global array but with
APC, which I also have installed (using pecl install apc and
accepting the default configuration values). When I comment out the APC
extension line in php.ini, the $_SERVER array shows up perfectly on each
load of the page.

Reproduce code:
---
test.php:
?php
include_once 'file.inc';
?

file.inc:
?php
print_r($_SERVER);
?

Expected result:

I should see the print_r() output of the $_SERVER auto-global array
each time the page loads.

Actual result:
--
A PHP notice that occurs each time the page loads (but I noticed that
the expected result occurred the first time the page loaded):

PHP Notice:  Undefined variable: _SERVER in
/data/home/ramsey/public_html/file.inc on line 2





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


#35117 [Fbk-Bgs]: $_SERVER auto-global not in global scope in included file

2005-11-05 Thread sniper
 ID:   35117
 Updated by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
-Status:   Feedback
+Status:   Bogus
 Bug Type: *General Issues
 Operating System: Debian sarge
 PHP Version:  5.1.0RC4
 New Comment:

Ah, I didn't notice the mention about APC. This is not PHP bug  but bug
in APC then. Report this to correct place. (pecl.php.net)



Previous Comments:


[2005-11-05 19:56:43] [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

I can't reproduce this. And what configure line did you use?



[2005-11-05 19:39:04] [EMAIL PROTECTED]

Description:

I noticed the following error after moving a Web site's code to a
machine running PHP 5.1RC4:

PHP Notice:  Undefined variable: _SERVER in
/data/home/ramsey/public_html/file.inc on line 2

This didn't make any sense, however for two reasons: 1) I'm able to use
$_SERVER in other scripts, and 2) this variable should be an
auto-global. The difference with this script, though, is that it is an
.inc file that is included and executed within a parent script.

If I place global $_SERVER; at the top of the included file, then it
has access to the $_SERVER auto-global array--on the first load of the
page only. Each subsequent load of the page again produces the PHP
Notice above.

I haven't tested this with other auto-globals, so I don't know whether
they have the same problems.

I created two simple test scripts to reproduce this (shown in the
reproduce code section). 

I noticed that the first time I loaded the page, it showed the $_SERVER
array just fine, but on each subsequent load, it generates the undefined
variable notice given above.

Everytime I make a change (any change) to the page and load it, the
array shows up on the first load only. With this in mind, I realized
that the problem was probably not with the auto-global array but with
APC, which I also have installed (using pecl install apc and
accepting the default configuration values). When I comment out the APC
extension line in php.ini, the $_SERVER array shows up perfectly on each
load of the page.

Reproduce code:
---
test.php:
?php
include_once 'file.inc';
?

file.inc:
?php
print_r($_SERVER);
?

Expected result:

I should see the print_r() output of the $_SERVER auto-global array
each time the page loads.

Actual result:
--
A PHP notice that occurs each time the page loads (but I noticed that
the expected result occurred the first time the page loaded):

PHP Notice:  Undefined variable: _SERVER in
/data/home/ramsey/public_html/file.inc on line 2





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


#35076 [Opn-Fbk]: Sometimes the log file shows: The session id contains illegal characters, ..etc

2005-11-05 Thread sniper
 ID:   35076
 Updated by:   [EMAIL PROTECTED]
 Reported By:  vincent_f40 at hotmail dot com
-Status:   Open
+Status:   Feedback
 Bug Type: Session related
 Operating System: Linux RHEL4, 2.6.9-11.ELsmp
-PHP Version:  5.0.5
+PHP Version:  5CVS-2005-11-05 (snap)
 New Comment:

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

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

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




Previous Comments:


[2005-11-05 19:23:23] vincent_f40 at hotmail dot com

Hi Sniper,

Downloaded the latest PHP from your link. Installed it with the option:
--without-pear.
Everything installed Ok.

But the errors keep appearing...any ideas?

Thanks,
Vince



[2005-11-05 12:42:41] [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

And ignore the PEAR errors. (just add --without-pear to your configure
line)



[2005-11-05 01:00:13] vincent_f40 at hotmail dot com

Hi Sniper,

Oki...and what about my initial error. The error down here:
Is this then a know issue and will be solved in the latest php release
?

Thu Nov  3 00:49:10 2005] [error] PHP Warning:  session_start() [a
href='function.session-start'function.session-start/a]: The session
id contains illegal characters, valid characters are a-z, A-Z, 0-9 and
'-,' in /home/httpd/html/includes/session_init.inc on line 70
[Thu Nov  3 00:49:11 2005] [error] PHP Warning:  Unknown: The session
id
contains illegal characters, valid characters are a-z, A-Z, 0-9 and
'-,'
in Unknown on line 0
[Thu Nov  3 00:49:11 2005] [error] PHP Warning:  Unknown: Failed to
write session data (files). Please verify that the current setting of
session.save_path is correct () in Unknown on line 0

Thanks,
Vince.



[2005-11-03 02:27:52] vincent_f40 at hotmail dot com

Description:

[Thu Nov  3 00:49:10 2005] [error] PHP Warning:  session_start() [a
href='function.session-start'function.session-start/a]: The session
id contains illegal characters, valid characters are a-z, A-Z, 0-9 and
'-,' in /home/httpd/html/includes/session_init.inc on line 70
[Thu Nov  3 00:49:11 2005] [error] PHP Warning:  Unknown: The session
id contains illegal characters, valid characters are a-z, A-Z, 0-9 and
'-,' in Unknown on line 0
[Thu Nov  3 00:49:11 2005] [error] PHP Warning:  Unknown: Failed to
write session data (files). Please verify that the current setting of
session.save_path is correct () in Unknown on line 0

1) Cant reproduce the errors. As the site works fine, only sometimes
the above error appears in the log files.
2) session_write_close() is being used.
3) session_name() uses only the characters [a-z].
4) As the site works /tmp is oke as well.(perms, etc.)
5) There is enough free disk space in /tmp as well.

a) using apache 1.3.34, php compiled as module(apxs)
b) Kernel: 2.6.9-11.ELsmp (double processor)

Is this a bug or a php programming error ?
As it happens not always, just random/sometimes.

Search the net for hours...no luck in finding the explanation. Hope to
find some clue here.

Thanks.






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


#35117 [Opn-Bgs]: $_SERVER auto-global not in global scope in included file

2005-11-05 Thread sniper
 ID:   35117
 Updated by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
-Status:   Open
+Status:   Bogus
 Bug Type: *General Issues
 Operating System: Debian sarge
 PHP Version:  5.1.0RC4
 New Comment:

.


Previous Comments:


[2005-11-05 20:00:33] [EMAIL PROTECTED]

Got it... reporting to the correct place.



[2005-11-05 19:59:25] [EMAIL PROTECTED]

Please note the last paragraph of my description. I think this is a
problem with APC and not with 5.1RC4. So, to test, use 5.1RC4, but
install APC with pecl install apc (using the default configuration
values) and enable the extension in php.ini.



[2005-11-05 19:58:14] [EMAIL PROTECTED]

Ah, I didn't notice the mention about APC. This is not PHP bug  but bug
in APC then. Report this to correct place. (pecl.php.net)




[2005-11-05 19:56:43] [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

I can't reproduce this. And what configure line did you use?



[2005-11-05 19:39:04] [EMAIL PROTECTED]

Description:

I noticed the following error after moving a Web site's code to a
machine running PHP 5.1RC4:

PHP Notice:  Undefined variable: _SERVER in
/data/home/ramsey/public_html/file.inc on line 2

This didn't make any sense, however for two reasons: 1) I'm able to use
$_SERVER in other scripts, and 2) this variable should be an
auto-global. The difference with this script, though, is that it is an
.inc file that is included and executed within a parent script.

If I place global $_SERVER; at the top of the included file, then it
has access to the $_SERVER auto-global array--on the first load of the
page only. Each subsequent load of the page again produces the PHP
Notice above.

I haven't tested this with other auto-globals, so I don't know whether
they have the same problems.

I created two simple test scripts to reproduce this (shown in the
reproduce code section). 

I noticed that the first time I loaded the page, it showed the $_SERVER
array just fine, but on each subsequent load, it generates the undefined
variable notice given above.

Everytime I make a change (any change) to the page and load it, the
array shows up on the first load only. With this in mind, I realized
that the problem was probably not with the auto-global array but with
APC, which I also have installed (using pecl install apc and
accepting the default configuration values). When I comment out the APC
extension line in php.ini, the $_SERVER array shows up perfectly on each
load of the page.

Reproduce code:
---
test.php:
?php
include_once 'file.inc';
?

file.inc:
?php
print_r($_SERVER);
?

Expected result:

I should see the print_r() output of the $_SERVER auto-global array
each time the page loads.

Actual result:
--
A PHP notice that occurs each time the page loads (but I noticed that
the expected result occurred the first time the page loaded):

PHP Notice:  Undefined variable: _SERVER in
/data/home/ramsey/public_html/file.inc on line 2





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


#35116 [Opn-Fbk]: base64_decode broken in PHP 4.4.1

2005-11-05 Thread sniper
 ID:   35116
 Updated by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
-Status:   Open
+Status:   Feedback
 Bug Type: Strings related
 Operating System: Linux
 PHP Version:  4.4.1
 New Comment:

Why can't a bug be fixed?


Previous Comments:


[2005-11-05 20:00:23] [EMAIL PROTECTED]

I understand that whitespaces are not supported in Base64, but still
the behaviour of base64_decode() should not change from 4.4.0 to 4.4.1.



[2005-11-05 19:28:40] [EMAIL PROTECTED]

Description:

While base64_decode works properly in PHP 4.4.0 and PHP 5, it fails in
PHP 4.4.1.  I can reproduce this problem with vanilla sources of PHP
4.4.1 with the following ./configure line:

./configure --disable-all --with-mcrypt --enable-cli

I'm using Linux with glibc 2.3.5 and GCC 4.0.3.

Reproduce code:
---
?php
echo base64_decode(Hello World);

Expected result:

ée£å¨®W

Actual result:
--
ée¡j+





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


#35115 [Opn-Fbk]: MSSQL query fails when retrieving date field

2005-11-05 Thread sniper
 ID:   35115
 Updated by:   [EMAIL PROTECTED]
 Reported By:  freetds228 at lewenberg dot com
-Status:   Open
+Status:   Feedback
 Bug Type: MSSQL related
 Operating System: RedHat Enterprise Linux 3
 PHP Version:  4.4.1
 New Comment:

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




Previous Comments:


[2005-11-05 19:19:49] freetds228 at lewenberg dot com

Description:

When running a simple SELECT select query against an MS SQL server, if
the result set has a field with a non-NULL date, we are getting the
following error (with --enable-debug flag on): 

[Sat Nov  5 11:26:07 2005]  Script:  '/www-s/testfreetds.php'
---
/root/tmp/php-4.4.1/ext/mssql/php_mssql.c(191) : Block 0x093CA2E0
status:
/root/tmp/php-4.4.1/Zend/zend_variables.c(44) : Actual location 
(location was relayed)
Beginning:  OK (allocated on 
/root/tmp/php-4.4.1/ext/mssql/php_mssql.c:904, 19 bytes)
   End:  Overflown (magic=0x31383A34 instead of 0x2A8FCC84)
 At least 4 bytes overflown
---

The query returns only a single row and field (a date). Note that Perl
running the same query using the same freetds libraries has no errors.


We have compiled 4.4.1 against freetds 0.63 using the --with-mssql
option. 

Reproduce code:
---
$db = mssql_connect('mssqlserver', 'user', 'secret') ;

$rs = mssql_query('SELECT DateLastModified FROM Table WHERE rid = 1',
$db) ;



Expected result:

The date should be accessible in the result set. 

Actual result:
--
[Sat Nov  5 11:26:07 2005]  Script:  '/www-s/testfreetds.php'
---
/root/tmp/php-4.4.1/ext/mssql/php_mssql.c(191) : Block 0x093CA2E0
status:
/root/tmp/php-4.4.1/Zend/zend_variables.c(44) : Actual location 
(location was relayed)
Beginning:  OK (allocated on 
/root/tmp/php-4.4.1/ext/mssql/php_mssql.c:904, 19 bytes)
   End:  Overflown (magic=0x31383A34 instead of 0x2A8FCC84)
 At least 4 bytes overflown
---





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


#35076 [Opn-Fbk]: Sometimes the log file shows: The session id contains illegal characters, ..etc

2005-11-05 Thread sniper
 ID:   35076
 Updated by:   [EMAIL PROTECTED]
 Reported By:  vincent_f40 at hotmail dot com
-Status:   Open
+Status:   Feedback
 Bug Type: Session related
 Operating System: Linux RHEL4, 2.6.9-11.ELsmp
 PHP Version:  5CVS-2005-11-05 (snap)
 New Comment:

So what IS passed to server when this happens? What is the session id?
Are you sure someone just isn't trying to hack your service with some
random generated ID's and just doesn't know that some chars are not
allowed?


Previous Comments:


[2005-11-05 21:58:26] vincent_f40 at hotmail dot com

file: config.inc
?php
$conf['session_name'] = somename;
$conf['session_init'] = session_init.inc;
$conf['domain'] = .domain.com;
?

file: session_init.inc
?php
function a(){
  some code
}
session_name($conf['session_name']);
session_start();

if else statements

if (!$_COOKIE['wid']) {
setcookie(wid, $_GET['wid'], time()+(3600 * 24 *365), / ,
$conf['domain']);
}

?

file: index.php
?php
require_once(config.inc);
require_once($conf['session_init']);

html webpage code
?

I am not able to reproduce the error. The error just appears sometimes
in the log files...But basicly this is the setup.
Some pages we use frames...but I guess that should not be a problem.

Thanks,
Vince



[2005-11-05 19:23:23] vincent_f40 at hotmail dot com

Hi Sniper,

Downloaded the latest PHP from your link. Installed it with the option:
--without-pear.
Everything installed Ok.

But the errors keep appearing...any ideas?

Thanks,
Vince



[2005-11-05 12:42:41] [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

And ignore the PEAR errors. (just add --without-pear to your configure
line)



[2005-11-05 01:00:13] vincent_f40 at hotmail dot com

Hi Sniper,

Oki...and what about my initial error. The error down here:
Is this then a know issue and will be solved in the latest php release
?

Thu Nov  3 00:49:10 2005] [error] PHP Warning:  session_start() [a
href='function.session-start'function.session-start/a]: The session
id contains illegal characters, valid characters are a-z, A-Z, 0-9 and
'-,' in /home/httpd/html/includes/session_init.inc on line 70
[Thu Nov  3 00:49:11 2005] [error] PHP Warning:  Unknown: The session
id
contains illegal characters, valid characters are a-z, A-Z, 0-9 and
'-,'
in Unknown on line 0
[Thu Nov  3 00:49:11 2005] [error] PHP Warning:  Unknown: Failed to
write session data (files). Please verify that the current setting of
session.save_path is correct () in Unknown on line 0

Thanks,
Vince.



[2005-11-03 02:27:52] vincent_f40 at hotmail dot com

Description:

[Thu Nov  3 00:49:10 2005] [error] PHP Warning:  session_start() [a
href='function.session-start'function.session-start/a]: The session
id contains illegal characters, valid characters are a-z, A-Z, 0-9 and
'-,' in /home/httpd/html/includes/session_init.inc on line 70
[Thu Nov  3 00:49:11 2005] [error] PHP Warning:  Unknown: The session
id contains illegal characters, valid characters are a-z, A-Z, 0-9 and
'-,' in Unknown on line 0
[Thu Nov  3 00:49:11 2005] [error] PHP Warning:  Unknown: Failed to
write session data (files). Please verify that the current setting of
session.save_path is correct () in Unknown on line 0

1) Cant reproduce the errors. As the site works fine, only sometimes
the above error appears in the log files.
2) session_write_close() is being used.
3) session_name() uses only the characters [a-z].
4) As the site works /tmp is oke as well.(perms, etc.)
5) There is enough free disk space in /tmp as well.

a) using apache 1.3.34, php compiled as module(apxs)
b) Kernel: 2.6.9-11.ELsmp (double processor)

Is this a bug or a php programming error ?
As it happens not always, just random/sometimes.

Search the net for hours...no luck in finding the explanation. Hope to
find some clue here.

Thanks.






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


#35121 [Opn-Bgs]: Warning: Unknown(): SAFE MODE Restriction in effect.

2005-11-05 Thread sniper
 ID:   35121
 Updated by:   [EMAIL PROTECTED]
 Reported By:  tb at tbits dot net
-Status:   Open
+Status:   Bogus
 Bug Type: Output Control
 Operating System: Linux Kernel 2.6
 PHP Version:  4.4.1
 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.  Due to the volume
of reports we can not explain in detail here why your report is not
a bug.  The support channels will be able to provide an explanation
for you.

Thank you for your interest in PHP.




Previous Comments:


[2005-11-06 02:44:23] tb at tbits dot net

Description:

after starting apache 2.0.55 with php 4.4.1 and accessing a test.php i
got this error.

Warning: Unknown(): SAFE MODE Restriction in effect. The script whose
uid is 0 is not allowed to access
/var/www/webfarm/0_tbitsnet/projekte.tbits.net owned by uid 48 in
Unknown on line 0

Reproduce code:
---
every php code, my test.php was

? print hallo; ?

Expected result:

here my strace

[pid 13946] waitpid(-1, 0xbfea7550, WNOHANG|WUNTRACED) = 0
[pid 13946] select(0, NULL, NULL, NULL, {1, 0}) = 0 (Timeout)
[pid 13946] waitpid(-1, 0xbfea7550, WNOHANG|WUNTRACED) = 0
[pid 13946] select(0, NULL, NULL, NULL, {1, 0}) = 0 (Timeout)
[pid 13946] waitpid(-1, 0xbfea7550, WNOHANG|WUNTRACED) = 0
[pid 13946] select(0, NULL, NULL, NULL, {1, 0} unfinished ...
[pid 13952] ... poll resumed [{fd=10, events=POLLIN}, {fd=9,
events=POLLIN}, {fd=8, events=POLLIN}, {fd=5, events=POLLIN}, {fd=4,
events=POLLIN}, {fd=3, events=POLLIN, revents=POLLIN}], 6, -1) = 1
[pid 13952] accept(3, {sa_family=AF_INET, sin_port=htons(3645),
sin_addr=inet_addr(195.243.63.218)}, [16]) = 19
[pid 13952] semop(35422303, 0xb7f89bd2, 1 unfinished ...
[pid 13954] ... semop resumed )   = 0
[pid 13952] ... semop resumed )   = 0
[pid 13954] poll( unfinished ...
[pid 13952] fcntl64(19, F_GETFL)= 0x2 (flags O_RDWR)
[pid 13952] fcntl64(19, F_SETFL, O_RDWR|O_NONBLOCK) = 0
[pid 13952] read(19, GET /test.php HTTP/1.0\r\nHost: pr..., 8000) =
483
[pid 13952] gettimeofday({1131241209, 66044}, NULL) = 0
[pid 13952] time(NULL)  = 1131241209
[pid 13952] semop(35291227, 0xb7f89bcc, 1) = 0
[pid 13952] write(18, [Sun Nov 06 02:40:09 2005] [1395..., 141) =
141
[pid 13952] semop(35291227, 0xb7f89bd2, 1) = 0
[pid 13952] time(NULL)  = 1131241209
[pid 13952] semop(35291227, 0xb7f89bcc, 1) = 0
[pid 13952] write(18, [Sun Nov 06 02:40:09 2005] [1395..., 141) =
141
[pid 13952] semop(35291227, 0xb7f89bd2, 1) = 0
[pid 13952]
stat64(/var/www/webfarm/0_tbitsnet/projekte.tbits.net/test.php,
{st_mode=S_IFREG|0644, st_size=22, ...}) = 0
[pid 13952] open(/var/www/webfarm/.htaccess, O_RDONLY) = -1 ENOENT
(No such file or directory)
[pid 13952] open(/var/www/webfarm/0_tbitsnet/.htaccess, O_RDONLY)
= -1 ENOENT (No such file or directory)
[pid 13952]
open(/var/www/webfarm/0_tbitsnet/projekte.tbits.net/.htaccess,
O_RDONLY) = -1 ENOENT (No such file or directory)
[pid 13952]
open(/var/www/webfarm/0_tbitsnet/projekte.tbits.net/test.php/.htaccess,
O_RDONLY) = -1 ENOTDIR (Not a directory)
[pid 13952] lstat64(/var, {st_mode=S_IFDIR|0755, st_size=4096, ...})
= 0
[pid 13952] lstat64(/var/www, {st_mode=S_IFDIR|0755, st_size=4096,
...}) = 0
[pid 13952] lstat64(/var/www/webfarm, {st_mode=S_IFDIR|0755,
st_size=4096, ...}) = 0
[pid 13952] lstat64(/var/www/webfarm/0_tbitsnet,
{st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
[pid 13952]
lstat64(/var/www/webfarm/0_tbitsnet/projekte.tbits.net,
{st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
[pid 13952]
stat64(/var/www/webfarm/0_tbitsnet/projekte.tbits.net,
{st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
[pid 13952] brk(0)  = 0x831f000
[pid 13952] brk(0x8341000)  = 0x8341000
[pid 13952] setitimer(ITIMER_PROF, {it_interval={0, 0}, it_value={30,
0}}, NULL) = 0
[pid 13952] rt_sigaction(SIGPROF, {0xb7d1e688, [PROF], SA_RESTART},
{SIG_DFL}, 8) = 0
[pid 13952] rt_sigprocmask(SIG_UNBLOCK, [PROF], NULL, 8) = 0
[pid 13952] gettimeofday({1131241209, 69682}, NULL) = 0
[pid 13952] getcwd(/, 4095)   = 2
[pid 13952] chdir(/var/www/webfarm/0_tbitsnet/projekte.tbits.net)
= 0
[pid 13952] lstat64(/var, {st_mode=S_IFDIR|0755, st_size=4096, ...})
= 0
[pid 13952] lstat64(/var/www, {st_mode=S_IFDIR|0755, st_size=4096,
...}) = 0
[pid 13952] lstat64(/var/www/webfarm, {st_mode=S_IFDIR|0755,
st_size=4096, ...}) = 0
[pid 13952] lstat64(/var/www/webfarm/0_tbitsnet,
{st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
[pid 13952]
lstat64(/var/www/webfarm/0_tbitsnet/projekte.tbits.net,
{st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
[pid 13952]

#35115 [Opn-Asn]: MSSQL query fails when retrieving date field

2005-11-05 Thread sniper
 ID:   35115
 Updated by:   [EMAIL PROTECTED]
 Reported By:  freetds228 at lewenberg dot com
-Status:   Open
+Status:   Assigned
 Bug Type: MSSQL related
 Operating System: RedHat Enterprise Linux 3
-PHP Version:  4.4.1
+PHP Version:  5CVS, 4.4.1
-Assigned To:  
+Assigned To:  fmk
 New Comment:

Frank, please check this out!


Previous Comments:


[2005-11-06 03:03:55] freetds228 at lewenberg dot com

I tried to compile the snapshot but got this error: 

/root/tmp/php5-200511052330/ext/mssql/php_mssql.c:2312:2: #endif
without #if
make: *** [ext/mssql/php_mssql.lo] Error 1

I noticed I got this when I tried to compile the stable version of
php5, also.



[2005-11-05 20:01: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





[2005-11-05 19:19:49] freetds228 at lewenberg dot com

Description:

When running a simple SELECT select query against an MS SQL server, if
the result set has a field with a non-NULL date, we are getting the
following error (with --enable-debug flag on): 

[Sat Nov  5 11:26:07 2005]  Script:  '/www-s/testfreetds.php'
---
/root/tmp/php-4.4.1/ext/mssql/php_mssql.c(191) : Block 0x093CA2E0
status:
/root/tmp/php-4.4.1/Zend/zend_variables.c(44) : Actual location 
(location was relayed)
Beginning:  OK (allocated on 
/root/tmp/php-4.4.1/ext/mssql/php_mssql.c:904, 19 bytes)
   End:  Overflown (magic=0x31383A34 instead of 0x2A8FCC84)
 At least 4 bytes overflown
---

The query returns only a single row and field (a date). Note that Perl
running the same query using the same freetds libraries has no errors.


We have compiled 4.4.1 against freetds 0.63 using the --with-mssql
option. 

Reproduce code:
---
$db = mssql_connect('mssqlserver', 'user', 'secret') ;

$rs = mssql_query('SELECT DateLastModified FROM Table WHERE rid = 1',
$db) ;



Expected result:

The date should be accessible in the result set. 

Actual result:
--
[Sat Nov  5 11:26:07 2005]  Script:  '/www-s/testfreetds.php'
---
/root/tmp/php-4.4.1/ext/mssql/php_mssql.c(191) : Block 0x093CA2E0
status:
/root/tmp/php-4.4.1/Zend/zend_variables.c(44) : Actual location 
(location was relayed)
Beginning:  OK (allocated on 
/root/tmp/php-4.4.1/ext/mssql/php_mssql.c:904, 19 bytes)
   End:  Overflown (magic=0x31383A34 instead of 0x2A8FCC84)
 At least 4 bytes overflown
---





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


#35115 [Asn-Fbk]: MSSQL query fails when retrieving date field

2005-11-05 Thread sniper
 ID:   35115
 Updated by:   [EMAIL PROTECTED]
 Reported By:  freetds228 at lewenberg dot com
-Status:   Assigned
+Status:   Feedback
 Bug Type: MSSQL related
 Operating System: RedHat Enterprise Linux 3
 PHP Version:  5CVS, 4.4.1
 Assigned To:  fmk
 New Comment:

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

I fixed the compile error, so please try again.


Previous Comments:


[2005-11-06 03:56:12] [EMAIL PROTECTED]

Frank, please check this out!



[2005-11-06 03:03:55] freetds228 at lewenberg dot com

I tried to compile the snapshot but got this error: 

/root/tmp/php5-200511052330/ext/mssql/php_mssql.c:2312:2: #endif
without #if
make: *** [ext/mssql/php_mssql.lo] Error 1

I noticed I got this when I tried to compile the stable version of
php5, also.



[2005-11-05 20:01: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





[2005-11-05 19:19:49] freetds228 at lewenberg dot com

Description:

When running a simple SELECT select query against an MS SQL server, if
the result set has a field with a non-NULL date, we are getting the
following error (with --enable-debug flag on): 

[Sat Nov  5 11:26:07 2005]  Script:  '/www-s/testfreetds.php'
---
/root/tmp/php-4.4.1/ext/mssql/php_mssql.c(191) : Block 0x093CA2E0
status:
/root/tmp/php-4.4.1/Zend/zend_variables.c(44) : Actual location 
(location was relayed)
Beginning:  OK (allocated on 
/root/tmp/php-4.4.1/ext/mssql/php_mssql.c:904, 19 bytes)
   End:  Overflown (magic=0x31383A34 instead of 0x2A8FCC84)
 At least 4 bytes overflown
---

The query returns only a single row and field (a date). Note that Perl
running the same query using the same freetds libraries has no errors.


We have compiled 4.4.1 against freetds 0.63 using the --with-mssql
option. 

Reproduce code:
---
$db = mssql_connect('mssqlserver', 'user', 'secret') ;

$rs = mssql_query('SELECT DateLastModified FROM Table WHERE rid = 1',
$db) ;



Expected result:

The date should be accessible in the result set. 

Actual result:
--
[Sat Nov  5 11:26:07 2005]  Script:  '/www-s/testfreetds.php'
---
/root/tmp/php-4.4.1/ext/mssql/php_mssql.c(191) : Block 0x093CA2E0
status:
/root/tmp/php-4.4.1/Zend/zend_variables.c(44) : Actual location 
(location was relayed)
Beginning:  OK (allocated on 
/root/tmp/php-4.4.1/ext/mssql/php_mssql.c:904, 19 bytes)
   End:  Overflown (magic=0x31383A34 instead of 0x2A8FCC84)
 At least 4 bytes overflown
---





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


#35076 [Opn-Bgs]: Sometimes the log file shows: The session id contains illegal characters, ..etc

2005-11-05 Thread sniper
 ID:   35076
 Updated by:   [EMAIL PROTECTED]
 Reported By:  vincent_f40 at hotmail dot com
-Status:   Open
+Status:   Bogus
 Bug Type: Session related
 Operating System: Linux RHEL4, 2.6.9-11.ELsmp
 PHP Version:  5CVS-2005-11-05 (snap)
 New Comment:

Please ask your administrator to check the httpd access log and compare
the times there with the error time here.

This is not a PHP bug.



Previous Comments:


[2005-11-06 00:14:14] vincent_f40 at hotmail dot com

Hi Sniper,

Thank you for your reply.

I have no idea what IS passed to the server(what can be passed?). I am
just somehow getting these errors appearing arround 2-3 times a hour.
Nothing more it says...(just as I copy and pasted the error down here)
Also nothing about the session_id... As you can see in the error I copy
and pasted.
We use cookies for the sessions(we do not use session id in the
link)...dont know if there is a way to hack our service in this
way...with some random session_id...but then I should see these errors
appear a lot more I guess...

Any clue ? Do I need to switch to a more verbose error logging...

Thanks,
Vince



[2005-11-05 23:29:55] [EMAIL PROTECTED]

So what IS passed to server when this happens? What is the session id?
Are you sure someone just isn't trying to hack your service with some
random generated ID's and just doesn't know that some chars are not
allowed?



[2005-11-05 21:58:26] vincent_f40 at hotmail dot com

file: config.inc
?php
$conf['session_name'] = somename;
$conf['session_init'] = session_init.inc;
$conf['domain'] = .domain.com;
?

file: session_init.inc
?php
function a(){
  some code
}
session_name($conf['session_name']);
session_start();

if else statements

if (!$_COOKIE['wid']) {
setcookie(wid, $_GET['wid'], time()+(3600 * 24 *365), / ,
$conf['domain']);
}

?

file: index.php
?php
require_once(config.inc);
require_once($conf['session_init']);

html webpage code
?

I am not able to reproduce the error. The error just appears sometimes
in the log files...But basicly this is the setup.
Some pages we use frames...but I guess that should not be a problem.

Thanks,
Vince



[2005-11-05 19:23:23] vincent_f40 at hotmail dot com

Hi Sniper,

Downloaded the latest PHP from your link. Installed it with the option:
--without-pear.
Everything installed Ok.

But the errors keep appearing...any ideas?

Thanks,
Vince



[2005-11-05 12:42:41] [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

And ignore the PEAR errors. (just add --without-pear to your configure
line)



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

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


#35009 [Opn-Fbk]: mysql_pconnect() crashes on PHP-CLI when ZTS is enabled

2005-11-05 Thread sniper
 ID:   35009
 Updated by:   [EMAIL PROTECTED]
 Reported By:  glen at delfi dot ee
-Status:   Open
+Status:   Feedback
 Bug Type: MySQL related
 Operating System: PLD Linux
 PHP Version:  5CVS-2005-10-28 (snap)
 New Comment:

Note: dl() is not supported in multithreaded Web servers.

So how could you load the shared extension?




Previous Comments:


[2005-11-01 16:42:25] glen at delfi dot ee

yes. appears so: 
 
$ ./configure --disable-all --with-mysql 
--enable-maintainer-zts --enable-debug 
$ make 
$ ./sapi/cli/php  -r '$r = mysql_pconnect(heart);echo 
$r\n;'; echo rc=$? 
Resource id #4 
rc=0 
$ ./sapi/cli/php -m 
[PHP Modules] 
date 
mysql 
standard 
 
[Zend Modules] 
 
code used: php5-200510281630



[2005-11-01 11:39:45] [EMAIL PROTECTED]

What if you configure the mysql extension as static, does it work then?



[2005-10-28 20:49:51] glen at delfi dot ee

same thing with php5-200510281630

$ ./sapi/cli/php -v
PHP 5.1.0RC5-dev (cli) (built: Oct 28 2005 21:47:13) (DEBUG)
Copyright (c) 1997-2005 The PHP Group
Zend Engine v2.1.0-dev, Copyright (c) 1998-2005 Zend Technologies

$ ./sapi/cli/php  -r 'dl(mysql.so); mysql_pconnect();'

Warning: mysql_pconnect(): Can't connect to local MySQL server through
socket '/var/lib/mysql/mysql.sock' (2) in Command line code on line 1
/home/builder/rpm/BUILD/php5-200510281630/Zend/zend_hash.c(678) :
ht=0x8264d78 is already destroyed
/home/builder/rpm/BUILD/php5-200510281630/Zend/zend_hash.c(678) :
ht=0x8264d78 is already destroyed
/home/builder/rpm/BUILD/php5-200510281630/Zend/zend_hash.c(67) : Bailed
out without a bailout address!
$



[2005-10-28 19:54:46] [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





[2005-10-28 19:08:22] glen at delfi dot ee

ok. this is quick way to see it, altho the error is different.

$ ./configure --disable-all --with-mysql=shared --enable-maintainer-zts
--enable-debug
$ make
$ ./sapi/cli/php  -i |grep -i safe
$ sudo mkdir -p /usr/local/lib/php/extensions/debug-zts-20041030/
$ sudo chown builder /usr/local/lib/php/extensions/debug-zts-20041030/
$ cp modules/mysql.so
/usr/local/lib/php/extensions/debug-zts-20041030/
$ ./sapi/cli/php  -r 'dl(mysql.so); mysql_pconnect();'
Warning: mysql_pconnect(): Can't connect to local MySQL server through
socket '/var/lib/mysql/mysql.sock' (2) in Command line code on line 1
/home/builder/rpm/BUILD/p/php5-STABLE-200510281434/Zend/zend_hash.c(678)
: ht=0x9ce4a74 is already destroyed
/home/builder/rpm/BUILD/p/php5-STABLE-200510281434/Zend/zend_hash.c(678)
: ht=0x9ce4a74 is already destroyed
/home/builder/rpm/BUILD/p/php5-STABLE-200510281434/Zend/zend_hash.c(67)
: Bailed out without a bailout address!
$



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

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


#35096 [Opn-Fbk]: php 4.4.2-dev has still trouble with mod_rewrite/apache2

2005-11-04 Thread sniper
 ID:   35096
 Updated by:   [EMAIL PROTECTED]
 Reported By:  rob at burningsoda dot com
-Status:   Open
+Status:   Feedback
 Bug Type: Apache2 related
 Operating System: FreeBSD 6.0RC1
 PHP Version:  4CVS-2005-11-04 (snap)
 New Comment:

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




Previous Comments:


[2005-11-04 02:49:53] rob at burningsoda dot com

Description:

I just downloaded

Stable (4.4.x-dev)
Built On: Nov 03, 2005 23:51 GMT

and built it:

PHP 4.4.2-dev (cli) (built: Nov  4 2005 02:17:10)

But it seems like, the following bug is _not_ fixed
in that snapshot:

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

This happens with _any_ RewriteRule I use.

Reproduce code:
---
Try to use mod_rewrite on Apache 2.x to modify any URL.
Small test case:

index.php:
?php echo($_GET['myarg']); ?

RewriteRule:
RewriteRule ^(.+)/$ index.php?myarg=$1 [L]

URLs to try:
1. http://localhost/index.php?myarg=bla
2. http://localhost/blub/
3. http://localhost/index.php/


Expected result:

In all three cases a document should be delivered:

1. bla
2. blub
3. index.php

Actual result:
--
1. Correctly delivers document.
2. No document is delivered.
3. Correctly delivers document.





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


#35098 [Opn-Asn]: 5.1RC5 has troubles with Zlib which 5.1RC4 not have

2005-11-04 Thread sniper
 ID:   35098
 Updated by:   [EMAIL PROTECTED]
 Reported By:  spam2 at rhsoft dot net
-Status:   Open
+Status:   Assigned
 Bug Type: Zlib Related
 Operating System: Windows XP
 PHP Version:  5.1.0RC4
-Assigned To:  
+Assigned To:  iliaa
 New Comment:

Ilia, there is apparently something wrong with the fix for the leak?


Previous Comments:


[2005-11-04 04:34:58] spam2 at rhsoft dot net

Description:

The last Nightlys PHP 5.1 (RC5) have on some pages troubles with
zlib_outputcompression = On which RC4 hast not.

Strange caracters will occur - looks like compressed output not
decompressed by browser (firefox)

This is not really reproduceable but in fact on my dev-machine when i
downgrade all pages will work, its a cms-system and some other
dev-hosts with the same scripts will running ... 






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


#35091 [Opn-Bgs]: SoapClient leaks memory

2005-11-04 Thread sniper
 ID:   35091
 Updated by:   [EMAIL PROTECTED]
 Reported By:  paul at paulbutcher dot com
-Status:   Open
+Status:   Bogus
 Bug Type: SOAP related
 Operating System: *
 PHP Version:  5.0.5
 New Comment:

Ah, I should get glasses. You can also get all memory used with
something like this:

while (1) { $foo.= bar; }

Not bug but expected behaviour. Just don't do that!



Previous Comments:


[2005-11-04 00:36:03] paul at paulbutcher dot com

Same result (on Windows - haven't tried it on Linux yet)



[2005-11-03 21:42:36] [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





[2005-11-03 19:52:18] paul at paulbutcher dot com

Description:

SoapClient doesn't seem to clean up after itself when garbage
collected. It leaks something around 4K each time. Tested on both
Windows and Linux.

Reproduce code:
---
?php
while(true) {
new SoapClient(test.wsdl);
}
?


Expected result:

Assuming that I understand the PHP Garbage Collector (and it's possible
that I don't - I'm struggling to find any good documentation on exactly
how I should expect it to behave - any pointers very welcome!), I would
expect the memory usage of this script to be constant.

Actual result:
--
The memory usage increases very quickly (growing to several hundred
megabytes in less than a minute).





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


#35088 [Opn-Asn]: apache module core dumps when DOM method loadXML is called

2005-11-04 Thread sniper
 ID:   35088
 Updated by:   [EMAIL PROTECTED]
 Reported By:  cole at ccdc dot cam dot ac dot uk
-Status:   Open
+Status:   Assigned
 Bug Type: DOM XML related
 Operating System: IRIX 6.5.18m
 PHP Version:  5CVS-2005-11-03
 Assigned To:  helly
 New Comment:

Marcus, now there's another compile failure. :)
(And this is first time I'd like to assign same bug to multiple persons
too, so when you get that fixed, assign to cellog, about the PEAR
issue)



Previous Comments:


[2005-11-04 00:25:35] cole at ccdc dot cam dot ac dot uk

the latest snapshot still fails to compile at the same point - 

/bin/sh /local/cole/php5-200511032130/libtool --silent
--preserve-dup-deps --mode=compile cc  -Iext/spl/
-I/local/cole/php5-200511032130/ext/spl/ -DPHP_ATOM_INC
-I/local/cole/php5-200511032130/include
-I/local/cole/php5-200511032130/main -I/local/cole/php5-200511032130
-I/usr/local/include/libxml2
-I/local/cole/php5-200511032130/ext/date/lib
-I/local/cole/php5-200511032130/TSRM
-I/local/cole/php5-200511032130/Zend  -D_XPG_IV  -g   -c
/local/cole/php5-200511032130/ext/spl/php_spl.c -o ext/spl/php_spl.lo 
cc-1551 cc: WARNING File =
/local/cole/php5-200511032130/ext/spl/php_spl.c, Line = 398
  The variable func_name is used before its value is set.

   
zend_throw_exception_ex(spl_ce_LogicException, 0 TSRMLS_CC, Function
spl_autoload_call() cannot be registered, func_name);
   

^

cc-1028 cc: ERROR File =
/local/cole/php5-200511032130/ext/spl/php_spl.c, Line = 452
  The expression used must have a constant value.

autoload_func_info spl_alfi = {spl_func_ptr,
NULL, NULL};



[2005-11-03 23:39:07] cole at ccdc dot cam dot ac dot uk

Warning: call_user_func(PEAR_Task_Replace::validateXml): First argument
is expected to be a valid callback in
phar://install-pear-nozlib.phar/PEAR/PackageFile/v2/Validator.php on
line 1064

Fatal error: Call to undefined method PEAR_Error::getVersion() in 
I compiled the first latest snapshot with gcc 3.3 but now doing make
install fails - see PEAR errors below.

I'll try out the 'new' latest snap shot with mips-pro

phar://install-pear-nozlib.phar/index.php on line 112

Warning: call_user_func_array(): First argument is expected to be a
valid callback, 'System::_removeTmpFiles' was given in
phar://install-pear-nozlib.phar/PEAR.php on line 787
*** Error code 255 (bu21)
*** Error code 1 (bu21)



[2005-11-03 23:01:46] [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

At least the compile problem in ext/spl should be fixed.



[2005-11-03 22:42:21] [EMAIL PROTECTED]

Marcus, can you check that compile failure (found in ext/spl) mentioned
above?



[2005-11-03 22:38:10] cole at ccdc dot cam dot ac dot uk

I tried compiling the php-latest build with mips-pro but got a compiler
error:

  ^

cc-1028 cc: ERROR File =
/local/cole/php5-200511031930/ext/spl/php_spl.c, Line = 452
  The expression used must have a constant value.

autoload_func_info spl_alfi = {spl_func_ptr,
NULL, NULL};
   ^

1 error detected in the compilation of
/local/cole/php5-200511031930/ext/spl/php_spl.c.


I will try with gcc 3.3



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

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


#35076 [Opn-Fbk]: Sometimes the log file shows: The session id contains illegal characters, ..etc

2005-11-04 Thread sniper
 ID:   35076
 Updated by:   [EMAIL PROTECTED]
 Reported By:  vincent_f40 at hotmail dot com
-Status:   Open
+Status:   Feedback
 Bug Type: Session related
 Operating System: Linux RHEL4, 2.6.9-11.ELsmp
 PHP Version:  5.0.5
 New Comment:

I'd like to see the exact errors you got with 'make install'
when using the 'latest' snapshot.


Previous Comments:


[2005-11-03 23:50:51] vincent_f40 at hotmail dot com

./configure  --enable-sysvmem --enable-sysvshm --enable-sockets
--with-mhash=/usr --with-mysql=/usr
--with-apxs=/usr/local/apache/bin/apxs

The error just re-appeared with: php5-STABLE-200511031742

I am not sure what more you would like to know...just let me know and I
can provide it.

Thanks
Vince.



[2005-11-03 23:25:54] [EMAIL PROTECTED]

Could you help us out a bit and actually let us know what the errors
where you got? And with what configure line did you get them? We're
about to release PHP 5.1 and we'd like to fix this kind of issues
before the release..



[2005-11-03 23:12:36] vincent_f40 at hotmail dot com

Hi Sniper,

I have tried to install the link you provided:
http://snaps.php.net/php5-latest.tar.gz

But this at the make install command outputted a lot of errors, about
phar lib and call back functions...

I downloaded therefor the: php5-STABLE-200511031742
This installed ok.

Only I cant reproduce the error, so I will have to wait if the error
will re-appear.

I will keep you posted if it helped or not.

Thanks,
Vince



[2005-11-03 15:49:58] [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





[2005-11-03 02:27:52] vincent_f40 at hotmail dot com

Description:

[Thu Nov  3 00:49:10 2005] [error] PHP Warning:  session_start() [a
href='function.session-start'function.session-start/a]: The session
id contains illegal characters, valid characters are a-z, A-Z, 0-9 and
'-,' in /home/httpd/html/includes/session_init.inc on line 70
[Thu Nov  3 00:49:11 2005] [error] PHP Warning:  Unknown: The session
id contains illegal characters, valid characters are a-z, A-Z, 0-9 and
'-,' in Unknown on line 0
[Thu Nov  3 00:49:11 2005] [error] PHP Warning:  Unknown: Failed to
write session data (files). Please verify that the current setting of
session.save_path is correct () in Unknown on line 0

1) Cant reproduce the errors. As the site works fine, only sometimes
the above error appears in the log files.
2) session_write_close() is being used.
3) session_name() uses only the characters [a-z].
4) As the site works /tmp is oke as well.(perms, etc.)
5) There is enough free disk space in /tmp as well.

a) using apache 1.3.34, php compiled as module(apxs)
b) Kernel: 2.6.9-11.ELsmp (double processor)

Is this a bug or a php programming error ?
As it happens not always, just random/sometimes.

Search the net for hours...no luck in finding the explanation. Hope to
find some clue here.

Thanks.






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


#35091 [Opn-Asn]: SoapClient leaks memory

2005-11-04 Thread sniper
 ID:   35091
 Updated by:   [EMAIL PROTECTED]
 Reported By:  paul at paulbutcher dot com
-Status:   Open
+Status:   Assigned
 Bug Type: SOAP related
 Operating System: *
-PHP Version:  5.0.5
+PHP Version:  5CVS-2005-11-04 (snap)
-Assigned To:  
+Assigned To:  dmitry
 New Comment:

Dmitry, can you check this out please.



Previous Comments:


[2005-11-04 09:59:11] paul at paulbutcher dot com

Sorry - I don't understand. Your example repeatedly appends to a
string, which of course will legitimately increase the size of the
string until it eventually fills memory.

I don't understand how this is the same as repeatedly allocating an
object. My example doesn't maintain a reference to the object, so
surely it should be garbage collected immediately?

In fact, if I replace SoapClient with an object of my own making then
memory usage remains constant:

?php
class Foo {
private $bar;
public function __construct() { $bar = Hi there!; }
}
while(true) {
new Foo();
}
?

What am I missing?

Thanks!



[2005-11-04 09:28:48] [EMAIL PROTECTED]

Ah, I should get glasses. You can also get all memory used with
something like this:

while (1) { $foo.= bar; }

Not bug but expected behaviour. Just don't do that!




[2005-11-04 00:36:03] paul at paulbutcher dot com

Same result (on Windows - haven't tried it on Linux yet)



[2005-11-03 21:42:36] [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





[2005-11-03 19:52:18] paul at paulbutcher dot com

Description:

SoapClient doesn't seem to clean up after itself when garbage
collected. It leaks something around 4K each time. Tested on both
Windows and Linux.

Reproduce code:
---
?php
while(true) {
new SoapClient(test.wsdl);
}
?


Expected result:

Assuming that I understand the PHP Garbage Collector (and it's possible
that I don't - I'm struggling to find any good documentation on exactly
how I should expect it to behave - any pointers very welcome!), I would
expect the memory usage of this script to be constant.

Actual result:
--
The memory usage increases very quickly (growing to several hundred
megabytes in less than a minute).





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


#35062 [Opn-Bgs]: socket_read() produces warnings on non blocking sockets

2005-11-04 Thread sniper
 ID:   35062
 Updated by:   [EMAIL PROTECTED]
 Reported By:  dima at dimych dot sumy dot ua
-Status:   Open
+Status:   Bogus
 Bug Type: Sockets related
 Operating System: FreeBSD 4.9-STABLE #0
 PHP Version:  4.4.1RC1
 New Comment:

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

Thank you for your interest in PHP.

See bug #21197


Previous Comments:


[2005-11-04 14:53:52] dima at dimych dot sumy dot ua

I`m look everyware in the Internet and don`t find any workaround for
this problem. And error logs still growing...

This code decreases count of warnings:
-- code --
$startTime = microtime_float(true);
socket_send($socket, $package, strLen($package), 0);
socket_set_block($socket);
$to = array('sec' = 0, 'usec' = 50);
socket_set_option($socket, SOL_SOCKET, SO_RCVTIMEO, $to);
if (socket_read($socket, 4096)) {
  socket_close($socket);
  return microtime_float() - $startTime;
}
socket_close($socket);
-- end of code --
my ping function launches once per 5 minutes for around 50 hosts, but
not all of them alive. Dead hosts causes warnings.



[2005-11-02 14:37:46] dima at dimych dot sumy dot ua

I`m not agree what it is bogus

part of code from ext/sockets/sockets.c:
-- code --
if (type == PHP_NORMAL_READ) {
retval = php_read(php_sock-bsd_socket, tmpbuf, length,
0);
} else {
retval = recv(php_sock-bsd_socket, tmpbuf, length,
0);
}

if (retval == -1) {
PHP_SOCKET_ERROR(php_sock, unable to read from
socket, errno);
efree(tmpbuf);
RETURN_FALSE;
}
-- end of code --
As you can see any processing for EAGAIN not exists. Warning will be
generated in any case. 

1. I`m developing icmp ping function and no reply is not an error in
my program.
2. Function, what can say is any data to receive, not exists.
3. I do not want to turn warnings off. Because I need them in other
places.



[2005-11-02 08:52:06] dima at dimych dot sumy dot ua

Description:

Use of socket_read() on non blocking sockets produces warinigs like:
socket_read() unable to read from socket [35]: Resource temporarily
unavailable

I`m storing all php errors in log file /var/log/php.log.
This warning causes overflow of /var partition because socket_read()
called to wait icmp message. 


Reproduce code:
---
$socket = socket_create(AF_INET, SOCK_RAW, 1);
socket_connect($socket, $host, null);
$startTime = microtime_float(true);
socket_send($socket, $data, strLen($data), 0);
socket_set_nonblock($socket);
while((microtime_float() - $startTime)  0.5) {
  $mt = microtime_float();
  if (socket_read($socket, 255)) {
 break;
  }
}
socket_close($socket);


Expected result:

no warnings in php.log

Actual result:
--
I`m receive huge count of warinigs in my php.log file like this:
socket_read() unable to read from socket [35]: Resource temporarily
unavailable






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


#21197 [Opn]: socket_read() outputs error with PHP_NORMAL_READ

2005-11-04 Thread sniper
 ID:   21197
 Updated by:   [EMAIL PROTECTED]
 Reported By:  bool at boolsite dot net
 Status:   Open
 Bug Type: Sockets related
 Operating System: *
 PHP Version:  5.*, 4.* (2005-10-29) (snap)
 New Comment:

See also bug #35062


Previous Comments:


[2005-09-29 16:07:34] tommyo at gmail dot com

I installed the latest windows build PHP Version 5.1.0RC2-dev and the
socket problem still exists.  I get:

Warning: socket_read() [function.socket-read]: unable to read from
socket [0]: The operation completed successfully.

When I put PHP_NORMAL_READ for the read type parameter. Using the
default or PHP_BINARY_READ works just fine for the same line of code.



[2004-03-11 11:06:02] [EMAIL PROTECTED]

I've compilled PHP with cygwin/gcc and no error is produced. However,
the build version from snaps.php.net gives that error.



[2003-08-26 02:00:58] bool at boolsite dot net

Ok, this is a short example : (a little echo server)

?php
error_reporting(E_ALL);

$Port=6669;

if(($Sock=socket_create(AF_INET,SOCK_STREAM,0))=0) {
echo 'socket_create() a échoué :
',socket_strerror(socket_last_error($Sock)),\r\n;
exit;
}
if(($Ret=socket_bind($Sock,0,$Port))=0) {
echo 'socket_bind() a échoué :
',socket_strerror(socket_last_error($Ret)),\r\n;
exit;
}
if(($Ret=socket_listen($Sock,5))=0) {
echo 'socket_listen() a échoué :
',socket_strerror(socket_last_error($Ret)),\r\n;
exit;
}

while(true){
$MsgSock=socket_accept($Sock);
if($MsgSock===false) {
echo 'socket_accept() a échoué :
',socket_strerror(socket_last_error($MsgSock)),\r\n;
break;
}
  else {
echo '= Debut de la connexion...',\r\n;
$EndTime=time()+15;
do{
$buffer=socket_read($MsgSock,1024,PHP_NORMAL_READ);
if($buffer===false) {
echo 'socket_read() a échoué :
',socket_strerror(socket_last_error($MsgSock)),\r\n;
break;
}
elseif(!$buffer){
continue;
}
$buffer=trim($buffer);
echo ' ',$buffer,\r\n;
if($buffer=='quit') {
break;
}

$back='You sent : ['.$buffer.']';

echo ' ',$back,\r\n;
socket_write($MsgSock,$back.\r\n);
} while(time()$EndTime);

@socket_close($MsgSock);
echo '= End...',\r\n;
}
}
socket_close($Sock);
?



[2002-12-26 20:39:22] [EMAIL PROTECTED]

If you omit the third parameter to socket_read() it seems to work fine.
However, adding PHP_NORMAL_READ causes error as described in the bug
report.



[2002-12-26 09:32:25] bool at boolsite dot net

Hello

I have a source which works with PHP 4.1.x to PHP 4.2.x,
it's work perfectly. But with PHP 4.3RC4 (windows version,
client mode) I have this warning :
Warning: socket_read() unable to read from socket [0]: OpÚration
rÚussie. in E:\PHP\KioobFTP\v0.7.1\KioobFTP_SocketMode.php on line 262

Then, the result of the function is FALSE. 
The socket is in blocking mode.
The code is :
$tmp=socket_read($this-stream,4096,PHP_NORMAL_READ);

Do you need others info ?

Thanks.

Bool




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


#35105 [Opn-Asn]: stream_set_timeout has no effect on SSL stream

2005-11-04 Thread sniper
 ID:   35105
 Updated by:   [EMAIL PROTECTED]
 Reported By:  wckits at rit dot edu
-Status:   Open
+Status:   Assigned
 Bug Type: Sockets related
 Operating System: SunOS 5.9
 PHP Version:  5.0.5
-Assigned To:  
+Assigned To:  wez
 New Comment:

Assigned to the streams author and maintainer.



Previous Comments:


[2005-11-04 15:07:58] wckits at rit dot edu

Description:

A stream opened with stream_socket_client(ssl://. will not timeout
when reading.

This may have a similar underlying cause to bug #23618 but it is
exposed differently, and is still a problem in 5.0.5.

Reproduce code:
---
#!/bin/php-5.0.5/sapi/cli/php
?
//First connect and do something to prove that we are properly
connected.

print Setting up context\n;
$ctx = stream_context_create(array(
'ssl'=array(
'verify_peer' = false,
'allow_self_signed' = true,
)
));
print Creating socket\n;
$socket = stream_socket_client( ssl://www.rit.edu:443, $errno,
$errstr, 10, STREAM_CLIENT_CONNECT, $ctx );
print Setting timeout\n;
var_dump(stream_set_timeout( $socket, 5 ));
print Sending bogus request\n;
fwrite($socket, GET nourl Cupcakes/2.5\n\n\n\n );
print Reading Result\n;
var_dump(fgets( $socket));

//Now conenct and read when we know the server isnt going to send
anything

print Creating NEW socket\n;
$socket = stream_socket_client( ssl://www.rit.edu:443, $errno,
$errstr, 10, STREAM_CLIENT_CONNECT, $ctx );
print Setting timeout\n;
var_dump(stream_set_timeout( $socket, 5 ));
print Sending NO request\n;
print Read should time out in 5\n;
var_dump(fgets( $socket));
?


Expected result:

The first section will run and print an HTTP error. The second section
will run and timeout after printing Read should timeout in 5...

Actual result:
--
Read does not time out.

I suspect that the read timeout on SSL connections is just not
implemented, because it is hard, but if that is the case the
stream_set_timeout should return false to indicate the error.

If its just not implemented I'd be willing to patch it up if there is
one place to fix it. If there are ssl reads all over the php source I
don't think I'd have the time to track them all down.

I have seen people say just use select in response to stream timeout
problems. That does not work with ssl, or at least it may not always
work with ssl. Select can be used if you have access to the native SSL
interface (ie: it could be done right in C) but you need to be able to
check for the WANT_READ condition





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


#35104 [Opn-Asn]: __set() and read-only property prevents proper Class inheritence

2005-11-04 Thread sniper
 ID:   35104
 Updated by:   [EMAIL PROTECTED]
 Reported By:  php at tjworld dot net
-Status:   Open
+Status:   Assigned
 Bug Type: Class/Object related
 Operating System: Windows 2003
 PHP Version:  5.1.0RC5
-Assigned To:  
+Assigned To:  dmitry
 New Comment:

Dmitry, any insight on this?



Previous Comments:


[2005-11-04 13:27:28] php at tjworld dot net

Further test using DOMDocument/DOMElement...

C:\PHP\5.1.0RC5-devphp.exe dom.php

Fatal error: extDOMElement::__construct(): Cannot write property in
C:\dom.php on line 14

--dom.php-
?php
class extDOMDocument extends DOMDocument {
 public function createElement($name, $value=null) {
  $ret = new extDOMElement($name, $value, $this); // create the new
element with this Document as owner
  return $ret;
 }
}

class extDOMElement extends DOMElement {
 function __construct($name, $value='', $owner=null,
$namespaceURI=null) {
  if(!$owner instanceof extDOMDocument)
   throw new DOMException(DOM_NOT_FOUND_ERR); // illegal owner
  parent::__construct($name, $value, $namespaceURI);
  $this-ownerDocument = $owner; //** this line causes a Fatal Error
 }
  //  ... more class definition here
}

$doc = new extDOMDocument('test');
$el = $doc-createElement('tagname');
?



[2005-11-04 13:02:41] php at tjworld dot net

C:\PHP\5.1.0RC5-devphp.exe test.php
testing...
Fatal error: Uncaught exception 'Exception' with message 'Can't
overwrite test' in C:\test.php:12
Stack trace:
#0 C:\test.php(23): ReadOnly::__set('test', 'write to me')
#1 C:\test.php(30): Writeable-__construct('write to me')
#2 {main}
  thrown in C:\test.php on line 12


---test.php--
?php
class ReadOnly {
 protected $realProperty;
 private $dynamicProperty = array();
 function __construct() {
  $realProperty = 12;
  $this-dynamicProperty['test'] = 'read-only';
 }
 public function __set($name, $value) {
  if($name=='test') {
   if(isset($this-dynamicProperty[$name]))
throw new Exception(Can't overwrite $name);

   $dynamicProperty[$name] = $value;
  }
 }
 public function __get($name) { return $this-dynamicProperty[$name];
}
}
class Writeable extends ReadOnly {
 function __construct($value) {
  parent::__construct();
  $this-realProperty = 25; // ok
  $this-test = $value; // causes Fatal Error
 }
 public function getReal() {return $this-realProperty; }
 public function getDynamic() {return $this-test; }
}

echo testing...\r\n;
$test = new Writeable('write to me');
echo 'real: '.$test-getReal().\r\n;
echo 'dynamic: '.$test-getDynamic().\r\n;
?



[2005-11-04 12:38:17] [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





[2005-11-04 11:49:33] php at tjworld dot net

Description:

When extending a class that has a visible (public or protected)
read-only dynamic property by virtue of __set(), the sub-class is
prevented from modifying (or overloading) the property as if it were
merely a public consumer of an instance-object of super, rather than an
extension of the class definition itself.

This shows up in particular in the DOM classes DOMNode and DOMDocument,
where it causes:

Fatal error: extDOMElement::__construct() [function.--construct]:
Cannot write property in...

If you extend both classes, and try to create a new derived extDOMNode
object using a custom  extDOMDocument-createElement(), it is
impossible to set any of the new extDOMNode's dynamic properties from
within extDOMNode's constructor (especially ownerDocument) because
DOMNodes without an owner are forced to be read-only.

The extDOMNode class definition should be able to modify the publically
visible ownerDocument property.

Since real properties accessible from a sub-class can't be private (if
they're to be accessible from other objects), it follows that the same
rule should apply to dynamic properties. If this were so the dynamic
properties made visible by __set() would be inherited as protected or
public  and this issue wouldn't arise.

Reproduce code:
---
class ReadOnly {
 protected $realProperty;
 private $dynamicProperty = array();
 function __construct() {
  $realProperty = 12;
  $this-members['test'] = 'read-only';
 }
 public function __set($name, $value) {
  if($name=='test') {
   if(isset($this-dynamicProperty[$name]))
throw new Exception(Can't overwrite $name);  

   $props[$name] = $value;
  }
 }
}
class Writeable extends ReadOnly {
 function __construct($value) {
  parent::__construct();
  $this-realProperty = 25; // ok
  $this-test = $value; // causes Fatal Error
 }
}

$test = new Writeable('write to 

#35103 [Opn-Asn]: mysqli bind_result incorrectly handles unsigned int

2005-11-04 Thread sniper
 ID:   35103
 Updated by:   [EMAIL PROTECTED]
 Reported By:  php at pjberkel dot com
-Status:   Open
+Status:   Assigned
 Bug Type: MySQLi related
 Operating System: *
 PHP Version:  5CVS-2005-11-04 (cvs)
 Assigned To:  andrey


Previous Comments:


[2005-11-04 15:53:27] [EMAIL PROTECTED]

if your code is aware that the variable is unsigned you can get the
unsigned value by using sprintf() with %u as format specificator
[EMAIL PROTECTED]:~/test php -r '$a=-2; printf(%d %u\n, $a, $a);'
-2 4294967294

However I think it is good idea to make that implicit so mysqli to
return a string (on 32bit) and normal int (on 64bit).




[2005-11-04 12:46:29] php at pjberkel dot com

Compiling the current php5 STABLE CVS snapshot version under RHEL 4
yields the same incorrect results as before: using var_dump instead
of print in the original example gives the results:

int(2147483647)
int(-2147483648)
int(-2147483647)
int(-494965764)
int(-394965015)
int(-1)



[2005-11-04 11:17:12] php at pjberkel dot com

Description:

When using mysqli_stmt_bind_result to retrieve a 32bit unsigned
integer value from a mysql database (version 4.1.13-standard) that is
greater than the maximum *signed* value but less than the maximum
*unsigned* value (i.e. 2147483647  int = 4294967295), the integer is
returned incorrectly as a signed value.

I did read in the manual that php does not support unsigned integers
(http://www.php.net/manual/en/language.types.integer.php), however in
this case, mysqli_stmt_bind_result should probably cast the result to a
float.


Reproduce code:
---
?php

$mysqli = new mysqli(host, user, pass, db);
$mysqli-query(CREATE TABLE temp (id INT UNSIGNED NOT NULL));
$mysqli-query(INSERT INTO temp (id) VALUES
(2147483647),(2147483648),(2147483649),(381532),(392281),(4294967295));

/* BEGIN EXAMPLE OF BUG */
$stmt = $mysqli-prepare(SELECT id FROM temp);
$stmt-execute();
$stmt-bind_result($id);
while ($stmt-fetch()) {
print $id . br\n;
}
$stmt-close();
/* END EXAMPLE OF BUG */

$mysqli-query(DROP TABLE temp);
$mysqli-close();

?


Expected result:

2147483647
2147483648
2147483649
381532
392281
4294967295


Actual result:
--
2147483647
-2147483648
-2147483647
-494965764
-394965015
-1






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


#35107 [Opn-Fbk]: compile failure with PHP 5.1 + MySQL 5

2005-11-04 Thread sniper
 ID:   35107
 Updated by:   [EMAIL PROTECTED]
 Reported By:  alex at whitewhale dot net
-Status:   Open
+Status:   Feedback
 Bug Type: Compile Failure
 Operating System: MacOS X 10.4.3
 PHP Version:  5.1.0RC4
 New Comment:

Does this configure line work any better:

# rm config.cache
# ./configure --disable-all --with-apxs=/usr/sbin/apxs \
--with-mysqli=/usr/local/mysql/bin/mysql_config



Previous Comments:


[2005-11-04 17:40:02] alex at whitewhale dot net

Description:

Not very knowledgeable about compiler issues, but: getting a 
compile failure on MacOS X related to MySQL. PHP 5.1 RC3 
compiled with MySQL 5 successfully, but RC4 and a snapshot 
from this morning both fail using the following configure 
line:

./configure --with-apxs=/usr/sbin/apxs --prefix=/usr --enable-
inline-optimization --with-libxml-dir=/sw --with-mysqli=/usr/
local/mysql/bin/mysql_config --with-gd --with-jpeg-dir=/sw --
with-png-dir=/sw --with-zlib-dir=/usr --with-pdo-mysql --with-
xmlrpc --with-mm=/usr/local --disable-debug --with-ldap --
enable-soap

Reproduce code:
---
make

Expected result:

a successful compile

Actual result:
--
/usr/bin/ld: warning multiple definitions of symbol _regcomp
/usr/sbin/httpd definition of _regcomp
/usr/lib/gcc/powerpc-apple-darwin8/4.0.0/../../../libm.dylib
(regcomp.So) definition of _regcomp
/usr/bin/ld: warning multiple definitions of symbol _regexec
/usr/sbin/httpd definition of _regexec
/usr/lib/gcc/powerpc-apple-darwin8/4.0.0/../../../libm.dylib
(regexec.So) definition of _regexec
/usr/bin/ld: warning multiple definitions of symbol _regfree
/usr/sbin/httpd definition of _regfree
/usr/lib/gcc/powerpc-apple-darwin8/4.0.0/../../../libm.dylib
(regfree.So) definition of _regfree
/usr/bin/ld: Undefined symbols:
_mysql_get_character_set_info
_mysql_set_character_set
collect2: ld returned 1 exit status
make: *** [libs/libphp5.bundle] Error 1





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


#35096 [Opn-Fbk]: php 4.4.2-dev has still trouble with mod_rewrite/apache2

2005-11-04 Thread sniper
 ID:   35096
 Updated by:   [EMAIL PROTECTED]
 Reported By:  rob at burningsoda dot com
-Status:   Open
+Status:   Feedback
 Bug Type: Apache2 related
 Operating System: FreeBSD 6.0RC1
 PHP Version:  4CVS-2005-11-04 (snap)
 New Comment:

I want you to try the PHP 5 snapshot because I want to be sure this is
only happening with PHP 4. In which case we have better chance of
figuring out what fix to backport from PHP 5.

On the other hand, if this also happens with PHP 5, we really need to
know since we're about to release PHP 5.1 and it would be nice to fix
this kind of things before the release..



Previous Comments:


[2005-11-04 20:04:37] rob at burningsoda dot com

sniper,

This problem occurs only when using PHP 4.4.1 and the PHP 4-snapshots
_and_ apache 2.x. Why should I try a 5.x-snapshot? Do I misunderstand
you?



[2005-11-04 09:25:24] [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





[2005-11-04 02:49:53] rob at burningsoda dot com

Description:

I just downloaded

Stable (4.4.x-dev)
Built On: Nov 03, 2005 23:51 GMT

and built it:

PHP 4.4.2-dev (cli) (built: Nov  4 2005 02:17:10)

But it seems like, the following bug is _not_ fixed
in that snapshot:

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

This happens with _any_ RewriteRule I use.

Reproduce code:
---
Try to use mod_rewrite on Apache 2.x to modify any URL.
Small test case:

index.php:
?php echo($_GET['myarg']); ?

RewriteRule:
RewriteRule ^(.+)/$ index.php?myarg=$1 [L]

URLs to try:
1. http://localhost/index.php?myarg=bla
2. http://localhost/blub/
3. http://localhost/index.php/


Expected result:

In all three cases a document should be delivered:

1. bla
2. blub
3. index.php

Actual result:
--
1. Correctly delivers document.
2. No document is delivered.
3. Correctly delivers document.





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


#35109 [Opn-Bgs]: Expected if-clause result not performed

2005-11-04 Thread sniper
 ID:   35109
 Updated by:   [EMAIL PROTECTED]
 Reported By:  per at katrineholm dot org
-Status:   Open
+Status:   Bogus
 Bug Type: Output Control
 Operating System: Linux
 PHP Version:  4.4.1
 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.  Due to the volume
of reports we can not explain in detail here why your report is not
a bug.  The support channels will be able to provide an explanation
for you.

Thank you for your interest in PHP.

RTFM.


Previous Comments:


[2005-11-04 22:56:44] per at katrineholm dot org

Description:

Two if-clauses are not outputting the same result as they should.

Reproduce code:
---
?php
$a = abc;
$b = abcd;

/* Example 1: */
if ($a != $b) {
echo This one doesn't.;
}

/* Example 2: */
if (! $a == $b) {
echo This works fine.;
}
?

Expected result:

Both example 1 and 2 outputs the written strings.

Actual result:
--
Only example 1 outputs the expected result.





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


#35108 [Opn-Bgs]: PHP Warning: mail() [function.mail]: SMTP server response: 501 Syntax error in

2005-11-04 Thread sniper
 ID:   35108
 Updated by:   [EMAIL PROTECTED]
 Reported By:  theintunoo at brightwing dot jp
-Status:   Open
+Status:   Bogus
 Bug Type: Scripting Engine problem
 Operating System: sever 2003
 PHP Version:  5.1.0RC4
 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.  Due to the volume
of reports we can not explain in detail here why your report is not
a bug.  The support channels will be able to provide an explanation
for you.

Thank you for your interest in PHP.




Previous Comments:


[2005-11-04 18:49:49] theintunoo at brightwing dot jp

PHP Warning: mail() [function.mail]: SMTP server response: 501 Syntax
error in parameters or arguments in C:\Program



[2005-11-04 18:47:21] theintunoo at brightwing dot jp

Description:

php.ini 


Expected result:

open php.ini file 
search this line ;sendmail_from = [EMAIL PROTECTED]
after replace as like 
sendmail_from = [EMAIL PROTECTED]
release this ; mark only your php.ini file 
where php.ini 







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



#35107 [Opn-Fbk]: compile failure with PHP 5.1 + MySQL 5

2005-11-04 Thread sniper
 ID:   35107
 Updated by:   [EMAIL PROTECTED]
 Reported By:  alex at whitewhale dot net
-Status:   Open
+Status:   Feedback
 Bug Type: Compile Failure
 Operating System: MacOS X 10.4.3
 PHP Version:  5.1.0RC4
 New Comment:

So you didn't try with fresh sources or did not do 'make clean'.. Just
do make clean  make and it'll work.



Previous Comments:


[2005-11-04 18:34:21] alex at whitewhale dot net

Tried that configure line. No, now it fails with:

/usr/bin/ld: warning multiple definitions of symbol _regcomp
/usr/sbin/httpd definition of _regcomp
/usr/lib/gcc/powerpc-apple-darwin8/4.0.0/../../../libm.dylib
(regcomp.So) definition of _regcomp
/usr/bin/ld: warning multiple definitions of symbol _regexec
/usr/sbin/httpd definition of _regexec
/usr/lib/gcc/powerpc-apple-darwin8/4.0.0/../../../libm.dylib
(regexec.So) definition of _regexec
/usr/bin/ld: warning multiple definitions of symbol _regfree
/usr/sbin/httpd definition of _regfree
/usr/lib/gcc/powerpc-apple-darwin8/4.0.0/../../../libm.dylib
(regfree.So) definition of _regfree
/usr/bin/ld: Undefined symbols:
_spl_ce_RuntimeException
_spl_ce_Countable
_php_pcre_replace
_php_ob_gzhandler_check
collect2: ld returned 1 exit status
make: *** [libs/libphp5.bundle] Error 1

BTW, I may have been wrong to say RC3 compiled. I'm 
currently running RC3 w/ MySQL 5 but I think that I may have 
installed MySQL 5 after RC 3 was already compiled and 
installed with 4.1.x.

Also, I recently upgraded to MacOS X 10.4.3, if that has 
anything to do with it.



[2005-11-04 18:20:06] [EMAIL PROTECTED]

Does this configure line work any better:

# rm config.cache
# ./configure --disable-all --with-apxs=/usr/sbin/apxs \
--with-mysqli=/usr/local/mysql/bin/mysql_config




[2005-11-04 17:40:02] alex at whitewhale dot net

Description:

Not very knowledgeable about compiler issues, but: getting a 
compile failure on MacOS X related to MySQL. PHP 5.1 RC3 
compiled with MySQL 5 successfully, but RC4 and a snapshot 
from this morning both fail using the following configure 
line:

./configure --with-apxs=/usr/sbin/apxs --prefix=/usr --enable-
inline-optimization --with-libxml-dir=/sw --with-mysqli=/usr/
local/mysql/bin/mysql_config --with-gd --with-jpeg-dir=/sw --
with-png-dir=/sw --with-zlib-dir=/usr --with-pdo-mysql --with-
xmlrpc --with-mm=/usr/local --disable-debug --with-ldap --
enable-soap

Reproduce code:
---
make

Expected result:

a successful compile

Actual result:
--
/usr/bin/ld: warning multiple definitions of symbol _regcomp
/usr/sbin/httpd definition of _regcomp
/usr/lib/gcc/powerpc-apple-darwin8/4.0.0/../../../libm.dylib
(regcomp.So) definition of _regcomp
/usr/bin/ld: warning multiple definitions of symbol _regexec
/usr/sbin/httpd definition of _regexec
/usr/lib/gcc/powerpc-apple-darwin8/4.0.0/../../../libm.dylib
(regexec.So) definition of _regexec
/usr/bin/ld: warning multiple definitions of symbol _regfree
/usr/sbin/httpd definition of _regfree
/usr/lib/gcc/powerpc-apple-darwin8/4.0.0/../../../libm.dylib
(regfree.So) definition of _regfree
/usr/bin/ld: Undefined symbols:
_mysql_get_character_set_info
_mysql_set_character_set
collect2: ld returned 1 exit status
make: *** [libs/libphp5.bundle] Error 1





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


#35076 [Opn-Asn]: Sometimes the log file shows: The session id contains illegal characters, ..etc

2005-11-04 Thread sniper
 argument in
phar://install-pear-nozlib.phar/PEAR/Installer/Role.php on line 10
3

Warning: in_array(): Wrong datatype for second argument in
phar://install-pear-nozlib.phar/PEAR/Installer/Role.php on line 10
3

Warning: in_array(): Wrong datatype for second argument in
phar://install-pear-nozlib.phar/PEAR/Installer/Role.php on line 10
3



[2005-11-03 23:50:51] vincent_f40 at hotmail dot com

./configure  --enable-sysvmem --enable-sysvshm --enable-sockets
--with-mhash=/usr --with-mysql=/usr
--with-apxs=/usr/local/apache/bin/apxs

The error just re-appeared with: php5-STABLE-200511031742

I am not sure what more you would like to know...just let me know and I
can provide it.

Thanks
Vince.



[2005-11-03 23:25:54] [EMAIL PROTECTED]

Could you help us out a bit and actually let us know what the errors
where you got? And with what configure line did you get them? We're
about to release PHP 5.1 and we'd like to fix this kind of issues
before the release..



[2005-11-03 23:12:36] vincent_f40 at hotmail dot com

Hi Sniper,

I have tried to install the link you provided:
http://snaps.php.net/php5-latest.tar.gz

But this at the make install command outputted a lot of errors, about
phar lib and call back functions...

I downloaded therefor the: php5-STABLE-200511031742
This installed ok.

Only I cant reproduce the error, so I will have to wait if the error
will re-appear.

I will keep you posted if it helped or not.

Thanks,
Vince



[2005-11-03 15:49:58] [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





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

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


#35081 [Opn-Fbk]: using the example for .NET causes a com_exeption

2005-11-03 Thread sniper
 ID:   35081
 Updated by:   [EMAIL PROTECTED]
 Reported By:  mcyra at chello dot at
-Status:   Open
+Status:   Feedback
 Bug Type: COM related
 Operating System: WinXP
 PHP Version:  5.0.5
 New Comment:

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




Previous Comments:


[2005-11-03 08:03:25] mcyra at chello dot at

Description:

A sample script from documentation causes this error.
German version of WinXP.
Microsoft .NET Framework 1.1.
Microsoft .NET Framework 1.1 German Language Pack.
PHP 5.0.5 (cli) (build: Sep 5 2005 15:54:44)
Zend Engine v2.0.5

Reproduce code:
---
?php
  $stack = new DOTNET(mscorlib, System.Collections.Stack);

  $stack-Push(.Net);
  $stack-Push(Hello );

  echo $stack-Pop() . $stack-Pop();
?

Actual result:
--
Fatal error: Uncaught exception 'com_exception' with message 'Failed to
instantiate .Net object [CreateInstance] [0x80070057] Falscher
Parameter.' in D:\NET\test.php:2
Stack trace: 
#0 D:\NET\test.php(2): dotnet-dotnet('mscorlib',
'System.Collecti...')
#1 {main}
  thrown in D:\NET\test.php on line 2





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


#35079 [Opn-Fbk]: stream_set_blocking(true) toggles, not enables blocking

2005-11-03 Thread sniper
 ID:   35079
 Updated by:   [EMAIL PROTECTED]
 Reported By:  askalski at gmail dot com
-Status:   Open
+Status:   Feedback
 Bug Type: Filesystem function related
 Operating System: linux
 PHP Version:  5.0.5
 New Comment:

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




Previous Comments:


[2005-11-03 05:55:11] askalski at gmail dot com

Description:

main/streams/plain_wrapper.c (5.0.5)
main/streams.c (4.4 and earlier)

In several places, the ^= operator is used to turn off a flag.  This is
incorrect.  For example, stream_set_blocking() on a plain file hits this
code in php_stdiop_set_option():

if (value)
flags ^= O_NONBLOCK;
else
flags |= O_NONBLOCK;

This should be:

if (value)
flags = ~O_NONBLOCK;
else
flags |= O_NONBLOCK;

The same error is repeated elsewhere in the code.


Reproduce code:
---
$fp = fopen(test, w);

stream_set_blocking($fp, true);
stream_set_blocking($fp, true);
stream_set_blocking($fp, true);
stream_set_blocking($fp, true);

fclose($fp);


Expected result:

The stream should remain in blocking mode throughout the script
execution.


Actual result:
--
Here is abridged strace output showing the errant behavior.  Notice how
O_NONBLOCK is being turned on and off alternately.

open(/home/askalski/test, O_WRONLY|O_CREAT|O_TRUNC, 0666) = 4
fcntl64(4, F_SETFL, O_WRONLY|O_NONBLOCK) = 0
fcntl64(4, F_SETFL, O_WRONLY)   = 0
fcntl64(4, F_SETFL, O_WRONLY|O_NONBLOCK) = 0
fcntl64(4, F_SETFL, O_WRONLY)   = 0
close(4)= 0






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


#35077 [Opn-Fbk]: stream_set_timeout() does not work with stream_socket_recvfrom()

2005-11-03 Thread sniper
 ID:   35077
 Updated by:   [EMAIL PROTECTED]
-Summary:  stream_set_timeout does not work with
   stream_socket_recvfrom
 Reported By:  pn2865 at yahoo dot com
-Status:   Open
+Status:   Feedback
 Bug Type: Sockets related
-Operating System: Linux or Win XP or Win2003
+Operating System: *
 PHP Version:  5.0.5
 New Comment:

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




Previous Comments:


[2005-11-03 03:12:36] pn2865 at yahoo dot com

Description:

Sample program tries to get data via UDP and never completes if none
received. Use any IP address and port that does (or does not) exist and
you get the same result if that IP does not send a UDP packet to the
system this snippet is run on.

Reproduce code:
---
$server_recv = stream_socket_server(udp://192.168.1.100:, $errno,
$errstr, STREAM_SERVER_BIND);
if (!$server_recv) 
exit (ERROR: stream_socket_server failed);

set_time_limit(2); //  Will not interrupt stream_socket_recvfrom
stream_set_timeout($server_recv,3,0);

$packet=stream_socket_recvfrom($server_recv, 1000);
$info = stream_get_meta_data($server_recv);
if ($info['timed_out']) 
  echo 'Connection timed out!';
else
echo Got back '$packet'; 

Expected result:

Should timeout at 3 seconds.

Actual result:
--
Never comes back from stream_socket_recvfrom call.





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


#35076 [Opn-Fbk]: Sometimes the log file shows: The session id contains illegal characters, ..etc

2005-11-03 Thread sniper
 ID:   35076
 Updated by:   [EMAIL PROTECTED]
 Reported By:  vincent_f40 at hotmail dot com
-Status:   Open
+Status:   Feedback
 Bug Type: Session related
 Operating System: Linux RHEL4, 2.6.9-11.ELsmp
 PHP Version:  5.0.5
 New Comment:

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




Previous Comments:


[2005-11-03 02:27:52] vincent_f40 at hotmail dot com

Description:

[Thu Nov  3 00:49:10 2005] [error] PHP Warning:  session_start() [a
href='function.session-start'function.session-start/a]: The session
id contains illegal characters, valid characters are a-z, A-Z, 0-9 and
'-,' in /home/httpd/html/includes/session_init.inc on line 70
[Thu Nov  3 00:49:11 2005] [error] PHP Warning:  Unknown: The session
id contains illegal characters, valid characters are a-z, A-Z, 0-9 and
'-,' in Unknown on line 0
[Thu Nov  3 00:49:11 2005] [error] PHP Warning:  Unknown: Failed to
write session data (files). Please verify that the current setting of
session.save_path is correct () in Unknown on line 0

1) Cant reproduce the errors. As the site works fine, only sometimes
the above error appears in the log files.
2) session_write_close() is being used.
3) session_name() uses only the characters [a-z].
4) As the site works /tmp is oke as well.(perms, etc.)
5) There is enough free disk space in /tmp as well.

a) using apache 1.3.34, php compiled as module(apxs)
b) Kernel: 2.6.9-11.ELsmp (double processor)

Is this a bug or a php programming error ?
As it happens not always, just random/sometimes.

Search the net for hours...no luck in finding the explanation. Hope to
find some clue here.

Thanks.






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


#35092 [Opn-Bgs]: next() misbehavior

2005-11-03 Thread sniper
 ID:   35092
 Updated by:   [EMAIL PROTECTED]
 Reported By:  phbaer at npw dot net
-Status:   Open
+Status:   Bogus
 Bug Type: Arrays related
 Operating System: Linux
 PHP Version:  4.4.1
 New Comment:

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

Thank you for your interest in PHP.




Previous Comments:


[2005-11-03 20:37:20] phbaer at npw dot net

Description:

next() misbehaves:
it does not increment the internal position pointer with PHP 4.4.1

Reproduce code:
---
?php
$test = array();
for ($i = 0; $i  10; $i++) {
$test[] = $i;
}
while (next($test)) {
echo current($test) . br /;
}
?


Expected result:

1
2
3
4
5
6
7
8
9

Actual result:
--
1
1
1
1
1
1
1
1
1






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


#35087 [Opn-Bgs]: sendmail_path -f not longer work [Return-Path:]

2005-11-03 Thread sniper
 ID:   35087
 Updated by:   [EMAIL PROTECTED]
 Reported By:  rautenberg at inetsolutions dot de
-Status:   Open
+Status:   Bogus
 Bug Type: PHP options/info functions
 Operating System: 2.6.4-52-smp
 PHP Version:  4.4.1
 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.  Due to the volume
of reports we can not explain in detail here why your report is not
a bug.  The support channels will be able to provide an explanation
for you.

Thank you for your interest in PHP.




Previous Comments:


[2005-11-03 17:24:00] rautenberg at inetsolutions dot de

Description:

In php.ini i'v defined a sendmail path so that any errormail have an
Return-Path:.

php.ini:
sendmail_path = /usr/sbin/sendmail -f [EMAIL PROTECTED]

with PHP 4.3.X it works fine but with 4.4.1:

postfix at my php-server send a mail to the indicated mailadress
([EMAIL PROTECTED])

unknown: No recipients specified

How can i solve this?
Is sendmail_path -f not present anymore?

Reproduce code:
---
mail([EMAIL PROTECTED], test,$message,From:
[EMAIL PROTECTED]);

Expected result:

An errormail was sent with
unknown: No recipients specified






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


#35085 [Opn-Fbk]: session_set_save_handler(): Argument 2 is not a valid callback

2005-11-03 Thread sniper
 ID:   35085
 Updated by:   [EMAIL PROTECTED]
 Reported By:  joerg at krause dot net
-Status:   Open
+Status:   Feedback
 Bug Type: Session related
 Operating System: Linux
 PHP Version:  4.4.1
 New Comment:

Provide a full example script that doesn't work.
And why didn't you report before 4.4.1 was released?
There were RCs released first..



Previous Comments:


[2005-11-03 12:44:50] joerg at krause dot net

Description:

The following message arises:

session_set_save_handler(): Argument 2 is not a valid callback

it doesn't matter if there is valid callback or not, the function
crashes under all circumstances, if the handler is stored in a class

Reproduce code:
---
session_set_save_handler(array ($this,'lsess_open'), array
($this,'lsess_dummy'), array ($this, 'lsess_read'), array ($this,
'lsess_write'), array ($this, 'lsess_destroy'), array($this,
'lsess_gc'));

The handler are all in the same class defined as function. With all
previous versions of PHP it works fine.

Expected result:

No error, just accept callbacks.

Actual result:
--
error message (warning):

session_set_save_handler(): Argument 2 is not a valid callback







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


#35093 [Opn-Bgs]: foreach nullifies index of an inexed array

2005-11-03 Thread sniper
 ID:   35093
 Updated by:   [EMAIL PROTECTED]
 Reported By:  tony at marston-home dot demon dot co dot uk
-Status:   Open
+Status:   Bogus
 Bug Type: Arrays related
 Operating System: Windows XP
 PHP Version:  4.4.1
 New Comment:

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

Thank you for your interest in PHP.




Previous Comments:


[2005-11-03 21:10:23] tony at marston-home dot demon dot co dot uk

Description:

When I use foreach($array as $key = $value) on an indexed array,
afterwards the index value, when viewed with key($array) is null
instead of an integer. This means that when my code tests the array to
see if it is either indexed or associative it is given the wrong
answer.

Reproduce code:
---
?php
$array[] = 'string of data';

if (is_int(key($array))) {
echo array is indexed\n;
} else {
echo array is associativ\/n;
} // if

foreach ($array as $key = $value) {
if ($key === key($array)) {
echo they are the same\n;
} else {
echo they are NOT the same\n;
} // if
} // foreach

if (is_int(key($array))) {
echo array is indexed\n;
} else {
echo array is associative\n;
} // if
?

Expected result:

The output 'array is indexed' should be produced both before and after
the foreach() statement.

Actual result:
--
The key of an indexed array, when viewed with key($array), is not being
reported as an integer.





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


#35071 [Opn-Csd]: Safe mode restrictions: rb+ should be wb+

2005-11-03 Thread sniper
 ID:   35071
 Updated by:   [EMAIL PROTECTED]
 Reported By:  webmaster at iksaif dot net
-Status:   Open
+Status:   Closed
 Bug Type: GD related
 Operating System: *
 PHP Version:  4.4.1
 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-11-02 22:28:05] [EMAIL PROTECTED]

Fixed in HEAD and PHP_5_1 branches.




[2005-11-02 21:25:19] moron at industrial dot org

This is the same issue covered in bug #35060 (though you do suggest a
potential fix).  [EMAIL PROTECTED] claims this is a documentation problem,
not a bug.



[2005-11-02 21:04:17] webmaster at iksaif dot net

Description:

in ext/gd.c ext/gd_ctx.c  
(PG(safe_mode)  !php_checkuid(fn, rb+,  
CHECKUID_CHECK_FILE_AND_DIR)))  
should be :  
(PG(safe_mode)  !php_checkuid(fn, wb+,  
CHECKUID_CHECK_FILE_AND_DIR)))  
because with rb+ it's impossible to create a new file  
with imagepng,imagejpeg, etc   
(r change mode from CHECKUID_CHECK_FILE_AND_DIR to  
CHECKUID_DISALLOW_FILE_NOT_EXISTS).  






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


#35078 [Opn-Csd]: configure does not find ldap_start_tls_s

2005-11-03 Thread sniper
 ID:   35078
 Updated by:   [EMAIL PROTECTED]
 Reported By:  bkw at weisshuhn dot de
-Status:   Open
+Status:   Closed
 Bug Type: Compile Failure
 Operating System: Linux Fedora Core 2,3,4
-PHP Version:  4.4.1
+PHP Version:  5CVS, 4CVS
 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-11-03 04:58:24] bkw at weisshuhn dot de

The sersion of ext/ldap/config.m4 that introduced the regression is
1.26.2.8,  not .28 as stated above ;-)

Also, the line numbers of the patch may be slightly off, since  I
already applied another (unrelated) patch before, sorry about that. But
it's probably obvious anyway.



[2005-11-03 04:50:52] bkw at weisshuhn dot de

Description:

Actually a regression of Bug #24025:

configure fails to find ldap_parse_result, ldap_parse_reference and
ldap_start_tls_s.

this patch fixes the problem, which was introduced in Version Version
1.26.28 of ext/ldap/config.m4:

--- php-4.4.11/ext/ldap/config.m4.ldapconf
+++ php-4.4.11/ext/ldap/config.m4
@@ -124,6 +125,8 @@ if test $PHP_LDAP != no; then

   dnl Solaris 2.8 claims to be 2004 API, but doesn't have
   dnl ldap_parse_reference() nor ldap_start_tls_s()
+  _SAVE_LDFLAGS=$LDFLAGS
+  LDFLAGS=$LDFLAGS $LDAP_SHARED_LIBADD
   AC_CHECK_FUNCS([ldap_parse_result ldap_parse_reference
ldap_start_tls_s])
   LDFLAGS=$_SAVE_LDFLAGS


The commit that introduced the behaviour:
http://cvs.php.net/diff.php/php-src/ext/ldap/config.m4?r1=1.26.2.7r2=1.26.2.8
The LDAP_SHARED_LIBADD was lost from LDFLAGS by the rearrangement
there.






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


#35091 [Opn-Fbk]: SoapClient leaks memory

2005-11-03 Thread sniper
 ID:   35091
 Updated by:   [EMAIL PROTECTED]
 Reported By:  paul at paulbutcher dot com
-Status:   Open
+Status:   Feedback
 Bug Type: SOAP related
-Operating System: All
+Operating System: *
 PHP Version:  5.0.5
 New Comment:

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




Previous Comments:


[2005-11-03 19:52:18] paul at paulbutcher dot com

Description:

SoapClient doesn't seem to clean up after itself when garbage
collected. It leaks something around 4K each time. Tested on both
Windows and Linux.

Reproduce code:
---
?php
while(true) {
new SoapClient(test.wsdl);
}
?


Expected result:

Assuming that I understand the PHP Garbage Collector (and it's possible
that I don't - I'm struggling to find any good documentation on exactly
how I should expect it to behave - any pointers very welcome!), I would
expect the memory usage of this script to be constant.

Actual result:
--
The memory usage increases very quickly (growing to several hundred
megabytes in less than a minute).





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


#35088 [Opn-Fbk]: apache module core dumps when DOM method loadXML is called

2005-11-03 Thread sniper
 ID:   35088
 Updated by:   [EMAIL PROTECTED]
 Reported By:  cole at ccdc dot cam dot ac dot uk
-Status:   Open
+Status:   Feedback
 Bug Type: DOM XML related
 Operating System: IRIX 6.5.18m
 PHP Version:  5.0.5
 New Comment:

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




Previous Comments:


[2005-11-03 17:38:22] cole at ccdc dot cam dot ac dot uk

Some more relevant info that I forgot in the initial report - the link
stage of make reported many duplicate symbols in building the apache
library. Most were dom module related. I suspect this is the root
cause, but fixing the issue is not obvious?



[2005-11-03 17:34:04] cole at ccdc dot cam dot ac dot uk

Description:

php child process core dumps while trying to execute
DOMDocument-loadXML() from within apache2

 

 

Reproduce code:
---
$doc = new DOMDocument();
$doc-formatOutput = true;
$doc-preserveWhiteSpace = false;

// Calling loadXML here causes the core dump
$doc-loadXML( hello/hello);




Expected result:

Not to core dump!

Actual result:
--
It crashes.

Other possibly relevant things: The compilation of php and apache used
the native mips-pro compiler (rather than gcc).

Here's some data about the system, and the php shared object

We configured with 

./configure --with-apxs2=/local/cole/apache2/bin/apxs
--prefix=/local/cole/php-5.0.5

From the server log
[Thu Nov 03 16:16:08 2005] [notice] child pid 1749448 exit signal
Segmentation fault (11), possible coredump in
/home/cole/not-backed-up/relibase_clean_build/relibase_irix_build/relibase

From ldd:

ldd libphp5.so
libm.so  =  /usr/lib32/libm.so 
libz.so  =  /usr/lib32/libz.so 
libxml2.so.3 = /usr/lib32/internal/libxml2.so.3  

libc.so.1  =/usr/lib32/libc.so.1 







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


#35079 [Opn-Asn]: stream_set_blocking(true) toggles, not enables blocking

2005-11-03 Thread sniper
 ID:   35079
 Updated by:   [EMAIL PROTECTED]
 Reported By:  askalski at gmail dot com
-Status:   Open
+Status:   Assigned
 Bug Type: Filesystem function related
 Operating System: linux
-PHP Version:  5.0.5
+PHP Version:  5CVS-2005-11-03 (snap)
-Assigned To:  
+Assigned To:  wez
 New Comment:

Assigned to the author of streams.


Previous Comments:


[2005-11-03 18:56:39] askalski at gmail dot com

Still broken. (php-200511031730)



[2005-11-03 15:48:11] [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





[2005-11-03 05:55:11] askalski at gmail dot com

Description:

main/streams/plain_wrapper.c (5.0.5)
main/streams.c (4.4 and earlier)

In several places, the ^= operator is used to turn off a flag.  This is
incorrect.  For example, stream_set_blocking() on a plain file hits this
code in php_stdiop_set_option():

if (value)
flags ^= O_NONBLOCK;
else
flags |= O_NONBLOCK;

This should be:

if (value)
flags = ~O_NONBLOCK;
else
flags |= O_NONBLOCK;

The same error is repeated elsewhere in the code.


Reproduce code:
---
$fp = fopen(test, w);

stream_set_blocking($fp, true);
stream_set_blocking($fp, true);
stream_set_blocking($fp, true);
stream_set_blocking($fp, true);

fclose($fp);


Expected result:

The stream should remain in blocking mode throughout the script
execution.


Actual result:
--
Here is abridged strace output showing the errant behavior.  Notice how
O_NONBLOCK is being turned on and off alternately.

open(/home/askalski/test, O_WRONLY|O_CREAT|O_TRUNC, 0666) = 4
fcntl64(4, F_SETFL, O_WRONLY|O_NONBLOCK) = 0
fcntl64(4, F_SETFL, O_WRONLY)   = 0
fcntl64(4, F_SETFL, O_WRONLY|O_NONBLOCK) = 0
fcntl64(4, F_SETFL, O_WRONLY)   = 0
close(4)= 0






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


#35073 [Opn-Fbk]: failed to open stream: Illegal seek

2005-11-03 Thread sniper
 ID:   35073
 Updated by:   [EMAIL PROTECTED]
-Summary:  failed to open stream: Inappropriate ioctl for device
 Reported By:  marrtins at hackers dot lv
-Status:   Open
+Status:   Feedback
 Bug Type: Filesystem function related
 Operating System: Linux libc.2.3.2
-PHP Version:  5.0.5
+PHP Version:  5CVS-2005-11-03 (snap)
 New Comment:

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

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

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




Previous Comments:


[2005-11-03 11:45:18] marrtins at hackers dot lv

a bit better!
./configure script told me i must upgrade to newer libxml2 (did it) and
now results is as follows:

fopen() reports `failed to open stream: Illegal seek`

dba_open now works fine!


[Modules]
ctype
dba
ftp
gd
gettext
iconv
mbstring
mysql
openssl
overload
pcre
posix
session
sockets
standard
sysvmsg
sysvsem
sysvshm
tokenizer
xml
zlib



[2005-11-02 23:53:43] [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





[2005-11-02 22:38:51] marrtins at hackers dot lv

Description:

As i migrated from php4 (4.3.9) to php5 (5.0.5, 5.0.4) every file
system function (fopen, dba_open, etc) cannot read/write files. Empty
file can be created - but can`t write any byte there.

Not using any loaders or encoders or similar modules.

When recompiled back to 4.3.9 all works fine. The same happens when
compiled as apache module - 4.3.9 works fine, 5.0.5 and 5.0.4 not.

Reproduce code:
---
Example can be found here - http://paste.php.lv/2785

compile script:
export LDFLAGS=-liconv  ./configure
make
make install

Linux libc-2.3.2

gcc -v
Reading specs from /usr/lib/gcc-lib/i486-slackware-linux/3.3.4/specs
Configured with: ../gcc-3.3.4/configure --prefix=/usr --enable-shared
--enable-threads=posix --enable-__cxa_atexit --disable-checking
--with-gnu-ld --verbose --target=i486-slackware-linux
--host=i486-slackware-linux
Thread model: posix
gcc version 3.3.4



Expected result:

Expecting file `haha` to be created with contents `aa`. Also db4
database with some entries.

Actual result:
--
fopen() reports `failed to open stream: Inappropriate ioctl for
device`

dba_open() reports `Driver initialization failed for handler: db4`







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


#35074 [Opn-Fbk]: Call to virtual() causes Segmentation fault

2005-11-03 Thread sniper
 ID:   35074
 Updated by:   [EMAIL PROTECTED]
 Reported By:  jeff dot potter at hp dot com
-Status:   Open
+Status:   Feedback
 Bug Type: Apache2 related
 Operating System: Linux (Redhat EL 3 i386)
 PHP Version:  4.4.1
 New Comment:

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




Previous Comments:


[2005-11-03 17:16:34] jeff dot potter at hp dot com

php4-STABLE-latest (php4-STABLE-200511031356) still appears to have the
same symptoms as php-4.4.1

[Thu Nov 03 09:41:35 2005] [notice] child pid 4209 exit signal
Segmentation fault (11)
[Thu Nov 03 09:41:37 2005] [notice] child pid 4264 exit signal
Segmentation fault (11)



[2005-11-03 09:10:15] [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



[2005-11-03 00:29:49] jeff dot potter at hp dot com

Description:

Just compiled and integrated PHP v4.4.1, and I get an immediate
Segmentation fault on my first virtual() call. Same code works fine in
PHP 4.3.11  PHP 4.4.0.

Configure script:

./configure $php_dbg_flag --prefix=/opt/hp/hpsmh/php
--with-apxs2=/opt/hp/hpsmh/sbin/apxs \
--with-dom=/opt/hp/hpsmh  --with-zlib --enable-bcmath --enable-calendar
--enable-wddx --enable-ftp
make
make install

Platform:

RedHat Enterprise Linux Advanced Server 3 Update 2
Apache 2.0.48 with security patches


Reproduce code:
---
Just call virtual(some_uri).

Expected result:

My page rendered on the screen.

Actual result:
--
It looks like the rr-main structure in PHP_FUNCTION(virtual)is all
zeros. 

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread -1469858896 (LWP 13252)]
ap_rflush (r=0x82ef088) at protocol.c:1561
1561bb = apr_brigade_create(r-pool, c-bucket_alloc);

(gdb) bt
#0  ap_rflush (r=0x82ef088) at protocol.c:1561
#1  0xb71eba7f in zif_virtual (ht=1, return_value=0x839d264,
this_ptr=0x0, return_value_used=0, tsrm_ls=0x8363dd8)
at
/usr/src/redhat/BUILD/cleansweep-2.1.14-10139/php-4.4.1/sapi/apache2handler/php_functions.c:101
#2  0xb71e2b59 in execute (op_array=0x83987b4, tsrm_ls=0x8363dd8)
at
/usr/src/redhat/BUILD/cleansweep-2.1.14-10139/php-4.4.1/Zend/zend_execute.c:1675
#3  0xb71cea6c in zend_execute_scripts (type=8, tsrm_ls=0x8363dd8,
retval=0x0, file_count=3)
at
/usr/src/redhat/BUILD/cleansweep-2.1.14-10139/php-4.4.1/Zend/zend.c:938
#4  0xb71a5d3e in php_execute_script (primary_file=0xa863b830,
tsrm_ls=0x8363dd8)
at
/usr/src/redhat/BUILD/cleansweep-2.1.14-10139/php-4.4.1/main/main.c:1743
#5  0xb71eb3ce in php_handler (r=0x82b8e50)
at
/usr/src/redhat/BUILD/cleansweep-2.1.14-10139/php-4.4.1/sapi/apache2handler/sapi_apache2.c:572
#6  0x080a5b1e in ap_run_handler (r=0x82b8e50) at config.c:151
#7  0x080a6039 in ap_invoke_handler (r=0x82b8e50) at config.c:358
#8  0x080a1d8f in ap_process_request (r=0x82b8e50) at
http_request.c:246
#9  0x0809dd04 in ap_process_http_connection (c=0x82abf18) at
http_core.c:250
#10 0x080adeca in ap_run_process_connection (c=0x82abf18) at
connection.c:42
#11 0x080a2d3f in process_socket (p=0x82abdf0, sock=0x82abe28,
my_child_num=0, my_thread_num=22,
bucket_alloc=0x82addf8) at worker.c:520
#12 0x080a3332 in worker_thread (thd=0x81dbac8, dummy=0x82a5040) at
worker.c:834
#13 0xb747551c in dummy_worker (opaque=0x81dbac8) at thread.c:88
#14 0xb744adec in start_thread () from /lib/tls/libpthread.so.0
#15 0xb7370e8a in clone () from /lib/tls/libc.so.6
(gdb)


Frame #0 Code

#0  ap_rflush (r=0x82ef088) at protocol.c:1561
1561bb = apr_brigade_create(r-pool, c-bucket_alloc);

(gdb) print bb
$1 = (apr_bucket_brigade *) 0x839d264
(gdb) print *bb
$2 = {p = 0x0, list = {next = 0x0, prev = 0x1}, bucket_alloc =
0x0}

gdb) print c-bucket_alloc
Cannot access memory at address 0x50
(gdb) print *c-bucket_alloc
Cannot access memory at address 0x50
(gdb) print c-bucket_alloc
$3 = (struct apr_bucket_alloc_t **) 0x50

(gdb) print r-pool
$4 = (apr_pool_t *) 0x0
(gdb) print *r-pool
$5 = {parent = 0x82ef088, child = 0x6b637562, sibling = 0x2f737465, ref
= 0x92e7887, cleanups = 0x758,
  allocator = 0x31, subprocesses = 0x0, abort_fn = 0, user_data = 0x0,
tag = 0x0, active = 0x0, self = 0x0,
  self_first_avail = 0x0}
(gdb) print r-pool
$6 = (apr_pool_t **) 0x82ef088


1555AP_DECLARE(int) ap_rflush(request_rec *r)
1556{
1557conn_rec *c = r-connection;
1558apr_bucket_brigade *bb;
1559apr_bucket *b;
1560
1561bb = apr_brigade_create(r-pool, c-bucket_alloc);
1562b = apr_bucket_flush_create(c-bucket_alloc);
1563

#32741 [Opn-Asn]: hang on ociexecute() with collections (only with 10g, works with 9i)

2005-11-03 Thread sniper
 ID:   32741
 Updated by:   [EMAIL PROTECTED]
 Reported By:  fsurleau at skyservices dot net
-Status:   Open
+Status:   Assigned
 Bug Type: OCI8 related
 Operating System: linux
 PHP Version:  4.3.11
 Assigned To:  tony2001
 New Comment:

Tony, you propably can tell if that extension in PECL works with PHP 4?


Previous Comments:


[2005-11-03 13:04:50] fsurleau at skyservices dot net

OCI8 v.1.1 is a PHP 5 release.

The bug still exists in PHP 4.4.1



[2005-09-08 11:45:29] [EMAIL PROTECTED]

The bug has been fixed in OCI8 v.1.1, which is available in CVS HEAD
and PECL (use `pear install oci8-beta` to install it).



[2005-04-19 15:27:15] fsurleau at skyservices dot net

gdb ./httpd
GNU gdb Red Hat Linux (5.3.90-0.20030710.41.2.1rh)
Copyright 2003 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and
you are
welcome to change it and/or distribute copies of it under certain
conditions.
Type show copying to see the conditions.
There is absolutely no warranty for GDB.  Type show warranty for
details.
This GDB was configured as i386-redhat-linux...Using host
libthread_db library /lib/libthread_db.so.1.

(gdb) run -X
Starting program: /usr/local/apache2/bin/httpd -X
kgepop: no error frame to pop to for error 21522
OCI-21522: attempted to use an invalid connection in OCI (object mode
only)
Errors in file :
OCI-21522: attempted to use an invalid connection in OCI (object mode
only)


- Call Stack Trace -
Cannot open /proc/2679/exe.
calling  call entryargument values in
hex
location type point(? means dubious
value)
  


Program received signal SIGSEGV, Segmentation fault.
0x40e65940 in slrac () from /usr/local/oracle10g/lib/libclntsh.so.10.1
(gdb) bt
#0  0x40e65940 in slrac () from
/usr/local/oracle10g/lib/libclntsh.so.10.1
#1  0x40eb8a13 in kgdsaaddr () from
/usr/local/oracle10g/lib/libclntsh.so.10.1
#2  0x40eb848e in kgdsdst () from
/usr/local/oracle10g/lib/libclntsh.so.10.1
#3  0x40a4e80c in skgudmp () from
/usr/local/oracle10g/lib/libclntsh.so.10.1
#4  0x40e9a69e in kgepop () from
/usr/local/oracle10g/lib/libclntsh.so.10.1
#5  0x40e9ae1a in kgesev () from
/usr/local/oracle10g/lib/libclntsh.so.10.1
#6  0x40e9ac1f in kgesec0 () from
/usr/local/oracle10g/lib/libclntsh.so.10.1
#7  0x40d327c8 in kodogr2lt () from
/usr/local/oracle10g/lib/libclntsh.so.10.1
#8  0x40cbd020 in kosindcv () from
/usr/local/oracle10g/lib/libclntsh.so.10.1
#9  0x40cbca9a in kosiend () from
/usr/local/oracle10g/lib/libclntsh.so.10.1
#10 0x40cbde4d in kpctor () from
/usr/local/oracle10g/lib/libclntsh.so.10.1
#11 0x40cd3332 in ttca2p () from
/usr/local/oracle10g/lib/libclntsh.so.10.1
#12 0x40ca05b4 in ttcacr () from
/usr/local/oracle10g/lib/libclntsh.so.10.1
#13 0x40ca1487 in ttcdrv () from
/usr/local/oracle10g/lib/libclntsh.so.10.1
#14 0x40b4312d in nioqwa () from
/usr/local/oracle10g/lib/libclntsh.so.10.1
#15 0x409b4d56 in upirtrc () from
/usr/local/oracle10g/lib/libclntsh.so.10.1
#16 0x4094ba0d in kpurcsc () from
/usr/local/oracle10g/lib/libclntsh.so.10.1
#17 0x409081b8 in kpuexecv8 () from
/usr/local/oracle10g/lib/libclntsh.so.10.1
#18 0x4090a084 in kpuexec () from
/usr/local/oracle10g/lib/libclntsh.so.10.1
#19 0x4097e85e in OCIStmtExecute () from
/usr/local/oracle10g/lib/libclntsh.so.10.1
#20 0x403afb84 in oci_execute (statement=0x820369c, func=0x404aaff6
OCIExecute, mode=32) at
/home/install/php-4.3.11/ext/oci8/oci8.c:1483
#21 0x403b629f in zif_ociexecute (ht=1, return_value=0x8208fbc,
this_ptr=0x0, return_value_used=0) at
/home/install/php-4.3.11/ext/oci8/oci8.c:4017
#22 0x4048f71f in execute (op_array=0x81e63c4) at
/home/install/php-4.3.11/Zend/zend_execute.c:1654
#23 0x4047ce66 in zend_execute_scripts (type=8, retval=0x0,
file_count=3) at /home/install/php-4.3.11/Zend/zend.c:926
#24 0x4044ae84 in php_execute_script (primary_file=0xbffeb9c0) at
/home/install/php-4.3.11/main/main.c:1745
#25 0x4049538f in php_handler (r=0x81da8d8) at
/home/install/php-4.3.11/sapi/apache2handler/sapi_apache2.c:560
#26 0x08087646 in ap_run_handler (r=0x81da8d8) at config.c:152
#27 0x08087b61 in ap_invoke_handler (r=0x81da8d8) at config.c:364
#28 0x08071365 in ap_process_request (r=0x81da8d8) at
http_request.c:249
#29 0x0806d358 in ap_process_http_connection (c=0x81d44b0) at
http_core.c:251
#30 0x080907e2 in ap_run_process_connection (c=0x81d44b0) at
connection.c:43
#31 0x080862ad in child_main (child_num_arg=0) at prefork.c:610
#32 0x08086360 in make_child (s=0x80c73a0, slot=0) at prefork.c:650
#33 0x0808644a in startup_children (number_to_start=5) at
prefork.c:722
#34 0x08086750 in ap_mpm_run 

#35086 [Opn-Fbk]: socket_read does not return empty string after receiving '\n'

2005-11-03 Thread sniper
 ID:   35086
 Updated by:   [EMAIL PROTECTED]
 Reported By:  jelte dot werkhoven at cruisetravel dot nl
-Status:   Open
+Status:   Feedback
 Bug Type: Sockets related
 Operating System: GNU/Linux (SuSE 10.0)
 PHP Version:  4.4.1
 New Comment:

Try 'var_dump($out);' before those 'if' clauses.



Previous Comments:


[2005-11-03 14:41:00] jelte dot werkhoven at cruisetravel dot nl

Description:

This seems to be a replica of bug #21880, but I can replicate it each
time. I've got a proxy daemon written in C that terminates data with a
line break (linux '\n'). As I understand it, this should cause
socket_read to return an empty string, if called with the
PHP_NORMAL_READ flag. However, it doesn't and just hangs. BTW, version
is PHP 4.4.0 CLI. Connecting to said proxy daemon with either netcat or
telnet works as expected.

Reproduce code:
---
/* Get the port for the WWW service. */
$service_port = 8001;

/* Get the IP address for the target host. */
$address = gethostbyname('localhost');

/* Create a TCP/IP socket. */
$socket = socket_create(AF_INET, SOCK_STREAM, SOL_TCP);
if ($socket  0) {
   echo socket_create() failed: reason:  . socket_strerror($socket) .
\n;
} else {
   echo OK got socket.\n;
}

echo Attempting to connect to '$address' on port '$service_port'...;

$result = @socket_connect($socket, $address, $service_port);

if (!$result) {
   die(socket_connect() failed.\nReason:  .
socket_strerror(socket_last_error()) . \n);
} else {
   echo OK got connection.\n;
}

$in = REQ\n;

$out = '';

socket_write($socket, $in, strlen($in));
echo OK wrote connection string '$in'.\n;

echo Reading daemon response:\n;
while( $out = socket_read($socket, 2048, PHP_NORMAL_READ) ) {
//if( strncmp( $out, 'ACK', 3 ) == 0 ) break;   
if( $out === false ) echo FALSE!;
if( $out == '' ) echo ZILCH!;
}



Expected result:

Commented out strncmp line is workaround, without it, it never breaks
out of the while loop which I think it should. I figure it should echo
either ZILCH on receiving '\n' which is prepended to the ACK reply of
the daemon, or FALSE as the daemon disconnects after sending the ACK
string.
If I use it with the workaround I can actually see that the line
terminator is sent because PHP echo's it when I echo the $out string.



Actual result:
--
OK got socket.
Attempting to connect to '127.0.0.1' on port '8001'...OK got
connection.
OK wrote connection string 'REQ
'.
Reading daemon response:


And it hangs indefinately.





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


#34542 [Opn-Fbk]: register_long_arrays causes $_SESSIONS vars to disappear

2005-11-03 Thread sniper
 ID:   34542
 Updated by:   [EMAIL PROTECTED]
 Reported By:  marcus dot uy at virtualthinking dot com
-Status:   Open
+Status:   Feedback
 Bug Type: Session related
 Operating System: WinXP Pro
 PHP Version:  5.1.0RC1
 New Comment:

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

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

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




Previous Comments:


[2005-11-03 16:47:25] marcus dot uy at virtualthinking dot com

Hi, I think somebody else has a related problem with a workable test
case.



[2005-11-03 09:36:44] marcus at synchromedia dot co dot uk

I think I'm seeing this same bug in 5.1.0RC4. I'm not 
getting exactly the same symptom, but it's close. I'm 
finding that session files are created no problem, but when 
I change values in $_SESSION, the changes are not saved, 
even if I use session_write_close(). I've set up a small 
test case that is storing and changing exactly what I'm 
doing in my project and it doesn't happen, so I don't think 
it's a problem with the contents of the session. I also 
wrote a test that stuffed 5000 strings into $_SESSION and 
that worked ok too.
Like the original bug report, it all works fine if I leave 
register_long_arrays turned on, even though I'm not using 
them anywhere in my code, or in libraries that I'm using.
What I would like to do is do a trace with xdebug and look 
at everything that involves sessions, but I can't at present 
because xdebug-cvs won't run under 5.1.0RC4.



[2005-09-19 13:47: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 ?php and ends with ?,
is max. 10-20 lines long and does not require any external 
resources such as databases, etc.

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





[2005-09-19 12:38:07] marcus dot uy at virtualthinking dot com

Hi just tried it with the CVS versions to popinted me to.  No dice.

Same problem.  After the session is created as a zero-length file and
updating $_SESSION in the script does nothing to change this.

The values are accessible during the first run, and when re-read on
subsequent runs, understandably return an empty $_SESSION array.

FYI, my application is split into a public http system and a private
https system.  The session sticks in the http session, but as noted
earlier, the number of session values used is significantly less than
after a user has logged in the https session.

I allow the script to generate a new SID for the https session as I do
not need to pass over the values, and it is here that the values do not
stick.

Both the http and https sites share an *indentical* code base so it's
not a program error.

Erm, to be honest the code I posted is cut down to allow for it to be a
reasonable length.  It incorporates the essentials of the problem, but
perhaps not the full environment.

It still needs the register_long_arrays to be on before it will work.



[2005-09-18 22:07:55] [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

I can't reproduce this on either Linux or Windows.
(using sessions with cookies, of course, passing session ids in the URL
is not wise)




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

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


#35081 [Opn-Asn]: using the example for .NET causes a com_exeption

2005-11-03 Thread sniper
 ID:   35081
 Updated by:   [EMAIL PROTECTED]
 Reported By:  mcyra at chello dot at
-Status:   Open
+Status:   Assigned
 Bug Type: COM related
 Operating System: WinXP
 PHP Version:  5.0.5
-Assigned To:  
+Assigned To:  wez
 New Comment:

Assigned to the maintainer of COM extension.


Previous Comments:


[2005-11-03 18:13:18] mcyra at chello dot at

I have checked with the given link, result was:

Fatal error: Uncaught exception 'com_exception' with message 'Failed to
instantiate .Net object [CreateInstance] [0x80070057] Falscher
Parameter.' in D:\NET\test.php:2
Stack trace:
#0 D:\NET\test.php(2): dotnet-dotnet('mscorlib', 'System.Co
llecti...')
#1 {main}
  thrown in D:\NET\test.php on line 2



[2005-11-03 15:47:59] [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





[2005-11-03 08:03:25] mcyra at chello dot at

Description:

A sample script from documentation causes this error.
German version of WinXP.
Microsoft .NET Framework 1.1.
Microsoft .NET Framework 1.1 German Language Pack.
PHP 5.0.5 (cli) (build: Sep 5 2005 15:54:44)
Zend Engine v2.0.5

Reproduce code:
---
?php
  $stack = new DOTNET(mscorlib, System.Collections.Stack);

  $stack-Push(.Net);
  $stack-Push(Hello );

  echo $stack-Pop() . $stack-Pop();
?

Actual result:
--
Fatal error: Uncaught exception 'com_exception' with message 'Failed to
instantiate .Net object [CreateInstance] [0x80070057] Falscher
Parameter.' in D:\NET\test.php:2
Stack trace: 
#0 D:\NET\test.php(2): dotnet-dotnet('mscorlib',
'System.Collecti...')
#1 {main}
  thrown in D:\NET\test.php on line 2





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


#30760 [Asn-Opn]: php hangs when extension does not exist

2005-11-03 Thread sniper
 ID:   30760
 Updated by:   [EMAIL PROTECTED]
 Reported By:  Claus-Werner dot Lermen at zf dot com
-Status:   Assigned
+Status:   Open
 Bug Type: IIS related
 Operating System: Windows 2000/2003
 PHP Version:  5CVS, 4CVS (2005-04-30)
 Assigned To:  zeev


Previous Comments:


[2005-10-06 14:43:52] dolecek at stringdata dot cz

Pretty please make that MessageBox display go away completely, or
optional on startup. I've just spend several unproductive hours
debugging the very same problem with PHP CGI process hanging. If it's
not an interactive program, do not interact with desktop, damn it!



[2005-09-02 00:39:57] [EMAIL PROTECTED]

Zeev, looks like you made E_CORE_WARNINGS to cause these messageboxes
to popup whatever you have set your error_reporting, display_errors,
etc. to..




[2005-03-17 10:55:02] Claus-Werner dot Lermen at zf dot com

display_startup_error = off
but the behaviour is the same no matter what the value of this variable
is!



[2005-03-16 01:30:47] [EMAIL PROTECTED]

Do you have display_startup_errors ini option on?




[2005-02-11 11:59:40] Claus-Werner dot Lermen at zf dot com

the latest snapshot does not solve the problem: php stills hangs when
an extension cannot be loaded.
When php.exe is called from the commandline the messagebox still pops
up, even when I disable the E_CORE_WARNING.
php is normally running in the background, therefore a messagebox
should never be used - any message should be written to a logfile!



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

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


#30760 [Opn-Asn]: php hangs when extension does not exist

2005-11-03 Thread sniper
 ID:   30760
 Updated by:   [EMAIL PROTECTED]
 Reported By:  Claus-Werner dot Lermen at zf dot com
-Status:   Open
+Status:   Assigned
 Bug Type: IIS related
 Operating System: Windows 2000/2003
 PHP Version:  5CVS, 4CVS (2005-04-30)
-Assigned To:  zeev
+Assigned To:  dmitry
 New Comment:

Dmitry, can you check this out? (Zeev seems to have vanished)


Previous Comments:


[2005-10-06 14:43:52] dolecek at stringdata dot cz

Pretty please make that MessageBox display go away completely, or
optional on startup. I've just spend several unproductive hours
debugging the very same problem with PHP CGI process hanging. If it's
not an interactive program, do not interact with desktop, damn it!



[2005-09-02 00:39:57] [EMAIL PROTECTED]

Zeev, looks like you made E_CORE_WARNINGS to cause these messageboxes
to popup whatever you have set your error_reporting, display_errors,
etc. to..




[2005-03-17 10:55:02] Claus-Werner dot Lermen at zf dot com

display_startup_error = off
but the behaviour is the same no matter what the value of this variable
is!



[2005-03-16 01:30:47] [EMAIL PROTECTED]

Do you have display_startup_errors ini option on?




[2005-02-11 11:59:40] Claus-Werner dot Lermen at zf dot com

the latest snapshot does not solve the problem: php stills hangs when
an extension cannot be loaded.
When php.exe is called from the commandline the messagebox still pops
up, even when I disable the E_CORE_WARNING.
php is normally running in the background, therefore a messagebox
should never be used - any message should be written to a logfile!



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

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


#32220 [Asn-Opn]: [PATCH] thread_resources for thread not getting freed when apache kills thread

2005-11-03 Thread sniper
 ID:   32220
 Updated by:   [EMAIL PROTECTED]
 Reported By:  kameshj at fastmail dot fm
-Status:   Assigned
+Status:   Open
 Bug Type: Apache2 related
 Operating System: *
 PHP Version:  5CVS, 4CVS (2005-03-25)
 Assigned To:  zeev


Previous Comments:


[2005-03-25 02:05:13] [EMAIL PROTECTED]

Zeev, here's another thread issue, can you take a look in the patch?




[2005-03-25 02:04:47] [EMAIL PROTECTED]

Assuming this is not fixed in latest HEAD, PHP_5_0 or PHP_4_3 CVS
branches.




[2005-03-07 15:06:48] kameshj at fastmail dot fm

Description:

Run apache2 in a worker thread model with the following settings
StartThreads 3
MaxSpareThreads 4
MaxThreads 10
Loadtests on a very simple php scripts like the one that calls
phpinfo() at regular intervals of 5 minutes causes a memory leak(Not
really a leak but huge unused memory that gets freed at tsrm_shutdown)

This causes the memory consumed by the apache2 procsss to shoot up.

---Investigation
Apache2 to handle the concurrent requests increases the number of child
threads to max of MaxThreads when no more request to server it kills the
threads till the number of threads comes to MaxSpareThreads.

In the case of setting given above after the load test of 10
simultaneous requests,
Apache kills 6 threads (As MaxThreads-MaxSpareThreads = 10-4 = 6).
The thread_resources momory associated with these 6 threads still not
freed as soon as the corresponding thread is killed.
These kind of spurt loads at regular intervals causes lots of such
thread_resources memory to get accumulated not being used for any real
purpose.

Only when the sapi module comes down it calls tsrm_shutdown then these
thread_resources are getting freed.

Attaching the patch to fix the issue is available at
http://puggy.symonds.net/~kameshj/TSRM.c.patch

This patch has a few clean up to existing ts_free_thread.
This patch registers ts_free_thread as thread cleanup routine.

Reproduce code:
---
Run apache2 in a worker thread model with the following settings
StartThreads 3
MaxSpareThreads 4
MaxThreads 10

write a simple test.php
?php
phpinfo();
?
Run a load test with ab 
ab -n 40 -c 10
Wait for 5 minutes
ab -n 40 -c 10
Wait for 5 minutes
ab -n 40 -c 10
Wait for 5 minutes
ab -n 40 -c 10


Expected result:

In the case of setting given above after the load test of 10
simultaneous requests,
Apache kills 6 threads (As MaxThreads-MaxSpareThreads = 10-4 = 6).
The thread_resources momory associated with these 6 threads still not
freed as soon as the corresponding thread is killed.
These kind of spurt loads at regular intervals causes lots of such
thread_resources memory to get accumulated not being used for any real
purpose.

Only when the sapi module comes down it calls tsrm_shutdown then these
thread_resources are getting freed.


Actual result:
--
thread_resources of a thread that gets killed should get freed as soon
as it dies rather than waiting till the tsrm_shutdown





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


#32220 [Opn-Asn]: [PATCH] thread_resources for thread not getting freed when apache kills thread

2005-11-03 Thread sniper
 ID:   32220
 Updated by:   [EMAIL PROTECTED]
 Reported By:  kameshj at fastmail dot fm
-Status:   Open
+Status:   Assigned
 Bug Type: Apache2 related
 Operating System: *
 PHP Version:  5CVS, 4CVS (2005-03-25)
-Assigned To:  zeev
+Assigned To:  dmitry
 New Comment:

Dmitry, can you check this out?


Previous Comments:


[2005-03-25 02:05:13] [EMAIL PROTECTED]

Zeev, here's another thread issue, can you take a look in the patch?




[2005-03-25 02:04:47] [EMAIL PROTECTED]

Assuming this is not fixed in latest HEAD, PHP_5_0 or PHP_4_3 CVS
branches.




[2005-03-07 15:06:48] kameshj at fastmail dot fm

Description:

Run apache2 in a worker thread model with the following settings
StartThreads 3
MaxSpareThreads 4
MaxThreads 10
Loadtests on a very simple php scripts like the one that calls
phpinfo() at regular intervals of 5 minutes causes a memory leak(Not
really a leak but huge unused memory that gets freed at tsrm_shutdown)

This causes the memory consumed by the apache2 procsss to shoot up.

---Investigation
Apache2 to handle the concurrent requests increases the number of child
threads to max of MaxThreads when no more request to server it kills the
threads till the number of threads comes to MaxSpareThreads.

In the case of setting given above after the load test of 10
simultaneous requests,
Apache kills 6 threads (As MaxThreads-MaxSpareThreads = 10-4 = 6).
The thread_resources momory associated with these 6 threads still not
freed as soon as the corresponding thread is killed.
These kind of spurt loads at regular intervals causes lots of such
thread_resources memory to get accumulated not being used for any real
purpose.

Only when the sapi module comes down it calls tsrm_shutdown then these
thread_resources are getting freed.

Attaching the patch to fix the issue is available at
http://puggy.symonds.net/~kameshj/TSRM.c.patch

This patch has a few clean up to existing ts_free_thread.
This patch registers ts_free_thread as thread cleanup routine.

Reproduce code:
---
Run apache2 in a worker thread model with the following settings
StartThreads 3
MaxSpareThreads 4
MaxThreads 10

write a simple test.php
?php
phpinfo();
?
Run a load test with ab 
ab -n 40 -c 10
Wait for 5 minutes
ab -n 40 -c 10
Wait for 5 minutes
ab -n 40 -c 10
Wait for 5 minutes
ab -n 40 -c 10


Expected result:

In the case of setting given above after the load test of 10
simultaneous requests,
Apache kills 6 threads (As MaxThreads-MaxSpareThreads = 10-4 = 6).
The thread_resources momory associated with these 6 threads still not
freed as soon as the corresponding thread is killed.
These kind of spurt loads at regular intervals causes lots of such
thread_resources memory to get accumulated not being used for any real
purpose.

Only when the sapi module comes down it calls tsrm_shutdown then these
thread_resources are getting freed.


Actual result:
--
thread_resources of a thread that gets killed should get freed as soon
as it dies rather than waiting till the tsrm_shutdown





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


#35073 [Opn-Asn]: dba_open(test.db,n): Driver initialization failed for handler: db4: Invalid argu

2005-11-03 Thread sniper
 ID:   35073
 Updated by:   [EMAIL PROTECTED]
-Summary:  failed to open stream: Illegal seek
 Reported By:  marrtins at hackers dot lv
-Status:   Open
+Status:   Assigned
-Bug Type: Filesystem function related
+Bug Type: DBM/DBA related
 Operating System: Linux libc.2.3.2
 PHP Version:  5CVS-2005-11-03 (snap)
-Assigned To:  
+Assigned To:  helly
 New Comment:

Marcus, any ideas about this?



Previous Comments:


[2005-11-03 22:21:36] marrtins at hackers dot lv

I found that fopen() part was not working by my fault. I was specified
open mode as `c` no `w`.

PHP example: http://paste.php.lv/2797/nonum
Result:
Warning: dba_open(test.db,n): Driver initialization failed for handler:
db4: Invalid argument in /data2/src/php5-200511030730/sapi/cli/test.php
on line 3

using db-4.3.29 (www.sleepycat.com)

I felt back to db-4.2.52 and recompiled now working fine. Is there
problem with db-4.3.29 package?



[2005-11-02 22:38:51] marrtins at hackers dot lv

Description:

As i migrated from php4 (4.3.9) to php5 (5.0.5, 5.0.4) every file
system function (fopen, dba_open, etc) cannot read/write files. Empty
file can be created - but can`t write any byte there.

Not using any loaders or encoders or similar modules.

When recompiled back to 4.3.9 all works fine. The same happens when
compiled as apache module - 4.3.9 works fine, 5.0.5 and 5.0.4 not.

Reproduce code:
---
Example can be found here - http://paste.php.lv/2785

compile script:
export LDFLAGS=-liconv  ./configure
make
make install

Linux libc-2.3.2

gcc -v
Reading specs from /usr/lib/gcc-lib/i486-slackware-linux/3.3.4/specs
Configured with: ../gcc-3.3.4/configure --prefix=/usr --enable-shared
--enable-threads=posix --enable-__cxa_atexit --disable-checking
--with-gnu-ld --verbose --target=i486-slackware-linux
--host=i486-slackware-linux
Thread model: posix
gcc version 3.3.4



Expected result:

Expecting file `haha` to be created with contents `aa`. Also db4
database with some entries.

Actual result:
--
fopen() reports `failed to open stream: Inappropriate ioctl for
device`

dba_open() reports `Driver initialization failed for handler: db4`







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



#34852 [Asn-Opn]: Failure in odbc_exec() using oracle-supplied odbc driver

2005-11-03 Thread sniper
 ID:   34852
 Updated by:   [EMAIL PROTECTED]
 Reported By:  tim dot tassonis at trivadis dot com
-Status:   Assigned
+Status:   Open
 Bug Type: ODBC related
 Operating System: Linux
 PHP Version:  5.0.5
 Assigned To:  kalowsky


Previous Comments:


[2005-10-13 13:54:23] [EMAIL PROTECTED]

Dan, please have a look at it.



[2005-10-13 13:34:40] tim dot tassonis at trivadis dot com

Well, here is a patch. I dont know whether the formatting is preserved
her properly, it should apply cleanly with patch -p1  patchfile from
whithing the php-5.0.5 directory.

The patch just stops odbc_exec and odbc_prepare from failing if the
SQLSetStmtOption fails. The warning is still displayed in the
error_log. It would be great if this could be applied.

So below follows the patch (created with diff -ruN):

diff -ruN php-5.0.5/ext/odbc/php_odbc.c
php-5.0.5-ora/ext/odbc/php_odbc.c
--- php-5.0.5/ext/odbc/php_odbc.c   2005-07-03 00:50:01.0 +0200
+++ php-5.0.5-ora/ext/odbc/php_odbc.c   2005-10-13 12:20:55.0
+0200
@@ -875,9 +875,11 @@
if (SQLSetStmtOption(result-stmt, SQL_CURSOR_TYPE,
SQL_CURSOR_DYNAMIC)
== SQL_ERROR) {
odbc_sql_error(conn, result-stmt,  
SQLSetStmtOption);
+   /* Dont fail, but go on. This can happen 
SQLFreeStmt(result-stmt, SQL_DROP);
efree(result);
RETURN_FALSE;
+   */
}
}
} else {
@@ -1296,9 +1298,11 @@
if (SQLSetStmtOption(result-stmt, SQL_CURSOR_TYPE,
SQL_CURSOR_DYNAMIC)
== SQL_ERROR) {
odbc_sql_error(conn, result-stmt,  
SQLSetStmtOption);
+   /* Dont fail, but go on. This can happen
SQLFreeStmt(result-stmt, SQL_DROP);
efree(result);
RETURN_FALSE;
+   */
}
}
} else {



[2005-10-13 12:30:49] [EMAIL PROTECTED]

I can provide a patch to fix it, if that's appreciated.
Of course it is.



[2005-10-13 12:14:49] tim dot tassonis at trivadis dot com

Description:

When using the oracle-supplied ODBC Driver under Linux, any odbc_exec()
call fails with:
[unixODBC][Driver Manager]Driver does not support this function

The log files is a bit more verbose:
[unixODBC][Driver Manager]Driver does not support this function, SQL
state IM001 in  SQLSetStmtOption

The offending code is in odbc_prepare(line 875) and odbc_exec (line
1276), when the module tries to set SQL_CURSOR_DYNAMIC via
SQLSetStmtOption, which returns an error using the oracle driver.
The error goes away if I undefine HAVE_SQL_EXTENDED_FETCH, so the
statements will not be reached.
Would it be possible to only issue a notice when this command fails and
proceed with processing.
I can provide a patch to fix it, if that's appreciated.


Reproduce code:
---
$dsn=ANY_ORACLE_DSN;
$uid=ANY_VALID_USERID;
$pwd=ANY_VALID_PASSWORD;
$conn = odbc_connect ( $dsn, $uid, $pwd );
/* The connect succeeds */
if (!$conn) {
  printf(Error connecting to $database.br\n);
  return;
}
/* The exec will fail with the decribed error */
$cursor= odbc_exec($conn,SELECT tname from tab);
if (!$cursor) {
  printf(Failure in odbc_exe:br\n);
  printf(%sbr\n,htmlentities(odbc_errormsg($conn)));
  return;
}


Actual result:
--
[unixODBC][Driver Manager]Driver does not support this function, SQL
state IM001 in  SQLSetStmtOption






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


#34852 [Opn-Asn]: Failure in odbc_exec() using oracle-supplied odbc driver

2005-11-03 Thread sniper
 ID:   34852
 Updated by:   [EMAIL PROTECTED]
 Reported By:  tim dot tassonis at trivadis dot com
-Status:   Open
+Status:   Assigned
 Bug Type: ODBC related
 Operating System: Linux
 PHP Version:  5.0.5
-Assigned To:  kalowsky
+Assigned To:  tony2001
 New Comment:

Tony, mr. Kalowsky hasn't had anything to do with PHP for years now.
Just commit the patch. If it breaks something, someone will propably
complain. :)


Previous Comments:


[2005-10-13 13:54:23] [EMAIL PROTECTED]

Dan, please have a look at it.



[2005-10-13 13:34:40] tim dot tassonis at trivadis dot com

Well, here is a patch. I dont know whether the formatting is preserved
her properly, it should apply cleanly with patch -p1  patchfile from
whithing the php-5.0.5 directory.

The patch just stops odbc_exec and odbc_prepare from failing if the
SQLSetStmtOption fails. The warning is still displayed in the
error_log. It would be great if this could be applied.

So below follows the patch (created with diff -ruN):

diff -ruN php-5.0.5/ext/odbc/php_odbc.c
php-5.0.5-ora/ext/odbc/php_odbc.c
--- php-5.0.5/ext/odbc/php_odbc.c   2005-07-03 00:50:01.0 +0200
+++ php-5.0.5-ora/ext/odbc/php_odbc.c   2005-10-13 12:20:55.0
+0200
@@ -875,9 +875,11 @@
if (SQLSetStmtOption(result-stmt, SQL_CURSOR_TYPE,
SQL_CURSOR_DYNAMIC)
== SQL_ERROR) {
odbc_sql_error(conn, result-stmt,  
SQLSetStmtOption);
+   /* Dont fail, but go on. This can happen 
SQLFreeStmt(result-stmt, SQL_DROP);
efree(result);
RETURN_FALSE;
+   */
}
}
} else {
@@ -1296,9 +1298,11 @@
if (SQLSetStmtOption(result-stmt, SQL_CURSOR_TYPE,
SQL_CURSOR_DYNAMIC)
== SQL_ERROR) {
odbc_sql_error(conn, result-stmt,  
SQLSetStmtOption);
+   /* Dont fail, but go on. This can happen
SQLFreeStmt(result-stmt, SQL_DROP);
efree(result);
RETURN_FALSE;
+   */
}
}
} else {



[2005-10-13 12:30:49] [EMAIL PROTECTED]

I can provide a patch to fix it, if that's appreciated.
Of course it is.



[2005-10-13 12:14:49] tim dot tassonis at trivadis dot com

Description:

When using the oracle-supplied ODBC Driver under Linux, any odbc_exec()
call fails with:
[unixODBC][Driver Manager]Driver does not support this function

The log files is a bit more verbose:
[unixODBC][Driver Manager]Driver does not support this function, SQL
state IM001 in  SQLSetStmtOption

The offending code is in odbc_prepare(line 875) and odbc_exec (line
1276), when the module tries to set SQL_CURSOR_DYNAMIC via
SQLSetStmtOption, which returns an error using the oracle driver.
The error goes away if I undefine HAVE_SQL_EXTENDED_FETCH, so the
statements will not be reached.
Would it be possible to only issue a notice when this command fails and
proceed with processing.
I can provide a patch to fix it, if that's appreciated.


Reproduce code:
---
$dsn=ANY_ORACLE_DSN;
$uid=ANY_VALID_USERID;
$pwd=ANY_VALID_PASSWORD;
$conn = odbc_connect ( $dsn, $uid, $pwd );
/* The connect succeeds */
if (!$conn) {
  printf(Error connecting to $database.br\n);
  return;
}
/* The exec will fail with the decribed error */
$cursor= odbc_exec($conn,SELECT tname from tab);
if (!$cursor) {
  printf(Failure in odbc_exe:br\n);
  printf(%sbr\n,htmlentities(odbc_errormsg($conn)));
  return;
}


Actual result:
--
[unixODBC][Driver Manager]Driver does not support this function, SQL
state IM001 in  SQLSetStmtOption






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


#34955 [Asn-Opn]: PEAR install fails

2005-11-03 Thread sniper
 ID:   34955
 Updated by:   [EMAIL PROTECTED]
 Reported By:  squasar at eternalviper dot net
-Status:   Assigned
+Status:   Open
 Bug Type: Compile Failure
 Operating System: Mac OS X 10.4.2/Darwin 8.2.0
 PHP Version:  5.1.0RC3
 Assigned To:  cellog


Previous Comments:


[2005-10-27 13:30:26] squasar at eternalviper dot net

No; PEAR does not install. As far as I can tell, install-pear-
nozlib.phar never runs at all; php parses it and spits out 
800K worth of ? characters.



[2005-10-27 05:29:23] [EMAIL PROTECTED]

I can't reproduce this on gentoo linux.

Does PEAR actually install?



[2005-10-22 11:50:54] [EMAIL PROTECTED]

Greg, check it out please.



[2005-10-22 05:58:17] squasar at eternalviper dot net

Description:

The Installing PEAR environment phase of the make install 
command results in several pages of garbage output and no 
installed PEAR. The error occurs when make attempts to run the 
install-pear-nozlib.phar script.

Reproduce code:
---
$ ./buildconf --force
$ ./configure --prefix=/usr --with-apxs --enable-cli
--disable-short-tags --with-zlib --with-bz2 --enable-ftp --with-iconv
--enable-mbstring --with-mysql=/usr --enable-sockets --enable-debug
--enable-simplexml --with-xsl=/usr --with-curl=/usr --with-curlwrappers
--enable-bcmath --with-gmp=/usr/local --with-gd
--with-freetype-dir=/usr/X11R6 --enable-gd-native-ttf
--with-imap=/usr/local/imap --with-imap-ssl=/usr --with-xmlrpc
--with-xml-dir=/usr --with-expat-dir=/usr --with-iconv-dir=/usr
--with-mysqli=/usr/bin/mysql_config --with-pdo-mysql=/usr
--with-embedded-mysqli --enable-maintainer-zts --enable-zend-multibyte
--enable-memory-limit --with-svn=/usr
$ make -j 3
$ sudo make install

Expected result:

Installing PHP SAPI module:   apache
[activating module `php5' in /etc/httpd/httpd.conf]
cp libs/libphp5.so /usr/libexec/httpd/libphp5.so
chmod 755 /usr/libexec/httpd/libphp5.so
cp /etc/httpd/httpd.conf /etc/httpd/httpd.conf.bak
cp /etc/httpd/httpd.conf.new /etc/httpd/httpd.conf
rm /etc/httpd/httpd.conf.new
Installing PHP CLI binary:/usr/bin/
Installing PHP CLI man page:  /usr/man/man1/
Installing build environment: /usr/lib/php/build/
Installing header files:  /usr/include/php/
Installing helper programs:   /usr/bin/
  program: phpize
  program: php-config
Installing man pages: /usr/man/man1/
  page: phpize.1
  page: php-config.1
Installing PEAR environment:  /usr/lib/php/
Installing PDO headers:  /usr/include/php/ext/pdo/


Actual result:
--
Installing PHP SAPI module:   apache
[activating module `php5' in /etc/httpd/httpd.conf]
cp libs/libphp5.so /usr/libexec/httpd/libphp5.so
chmod 755 /usr/libexec/httpd/libphp5.so
cp /etc/httpd/httpd.conf /etc/httpd/httpd.conf.bak
cp /etc/httpd/httpd.conf.new /etc/httpd/httpd.conf
rm /etc/httpd/httpd.conf.new
Installing PHP CLI binary:/usr/bin/
Installing PHP CLI man page:  /usr/man/man1/
Installing build environment: /usr/lib/php/build/
Installing header files:  /usr/include/php/
Installing helper programs:   /usr/bin/
  program: phpize
  program: php-config
Installing man pages: /usr/man/man1/
  page: phpize.1
  page: php-config.1
Installing PEAR environment:  /usr/lib/php/
???/* this continues for 
exactly 821228 characters total 
*/???Installing PDO 
headers:  /usr/include/php/ext/pdo/






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


#34955 [Opn-Asn]: PEAR install fails

2005-11-03 Thread sniper
 ID:   34955
 Updated by:   [EMAIL PROTECTED]
 Reported By:  squasar at eternalviper dot net
-Status:   Open
+Status:   Assigned
 Bug Type: Compile Failure
 Operating System: Mac OS X 10.4.2/Darwin 8.2.0
 PHP Version:  5.1.0RC3
 Assigned To:  cellog
 New Comment:

Greg, perhaps we should remove PEAR totally from PHP and keep it
separate. This thing has always slowed the releases of PHP
and it should really end by now..



Previous Comments:


[2005-10-27 13:30:26] squasar at eternalviper dot net

No; PEAR does not install. As far as I can tell, install-pear-
nozlib.phar never runs at all; php parses it and spits out 
800K worth of ? characters.



[2005-10-27 05:29:23] [EMAIL PROTECTED]

I can't reproduce this on gentoo linux.

Does PEAR actually install?



[2005-10-22 11:50:54] [EMAIL PROTECTED]

Greg, check it out please.



[2005-10-22 05:58:17] squasar at eternalviper dot net

Description:

The Installing PEAR environment phase of the make install 
command results in several pages of garbage output and no 
installed PEAR. The error occurs when make attempts to run the 
install-pear-nozlib.phar script.

Reproduce code:
---
$ ./buildconf --force
$ ./configure --prefix=/usr --with-apxs --enable-cli
--disable-short-tags --with-zlib --with-bz2 --enable-ftp --with-iconv
--enable-mbstring --with-mysql=/usr --enable-sockets --enable-debug
--enable-simplexml --with-xsl=/usr --with-curl=/usr --with-curlwrappers
--enable-bcmath --with-gmp=/usr/local --with-gd
--with-freetype-dir=/usr/X11R6 --enable-gd-native-ttf
--with-imap=/usr/local/imap --with-imap-ssl=/usr --with-xmlrpc
--with-xml-dir=/usr --with-expat-dir=/usr --with-iconv-dir=/usr
--with-mysqli=/usr/bin/mysql_config --with-pdo-mysql=/usr
--with-embedded-mysqli --enable-maintainer-zts --enable-zend-multibyte
--enable-memory-limit --with-svn=/usr
$ make -j 3
$ sudo make install

Expected result:

Installing PHP SAPI module:   apache
[activating module `php5' in /etc/httpd/httpd.conf]
cp libs/libphp5.so /usr/libexec/httpd/libphp5.so
chmod 755 /usr/libexec/httpd/libphp5.so
cp /etc/httpd/httpd.conf /etc/httpd/httpd.conf.bak
cp /etc/httpd/httpd.conf.new /etc/httpd/httpd.conf
rm /etc/httpd/httpd.conf.new
Installing PHP CLI binary:/usr/bin/
Installing PHP CLI man page:  /usr/man/man1/
Installing build environment: /usr/lib/php/build/
Installing header files:  /usr/include/php/
Installing helper programs:   /usr/bin/
  program: phpize
  program: php-config
Installing man pages: /usr/man/man1/
  page: phpize.1
  page: php-config.1
Installing PEAR environment:  /usr/lib/php/
Installing PDO headers:  /usr/include/php/ext/pdo/


Actual result:
--
Installing PHP SAPI module:   apache
[activating module `php5' in /etc/httpd/httpd.conf]
cp libs/libphp5.so /usr/libexec/httpd/libphp5.so
chmod 755 /usr/libexec/httpd/libphp5.so
cp /etc/httpd/httpd.conf /etc/httpd/httpd.conf.bak
cp /etc/httpd/httpd.conf.new /etc/httpd/httpd.conf
rm /etc/httpd/httpd.conf.new
Installing PHP CLI binary:/usr/bin/
Installing PHP CLI man page:  /usr/man/man1/
Installing build environment: /usr/lib/php/build/
Installing header files:  /usr/include/php/
Installing helper programs:   /usr/bin/
  program: phpize
  program: php-config
Installing man pages: /usr/man/man1/
  page: phpize.1
  page: php-config.1
Installing PEAR environment:  /usr/lib/php/
???/* this continues for 
exactly 821228 characters total 
*/???Installing PDO 
headers:  /usr/include/php/ext/pdo/






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


#35088 [Opn-Asn]: apache module core dumps when DOM method loadXML is called

2005-11-03 Thread sniper
 ID:   35088
 Updated by:   [EMAIL PROTECTED]
 Reported By:  cole at ccdc dot cam dot ac dot uk
-Status:   Open
+Status:   Assigned
 Bug Type: DOM XML related
 Operating System: IRIX 6.5.18m
 PHP Version:  5.0.5
-Assigned To:  
+Assigned To:  helly
 New Comment:

Marcus, can you check that compile failure (found in ext/spl) mentioned
above?


Previous Comments:


[2005-11-03 22:38:10] cole at ccdc dot cam dot ac dot uk

I tried compiling the php-latest build with mips-pro but got a compiler
error:

  ^

cc-1028 cc: ERROR File =
/local/cole/php5-200511031930/ext/spl/php_spl.c, Line = 452
  The expression used must have a constant value.

autoload_func_info spl_alfi = {spl_func_ptr,
NULL, NULL};
   ^

1 error detected in the compilation of
/local/cole/php5-200511031930/ext/spl/php_spl.c.


I will try with gcc 3.3



[2005-11-03 21:42:54] [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





[2005-11-03 17:38:22] cole at ccdc dot cam dot ac dot uk

Some more relevant info that I forgot in the initial report - the link
stage of make reported many duplicate symbols in building the apache
library. Most were dom module related. I suspect this is the root
cause, but fixing the issue is not obvious?



[2005-11-03 17:34:04] cole at ccdc dot cam dot ac dot uk

Description:

php child process core dumps while trying to execute
DOMDocument-loadXML() from within apache2

 

 

Reproduce code:
---
$doc = new DOMDocument();
$doc-formatOutput = true;
$doc-preserveWhiteSpace = false;

// Calling loadXML here causes the core dump
$doc-loadXML( hello/hello);




Expected result:

Not to core dump!

Actual result:
--
It crashes.

Other possibly relevant things: The compilation of php and apache used
the native mips-pro compiler (rather than gcc).

Here's some data about the system, and the php shared object

We configured with 

./configure --with-apxs2=/local/cole/apache2/bin/apxs
--prefix=/local/cole/php-5.0.5

From the server log
[Thu Nov 03 16:16:08 2005] [notice] child pid 1749448 exit signal
Segmentation fault (11), possible coredump in
/home/cole/not-backed-up/relibase_clean_build/relibase_irix_build/relibase

From ldd:

ldd libphp5.so
libm.so  =  /usr/lib32/libm.so 
libz.so  =  /usr/lib32/libz.so 
libxml2.so.3 = /usr/lib32/internal/libxml2.so.3  

libc.so.1  =/usr/lib32/libc.so.1 







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


#32806 [Asn-Fbk]: fgets() function is slow

2005-11-03 Thread sniper
 ID:   32806
 Updated by:   [EMAIL PROTECTED]
 Reported By:  peoned at yahoo dot com
-Status:   Assigned
+Status:   Feedback
 Bug Type: Performance problem
 Operating System: Linux
 PHP Version:  5.0.4
 Assigned To:  wez
 New Comment:

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




Previous Comments:


[2005-05-04 23:24:07] peoned at yahoo dot com

without fwrite() it is significantly faster, gives about 5-6 seconds.
But in Perl without print OUT $_; it gives around 1-2 seconds. So it is
still slower in PHP because of fgets().



[2005-05-02 14:25:11] [EMAIL PROTECTED]

Can you try your tests with the fwrite() line commented out?



[2005-04-28 07:30:31] peoned at yahoo dot com

I did an 
`echo strlen($line).,;` 
Here are the lengths for some of the first few lines:
42,7,18,11,71,13,8,7,42,7,20,11,73,70,68,63,13,8,7

It looks pretty much like this for the rest of the file. Lines between
1 and 100 chars in length.

Note: It isn't the start up cost for sure because I measured the time
just around the while loop with the same results.



[2005-04-28 04:37:03] [EMAIL PROTECTED]

How long are the lines in your file?



[2005-04-28 01:58:55] [EMAIL PROTECTED]

Startup costs could be 8 seconds or more depending on the extensions
you are loading. That said PHP's fgets() is still slower then Perl's
because of it's implementation that does not wrap the C library fgets()
or getline(), but rather uses custom code.



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

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


<    8   9   10   11   12   13   14   15   16   17   >