#44889 [NEW]: T_OPEN_TAG doesn't match ?php without any trailing characters

2008-05-02 Thread mikec at resnet dot net dot nz
From: mikec at resnet dot net dot nz
Operating system: Linux and Win32
PHP version:  5.3CVS-2008-05-02 (snap)
PHP Bug Type: Scripting Engine problem
Bug description:  T_OPEN_TAG doesn't match ?php without any trailing characters

Description:

First noticed when including a file containing only ?php, without a
trailing new line character. I expected this would output nothing, but
instead it outputted ?php to the browser.

This only occurs with 'short_open_tag' set to 'off', when set to 'on'
including the same file outputs nothing, as expected.

The tokenizer expects a character after the long open tag, I suggest that
this be extended to check for the end of the input too.


Reproduce code:
---
var_dump(ini_get('short_open_tag'));
print_r(token_get_all('?php'));
print_r(token_get_all('?'));

Expected result:

string(0) 
Array
(
[0] = Array
(
[0] = 368
[1] = ?php
[2] = 1
)

)
Array
(
[0] = Array
(
[0] = 311
[1] = ?
[2] = 1
)

)

Actual result:
--
string(0) 
Array
(
[0] = Array
(
[0] = 311
[1] = ?
[2] = 1
)

[1] = Array
(
[0] = 311
[1] = php
[2] = 1
)

)
Array
(
[0] = Array
(
[0] = 311
[1] = ?
[2] = 1
)

)

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



#44889 [Opn]: T_OPEN_TAG doesn't match ?php without any trailing characters

2008-05-02 Thread mikec at resnet dot net dot nz
 ID:   44889
 User updated by:  mikec at resnet dot net dot nz
 Reported By:  mikec at resnet dot net dot nz
 Status:   Open
 Bug Type: Scripting Engine problem
 Operating System: Linux and Win32
 PHP Version:  5.3CVS-2008-05-02 (snap)
 New Comment:

First Seen On:
  PHP Version 5.2.5 on Fedora Core 6

Reproduced on (and actual/expected results from):
  PHP 5.3.0-dev (cli) (built: May  2 2008 00:17:56)
  Copyright (c) 1997-2008 The PHP Group
  Zend Engine v2.3.0, Copyright (c) 1998-2008 Zend Technologies

  From snaps: php5.3-win32-200805020430.zip
  Running on Windows Vista 32bit


Previous Comments:


[2008-05-02 07:18:30] mikec at resnet dot net dot nz

Description:

First noticed when including a file containing only ?php, without a
trailing new line character. I expected this would output nothing, but
instead it outputted ?php to the browser.

This only occurs with 'short_open_tag' set to 'off', when set to 'on'
including the same file outputs nothing, as expected.

The tokenizer expects a character after the long open tag, I suggest
that this be extended to check for the end of the input too.


Reproduce code:
---
var_dump(ini_get('short_open_tag'));
print_r(token_get_all('?php'));
print_r(token_get_all('?'));

Expected result:

string(0) 
Array
(
[0] = Array
(
[0] = 368
[1] = ?php
[2] = 1
)

)
Array
(
[0] = Array
(
[0] = 311
[1] = ?
[2] = 1
)

)

Actual result:
--
string(0) 
Array
(
[0] = Array
(
[0] = 311
[1] = ?
[2] = 1
)

[1] = Array
(
[0] = 311
[1] = php
[2] = 1
)

)
Array
(
[0] = Array
(
[0] = 311
[1] = ?
[2] = 1
)

)





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



#44887 [Opn-Bgs]: Improve DOM loadHTML loading speed

2008-05-02 Thread rrichards
 ID:   44887
 Updated by:   [EMAIL PROTECTED]
 Reported By:  xwisdom at yahoo dot com
-Status:   Open
+Status:   Bogus
 Bug Type: Feature/Change Request
 Operating System: Windows XP
 PHP Version:  5.2.6
 New Comment:

Functionality provided by third party lib. Due to HTML being broken 
syntax the loadHTML method needs to perform numerous checks and then 
try to fix things in attempt to create proper XML, unlike using the 
loadXML method where proper XML is assumed so parser does not need to 
perform many of the checks nor try to fix things.


Previous Comments:


[2008-05-02 02:00:56] xwisdom at yahoo dot com

Description:

I would like to see some speed improvement for DOMDocument-loadHTML().
At the moment it takes a much longer time to load an xhtml document than
would loadXML().

Make the loading/parsing much faster will be a great improvement for
PHP DOM processing.










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



#44890 [NEW]: converting some doubles to strings yields trailing colon

2008-05-02 Thread mr-russ at pws dot com dot au
From: mr-russ at pws dot com dot au
Operating system: Ubuntu Linux 8.04
PHP version:  5.2CVS-2008-05-02 (snap)
PHP Bug Type: *General Issues
Bug description:  converting some doubles to strings yields trailing colon

Description:

I expect any number, divided by 10 times itself, then converted to a
string, to yield 0.1

In this release, sometimes I get 0.0: (yes, that's 0.0 with a trailing
colon character)

I have tested on i386 and amd64.  amd64 behaves as expected.  i386 gives
the invalid result.

Original bug report by Brett Kiefer on Ubuntu Launchpad:
https://bugs.launchpad.net/ubuntu/+source/php5/+bug/218891


Reproduce code:
---
?php
for ($d = 0.10; $d  1; $d = $d + 0.1) print $d * 10 .   . ($d /
($d * 10)) . \n;
?

Expected result:

1 0.1
2 0.1
3 0.1
4 0.1
5 0.1
6 0.1
7 0.1
8 0.1
9 0.1
10 0.1

Actual result:
--
1 0.1
2 0.1
3 0.1
4 0.1
5 0.1
6 0.0:
7 0.0:
8 0.1
9 0.0:
10 0.1

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



#44872 [Opn-Fbk]: canary mismatch on efree() - heap overflow detected

2008-05-02 Thread nlopess
 ID:   44872
 Updated by:   [EMAIL PROTECTED]
 Reported By:  mattr at shoplet dot com
-Status:   Open
+Status:   Feedback
 Bug Type: MySQLi related
 Operating System: FreeBSD 6.2
 PHP Version:  5.2.5
 New Comment:

Please try using this CVS snapshot:

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

For Windows (installer):

  http://snaps.php.net/win32/php5.3-win32-installer-latest.msi




Previous Comments:


[2008-04-30 17:19:34] mattr at shoplet dot com

Description:

The execution of the attached script halts unexpectedly with ALERT -
canary mismatch on efree() - heap overflow detected (attacker
'REMOTE_ADDR not set', file '../library/Zend/Db/Statement/Mysqli.php',
line 113) in the apache error log.


PHP Info:
---
PHP Version = 5.2.5
System = FreeBSD localhost 6.2-RELEASE FreeBSD 6.2-RELEASE #0: Fri Jan
12 11:05:30 UTC 2007 [EMAIL PROTECTED]
alo.edu:/usr/obj/usr/src/sys/SMP i386
Configure Command =  './configure'  '--with-layout=GNU'
'--with-config-file-scan-dir=/usr/local/etc/php' '--disable-all' '--e
nable-libxml' '--with-libxml-dir=/usr/local' '--enable-reflection'
'--program-prefix=' '--enable-fastcgi' '--with-apxs=/usr/lo
cal/sbin/apxs' '--with-regex=php' '--with-zend-vm=CALL'
'--enable-debug' '--enable-zend-multibyte' '--prefix=/usr/local' '--ma
ndir=/usr/local/man' '--infodir=/usr/local/info/'
PHP API = 20041225
PHP Extension = 20060613
Zend Extension = 220060519
Debug Build = yes
Thread Safety = disabled
Zend Memory Manager = enabled
IPv6 Support = enabled

This server is protected with the Suhosin Patch 0.9.6.2
Copyright (c) 2006 Hardened-PHP Project

---

Script fails on another machine running Debian 4 in the same
reproducible manner with and without the Suhosin patch.




Reproduce code:
---
#!/usr/local/bin/php
?php

set_include_path('../library/'. PATH_SEPARATOR . '../application/lib/'
. PATH_SEPARATOR . get_include_path());

require_once('Zend/Db.php');
// Zend Db classes can be found here: http://framework.zend.com
// Can attach to the ticket later if needed.

date_default_timezone_set('America/New_York');

$db =
Zend_Db::factory('mysqli',Array('host'='localhost','username'='','password'='','dbname'='eproc'));
$order_num = 1208212550;

$sql = $db-quoteInto(SELECT * FROM `eproc`.`Orders` WHERE
`order_num`=? LIMIT 1,$order_num);
$q = $db-fetchAll($sql);

$batch_status = $db-fetchOne(SELECT `to_po` FROM
`eproc2`.`batch_status` WHERE `status`='done' ORDER BY `to_po` DESC
LIMIT 1);

$items = $db-fetchAll(SELECT * FROM `eproc`.`Order_Item` WHERE
`order_num`='{$order_num}' ORDER BY `line_num` ASC);

$notes = $db-fetchAll(SELECT * FROM `eproc`.`notes` WHERE
`order_num`='{$order_num}' ORDER BY `sticky` DESC, `date_modified`
ASC);


$emails = $db-fetchAll(SELECT
`message_id`,`from_email`,`to_email`,`subject`,`date_received` FROM
`email_store`.`email` WHERE `order_num`='{$order_num}' ORDER BY
`date_received` ASC);

$attachments = $db-fetchAll(SELECT * FROM `files`.`order_attachments`
WHERE `order_num`='{$order_num}' ORDER BY `timestampAdded` ASC);

print_r($q);
print_r($order_id);
print_r($batch_status);
print_r($items);
print_r($notes);
print_r($emails);
print_r($attachments);


Expected result:

Several Arrays of database results

Actual result:
--
Execution:
[Wed Apr 30 12:45:01 2008]  Script:  './index.php'
---
/usr/ports/lang/php5/work/php-5.2.5/Zend/zend_opcode.c(238) : Block
0x0828d0e0 status:
Invalid pointer: ((prev=0x0045) != (prev.size=0x))
---
[Wed Apr 30 12:45:01 2008]  Script:  './index.php'
---
/usr/ports/lang/php5/work/php-5.2.5/Zend/zend_variables.h(35) : Block
0x0828d09c status:
/usr/ports/lang/php5/work/php-5.2.5/Zend/zend_variables.c(36) : Actual
location (location was relayed)
Invalid pointer: ((size=0x) != (next.prev=0x003d))
---
[Wed Apr 30 12:45:01 2008]  Script:  './index.php'
/usr/ports/databases/php5-mysqli/work/php-5.2.5/ext/mysqli/mysqli_api.c(362)
:  Freeing 0x0828D060 (0 bytes), script=./index.php
zend_mm_heap corrupted
Segmentation fault (core dumped)




Backtrace:

#0  0x28583ecb in kill () from /lib/libc.so.6
#1  0x08150f51 in zend_mm_panic (message=0x8252700 zend_mm_heap
corrupted)
at /usr/ports/lang/php5/work/php-5.2.5/Zend/zend_alloc.c:94
#2  0x08151ef5 in zend_mm_find_leaks (segment=0x827e000, b=0x828d02c)
at /usr/ports/lang/php5/work/php-5.2.5/Zend/zend_alloc.c:1223
#3  0x08152070 in zend_mm_check_leaks (heap=0x827d400) at
/usr/ports/lang/php5/work/php-5.2.5/Zend/zend_alloc.c:1277
#4  0x08152aaf in zend_mm_shutdown (heap=0x827d400, full_shutdown=0,
silent=0)
at 

#19324 [Com]: show PHP source on client's browser

2008-05-02 Thread amohamed at ttcanc dot org
 ID:   19324
 Comment by:   amohamed at ttcanc dot org
 Reported By:  wiseguy at ms10 dot url dot com dot tw
 Status:   No Feedback
 Bug Type: Output Control
 Operating System: Solaris8 x86
 PHP Version:  4.2.3
 New Comment:

windows 2003, iis, php 5.2.3... website loads php code in browser.
Sucks big time.


Previous Comments:


[2002-10-28 01:00:03] php-bugs at lists dot php dot net

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



[2002-10-12 10:12:09] [EMAIL PROTECTED]

Please try using this CVS snapshot:

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





[2002-09-30 06:18:43] alberty at neptunelabs dot de

3. showing source code
4. showing source code
5. showing source code
6. no source code 
7. showing source code



[2002-09-30 05:53:45] [EMAIL PROTECTED]

3 and 4 with the php_engine = on directive please (explicit).

Derick



[2002-09-30 05:50:54] alberty at neptunelabs dot de

Hi ,

I have a small question to this bug, because I have the same problem.

1. stop apache
2. start apache in single process mode like:
   /path/to/apache/httpd -X
3. Request a page from a vhost/directory where PHP is enabled
4. Do that again :)
5. Request a page from a vhost/directory where PHP is disabled
6. Request a page from a vhost/directory where PHP is enabled (but
not
explicit with php_engine = on, just the 'default')
7. Request a page from a vhost/directory where PHP is enabled
(implicit
wirth php_engine = on)
Please tell us when you see the source and when not.

Test 3 and 4 with explicit php_engine directive or not (the same as
6)?

However, with php_engine=on in a virtualhostlocation and also a
concurrently php_engine off directive in another virtualhost, Apache
results always the source code on my virtualhost with php_engine=on.

Regards,

-- 
Steve



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

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



#44767 [Opn]: Incorrect handling of a closing # to # based comments

2008-05-02 Thread ikickdogsforfun at hotmail dot com
 ID:   44767
 User updated by:  ikickdogsforfun at hotmail dot com
 Reported By:  ikickdogsforfun at hotmail dot com
 Status:   Open
 Bug Type: Scripting Engine problem
 Operating System: Gentoo Linux
 PHP Version:  5.2.6RC5
 New Comment:

In which case the comment is handled incorrectly if a second # appears,
note the code above which produces 2 errors. One of the errors refers to
a third line, even though there is only code on line. This suggests that
the interpretor has closed the comment and is attempting to handle the
rest of the code after the second # by treating it as a new line.


Previous Comments:


[2008-04-29 23:28:07] whitewolf24 at hotmail dot com

um, last I checked and have read in the manual
# comments to the end of the line OR the end of the php block, which
ever happens first. not to another #



[2008-04-17 20:49:53] ikickdogsforfun at hotmail dot com

Description:

A # comment can be closed by a second # causing PHP to act rather
oddly. Any errors that occur on the same line but after the closing #
are reported as an error on the next line, however if there are no
errors anything after the second # is ignored and not processed as if it
was a comment. I think based on this, there needs to be some concistency
about what happens when a second # is encountered. Are these intended to
be embedded comments which can be be closed? Or should everything being
ignored after the first # untill a new line character is encountered?

Reproduce code:
---
This produces 2 errors, one on line 2, one on line 3, though they are
both about line 3:
?
echo \some .# This is an imbedded comment#text;
?
This only echos out 'some':
?
echo some .# This is an imbedded comment#hi;
?

Expected result:

I would expect to see 'some text' echoed out, as I was under the
impression these kinds of comments were imbedded.

Actual result:
--
See the code section





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



#27446 [Com]: system.multiCall does not work

2008-05-02 Thread kawai at apache dot org
 ID:   27446
 Comment by:   kawai at apache dot org
 Reported By:  tomy at envox dot hr
 Status:   Verified
 Bug Type: XMLRPC-EPI related
 Operating System: *
 PHP Version:  5CVS, 4CVS (2004-03-01)
 New Comment:

I also hit this bug in my own server. I analyzed the bug, and created a
patch for this:


--- php-5.2.6/ext/xmlrpc/xmlrpc-epi-php.c   Mon Dec 31 16:20:14 2007
+++ xmlrpc-epi-php.cFri May  2 22:41:30 2008
@@ -859,6 +859,20 @@
zval* callback_params[3];
TSRMLS_FETCH();

+   const char* methodname = XMLRPC_RequestGetMethodName(xRequest);
+   zval **php_function;
+   if (!methodname) { methodname = ; }
+   Z_STRVAL_P(pData-xmlrpc_method) = estrdup(methodname);
+   Z_STRLEN_P(pData-xmlrpc_method) = strlen(methodname);
+   Z_TYPE_P(pData-xmlrpc_method) = IS_STRING;
+   pData-php_executed = 0;
+   if(zend_hash_find(Z_ARRVAL_P(pData-server-method_map),
+  Z_STRVAL_P(pData-xmlrpc_method), 
+  Z_STRLEN_P(pData-xmlrpc_method) + 1, 
+  (void**)php_function) == SUCCESS) {
+   pData-php_function = *php_function;
+   }
+   
/* convert xmlrpc to native php types */
xmlrpc_params = XMLRPC_to_PHP(XMLRPC_RequestGetData(xRequest));
 
@@ -876,7 +890,7 @@
 
zval_ptr_dtor(xmlrpc_params);
 
-   return NULL;
+   return PHP_to_XMLRPC(pData-return_data TSRMLS_CC);
 }
 
 /* called by the C server when it first receives an introspection
request.  We pass this on to
@@ -1017,7 +1031,6 @@
Parses XML requests and call methods */
 PHP_FUNCTION(xmlrpc_server_call_method)
 {
-   xmlrpc_callback_data data = {0};
XMLRPC_REQUEST xRequest;
STRUCT_XMLRPC_REQUEST_INPUT_OPTIONS input_opts;
xmlrpc_server_data* server;
@@ -1048,8 +1061,8 @@
 
if(xRequest) {
const char* methodname = 
XMLRPC_RequestGetMethodName(xRequest);
-   zval **php_function;
-   XMLRPC_VALUE xAnswer = NULL;
+   
+   xmlrpc_callback_data data = {0};
MAKE_STD_ZVAL(data.xmlrpc_method); /* init. very 
important.  spent
a frustrating day finding this out. */
MAKE_STD_ZVAL(data.return_data);
Z_TYPE_P(data.return_data) = IS_NULL;  /* in case value 
is never
init'd, we don't dtor to think it is a string or something */
@@ -1060,26 +1073,15 @@
}
 
/* setup some data to pass to the callback function */
-   Z_STRVAL_P(data.xmlrpc_method) = estrdup(methodname);
-   Z_STRLEN_P(data.xmlrpc_method) = strlen(methodname);
-   Z_TYPE_P(data.xmlrpc_method) = IS_STRING;
data.caller_params = *caller_params;
data.php_executed = 0;
data.server = server;
 
-   /* check if the called method has been previous 
registered */
-   if(zend_hash_find(Z_ARRVAL_P(server-method_map),
-  Z_STRVAL_P(data.xmlrpc_method), 
-  Z_STRLEN_P(data.xmlrpc_method) + 1, 
-  (void**)php_function) == SUCCESS) {
-
-   data.php_function = *php_function;
-   }
-
/* We could just call the php method directly ourselves 
at this
point, but we do this 
 * with a C callback in case the xmlrpc library ever 
implements
some cool usage stats,
 * or somesuch.
 */
+   XMLRPC_VALUE xAnswer = NULL;
xAnswer = XMLRPC_ServerCallMethod(server-server_ptr, 
xRequest,
data);
if(xAnswer  out.b_php_out) {
zval_dtor(data.return_data);
@@ -1086,7 +1088,9 @@
FREE_ZVAL(data.return_data);
data.return_data = XMLRPC_to_PHP(xAnswer);
} else if(data.php_executed  !out.b_php_out) {
-   xAnswer = PHP_to_XMLRPC(data.return_data 
TSRMLS_CC);
+   if(!xAnswer){
+   xAnswer = 
PHP_to_XMLRPC(data.return_data TSRMLS_CC);
+   }
}
 
/* should we return data as xml? */


Previous Comments:


[2004-03-15 23:35:42] [EMAIL PROTECTED]

It crashes, here's the backtrace with latest CVS checkout:

0x404b9e8c in call_user_function_ex (function_table=0x80b8868,
object_pp=0x0, function_name=0x0,
retval_ptr_ptr=0xbfffc954, param_count=3, params=0x8218104,
no_separation=1, symbol_table=0x0)
at 

#44870 [Asn-Opn]: rename() on directory deletes same named file

2008-05-02 Thread derick
 ID:   44870
 Updated by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
-Status:   Assigned
+Status:   Open
 Bug Type: Streams related
 Operating System: Windows/XP
 PHP Version:  5.3CVS-2008-04-30 (snap)
 Assigned To:  pajoye
 New Comment:

This bug has been fixed in CVS.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.
 
Thank you for the report, and for helping us make PHP better.




Previous Comments:


[2008-04-30 14:40:16] [EMAIL PROTECTED]

On Unix:
Renaming a file to a file that already exists overwrites it.
Renaming a file to a directory that already exists does not write, and
throws an error.

Windows should obviously behave the same.



[2008-04-30 14:17:25] [EMAIL PROTECTED]

Calling rename() on a directory where there is already a file with
the
new name does something odd, it renames the directory but also deletes
the file.

Can you test it with 5.2.x please?

I know that rename on windows will not rename a file when a directory
already exists with the same (new) name. I'm not sure about renaming a
directory.

But the general idea is to replace a file if it is named using the new
name (all platforms).



[2008-04-30 14:09:56] [EMAIL PROTECTED]

Description:

Calling rename() on a directory where there is already a file with the
new name does something odd, it renames the directory but also deletes
the file.

If this is in fact a bug then the test case rename_variation3.phpt will
need to be fixed up.

Reproduce code:
---
?php

$file_path = dirname(__FILE__);
$filename = $file_path/rename_variation3.tmp; 
$dirname = $file_path/rename_variation3_dir; 

mkdir($dirname);

$fp = fopen($filename, w);
fclose($fp);
var_dump( rename($dirname, $filename) );

echo Done\n;
?


Expected result:

A directory called rename_variation3.tmp and also a file called
rename_variation3.tmp

Actual result:
--
A directory called rename_variation3.tmp and no file..!





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



#44870 [Opn-Asn]: rename() on directory deletes same named file

2008-05-02 Thread pajoye
 ID:   44870
 Updated by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
-Status:   Open
+Status:   Assigned
 Bug Type: Streams related
 Operating System: Windows/XP
 PHP Version:  5.3CVS-2008-04-30 (snap)
 Assigned To:  pajoye
 New Comment:

The patch to fix this special case:

http://blog.thepimp.net/patches/bug44870.patch.txt


Previous Comments:


[2008-05-02 14:08: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.





[2008-04-30 14:40:16] [EMAIL PROTECTED]

On Unix:
Renaming a file to a file that already exists overwrites it.
Renaming a file to a directory that already exists does not write, and
throws an error.

Windows should obviously behave the same.



[2008-04-30 14:17:25] [EMAIL PROTECTED]

Calling rename() on a directory where there is already a file with
the
new name does something odd, it renames the directory but also deletes
the file.

Can you test it with 5.2.x please?

I know that rename on windows will not rename a file when a directory
already exists with the same (new) name. I'm not sure about renaming a
directory.

But the general idea is to replace a file if it is named using the new
name (all platforms).



[2008-04-30 14:09:56] [EMAIL PROTECTED]

Description:

Calling rename() on a directory where there is already a file with the
new name does something odd, it renames the directory but also deletes
the file.

If this is in fact a bug then the test case rename_variation3.phpt will
need to be fixed up.

Reproduce code:
---
?php

$file_path = dirname(__FILE__);
$filename = $file_path/rename_variation3.tmp; 
$dirname = $file_path/rename_variation3_dir; 

mkdir($dirname);

$fp = fopen($filename, w);
fclose($fp);
var_dump( rename($dirname, $filename) );

echo Done\n;
?


Expected result:

A directory called rename_variation3.tmp and also a file called
rename_variation3.tmp

Actual result:
--
A directory called rename_variation3.tmp and no file..!





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



#44870 [Asn-Csd]: rename() on directory deletes same named file

2008-05-02 Thread derick
 ID:   44870
 Updated by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
-Status:   Assigned
+Status:   Closed
 Bug Type: Streams related
 Operating System: Windows/XP
 PHP Version:  5.3CVS-2008-04-30 (snap)
 Assigned To:  pajoye
 New Comment:

This bug has been fixed in CVS.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.
 
Thank you for the report, and for helping us make PHP better.




Previous Comments:


[2008-05-02 14:09:14] [EMAIL PROTECTED]

The patch to fix this special case:

http://blog.thepimp.net/patches/bug44870.patch.txt



[2008-05-02 14:08: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.





[2008-04-30 14:40:16] [EMAIL PROTECTED]

On Unix:
Renaming a file to a file that already exists overwrites it.
Renaming a file to a directory that already exists does not write, and
throws an error.

Windows should obviously behave the same.



[2008-04-30 14:17:25] [EMAIL PROTECTED]

Calling rename() on a directory where there is already a file with
the
new name does something odd, it renames the directory but also deletes
the file.

Can you test it with 5.2.x please?

I know that rename on windows will not rename a file when a directory
already exists with the same (new) name. I'm not sure about renaming a
directory.

But the general idea is to replace a file if it is named using the new
name (all platforms).



[2008-04-30 14:09:56] [EMAIL PROTECTED]

Description:

Calling rename() on a directory where there is already a file with the
new name does something odd, it renames the directory but also deletes
the file.

If this is in fact a bug then the test case rename_variation3.phpt will
need to be fixed up.

Reproduce code:
---
?php

$file_path = dirname(__FILE__);
$filename = $file_path/rename_variation3.tmp; 
$dirname = $file_path/rename_variation3_dir; 

mkdir($dirname);

$fp = fopen($filename, w);
fclose($fp);
var_dump( rename($dirname, $filename) );

echo Done\n;
?


Expected result:

A directory called rename_variation3.tmp and also a file called
rename_variation3.tmp

Actual result:
--
A directory called rename_variation3.tmp and no file..!





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



#44891 [NEW]: Memory leak using registerPHPFunctions and XSLT Variable as function parameter

2008-05-02 Thread aldo at armiento dot com
From: aldo at armiento dot com
Operating system: Linux 2.6.18
PHP version:  5.3CVS-2008-05-02 (snap)
PHP Bug Type: XSLT related
Bug description:  Memory leak using registerPHPFunctions and XSLT Variable as 
function parameter

Description:

Using registerPHPFunctions and calling a PHP function from XSL with 
first parameter an XSL Variable (instead of node, node-text, etc.) 
produces a memory leak.

Also memory_limit directive in php.ini is ignored.

Reproduce code:
---
?php

// XML Contents

$sXML =  EOD
?xml version=1.0 encoding=UTF-8?
rootroot node/root
EOD;

$domXML = new DOMDocument();
$domXML-loadXML($sXML);

// XSL Contents

$sXSL =  EOD
xsl:stylesheet version=1.0
xmlns:xsl=http://www.w3.org/1999/XSL/Transform;
xmlns:php=http://php.net/xsl;

xsl:template match=/
xsl:variable name=variable text /xsl:variable
xsl:value-of select=php:functionString('trim', \$variable) /
/xsl:template

/xsl:stylesheet
EOD;

$domXSL = new DOMDocument();
$domXSL-loadXML($sXSL);

// XSLT Processor

$xsltProcessor = new XSLTProcessor();
$xsltProcessor-registerPHPFunctions();
$xsltProcessor-importStyleSheet($domXSL);

while (true) {
$xsltProcessor-transformToDoc($domXML);
}



Expected result:

Nothing.

Actual result:
--
All server available memory is used. 

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



#44891 [Opn]: Memory leak using registerPHPFunctions and XSLT Variable as function parameter

2008-05-02 Thread aldo at armiento dot com
 ID:   44891
 User updated by:  aldo at armiento dot com
 Reported By:  aldo at armiento dot com
 Status:   Open
 Bug Type: XSLT related
 Operating System: Linux 2.6.18
 PHP Version:  5.3CVS-2008-05-02 (snap)
 New Comment:

Reproducible also with 5.2CVS-2008-05-02 (snap)


Previous Comments:


[2008-05-02 14:42:51] aldo at armiento dot com

Description:

Using registerPHPFunctions and calling a PHP function from XSL with 
first parameter an XSL Variable (instead of node, node-text, etc.) 
produces a memory leak.

Also memory_limit directive in php.ini is ignored.

Reproduce code:
---
?php

// XML Contents

$sXML =  EOD
?xml version=1.0 encoding=UTF-8?
rootroot node/root
EOD;

$domXML = new DOMDocument();
$domXML-loadXML($sXML);

// XSL Contents

$sXSL =  EOD
xsl:stylesheet version=1.0
xmlns:xsl=http://www.w3.org/1999/XSL/Transform;
xmlns:php=http://php.net/xsl;

xsl:template match=/
xsl:variable name=variable text /xsl:variable
xsl:value-of select=php:functionString('trim', \$variable) /
/xsl:template

/xsl:stylesheet
EOD;

$domXSL = new DOMDocument();
$domXSL-loadXML($sXSL);

// XSLT Processor

$xsltProcessor = new XSLTProcessor();
$xsltProcessor-registerPHPFunctions();
$xsltProcessor-importStyleSheet($domXSL);

while (true) {
$xsltProcessor-transformToDoc($domXML);
}



Expected result:

Nothing.

Actual result:
--
All server available memory is used. 





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



#44892 [NEW]: IP2LONG doesn't handle leading zeroes

2008-05-02 Thread anthony dot morris at bankofamerica dot com
From: anthony dot morris at bankofamerica dot com
Operating system: Multiple
PHP version:  5.2.6
PHP Bug Type: Network related
Bug description:  IP2LONG doesn't handle leading zeroes

Description:

IP2Long does not handle leading zeroes

Reproduce code:
---
?PHP
echo LONG2IP(IP2LONG('192.068.068.068'));
?


OR

?PHP
echo IP2LONG('192.068.068.068');
echo 'br';
echo IP2LONG('192.68.68.68');
?


Expected result:

Notice the top example should return back the same IP.  The bottom
example, should produce the same LONG number.


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



#44892 [Opn-Bgs]: IP2LONG doesn't handle leading zeroes

2008-05-02 Thread felipe
 ID:   44892
 Updated by:   [EMAIL PROTECTED]
 Reported By:  anthony dot morris at bankofamerica dot com
-Status:   Open
+Status:   Bogus
 Bug Type: Network related
 Operating System: Multiple
 PHP Version:  5.2.6
 New Comment:

That is expected.

All numbers supplied as parts in IPv4 dotted decimal notation may be
decimal, octal, or hexadecimal, as specified in the ISO C standard (that
is, a leading 0x or 0X implies hexadecimal; otherwise, a leading '0'
implies octal; otherwise, the number is interpreted as decimal).

-
http://www.opengroup.org/onlinepubs/95399/functions/inet_addr.html


Previous Comments:


[2008-05-02 15:20:48] anthony dot morris at bankofamerica dot com

Description:

IP2Long does not handle leading zeroes

Reproduce code:
---
?PHP
echo LONG2IP(IP2LONG('192.068.068.068'));
?


OR

?PHP
echo IP2LONG('192.068.068.068');
echo 'br';
echo IP2LONG('192.68.68.68');
?


Expected result:

Notice the top example should return back the same IP.  The bottom
example, should produce the same LONG number.






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



#44891 [Opn-Ver]: Memory leak using registerPHPFunctions and XSLT Variable as function parameter

2008-05-02 Thread felipe
 ID:   44891
 Updated by:   [EMAIL PROTECTED]
 Reported By:  aldo at armiento dot com
-Status:   Open
+Status:   Verified
 Bug Type: XSLT related
 Operating System: Linux 2.6.18
 PHP Version:  5.3CVS-2008-05-02 (snap)
 New Comment:

5.3 backtrace:

==25539== 409,600 bytes in 100 blocks are definitely lost in loss
record 1 of 1
==25539==at 0x4021620: malloc (vg_replace_malloc.c:149)
==25539==by 0x414B180: xmlBufferCreate (in
/usr/lib/libxml2.so.2.6.27)
==25539==by 0x414BE43: xmlNodeGetContent (in
/usr/lib/libxml2.so.2.6.27)
==25539==by 0x417AE60: xmlXPathCastNodeToString (in
/usr/lib/libxml2.so.2.6.27)
==25539==by 0x417B194: xmlXPathCastNodeSetToString (in
/usr/lib/libxml2.so.2.6.27)
==25539==by 0x417E4AC: xmlXPathCastToString (in
/usr/lib/libxml2.so.2.6.27)
==25539==by 0x822F1EE: xsl_ext_function_php (xsltprocessor.c:289)
==25539==by 0x41835E1: (within /usr/lib/libxml2.so.2.6.27)
==25539==by 0x418306A: (within /usr/lib/libxml2.so.2.6.27)
==25539==by 0x4184E2F: (within /usr/lib/libxml2.so.2.6.27)
==25539==by 0x4189265: (within /usr/lib/libxml2.so.2.6.27)
==25539==by 0x4189471: xmlXPathCompiledEval (in
/usr/lib/libxml2.so.2.6.27)
==25539==by 0x40FBA1A: xsltValueOf (in /usr/lib/libxslt.so.1.1.20)
==25539==by 0x40F8AE6: (within /usr/lib/libxslt.so.1.1.20)
==25539==by 0x40FA002: (within /usr/lib/libxslt.so.1.1.20)
==25539==by 0x40FA7FC: xsltProcessOneNode (in
/usr/lib/libxslt.so.1.1.20)
==25539==by 0x40FE9F1: (within /usr/lib/libxslt.so.1.1.20)
==25539==by 0x822FDD1: php_xsl_apply_stylesheet
(xsltprocessor.c:540)
==25539==by 0x823021F: zif_xsl_xsltprocessor_transform_to_doc
(xsltprocessor.c:594)
==25539==by 0x82B38BA: zend_do_fcall_common_helper_SPEC
(zend_vm_execute.h:189)
==25539==by 0x82B2E44: execute (zend_vm_execute.h:91)
==25539==by 0x828D19E: zend_execute_scripts (zend.c:1195)
==25539==by 0x8233870: php_execute_script (main.c:2077)
==25539==by 0x83206D8: main (php_cli.c:1139)


Previous Comments:


[2008-05-02 14:46:04] aldo at armiento dot com

Reproducible also with 5.2CVS-2008-05-02 (snap)



[2008-05-02 14:42:51] aldo at armiento dot com

Description:

Using registerPHPFunctions and calling a PHP function from XSL with 
first parameter an XSL Variable (instead of node, node-text, etc.) 
produces a memory leak.

Also memory_limit directive in php.ini is ignored.

Reproduce code:
---
?php

// XML Contents

$sXML =  EOD
?xml version=1.0 encoding=UTF-8?
rootroot node/root
EOD;

$domXML = new DOMDocument();
$domXML-loadXML($sXML);

// XSL Contents

$sXSL =  EOD
xsl:stylesheet version=1.0
xmlns:xsl=http://www.w3.org/1999/XSL/Transform;
xmlns:php=http://php.net/xsl;

xsl:template match=/
xsl:variable name=variable text /xsl:variable
xsl:value-of select=php:functionString('trim', \$variable) /
/xsl:template

/xsl:stylesheet
EOD;

$domXSL = new DOMDocument();
$domXSL-loadXML($sXSL);

// XSLT Processor

$xsltProcessor = new XSLTProcessor();
$xsltProcessor-registerPHPFunctions();
$xsltProcessor-importStyleSheet($domXSL);

while (true) {
$xsltProcessor-transformToDoc($domXML);
}



Expected result:

Nothing.

Actual result:
--
All server available memory is used. 





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



#39858 [Com]: Lost connection to MySQL server during query by a repeated call stored proced

2008-05-02 Thread bepoteat at yahoo dot com
 ID:   39858
 Comment by:   bepoteat at yahoo dot com
 Reported By:  develar at gmail dot com
 Status:   Assigned
 Bug Type: PDO related
 Operating System: Windows XP SP2
 PHP Version:  5.2.0
 Assigned To:  wez
 New Comment:

I believe paulsidekick is correct.  I am working on a page that
repeatedly calls a stored proc that returns a resultset.  After using
the expected results from the first call, I tried moving to the next
resultset and displaying the column values.  I got nothing.  Then I
tried using

mysqli_free_result($rs);
while (mysqli_more_results($conn)) {
mysqli_next_result($conn);
echo count($row);
mysqli_free_result($rs);
}

and got 0.  So I decided to just get rid of the empty resultset. 
Below is the basic structure of the code that worked for me (note the
while loop).

$conn = mysqli_connect(server, username, password);

for ($i=1; $i$someNumber; $i++) {
$rs = mysqli_query($conn, CALL spMyProc(param1, param2));

if ($rs  $row = mysqli_fetch_asoc($rs)) {
//some code to use results
} else {
//error handler
}

mysqli_free_result($rs);

//Add this section to dispose of extra resultset.
while (mysqli_more_results($conn)) {
mysqli_next_result($conn);
mysqli_free_result($rs);
}
}

mysqli_close($conn);

I know this doesn't exactly fix the problem, but it is a workaround
that involves a minimal amount of code.

(By the way, why doesn't the CAPTCHA box show up in Firefox?  I had to
use Internet Exploiter to post this.  I thought PHP was all about being
open source!)


Previous Comments:


[2008-04-17 14:44:34] james dot lewis at americanmobileventures dot com

Also having this error. PHP 5.2.5 on XP SP2, with Apache2 (XAMPP 1.6.6)



[2008-04-05 21:04:45] mgrdinic at sledxchange dot com

One last thing:

It should be noted that you can workaround this issue by simply
instantiating a whole new PDO object after every call that returns a
result set.

// create a PDO instance up here somewhere and perform your query...

// get the return values you need...
$result = $sth-fetchAll ();

// and just create a new object...
try {
$dbh = new PDO ( $dsn, $user, $pass );
$dbh-setAttribute(PDO::MYSQL_ATTR_USE_BUFFERED_QUERY, 1);
$dbh-setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_WARNING);
} catch ( PDOException $e ) {
die ( 'PDO Connection Failed: ' . $e-getMessage () );
}

// now you can query again without the error. 


It seem like the solution is simple to do. In fact, this guy seems to
be on the right track:
http://bugs.php.net/bug.php?id=42499

Why isn't this done!

Oh well, hopefully the above, if not totally wrong : ) will help
someone else.



[2008-04-05 20:53:08] mgrdinic at sledxchange dot com

Same problem here-I'm on Vista Ultimate SP1 and IIS 7 MySQL 5.0.45

The trick is regular NON-Select queries work as expected. It's when
your Stored Procedures return result sets the problems show up. 

So for example, if the first query performs a one off select and
closes, the second query is hit with the SQLSTATE[HY000]: General
error: 2014 Cannot execute queries while other unbuffered queries are
active error. And yes, that's with using the fetchAll.

However, if I remove the select statement from the first procedure and
run the code again, both stored procedures work fine.  

I've tried the latest snap-shots, but unfortunately I couldn't get pdo
to even load. Any ideas? Updates?



[2008-04-05 16:56:25] php at pofik dot com

Hi there - so is there a proper fix for this by now? I just started
using stored procedures more extensively and I am now hit by this bug
all the time (Windows XP SP2, MySQL 5.0.51a, PHP 5.2.1)! Apparently this
bug is a known problem since at least October 2005 (Bug #5827), so I'd
think this should be long fixed?? However, I cannot locate any
information on a proper fix except for a bunch of makeshift workarounds
(using ODBC, abandoning the connection on HY000 etc.), and tons of
people complaining about it not being fixed. 

Considering how long this bug is known and open, it would help if
someone could post some update. This issue is really really annoying.

Thanks!



[2008-02-07 12:57:17] kraus at phoenix-medien dot de

This PDO bug makes it impossible to install Magento on Windows

#44893 [NEW]: gzfile

2008-05-02 Thread sworddragon2 at aol dot com
From: sworddragon2 at aol dot com
Operating system: Windows XP Professional SP3
PHP version:  5.2.6
PHP Bug Type: Zlib Related
Bug description:  gzfile

Description:

If im trying to use the function gzfile() to a compressed file, that
includes just a picture, the function don't read the complete file. On
this reproduce, the function stops after the End Transmission Block.

Reproduce code:
---
$file=fopen(smiley1.gif,rb);
$picture=fread($file,filesize(smiley1.gif));
fclose($file);
$file=gzopen(smiley1.gz,w);
gzwrite($file,$picture);
gzclose($file);
$file=gzfile(smiley1.gz);
print_r($file);

Expected result:

I expect to see all arrays until the end of the file.

Actual result:
--
With gzfile, i got just the array [0] with the content GIF89a

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



#39858 [Com]: Lost connection to MySQL server during query by a repeated call stored proced

2008-05-02 Thread bepoteat at yahoo dot com
 ID:   39858
 Comment by:   bepoteat at yahoo dot com
 Reported By:  develar at gmail dot com
 Status:   Assigned
 Bug Type: PDO related
 Operating System: Windows XP SP2
 PHP Version:  5.2.0
 Assigned To:  wez
 New Comment:

After looking at the PHP manual, I realized I could reduce the loop to
a single line:

while (mysqli_next_result($conn));

I didn't even have to use mysqli_free_result (but it is good practice).


Previous Comments:


[2008-05-02 16:24:57] bepoteat at yahoo dot com

I believe paulsidekick is correct.  I am working on a page that
repeatedly calls a stored proc that returns a resultset.  After using
the expected results from the first call, I tried moving to the next
resultset and displaying the column values.  I got nothing.  Then I
tried using

mysqli_free_result($rs);
while (mysqli_more_results($conn)) {
mysqli_next_result($conn);
echo count($row);
mysqli_free_result($rs);
}

and got 0.  So I decided to just get rid of the empty resultset. 
Below is the basic structure of the code that worked for me (note the
while loop).

$conn = mysqli_connect(server, username, password);

for ($i=1; $i$someNumber; $i++) {
$rs = mysqli_query($conn, CALL spMyProc(param1, param2));

if ($rs  $row = mysqli_fetch_asoc($rs)) {
//some code to use results
} else {
//error handler
}

mysqli_free_result($rs);

//Add this section to dispose of extra resultset.
while (mysqli_more_results($conn)) {
mysqli_next_result($conn);
mysqli_free_result($rs);
}
}

mysqli_close($conn);

I know this doesn't exactly fix the problem, but it is a workaround
that involves a minimal amount of code.

(By the way, why doesn't the CAPTCHA box show up in Firefox?  I had to
use Internet Exploiter to post this.  I thought PHP was all about being
open source!)



[2008-04-17 14:44:34] james dot lewis at americanmobileventures dot com

Also having this error. PHP 5.2.5 on XP SP2, with Apache2 (XAMPP 1.6.6)



[2008-04-05 21:04:45] mgrdinic at sledxchange dot com

One last thing:

It should be noted that you can workaround this issue by simply
instantiating a whole new PDO object after every call that returns a
result set.

// create a PDO instance up here somewhere and perform your query...

// get the return values you need...
$result = $sth-fetchAll ();

// and just create a new object...
try {
$dbh = new PDO ( $dsn, $user, $pass );
$dbh-setAttribute(PDO::MYSQL_ATTR_USE_BUFFERED_QUERY, 1);
$dbh-setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_WARNING);
} catch ( PDOException $e ) {
die ( 'PDO Connection Failed: ' . $e-getMessage () );
}

// now you can query again without the error. 


It seem like the solution is simple to do. In fact, this guy seems to
be on the right track:
http://bugs.php.net/bug.php?id=42499

Why isn't this done!

Oh well, hopefully the above, if not totally wrong : ) will help
someone else.



[2008-04-05 20:53:08] mgrdinic at sledxchange dot com

Same problem here-I'm on Vista Ultimate SP1 and IIS 7 MySQL 5.0.45

The trick is regular NON-Select queries work as expected. It's when
your Stored Procedures return result sets the problems show up. 

So for example, if the first query performs a one off select and
closes, the second query is hit with the SQLSTATE[HY000]: General
error: 2014 Cannot execute queries while other unbuffered queries are
active error. And yes, that's with using the fetchAll.

However, if I remove the select statement from the first procedure and
run the code again, both stored procedures work fine.  

I've tried the latest snap-shots, but unfortunately I couldn't get pdo
to even load. Any ideas? Updates?



[2008-04-05 16:56:25] php at pofik dot com

Hi there - so is there a proper fix for this by now? I just started
using stored procedures more extensively and I am now hit by this bug
all the time (Windows XP SP2, MySQL 5.0.51a, PHP 5.2.1)! Apparently this
bug is a known problem since at least October 2005 (Bug #5827), so I'd
think this should be long fixed?? However, I cannot locate any
information on a proper fix except for a bunch of makeshift workarounds
(using ODBC, abandoning the connection on HY000 etc.), and tons of
people complaining about it not being fixed. 

Considering how 

#43254 [Com]: Apache HTTP crashes on some pettions

2008-05-02 Thread ilanfir at gmail dot com
 ID:   43254
 Comment by:   ilanfir at gmail dot com
 Reported By:  pedro dot cambra at gmail dot com
 Status:   No Feedback
 Bug Type: Apache2 related
 Operating System: Windows XP
 PHP Version:  5.2.5
 New Comment:

I'm having almost the same problem.
Error signature:
szAppName : httpd.exe szAppVer : 2.2.8.0 szModName :
libhttpd.dll 
szModVer : 2.2.8.0 offset : 0001b317 

I'm using php 5.2.6 and apache 2.2.8 on windows xp
phpinfo() works for me too, but any other php scripts crash apache.


Previous Comments:


[2007-11-20 01:00:01] php-bugs at lists dot php dot net

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



[2007-11-12 09:41:06] [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 the script requires a 
database to demonstrate the issue, please make sure it creates 
all necessary tables, stored procedures etc.

Please avoid embedding huge scripts into the report.





[2007-11-11 23:34:50] pedro dot cambra at gmail dot com

Description:

Suddenly (ive not made any config change, from a time to now, it simply
crashes), in some parts of the code i get a Apache HTTP crash (the
classic error for reporting Windows.

The stack that i get is this

szAppName : httpd.exe szAppVer : 2.2.4.0 szModName : php5ts.dll

szModVer : 5.2.6.6 offset : 00181bca 

The error report contents is this

H:\DOCUME~1\Pedro\LOCALS~1\Temp\WERb60d.dir00\httpd.exe.mdmp
H:\DOCUME~1\Pedro\LOCALS~1\Temp\WERb60d.dir00\appcompat.txt

Ive tested with PHP 5.2.2, 5.2.3 and 5.2.6

I am not seeing any error details on Apache 2.2 error.log even if i
config it to debug mode.

phpinfo() works well

Reproduce code:
---
This H:\DOCUME~1\Pedro\LOCALS~1\Temp\WERb60d.dir00\appcompat.txt has
this content:

?xml version=1.0 encoding=UTF-16?
DATABASE
EXE NAME=httpd.exe FILTER=GRABMI_FILTER_PRIVACY
MATCHING_FILE NAME=ab.exe SIZE=65600 CHECKSUM=0x83F080C1
BIN_FILE_VERSION=2.2.4.0 BIN_PRODUCT_VERSION=2.2.4.0
PRODUCT_VERSION=2.2.4 FILE_DESCRIPTION=ApacheBench/SSL command line
utility COMPANY_NAME=Apache Software Foundation PRODUCT_NAME=Apache
HTTP Server FILE_VERSION=2.2.4 ORIGINAL_FILENAME=ab.exe
INTERNAL_NAME=ab.exe LEGAL_COPYRIGHT=Copyright 2006 The Apache
Software Foundation. VERFILEDATEHI=0x0 VERFILEDATELO=0x0
VERFILEOS=0x4 VERFILETYPE=0x1 MODULE_TYPE=WIN32 PE_CHECKSUM=0x0
LINKER_VERSION=0x0 UPTO_BIN_FILE_VERSION=2.2.4.0
UPTO_BIN_PRODUCT_VERSION=2.2.4.0 LINK_DATE=01/10/2007 05:20:26
UPTO_LINK_DATE=01/10/2007 05:20:26 VER_LANGUAGE=Inglés (Estados
Unidos) [0x409] /
MATCHING_FILE NAME=ApacheMonitor.exe SIZE=41041
CHECKSUM=0x72A8CDF3 BIN_FILE_VERSION=2.2.4.0
BIN_PRODUCT_VERSION=2.2.4.0 PRODUCT_VERSION=2.2.4
FILE_DESCRIPTION=Apache HTTP Server Monitor COMPANY_NAME=Apache
Software Foundation PRODUCT_NAME=Apache HTTP Server
FILE_VERSION=2.2.4 ORIGINAL_FILENAME=ApacheMonitor.exe
INTERNAL_NAME=ApacheMonitor.exe LEGAL_COPYRIGHT=Copyright 2006 The
Apache Software Foundation. VERFILEDATEHI=0x0 VERFILEDATELO=0x0
VERFILEOS=0x4 VERFILETYPE=0x1 MODULE_TYPE=WIN32 PE_CHECKSUM=0x0
LINKER_VERSION=0x0 UPTO_BIN_FILE_VERSION=2.2.4.0
UPTO_BIN_PRODUCT_VERSION=2.2.4.0 LINK_DATE=01/10/2007 05:20:43
UPTO_LINK_DATE=01/10/2007 05:20:43 VER_LANGUAGE=Inglés (Estados
Unidos) [0x409] /
MATCHING_FILE NAME=htcacheclean.exe SIZE=53322
CHECKSUM=0x2C2DD7E1 BIN_FILE_VERSION=2.2.4.0
BIN_PRODUCT_VERSION=2.2.4.0 PRODUCT_VERSION=2.2.4
FILE_DESCRIPTION=Apache htcacheclean command line utility
COMPANY_NAME=Apache Software Foundation PRODUCT_NAME=Apache HTTP
Server FILE_VERSION=2.2.4 ORIGINAL_FILENAME=htcacheclean.exe
INTERNAL_NAME=htcacheclean.exe LEGAL_COPYRIGHT=Copyright 2006 The
Apache Software Foundation. VERFILEDATEHI=0x0 VERFILEDATELO=0x0
VERFILEOS=0x4 VERFILETYPE=0x1 MODULE_TYPE=WIN32 PE_CHECKSUM=0x0
LINKER_VERSION=0x0 UPTO_BIN_FILE_VERSION=2.2.4.0
UPTO_BIN_PRODUCT_VERSION=2.2.4.0 LINK_DATE=01/10/2007 05:20:28
UPTO_LINK_DATE=01/10/2007 05:20:28 VER_LANGUAGE=Inglés (Estados
Unidos) [0x409] /
MATCHING_FILE NAME=htdbm.exe SIZE=77891 CHECKSUM=0x134B0B6F
BIN_FILE_VERSION=2.2.4.0 BIN_PRODUCT_VERSION=2.2.4.0
PRODUCT_VERSION=2.2.4 FILE_DESCRIPTION=Apache htdbm command line
utility COMPANY_NAME=Apache Software Foundation PRODUCT_NAME=Apache
HTTP Server FILE_VERSION=2.2.4 ORIGINAL_FILENAME=htdbm.exe

#44895 [NEW]: Passing XML as a parameter to a stored procedure, causes syntax error.

2008-05-02 Thread jrichardson at whisolutions dot com
From: jrichardson at whisolutions dot com
Operating system: Linux
PHP version:  5.2.6
PHP Bug Type: MSSQL related
Bug description:  Passing XML as a parameter to a stored procedure, causes 
syntax error.

Description:

When passing XML as a parameter to a stored procedure; the mssql_query
call now interrupts the / as a special character and produces a syntax
error. If the slashes are removed from the XML the SP executes, but the XML
parser inside the procedure will not be able to handle it.

The same query will execute and return the proper results when executed
from PHP5 or from mssql server directly.

Reproduce code:
---
$sSQL = exec any_store_procedure NULL, NULL,
'statusid5/idid6/idid8/id/status', NULL, '01/01/2008',
'04/29/2008', 25, 1;
$rc = mssql_query($sSQL,$Link_ID);
$returnedrows = mssql_num_rows($rc);

Expected result:

Depends on the Stored Procedure. But this will causes a syntax error. When
running the same query in PHP4 or directly in mssql, it returns a result.

Actual result:
--
Warning: mssql_query() [function.mssql-query]: message: Line 3: Incorrect
syntax near ','. (severity 15) in

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



#44894 [Opn]: php_xsl.dll missing from .zip download file

2008-05-02 Thread ash at theleys dot net
 ID:   44894
 User updated by:  ash at theleys dot net
 Reported By:  ash at theleys dot net
 Status:   Open
 Bug Type: XSLT related
 Operating System: Windows/2003 ISAPI
 PHP Version:  5.2.6
 New Comment:

Error Class 'XsltProcessor' not found is exact error, copying
php_xsl.dll file from 5.2.5 seems to function correctly.


Previous Comments:


[2008-05-02 17:00:29] ash at theleys dot net

Description:

php_xsl.dll missing from .zip download \ext folder gives Fatal class
error.






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



#44894 [NEW]: php_xsl.dll missing from .zip download file

2008-05-02 Thread ash at theleys dot net
From: ash at theleys dot net
Operating system: Windows/2003 ISAPI
PHP version:  5.2.6
PHP Bug Type: XSLT related
Bug description:  php_xsl.dll missing from .zip download file

Description:

php_xsl.dll missing from .zip download \ext folder gives Fatal class
error.


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



#44894 [Opn-Ver]: php_xsl.dll missing from .zip download file

2008-05-02 Thread pajoye
 ID:   44894
 Updated by:   [EMAIL PROTECTED]
 Reported By:  ash at theleys dot net
-Status:   Open
+Status:   Verified
 Bug Type: XSLT related
 Operating System: Windows/2003 ISAPI
 PHP Version:  5.2.6
-Assigned To:  
+Assigned To:  pajoye
 New Comment:

Our apologizes, xsl and imap are missing from the windows builds. We
are working to fix this issue as soon as possible. Too bad that it was
not catched with the snaps and RC


Previous Comments:


[2008-05-02 17:26:21] ash at theleys dot net

Error Class 'XsltProcessor' not found is exact error, copying
php_xsl.dll file from 5.2.5 seems to function correctly.



[2008-05-02 17:00:29] ash at theleys dot net

Description:

php_xsl.dll missing from .zip download \ext folder gives Fatal class
error.






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



#44897 [Opn]: failed to prepare statement

2008-05-02 Thread top dot bagger at bk dot ru
 ID:   44897
 User updated by:  top dot bagger at bk dot ru
 Reported By:  top dot bagger at bk dot ru
 Status:   Open
 Bug Type: MySQLi related
 Operating System: CentOS 5
 PHP Version:  5.2.6
 New Comment:

Sorry, I forgot to add my output of this:

State of user: 1prepare failed
errno: 2013 - error: Lost connection to MySQL server during query


Previous Comments:


[2008-05-02 20:27:03] top dot bagger at bk dot ru

Description:

prepare method call returns false if mysql stored procedure was
prepared before

Reproduce code:
---
$my = new mysqli(localhost,test,test,test_db);
$stmta = $my-prepare(CALL sp_auth_user(?,?));
$user = 'user';
$pass = 'pass';
$stmta-bind_param(ss, $user,$pass);
$stmta-execute();
$stmta-bind_result($state);
$stmta-fetch();
printf(State of user: %s\n, $state);
$stmta-close();
$stmtb = $my-prepare(SELECT userId FROM appUsers WHERE login = ?);
if ($stmtb) echo prepare succeeded;
else {
echo prepare failedbr /;
echo errno: , $my-errno,   - error: , $my-error, br /;
}

Expected result:

$stmtb contains mysqli_stmt object

Actual result:
--
$stmtb is false





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



#44876 [Opn-WFx]: stripslashes() removes backslashes in wrong cases

2008-05-02 Thread fa
 ID:   44876
 Updated by:   [EMAIL PROTECTED]
 Reported By:  c dot onogol at gmail dot com
-Status:   Open
+Status:   Wont fix
 Bug Type: Scripting Engine problem
 Operating System: Windows NT
 PHP Version:  5.2.5
 New Comment:

This is expected behaviour and has always been this way.


Previous Comments:


[2008-04-30 21:16:17] c dot onogol at gmail dot com

Description:

stripslashes is supposed to remove backslashes added by addslashes():
from the doc:
   stripslashes — Un-quote string quoted with addslashes()
   addslashes — Quote string with slashes


stripslashes return values from the documentation:
Returns a string with backslashes stripped off. (\' becomes ' and so
on.) Double backslashes (\\) are made into a single backslash (\).

The problem is that it removes single backslashes that are not escaping
any quotes/slashes.
For example, this one \ that one should stay the same after running
stripslashes(), but it actually is stripping the backslash, so the end
result of stripslashes(this one \ that one) is this one that one.

the backslash in this one \ that one is part of the original text and
is not a backslash addslashes() would add.










Reproduce code:
---
?
$str = this one \ should stay. it\'s a \test\;
$str = stripslashes($str);
var_dump($str);
?

Expected result:

string(37) this one \ should stay. it's a test

Actual result:
--
string(36) this one should stay. it's a test





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



#44898 [NEW]: Operators not acting correctly to floatval results

2008-05-02 Thread zero at infernotechnologies dot net
From: zero at infernotechnologies dot net
Operating system: CentOS Enterprise 4.5 x86_64
PHP version:  5.2.6
PHP Bug Type: Math related
Bug description:  Operators not acting correctly to floatval results

Description:

floatval() two seperate strings to return a result, try result against
exact same number (via =) and condition returns false.

Reproduce code:
---
$value1 = '1';
$value2 = '0.9';
$value3 = 0.1;

$result = floatval(floatval($value1) - floatval($value2));

if ($result = $value3)
{
echo 'Working as intended';
}
else
{
echo $result IS NOT = $value3br /;
var_dump($result, $value3);
}

Expected result:

Working as intended

Actual result:
--
0.1 IS NOT = 0.1
float(0.1) float(0.1) 

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



#44898 [Opn]: Operators not acting correctly to floatval results

2008-05-02 Thread zero at infernotechnologies dot net
 ID:   44898
 User updated by:  zero at infernotechnologies dot net
 Reported By:  zero at infernotechnologies dot net
 Status:   Open
 Bug Type: Math related
 Operating System: CentOS Enterprise 4.5 x86_64
 PHP Version:  5.2.6
 New Comment:

It seems adding a single line fixes the issue:

Line to add:
-
$result = floatval($result . ' ');


Working version:
-
$value1 = '1';
$value2 = '0.9';
$value3 = 0.1;

$result = floatval(floatval($value1) - floatval($value2));

$result = floatval($result . ' ');

if ($result = $value3)
{
echo 'Working as intended';
}
else
{
echo $result IS NOT = $value3br /;
var_dump($result, $value3);
}


Previous Comments:


[2008-05-02 20:43:47] zero at infernotechnologies dot net

Description:

floatval() two seperate strings to return a result, try result against
exact same number (via =) and condition returns false.

Reproduce code:
---
$value1 = '1';
$value2 = '0.9';
$value3 = 0.1;

$result = floatval(floatval($value1) - floatval($value2));

if ($result = $value3)
{
echo 'Working as intended';
}
else
{
echo $result IS NOT = $value3br /;
var_dump($result, $value3);
}

Expected result:

Working as intended

Actual result:
--
0.1 IS NOT = 0.1
float(0.1) float(0.1) 





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



#44893 [Opn-Fbk]: gzfile

2008-05-02 Thread fa
 ID:   44893
 Updated by:   [EMAIL PROTECTED]
 Reported By:  sworddragon2 at aol dot com
-Status:   Open
+Status:   Feedback
 Bug Type: Zlib Related
 Operating System: Windows XP Professional SP3
 PHP Version:  5.2.6
 New Comment:

Couldn't reproduce on Win XP SP2 with php-5.2.6-Win32.zip


Previous Comments:


[2008-05-02 16:31:23] sworddragon2 at aol dot com

Description:

If im trying to use the function gzfile() to a compressed file, that
includes just a picture, the function don't read the complete file. On
this reproduce, the function stops after the End Transmission Block.

Reproduce code:
---
$file=fopen(smiley1.gif,rb);
$picture=fread($file,filesize(smiley1.gif));
fclose($file);
$file=gzopen(smiley1.gz,w);
gzwrite($file,$picture);
gzclose($file);
$file=gzfile(smiley1.gz);
print_r($file);

Expected result:

I expect to see all arrays until the end of the file.

Actual result:
--
With gzfile, i got just the array [0] with the content GIF89a





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



#44899 [NEW]: __isset usage changes behavior of empty()

2008-05-02 Thread nuttzy at spellingcow dot com
From: nuttzy at spellingcow dot com
Operating system: CentOS
PHP version:  5.2.6
PHP Bug Type: Class/Object related
Bug description:  __isset usage changes behavior of empty()

Description:

Per http://bugs.php.net/bug.php?id=40797, the behavior of empty() was
modified to call the __isset magic method.  There is at least one case
where this changes the behavior of empty() to falsely report not empty
when in fact the desired result is empty.

I suppose you would need an __empty() magic method, but that sounds
heinous.  Overloading docs should at least be updated to warn the
developer.

Reproduce code:
---
?
class myclass
{
private $_raw_data = array() ;

function __construct( $data)
{
$this-_raw_data = $data ;
}

function __isset( $field_name)
{
return isset($this-_raw_data[$field_name]);
}
}

$_POST['foo']='' ;
$myclass = new myclass( $_POST) ;

// correct reports isset
echo (isset($myclass-foo)) ? 'isset' : 'not isset') ;

// incorrectly reports not empty
echo (empty($myclass-foo)) ? 'empty' : 'not empty' ;

// a way to get around the broken empty() call
echo ($myclass-foo) ? 'not empty' : 'empty' ;

?

Expected result:

isset
empty
empty

Actual result:
--
isset
not empty
empty

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



#44879 [Opn-Csd]: redundant php_mysql.dll

2008-05-02 Thread fa
 ID:   44879
 Updated by:   [EMAIL PROTECTED]
 Reported By:  agreenhi at gmail dot com
-Status:   Open
+Status:   Closed
 Bug Type: *Configuration Issues
 Operating System: Windows XP
 PHP Version:  5.2.5
 New Comment:

Thank you for your bug report. This issue has already been fixed
in the latest released version of PHP, which you can download at 
http://www.php.net/downloads.php

Fixed in 5.2.6


Previous Comments:


[2008-05-01 08:15:54] agreenhi at gmail dot com

Description:

The line:
extension=php_mysql.dll
appears twice. Once in the dynamic extentions section, and once again
in the [PHP_MYSQL] section. This occured after using the windows
installer.

Expected result:

PHP to start.

Actual result:
--
This appears to hang PHP in the start-up process with the error that
MySQL is already open.
When the second extension=php_mysql.dll is removed all is good!





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



#44898 [Opn-Bgs]: Operators not acting correctly to floatval results

2008-05-02 Thread derick
 ID:   44898
 Updated by:   [EMAIL PROTECTED]
 Reported By:  zero at infernotechnologies dot net
-Status:   Open
+Status:   Bogus
 Bug Type: Math related
 Operating System: CentOS Enterprise 4.5 x86_64
 PHP Version:  5.2.6
 New Comment:

Floating point values have a limited precision. Hence a value might 
not have the same string representation after any processing. That also
includes writing a floating point value in your script and directly 
printing it without any mathematical operations.

If you would like to know more about floats and what IEEE
754 is, read this:
http://docs.sun.com/source/806-3568/ncg_goldberg.html
 
Thank you for your interest in PHP.

.


Previous Comments:


[2008-05-02 20:49:24] zero at infernotechnologies dot net

It seems adding a single line fixes the issue:

Line to add:
-
$result = floatval($result . ' ');


Working version:
-
$value1 = '1';
$value2 = '0.9';
$value3 = 0.1;

$result = floatval(floatval($value1) - floatval($value2));

$result = floatval($result . ' ');

if ($result = $value3)
{
echo 'Working as intended';
}
else
{
echo $result IS NOT = $value3br /;
var_dump($result, $value3);
}



[2008-05-02 20:43:47] zero at infernotechnologies dot net

Description:

floatval() two seperate strings to return a result, try result against
exact same number (via =) and condition returns false.

Reproduce code:
---
$value1 = '1';
$value2 = '0.9';
$value3 = 0.1;

$result = floatval(floatval($value1) - floatval($value2));

if ($result = $value3)
{
echo 'Working as intended';
}
else
{
echo $result IS NOT = $value3br /;
var_dump($result, $value3);
}

Expected result:

Working as intended

Actual result:
--
0.1 IS NOT = 0.1
float(0.1) float(0.1) 





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



#44865 [Opn-Bgs]: max_file_size produces no error

2008-05-02 Thread fa
 ID:   44865
 Updated by:   [EMAIL PROTECTED]
 Reported By:  jahajee dot com at gmail dot com
-Status:   Open
+Status:   Bogus
 Bug Type: *General Issues
 Operating System: linux
 PHP Version:  4.4.8
 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.

Please see http://php.net/manual/en/features.file-upload.errors.php -
this looks like what you need.


Previous Comments:


[2008-04-29 23:38:40] jahajee dot com at gmail dot com

Description:

I'm using optional file upload form with max file upload size of 200 Kb
.Error check by backend script is done and error reported till the Max
file size is 2 Mb (PHP max file size setting) .Since after that if the
file size increases no file is actually send and hence the form is
processed without any warning to the user. For example if the user
uploads file of 1.6 Mb say then he gets an error that the file size is
more than 200 Kb but if the uploaded file size is 2.3Mb no file is
uploaded and the whole form processed without any error.
Saw the same in other discussions but of no help .Can't use the GET
method as the upload file is optional in the form.
Jahajee

Expected result:

Expects to warn the user even if the file size is more than 2Mb(PHP Max
file size setting)

Actual result:
--
No error reported and file processed without the uploaded file





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



#44893 [Fbk-Opn]: gzfile

2008-05-02 Thread sworddragon2 at aol dot com
 ID:   44893
 User updated by:  sworddragon2 at aol dot com
 Reported By:  sworddragon2 at aol dot com
-Status:   Feedback
+Status:   Open
 Bug Type: Zlib Related
 Operating System: Windows XP Professional SP3
 PHP Version:  5.2.6
 New Comment:

I used this picture for the example:

http://img501.imageshack.us/img501/7006/smiley1dr6.gif


Maybe it helps you to reproduce the problem. But this was not the only
picture with that I can reproduce the problem.


Previous Comments:


[2008-05-02 20:49:26] [EMAIL PROTECTED]

Couldn't reproduce on Win XP SP2 with php-5.2.6-Win32.zip



[2008-05-02 16:31:23] sworddragon2 at aol dot com

Description:

If im trying to use the function gzfile() to a compressed file, that
includes just a picture, the function don't read the complete file. On
this reproduce, the function stops after the End Transmission Block.

Reproduce code:
---
$file=fopen(smiley1.gif,rb);
$picture=fread($file,filesize(smiley1.gif));
fclose($file);
$file=gzopen(smiley1.gz,w);
gzwrite($file,$picture);
gzclose($file);
$file=gzfile(smiley1.gz);
print_r($file);

Expected result:

I expect to see all arrays until the end of the file.

Actual result:
--
With gzfile, i got just the array [0] with the content GIF89a





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



#44876 [WFx]: stripslashes() removes backslashes in wrong cases

2008-05-02 Thread c dot onogol at gmail dot com
 ID:   44876
 User updated by:  c dot onogol at gmail dot com
 Reported By:  c dot onogol at gmail dot com
 Status:   Wont fix
 Bug Type: Scripting Engine problem
 Operating System: Windows NT
 PHP Version:  5.2.5
 New Comment:

According to the documentation, stripslashes() un-quotes strings quoted
with addslashes().
The slash in the example would have never been added by addslashes()
and is not escaping any quotes or backslashes.


If this is the expected behavior, then one could say the documentation
is inaccurate and misleading.

Under return values it even says:
Returns a string with backslashes stripped off. (\' becomes ' and so
on.) Double backslashes (\\) are made into a single backslash (\).

I think the expected behavior one gets from the documentation differs
from the actual behavior of the function. Something along the lines of
strips all backslashes would be more accurate if the expected behavior
is the one you describe


Thanks


Previous Comments:


[2008-05-02 20:32:42] [EMAIL PROTECTED]

This is expected behaviour and has always been this way.



[2008-04-30 21:16:17] c dot onogol at gmail dot com

Description:

stripslashes is supposed to remove backslashes added by addslashes():
from the doc:
   stripslashes — Un-quote string quoted with addslashes()
   addslashes — Quote string with slashes


stripslashes return values from the documentation:
Returns a string with backslashes stripped off. (\' becomes ' and so
on.) Double backslashes (\\) are made into a single backslash (\).

The problem is that it removes single backslashes that are not escaping
any quotes/slashes.
For example, this one \ that one should stay the same after running
stripslashes(), but it actually is stripping the backslash, so the end
result of stripslashes(this one \ that one) is this one that one.

the backslash in this one \ that one is part of the original text and
is not a backslash addslashes() would add.










Reproduce code:
---
?
$str = this one \ should stay. it\'s a \test\;
$str = stripslashes($str);
var_dump($str);
?

Expected result:

string(37) this one \ should stay. it's a test

Actual result:
--
string(36) this one should stay. it's a test





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



#44864 [Opn-Fbk]: STREAM_CLIENT_ASYNC_CONNECT does does not work

2008-05-02 Thread jani
 ID:   44864
 Updated by:   [EMAIL PROTECTED]
 Reported By:  fhoenig at kargo dot com
-Status:   Open
+Status:   Feedback
 Bug Type: Streams related
 Operating System: FreeBSD 7.0 / AMD64
 PHP Version:  5.2.5
 Assigned To:  fb-req-jani


Previous Comments:


[2008-04-30 16:43:42] fhoenig at kargo dot com

The select issue seems indeed fixed in the 5.2-latest. However, since
the sockets extension was built as a SO, I still need to try whether
it's related to that.



[2008-04-30 16:16:53] fhoenig at kargo dot com

Yes and it does even more unpredictable things. It seems like I get the
bytes I write to the socket back on the reads... I need to look more
into it though. I just found that the problem does not exist on freebsd
7.0/i386. So it has to do with 64-bit land.



[2008-04-30 08:48:16] [EMAIL PROTECTED]

Please try using this CVS snapshot:

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

For Windows (installer):

  http://snaps.php.net/win32/php5.2-win32-installer-latest.msi





[2008-04-29 23:56:48] fhoenig at kargo dot com

Actually I cased down the problem a bit further.

socket_select under these conditions is not waiting even is the tv_sec
is set to NULL (in which case it should wait infinitely)

instead of sleep, put: $num_changed_streams = stream_select($rfd, $wfd,
$efd, NULL);

something is wrong with sockets here...



[2008-04-29 21:25:52] fhoenig at kargo dot com

Description:

The below code only works with sleeping in between
stream_socket_client() and the first IO on the socket. No error though.
Works on FreeBSD 6.2 and linux as well as OSX. Just not on Freebsd 7.0.
was installed through ports with default options.

What changed in freebsd 7 that could cause that? Fix through sysctl
option maybe?

Reproduce code:
---
$fp = stream_socket_client(tcp://www.google.com:80, $errno, $errstr,
0, STREAM_CLIENT_CONNECT | STREAM_CLIENT_ASYNC_CONNECT);

//sleep(1); === works only with sleep uncommented.

if (!$fp) {
echo $errstr ($errno)br /\n;
} else {
fwrite($fp, GET / HTTP/1.0\r\nHost: www.example.com\r\nAccept:
*/*\r\n\r\n);
while (!feof($fp)) {

echo fgets($fp, 1024);
}
fclose($fp);
}



Expected result:

The html output from www.google.com/


Actual result:
--
Locks up after fwrite and never reads anything from the socket. No
error. 





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



#44894 [Ver-Asn]: php_xsl.dll missing from .zip download file

2008-05-02 Thread jani
 ID:   44894
 Updated by:   [EMAIL PROTECTED]
 Reported By:  ash at theleys dot net
-Status:   Verified
+Status:   Assigned
 Bug Type: XSLT related
 Operating System: Windows/2003 ISAPI
 PHP Version:  5.2.6
 Assigned To:  pajoye


Previous Comments:


[2008-05-02 18:47:31] [EMAIL PROTECTED]

Our apologizes, xsl and imap are missing from the windows builds. We
are working to fix this issue as soon as possible. Too bad that it was
not catched with the snaps and RC



[2008-05-02 17:26:21] ash at theleys dot net

Error Class 'XsltProcessor' not found is exact error, copying
php_xsl.dll file from 5.2.5 seems to function correctly.



[2008-05-02 17:00:29] ash at theleys dot net

Description:

php_xsl.dll missing from .zip download \ext folder gives Fatal class
error.






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



#44900 [NEW]: OpenSSL extension fails to link with OpenSSL 0.9.6

2008-05-02 Thread jd at cpanel dot net
From: jd at cpanel dot net
Operating system: RedHat Linux AS-2
PHP version:  5.2.6
PHP Bug Type: Compile Failure
Bug description:  OpenSSL extension fails to link with OpenSSL 0.9.6

Description:

PHP 5.2.6 introduces some memory cleanup code in the OpenSSL extension. 
Unfortunately, EVP_MD_CTX_cleanup() is only available with OpenSSL 0.9.7
and higher.  openssl.c needs to verify EVP_MD_CTX_cleanup() is
available...

diff -Nur php-5.2.6.orig/ext/openssl/openssl.c
php-5.2.6/ext/openssl/openssl.c
--- php-5.2.6.orig/ext/openssl/openssl.c2008-04-07
05:44:03.0 -0500
+++ php-5.2.6/ext/openssl/openssl.c 2008-05-02 17:11:10.0
-0500
@@ -3522,7 +3522,9 @@
efree(sigbuf);
RETVAL_FALSE;
}
+#if OPENSSL_VERSION_NUMBER = 0x0090700fL
EVP_MD_CTX_cleanup(md_ctx);
+#endif
if (keyresource == -1) {
EVP_PKEY_free(pkey);
}
@@ -3562,7 +3564,9 @@
EVP_VerifyInit   (md_ctx, mdtype);
EVP_VerifyUpdate (md_ctx, data, data_len);
err = EVP_VerifyFinal (md_ctx, (unsigned char *)signature,
signature_len, pkey);
+#if OPENSSL_VERSION_NUMBER = 0x0090700fL
EVP_MD_CTX_cleanup(md_ctx);
+#endif
 
if (keyresource == -1) {
EVP_PKEY_free(pkey);



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



#42616 [Com]: CLI crashes

2008-05-02 Thread uncle_coolj at hotmail dot com
 ID:   42616
 Comment by:   uncle_coolj at hotmail dot com
 Reported By:  ashish_chap at yahoo dot co dot in
 Status:   No Feedback
 Bug Type: CGI related
 Operating System: Windows XP
 PHP Version:  5.2.4
 New Comment:

Hey,
i've tried to disable different modules to find out which one causes
the crash.

I've found out that the php_threads.dll is the problem.
if you comment out the module it works...

best regards


Previous Comments:


[2007-10-12 20:51:13] robert2s at hotmail dot com

I solved this in the following way.
In the php.ini file, add a semicolon (;) in front of the line
extension=php_sam.dl



[2007-09-24 00:19:42] mburke at cordovabay dot com

I am having the same problem. The configuration is:
Apache 2.2.4 (Win32)
PHP 5.2.4
MySQL 5.0.45

All php pages result in error 500

error log shows:

PHP Warning:  require_once(SAM/php_sam.php): failed to open stream: No
such file
 or directory in sam_factory on line 1

each time a php page is requested.

Any help would be appreciated!!



[2007-09-21 01:00:00] php-bugs at lists dot php dot net

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



[2007-09-13 10:15:17] [EMAIL PROTECTED]

Please try using this CVS snapshot:

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

For Windows (installer):

  http://snaps.php.net/win32/php5.2-win32-installer-latest.msi

Something related to this was fixed in CVS, so please try the latest
snapshot.



[2007-09-12 18:51:00] ashish_chap at yahoo dot co dot in

I had tried that but still facing the same issue... anythoughts???



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

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



#44894 [Asn-Csd]: php_xsl.dll missing from .zip download file

2008-05-02 Thread pajoye
 ID:   44894
 Updated by:   [EMAIL PROTECTED]
 Reported By:  ash at theleys dot net
-Status:   Assigned
+Status:   Closed
 Bug Type: XSLT related
 Operating System: Windows/2003 ISAPI
 PHP Version:  5.2.6
 Assigned To:  pajoye
 New Comment:

Thank you for your bug report. This issue has already been fixed
in the latest released version of PHP, which you can download at 
http://www.php.net/downloads.php

The new packages zip should be in the various mirrors in the next
update.


Previous Comments:


[2008-05-02 18:47:31] [EMAIL PROTECTED]

Our apologizes, xsl and imap are missing from the windows builds. We
are working to fix this issue as soon as possible. Too bad that it was
not catched with the snaps and RC



[2008-05-02 17:26:21] ash at theleys dot net

Error Class 'XsltProcessor' not found is exact error, copying
php_xsl.dll file from 5.2.5 seems to function correctly.



[2008-05-02 17:00:29] ash at theleys dot net

Description:

php_xsl.dll missing from .zip download \ext folder gives Fatal class
error.






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



#44901 [NEW]: open_basedir as prefix complains on attempts to access non-existant files

2008-05-02 Thread jake at yahoo-inc dot com
From: jake at yahoo-inc dot com
Operating system: redhat e linux (2.6.9-42.ELsmp)
PHP version:  5.2.6
PHP Bug Type: *Directory/Filesystem functions
Bug description:  open_basedir as prefix complains on attempts to access 
non-existant files

Description:

When using open_basedir as a prefix, attempting to access files or
directories which match the prefix but are not present on the filesystem
raise open_basedir restriction warnings.



Reproduce code:
---
// create files or directories on the file system /foo1, /foo2
// add /foo (not /foo/) to the open basedir restriction, then:

var_dump(file_exists('/foo1'));
var_dump(file_exists('/foo2'));
var_dump(file_exists('/foo3'));



Expected result:

this is the output returned:
bool(true)
bool(true)
bool(false)

which is expected, however, the false returned by the third call is
disingenuous... it is false because the call is being blocked by
open_basedir, and the following warning is triggered:

[Fri May  2 17:33:05 2008] [error] PHP Warning:  file_exists():
open_basedir restriction in effect. File(/foo3) is not within the allowed
path(s)



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



#44899 [Csd]: __isset usage changes behavior of empty()

2008-05-02 Thread felipe
 ID:   44899
 Updated by:   [EMAIL PROTECTED]
 Reported By:  nuttzy at spellingcow dot com
 Status:   Closed
 Bug Type: Scripting Engine problem
 Operating System: CentOS
 PHP Version:  5.2.6
 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.

Reclassified...

The source has been fixed, not the documentation.


Previous Comments:


[2008-05-03 00:41:58] [EMAIL PROTECTED]

This bug has been fixed in the documentation's XML sources. Since the
online and downloadable versions of the documentation need some time
to get updated, we would like to ask you to be a bit patient.

Thank you for the report, and for helping us make our documentation
better.

Fixed in 5_3 and HEAD. (patch by Etienne Kneuss)



[2008-05-02 20:53:35] nuttzy at spellingcow dot com

Description:

Per http://bugs.php.net/bug.php?id=40797, the behavior of empty() was
modified to call the __isset magic method.  There is at least one case
where this changes the behavior of empty() to falsely report not empty
when in fact the desired result is empty.

I suppose you would need an __empty() magic method, but that sounds
heinous.  Overloading docs should at least be updated to warn the
developer.

Reproduce code:
---
?
class myclass
{
private $_raw_data = array() ;

function __construct( $data)
{
$this-_raw_data = $data ;
}

function __isset( $field_name)
{
return isset($this-_raw_data[$field_name]);
}
}

$_POST['foo']='' ;
$myclass = new myclass( $_POST) ;

// correct reports isset
echo (isset($myclass-foo)) ? 'isset' : 'not isset') ;

// incorrectly reports not empty
echo (empty($myclass-foo)) ? 'empty' : 'not empty' ;

// a way to get around the broken empty() call
echo ($myclass-foo) ? 'not empty' : 'empty' ;

?

Expected result:

isset
empty
empty

Actual result:
--
isset
not empty
empty





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



#44897 [NEW]: failed to prepare statement

2008-05-02 Thread top dot bagger at bk dot ru
From: top dot bagger at bk dot ru
Operating system: CentOS 5
PHP version:  5.2.6
PHP Bug Type: MySQLi related
Bug description:  failed to prepare statement

Description:

prepare method call returns false if mysql stored procedure was prepared
before

Reproduce code:
---
$my = new mysqli(localhost,test,test,test_db);
$stmta = $my-prepare(CALL sp_auth_user(?,?));
$user = 'user';
$pass = 'pass';
$stmta-bind_param(ss, $user,$pass);
$stmta-execute();
$stmta-bind_result($state);
$stmta-fetch();
printf(State of user: %s\n, $state);
$stmta-close();
$stmtb = $my-prepare(SELECT userId FROM appUsers WHERE login = ?);
if ($stmtb) echo prepare succeeded;
else {
echo prepare failedbr /;
echo errno: , $my-errno,   - error: , $my-error, br /;
}

Expected result:

$stmtb contains mysqli_stmt object

Actual result:
--
$stmtb is false

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



#44883 [Opn-WFx]: Endless Recursion Ends quickly, throws no error

2008-05-02 Thread felipe
 ID:   44883
 Updated by:   [EMAIL PROTECTED]
 Reported By:  kevin at creativeanvil dot com
-Status:   Open
+Status:   Wont fix
 Bug Type: Scripting Engine problem
 Operating System: RHEL 4x
 PHP Version:  5.2.5
 New Comment:

Bug #29242


Previous Comments:


[2008-05-01 18:36:32] kevin at creativeanvil dot com

Description:

Basically my script was ending in the middle and output at the end of
the script was not outputted.  This was due to a coding error, however I
believe a PHP error should have been thrown because PHP terminated the
request at some point.  It was a stupid mistake, however not the easiest
to track down.

The code isn't my actual code, but it will reproduce what I think is a
problem.

Reproduce code:
---
?php
$c=0;
function recursiveTest() {
global $c;
echo $c++.br;
recursiveTest();
}
recursiveTest();
?

Expected result:

I would expect it to go on until memory limit is reached, throwing an
error, max execution time reached, throwing an error, or something that
throws an error.

In my environment it gets to 19456 and stops everytime, no error is
given and it stops very quicky.

ENDLESS RECURSION ERROR.

Some kind of error.

Actual result:
--
1
2
3

19456





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