#36696 [Com]: __destruct() is called before serialize() when object stored in session

2008-06-26 Thread margus dot sipria at gmail dot com
 ID:   36696
 Comment by:   margus dot sipria at gmail dot com
 Reported By:  iain at iaindooley dot com
 Status:   Open
 Bug Type: Feature/Change Request
 Operating System: *
 PHP Version:  5.1.2
 Assigned To:  sas
 New Comment:

duplicate with a bug http://bugs.php.net/bug.php?id=33772


Previous Comments:


[2006-03-23 00:27:58] iain at iaindooley dot com

in a garbage collection system, the destructor shouldn't be called on
an object until the last reference to it is destroyed. if i do:

$_SESSION['var'] = new Var();

then a reference to that object that was created should be stored in
the $_SESSION array, and __destruct() should not be called until the
$_SESSION array is destoryed. so clearly the session array must be being
destroyed before the objects within it are serialized, which isn't
right.



[2006-03-22 18:13:41] [EMAIL PROTECTED]

There is nothing wrong with the order here. Temp var gets destroyed as
soon as it is created, while session serialization happens at the end of
the script.



[2006-03-21 23:34:59] iain at iaindooley dot com

i would say that the fact the order of operations changes for a temp
var or an assigned var is a bug.



[2006-03-21 15:47:16] [EMAIL PROTECTED]

Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to report
a bug at http://bugs.php.net/how-to-report.php

When putting objects into session or serializing them manually put the
instantiation result into a variable 1st and then use it.

Ex. $a = new Object();
$_SESSION['obj'] = $a;

Doing so avoids temp var, which gets destroyed right away hence leading
to the wrong order of operations.



[2006-03-20 23:25:16] [EMAIL PROTECTED]

Assigned to the maintainer.



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

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



#16263 [Com]: session.start() create new empty session file and not resume existing session

2008-06-26 Thread karst at spectraweb dot nl
 ID:   16263
 Comment by:   karst at spectraweb dot nl
 Reported By:  kur at natur dot cuni dot cz
 Status:   No Feedback
 Bug Type: Session related
 Operating System: ANY
 PHP Version:  4.3.0-dev
 New Comment:

I have apache/php configured to run as another user then apache. I
tried to install php-xml and yum updated php, setting the owner of the
directory where the sessions are stored to apache, NOT MY USER! 

This worked for me:

to check if this was the problem I did a chmod 777 to session directory
- and: it worked again

I changed the owner of the session directory to my apache user,
chmodded session directory to the initial 770 - and yay: it worked.


Previous Comments:


[2008-06-02 12:45:16] shashibanzal at hotmail dot com

While running a programme as a login for librarian, if the name of
programme is changed in the URL, it switches to the pgm entered now and
the borrower can perform all functions of librarian. This is not
correct. Session start has been used.



[2008-05-25 21:59:47] gsimanton at gmail dot com

I found this on the php.net session page, and it worked for me:

b johnlonely at gmail dot comb
12-Oct-2005 02:32
Everytime I upgrade PHP to a new version, I used to recompile the
php.ini file. Everytime I create a website, I always kept the php.ini
file so that in the future I would be able to retrieve some Unique
properties of the php version I used. So the last php version I've seen
where session is sticking is version 4.2. I've been trying for two days
with no luck searching the manual and forum, when I tried something :

If you guys always fill the
session.cookie_path = /
to somewhere you the cookies should go, then leave the fuss. You'll
save two days! Leave it be!

[Session]
session.cookie_path = /

Happy sticking sessions.



[2008-05-20 11:27:30] moi at discardmail dot com

I have the same problem on:
Windows XP,
Apache 1.3
PHP 5.2

But only in IE6. I have set all security setting s in IE6 to lowest and
the script

?
session_start();
print session_id();
?

still generates new session on every page load. The same script, the
same server and FF2 or IE7 work right.

Any ideas?



[2008-05-14 11:12:52] pmioni at hce dot it

I had the same problem with Vista and EasyPHP. $_SESSION has problems
when you give it numbers as indexes.
So, for example, if you're trying to register the results of a
mysql_fetch_row or mysql_fetch_array (which contain numeric indexes) the
thing fails, because $_SESSION does not accept the indexes - the file
will be empty and nothing is saved in session

Try to save the results of mysql_fetch_assoc instead.

(Obviously, session permissions , path etc. must be correctly set).



[2008-05-12 05:29:50] jcaprathe at gmail dot com

I just upgraded to leopard and now experience the same problem, i have
had php on just about every platform out there and never experienced
this until now. It creates a new session file every page i go to and
will not use the session, if i turn on session.use_trans_id it will use
the session and everything works. 
are there any mac users with this issue?

OS X 10.5.2
php 5.2.5
apache 2.2.8



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

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



#45363 [NEW]: session_destroy, Failed to initialize storage module, custom session handler

2008-06-26 Thread famzah at icdsoft dot com
From: famzah at icdsoft dot com
Operating system: *
PHP version:  5.2.6
PHP Bug Type: Session related
Bug description:  session_destroy, Failed to initialize storage module, 
custom session handler

Description:

I want to re-open bug #32330 (http://bugs.php.net/bug.php?id=32330). The
problem still persists even though PHP developers stated that it was fixed.


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



#45364 [NEW]: usort does not auto-load classes

2008-06-26 Thread lindsay at marshall dot name
From: lindsay at marshall dot name
Operating system: Linux
PHP version:  5.2.6
PHP Bug Type: Scripting Engine problem
Bug description:  usort does not auto-load classes

Description:

On a call :

usort($array, array('Class', 'func'));

If Class is not loaded when usort is called it does not trigger the
auto-loader.

Expected result:

The class is auto-loaded as necessary

Actual result:
--
The class is not loaded and the script fails

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



#45365 [NEW]: non-native conversions from float to string

2008-06-26 Thread rasmus at mindplay dot dk
From: rasmus at mindplay dot dk
Operating system: Any
PHP version:  5.2.6
PHP Bug Type: Scripting Engine problem
Bug description:  non-native conversions from float to string

Description:

When using strval(), implicit conversion or type-casting, floats are
converted using locale-aware display formatting, rather than native
formatting, as understood by most other software (and PHP itself).

Please understand that this is a complex problem, which requires a lengthy
analysis and many examples. I have spent almost 6 hours analyzing this
problem in-depth, and created a complete report explaining the problem,
suggesting changes, and recommending ways to implement these changes.

Please, don't discard this report without careful consideration - there
are fundamental problems with float-handling in PHP, which should be taken
seriously.

For the full description and examples, please see this page:

http://public.test.fynskemedier.dk/float/

Thank You.


Reproduce code:
---
?php

setlocale(LC_NUMERIC, 'danish');

function ftos($f) {
return is_float($f) ? sprintf('%.14F', $f) : 'NaN';
}

$a = 1234.01234567890123456789;

echo accurate value:  . ftos($a) . \n\n;
echo casting float to string: ;
$s = (string) $a;
var_dump($s);
echo casting back to float: ;
echo ftos( (float) $s ) . \n\n;

?

The above is a very simple example, demonstrating one of the issues most
commonly encountered by beginning PHP developers.

Please find many more examples and in-depth explanations below:

http://public.test.fynskemedier.dk/float/


Expected result:

accurate value: 1234.01234567890128

casting float to string: string(19) 1234.01234567890128
casting back to float: 1234.01234567890128


Actual result:
--
accurate value: 1234.01234567890128

casting float to string: string(13) 1234,01234568
casting back to float: 1234.00


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



#45366 [NEW]: preg_match_all() misses elements (corner-case)

2008-06-26 Thread Arne dot Heizmann at csr dot com
From: Arne dot Heizmann at csr dot com
Operating system: All
PHP version:  5.2.6
PHP Bug Type: Regexps related
Bug description:  preg_match_all() misses elements (corner-case)

Description:

The following example code demonstrates that preg_match_all() does not
always return all elements as it should.

Almost any change to the input string makes the bug no longer trigger. For
example, remove one of the B's, and the bug no longer occurs. Same goes for
the regexp: if you change the (?=X|Y) to (?=X) or anything simpler, the bug
no longer triggers.

Reproduce code:
---
?

header ('Content-type: text/plain');
$input = 'A,  abcd abcd\'y';
preg_match_all (/[AB]+(?:\\s*\\w+)*(?=X|Y)|./si, $input, $output);
var_export ($output);

?


Expected result:

array (
  0 = 
  array (
0 = 'A',
1 = ',',
2 = ' ',
3 = 'B',
4 = 'B',
5 = 'B',
6 = 'B',
7 = 'B',
8 = 'B',
9 = 'B',
10 = 'B',
11 = ' ',
12 = 'a',
13 = 'b',
14 = 'c',
15 = 'd',
16 = ' ',
17 = 'a',
18 = 'b',
19 = 'c',
20 = 'd',
21 = '\'',
22 = 'y',
  ),
)

Actual result:
--
array (
  0 = 
  array (
0 = 'A',
1 = ',',
2 = ' ',
  ),
)

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



#45368 [NEW]: preg_replace_callback to non-existing function + custom errorhandler segfaults

2008-06-26 Thread Sjon at react dot com
From: Sjon at react dot com
Operating system: Linux
PHP version:  5.2.6
PHP Bug Type: Reproducible crash
Bug description:  preg_replace_callback to non-existing function + custom 
errorhandler segfaults

Description:

I have been working many hours to strip a 15000+ lines crashing script to
a short and reproducible crash; so here it is. Unfortunately the code is
still quite long, but anything I change will fix it, including the non-used
function arguments. This code (still) crashes in php5.2-200806261230; so I
hope someone might be able to fix this.

I know that the cause of the problem is that e-f calls a non-existing
callback function ('e', 'x');

Reproduce code:
---
The bug can only be reproduced by downloading both
http://home.parse.nl/~sjon/bug-reports/php/waa.txt and
http://home.parse.nl/~sjon/bug-reports/php/meukee.php ; rename them both to
.php and run 'waa.php'

Expected result:

Just the error 'preg_replace_callback(): Requires argument 2, 'e::x', to
be a valid callback'

Actual result:
--
#0  0x080aa31a in preg_replace_impl (ht=3, return_value=0x895a888, 
return_value_ptr=0x0, this_ptr=0x0, return_value_used=1, 
is_callable_replace=1 '\001')
at /tmp/php5.2-200806261230/ext/pcre/php_pcre.c:1283
#1  0x080aaa08 in zif_preg_replace_callback (ht=3, return_value=0x895a888,

return_value_ptr=0x0, this_ptr=0x0, return_value_used=1)
at /tmp/php5.2-200806261230/ext/pcre/php_pcre.c:1355
#2  0x0832fb58 in zend_do_fcall_common_helper_SPEC
(execute_data=0xbf9768d8)
at /tmp/php5.2-200806261230/Zend/zend_vm_execute.h:200
#3  0x0833535a in ZEND_DO_FCALL_SPEC_CONST_HANDLER
(execute_data=0xbf9768d8)
at /tmp/php5.2-200806261230/Zend/zend_vm_execute.h:1679
#4  0x0832f6d8 in execute (op_array=0x895bdd8)
at /tmp/php5.2-200806261230/Zend/zend_vm_execute.h:92
#5  0x0832fcc7 in zend_do_fcall_common_helper_SPEC
(execute_data=0xbf976a78)
at /tmp/php5.2-200806261230/Zend/zend_vm_execute.h:234
#6  0x08330777 in ZEND_DO_FCALL_BY_NAME_SPEC_HANDLER
(execute_data=0xbf976a78)
at /tmp/php5.2-200806261230/Zend/zend_vm_execute.h:322
#7  0x0832f6d8 in execute (op_array=0x895b9e8)
at /tmp/php5.2-200806261230/Zend/zend_vm_execute.h:92
#8  0x0832fcc7 in zend_do_fcall_common_helper_SPEC
(execute_data=0xbf976c38)
at /tmp/php5.2-200806261230/Zend/zend_vm_execute.h:234
#9  0x08330777 in ZEND_DO_FCALL_BY_NAME_SPEC_HANDLER
(execute_data=0xbf976c38)
at /tmp/php5.2-200806261230/Zend/zend_vm_execute.h:322
---Type return to continue, or q return to quit---
#10 0x0832f6d8 in execute (op_array=0x895fde8)
at /tmp/php5.2-200806261230/Zend/zend_vm_execute.h:92
#11 0x0832fcc7 in zend_do_fcall_common_helper_SPEC
(execute_data=0xbf976da8)
at /tmp/php5.2-200806261230/Zend/zend_vm_execute.h:234
#12 0x08330777 in ZEND_DO_FCALL_BY_NAME_SPEC_HANDLER
(execute_data=0xbf976da8)
at /tmp/php5.2-200806261230/Zend/zend_vm_execute.h:322
#13 0x0832f6d8 in execute (op_array=0x8958be4)
at /tmp/php5.2-200806261230/Zend/zend_vm_execute.h:92
#14 0x082fe232 in zend_eval_string (str=0x8956c2c $this-h('waa?
meukee!');, 
retval_ptr=0xbf976ea4, 
string_name=0x8958b18
/mnt/serve-a-lot/sjon/public_html/meukee.php(91) : regexp code) at
/tmp/php5.2-200806261230/Zend/zend_execute_API.c:1195
#15 0x080a902e in preg_do_eval (eval_str=0x89589bc $this-h('$0');, 
eval_str_len=15, subject=0x8958aa4 waa? meukee!, offsets=0x8958ae0,

count=1, result=0xbf976f28)
at /tmp/php5.2-200806261230/ext/pcre/php_pcre.c:899
#16 0x080a950c in php_pcre_replace_impl (pce=0x8989e08, 
subject=0x8958aa4 waa? meukee!, subject_len=12,
replace_val=0x8958980, 
is_callable_replace=0, result_len=0xbf9770b4, limit=-1,
replace_count=0x0)
at /tmp/php5.2-200806261230/ext/pcre/php_pcre.c:1031
#17 0x080a91fe in php_pcre_replace (regex=0x8958a34 /.+/se, regex_len=6,

subject=0x8958aa4 waa? meukee!, subject_len=12,
replace_val=0x8958980, 
is_callable_replace=0, result_len=0xbf9770b4, limit=-1,
replace_count=0x0)
---Type return to continue, or q return to quit---
at /tmp/php5.2-200806261230/ext/pcre/php_pcre.c:933
#18 0x080aa017 in php_replace_in_subject (regex=0x89589f8,
replace=0x8958980, 
subject=0x89484dc, result_len=0xbf9770b4, limit=-1, 
is_callable_replace=0 '\0', replace_count=0x0)
at /tmp/php5.2-200806261230/ext/pcre/php_pcre.c:1233
#19 0x080aa92f in preg_replace_impl (ht=3, return_value=0x8958944, 
return_value_ptr=0x0, this_ptr=0x0, return_value_used=1, 
is_callable_replace=0 '\0')
at /tmp/php5.2-200806261230/ext/pcre/php_pcre.c:1331
#20 0x080aa9d1 in zif_preg_replace (ht=3, return_value=0x8958944, 
return_value_ptr=0x0, this_ptr=0x0, return_value_used=1)
at /tmp/php5.2-200806261230/ext/pcre/php_pcre.c:1347
#21 0x0832fb58 in zend_do_fcall_common_helper_SPEC
(execute_data=0xbf977398)
at /tmp/php5.2-200806261230/Zend/zend_vm_execute.h:200
#22 0x0833535a in ZEND_DO_FCALL_SPEC_CONST_HANDLER

#45353 [Bgs]: Please Delete

2008-06-26 Thread bjori
 ID:   45353
 Updated by:   [EMAIL PROTECTED]
 Reported By:  null at null dot invalid
 Status:   Bogus
 Bug Type: Scripting Engine problem
 Operating System: Windows XP
 PHP Version:  5.2.6
 New Comment:

.


Previous Comments:


[2008-06-25 12:01:36] null at null dot invalid

n



[2008-06-25 11:59:02] null at null dot invalid

n



[2008-06-25 11:58:03] phpbugs dot mp7jir at stevenroddis dot com

n



[2008-06-25 11:53:28] null at null dot invalid

Description:

+= operand empties variable, see code for more details.

Reproduce code:
---
?php
//Running PHP Version 5.2.6 on Windows XP
$foo = '_123';
$bar = '';
$foo += $bar;

echo $foo;
?

Expected result:

_123

Actual result:
--
nothing
Checked with a debugger, $foo += $bar; makes $foo = null;





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



#45368 [Com]: preg_replace_callback to non-existing function + custom errorhandler segfaults

2008-06-26 Thread sjon at react dot com
 ID:   45368
 Comment by:   sjon at react dot com
 Reported By:  Sjon at react dot com
 Status:   Open
 Bug Type: Reproducible crash
 Operating System: Linux
 PHP Version:  5.2.6
 New Comment:

The correct URL is not
http://home.parse.nl/~sjon/bug-reports/php/meukee.php but
http://home.parse.nl/~sjon/bug-reports/php/meukee.txt


Previous Comments:


[2008-06-26 13:49:08] Sjon at react dot com

Description:

I have been working many hours to strip a 15000+ lines crashing script
to a short and reproducible crash; so here it is. Unfortunately the code
is still quite long, but anything I change will fix it, including the
non-used function arguments. This code (still) crashes in
php5.2-200806261230; so I hope someone might be able to fix this.

I know that the cause of the problem is that e-f calls a non-existing
callback function ('e', 'x');

Reproduce code:
---
The bug can only be reproduced by downloading both
http://home.parse.nl/~sjon/bug-reports/php/waa.txt and
http://home.parse.nl/~sjon/bug-reports/php/meukee.php ; rename them both
to .php and run 'waa.php'

Expected result:

Just the error 'preg_replace_callback(): Requires argument 2, 'e::x',
to be a valid callback'

Actual result:
--
#0  0x080aa31a in preg_replace_impl (ht=3, return_value=0x895a888, 
return_value_ptr=0x0, this_ptr=0x0, return_value_used=1, 
is_callable_replace=1 '\001')
at /tmp/php5.2-200806261230/ext/pcre/php_pcre.c:1283
#1  0x080aaa08 in zif_preg_replace_callback (ht=3,
return_value=0x895a888, 
return_value_ptr=0x0, this_ptr=0x0, return_value_used=1)
at /tmp/php5.2-200806261230/ext/pcre/php_pcre.c:1355
#2  0x0832fb58 in zend_do_fcall_common_helper_SPEC
(execute_data=0xbf9768d8)
at /tmp/php5.2-200806261230/Zend/zend_vm_execute.h:200
#3  0x0833535a in ZEND_DO_FCALL_SPEC_CONST_HANDLER
(execute_data=0xbf9768d8)
at /tmp/php5.2-200806261230/Zend/zend_vm_execute.h:1679
#4  0x0832f6d8 in execute (op_array=0x895bdd8)
at /tmp/php5.2-200806261230/Zend/zend_vm_execute.h:92
#5  0x0832fcc7 in zend_do_fcall_common_helper_SPEC
(execute_data=0xbf976a78)
at /tmp/php5.2-200806261230/Zend/zend_vm_execute.h:234
#6  0x08330777 in ZEND_DO_FCALL_BY_NAME_SPEC_HANDLER
(execute_data=0xbf976a78)
at /tmp/php5.2-200806261230/Zend/zend_vm_execute.h:322
#7  0x0832f6d8 in execute (op_array=0x895b9e8)
at /tmp/php5.2-200806261230/Zend/zend_vm_execute.h:92
#8  0x0832fcc7 in zend_do_fcall_common_helper_SPEC
(execute_data=0xbf976c38)
at /tmp/php5.2-200806261230/Zend/zend_vm_execute.h:234
#9  0x08330777 in ZEND_DO_FCALL_BY_NAME_SPEC_HANDLER
(execute_data=0xbf976c38)
at /tmp/php5.2-200806261230/Zend/zend_vm_execute.h:322
---Type return to continue, or q return to quit---
#10 0x0832f6d8 in execute (op_array=0x895fde8)
at /tmp/php5.2-200806261230/Zend/zend_vm_execute.h:92
#11 0x0832fcc7 in zend_do_fcall_common_helper_SPEC
(execute_data=0xbf976da8)
at /tmp/php5.2-200806261230/Zend/zend_vm_execute.h:234
#12 0x08330777 in ZEND_DO_FCALL_BY_NAME_SPEC_HANDLER
(execute_data=0xbf976da8)
at /tmp/php5.2-200806261230/Zend/zend_vm_execute.h:322
#13 0x0832f6d8 in execute (op_array=0x8958be4)
at /tmp/php5.2-200806261230/Zend/zend_vm_execute.h:92
#14 0x082fe232 in zend_eval_string (str=0x8956c2c $this-h('waa?
meukee!');, 
retval_ptr=0xbf976ea4, 
string_name=0x8958b18
/mnt/serve-a-lot/sjon/public_html/meukee.php(91) : regexp code) at
/tmp/php5.2-200806261230/Zend/zend_execute_API.c:1195
#15 0x080a902e in preg_do_eval (eval_str=0x89589bc $this-h('$0');, 
eval_str_len=15, subject=0x8958aa4 waa? meukee!,
offsets=0x8958ae0, 
count=1, result=0xbf976f28)
at /tmp/php5.2-200806261230/ext/pcre/php_pcre.c:899
#16 0x080a950c in php_pcre_replace_impl (pce=0x8989e08, 
subject=0x8958aa4 waa? meukee!, subject_len=12,
replace_val=0x8958980, 
is_callable_replace=0, result_len=0xbf9770b4, limit=-1,
replace_count=0x0)
at /tmp/php5.2-200806261230/ext/pcre/php_pcre.c:1031
#17 0x080a91fe in php_pcre_replace (regex=0x8958a34 /.+/se,
regex_len=6, 
subject=0x8958aa4 waa? meukee!, subject_len=12,
replace_val=0x8958980, 
is_callable_replace=0, result_len=0xbf9770b4, limit=-1,
replace_count=0x0)
---Type return to continue, or q return to quit---
at /tmp/php5.2-200806261230/ext/pcre/php_pcre.c:933
#18 0x080aa017 in php_replace_in_subject (regex=0x89589f8,
replace=0x8958980, 
subject=0x89484dc, result_len=0xbf9770b4, limit=-1, 
is_callable_replace=0 '\0', replace_count=0x0)
at /tmp/php5.2-200806261230/ext/pcre/php_pcre.c:1233
#19 0x080aa92f in preg_replace_impl (ht=3, return_value=0x8958944, 
return_value_ptr=0x0, this_ptr=0x0, return_value_used=1, 
is_callable_replace=0 '\0')
at /tmp/php5.2-200806261230/ext/pcre/php_pcre.c:1331
#20 0x080aa9d1 in zif_preg_replace (ht=3, return_value=0x8958944, 
return_value_ptr=0x0, 

#45368 [Opn-Ver]: preg_replace_callback to non-existing function + custom errorhandler segfaults

2008-06-26 Thread felipe
 ID:   45368
 Updated by:   [EMAIL PROTECTED]
 Reported By:  Sjon at react dot com
-Status:   Open
+Status:   Verified
 Bug Type: Reproducible crash
 Operating System: Linux
 PHP Version:  5.2.6
 New Comment:

Reproduced in PHP 5.2.7-dev (cli) (built: Jun  6 2008 12:12:11) 

5.3 and HEAD are OK.


Previous Comments:


[2008-06-26 14:51:54] sjon at react dot com

The correct URL is not
http://home.parse.nl/~sjon/bug-reports/php/meukee.php but
http://home.parse.nl/~sjon/bug-reports/php/meukee.txt



[2008-06-26 13:49:08] Sjon at react dot com

Description:

I have been working many hours to strip a 15000+ lines crashing script
to a short and reproducible crash; so here it is. Unfortunately the code
is still quite long, but anything I change will fix it, including the
non-used function arguments. This code (still) crashes in
php5.2-200806261230; so I hope someone might be able to fix this.

I know that the cause of the problem is that e-f calls a non-existing
callback function ('e', 'x');

Reproduce code:
---
The bug can only be reproduced by downloading both
http://home.parse.nl/~sjon/bug-reports/php/waa.txt and
http://home.parse.nl/~sjon/bug-reports/php/meukee.php ; rename them both
to .php and run 'waa.php'

Expected result:

Just the error 'preg_replace_callback(): Requires argument 2, 'e::x',
to be a valid callback'

Actual result:
--
#0  0x080aa31a in preg_replace_impl (ht=3, return_value=0x895a888, 
return_value_ptr=0x0, this_ptr=0x0, return_value_used=1, 
is_callable_replace=1 '\001')
at /tmp/php5.2-200806261230/ext/pcre/php_pcre.c:1283
#1  0x080aaa08 in zif_preg_replace_callback (ht=3,
return_value=0x895a888, 
return_value_ptr=0x0, this_ptr=0x0, return_value_used=1)
at /tmp/php5.2-200806261230/ext/pcre/php_pcre.c:1355
#2  0x0832fb58 in zend_do_fcall_common_helper_SPEC
(execute_data=0xbf9768d8)
at /tmp/php5.2-200806261230/Zend/zend_vm_execute.h:200
#3  0x0833535a in ZEND_DO_FCALL_SPEC_CONST_HANDLER
(execute_data=0xbf9768d8)
at /tmp/php5.2-200806261230/Zend/zend_vm_execute.h:1679
#4  0x0832f6d8 in execute (op_array=0x895bdd8)
at /tmp/php5.2-200806261230/Zend/zend_vm_execute.h:92
#5  0x0832fcc7 in zend_do_fcall_common_helper_SPEC
(execute_data=0xbf976a78)
at /tmp/php5.2-200806261230/Zend/zend_vm_execute.h:234
#6  0x08330777 in ZEND_DO_FCALL_BY_NAME_SPEC_HANDLER
(execute_data=0xbf976a78)
at /tmp/php5.2-200806261230/Zend/zend_vm_execute.h:322
#7  0x0832f6d8 in execute (op_array=0x895b9e8)
at /tmp/php5.2-200806261230/Zend/zend_vm_execute.h:92
#8  0x0832fcc7 in zend_do_fcall_common_helper_SPEC
(execute_data=0xbf976c38)
at /tmp/php5.2-200806261230/Zend/zend_vm_execute.h:234
#9  0x08330777 in ZEND_DO_FCALL_BY_NAME_SPEC_HANDLER
(execute_data=0xbf976c38)
at /tmp/php5.2-200806261230/Zend/zend_vm_execute.h:322
---Type return to continue, or q return to quit---
#10 0x0832f6d8 in execute (op_array=0x895fde8)
at /tmp/php5.2-200806261230/Zend/zend_vm_execute.h:92
#11 0x0832fcc7 in zend_do_fcall_common_helper_SPEC
(execute_data=0xbf976da8)
at /tmp/php5.2-200806261230/Zend/zend_vm_execute.h:234
#12 0x08330777 in ZEND_DO_FCALL_BY_NAME_SPEC_HANDLER
(execute_data=0xbf976da8)
at /tmp/php5.2-200806261230/Zend/zend_vm_execute.h:322
#13 0x0832f6d8 in execute (op_array=0x8958be4)
at /tmp/php5.2-200806261230/Zend/zend_vm_execute.h:92
#14 0x082fe232 in zend_eval_string (str=0x8956c2c $this-h('waa?
meukee!');, 
retval_ptr=0xbf976ea4, 
string_name=0x8958b18
/mnt/serve-a-lot/sjon/public_html/meukee.php(91) : regexp code) at
/tmp/php5.2-200806261230/Zend/zend_execute_API.c:1195
#15 0x080a902e in preg_do_eval (eval_str=0x89589bc $this-h('$0');, 
eval_str_len=15, subject=0x8958aa4 waa? meukee!,
offsets=0x8958ae0, 
count=1, result=0xbf976f28)
at /tmp/php5.2-200806261230/ext/pcre/php_pcre.c:899
#16 0x080a950c in php_pcre_replace_impl (pce=0x8989e08, 
subject=0x8958aa4 waa? meukee!, subject_len=12,
replace_val=0x8958980, 
is_callable_replace=0, result_len=0xbf9770b4, limit=-1,
replace_count=0x0)
at /tmp/php5.2-200806261230/ext/pcre/php_pcre.c:1031
#17 0x080a91fe in php_pcre_replace (regex=0x8958a34 /.+/se,
regex_len=6, 
subject=0x8958aa4 waa? meukee!, subject_len=12,
replace_val=0x8958980, 
is_callable_replace=0, result_len=0xbf9770b4, limit=-1,
replace_count=0x0)
---Type return to continue, or q return to quit---
at /tmp/php5.2-200806261230/ext/pcre/php_pcre.c:933
#18 0x080aa017 in php_replace_in_subject (regex=0x89589f8,
replace=0x8958980, 
subject=0x89484dc, result_len=0xbf9770b4, limit=-1, 
is_callable_replace=0 '\0', replace_count=0x0)
at /tmp/php5.2-200806261230/ext/pcre/php_pcre.c:1233
#19 0x080aa92f in preg_replace_impl (ht=3, return_value=0x8958944, 

#45369 [NEW]: strange behaviour on saving arrays with moved cursors in Session

2008-06-26 Thread thomas dot meike at nic dot at
From: thomas dot meike at nic dot at
Operating system: Linux Unix Windows
PHP version:  5.2.6
PHP Bug Type: Arrays related
Bug description:  strange behaviour on saving arrays with moved cursors in 
Session 

Description:

you define an array
step through ONLY SOME elements using list-each structure
stepping through you perform some changes on data
finishing the while-structure the array is saved in session
let's say, somewhere else in your businesslogic you need these session
data once more:
you initiate a variable with the recently saved session array 
the PROBLEM now: the variable is initiated with the array NOT RESETTED
as defined in documentation an array assigned to a variable has to be
resetted
the problem exists also with php version 5.2.5


Reproduce code:
---
session_start();
$arrL =
array(test1,test2,test3,test4,test5,test6,test7,test8,test9,test10);
if(!isset($_SESSION['DATA'])){
$_SESSION['DATA']=$arrL;
}
$counter = 3;
$arrSessData = $_SESSION['DATA'];
while((list($index, $value) = each($arrSessData))  
($counter  0) )
{
$arrSessData[$index] =  '_test_' . $value;
$counter--;
}
//store changes in session
$_SESSION['DATA']=$arrSessData;
//somewhere else within the businesslogic, init local 
variable and step
through
$arrSessDataProc = $_SESSION['DATA'];
while((list($index, $value) = each($arrSessDataProc)) ){
echo br . $index . ' ' . $value;
}


Expected result:

0 _test_test1
1 _test_test2
2 _test_test3
3 test4
4 test5
5 test6
6 test7
7 test8
8 test9
9 test10

Actual result:
--
4 test5
5 test6
6 test7
7 test8
8 test9
9 test10

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



#45339 [Opn]: Crash In ZEND_MM_CHECK_TREE

2008-06-26 Thread willh at metavera dot com
 ID:   45339
 User updated by:  willh at metavera dot com
 Reported By:  willh at metavera dot com
 Status:   Open
 Bug Type: Reproducible crash
 Operating System: Linux 2.6.18-5-686-bigmem
 PHP Version:  5.2CVS-2008-06-23 (snap)
 New Comment:

A couple interesting notes/observations. 

Removing the new by reference (new) and replace it with new appears 
to no longer replicate the crash. 

Changing 

static public function initialize($object,$method,$arguments = 
array())

to read 

static public function initialize($object,$method,$arguments = 
array())

Appears to no longer replicate the crash. Notice the  in the function

signature.  

Also passing something other than $this to MVCallback::initialize() 
appears to no longer replicate the crash. 

Commenting out line 1965 - 1967 in zend_alloc.c appears to prevent the

crash (the if(ZEND_MM_PREV_BLOCK_IS_FREE.. block). This likely causes 
memory leaks or poor utilization of memory but the process no longer 
crashes.


Previous Comments:


[2008-06-24 23:16:40] willh at metavera dot com

I made a typo in the above comment. 

 Unfortunately this script does not crash on our development server. 


should read ...

 Unfortunately this script does not crash on our production server. 



[2008-06-24 22:27:49] willh at metavera dot com

I have managed to isolate the PHP code that appeared to be triggering 
this issue on our production server and have crafted a relativity 
short, 71 lines, script that crashes PHP on our development servers. 
These servers run a different distribution of Linux but PHP is 
configured and compiled similarly. Unfortunately this script does not 
crash on our development server. 

The development server has php5.2-200806191230 configured in the 
following manner...

'./configure'  '--prefix=/usr/local/' '--with-apxs2' '--with-libxml-
dir' '--with-openssl' '--with-zlib' '--enable-bcmath' '--enable-
calendar' '--with-curl' '--with-curlwrappers' '--enable-exif' '--
enable-ftp' '--with-gd' '--enable-gd-native-ttf' '--with-gettext' '--
with-gmp' '--enable-mbstring' '--with-pdo-pgsql' '--with-pgsql' '--
enable-soap' '--with-tidy' '--enable-zip' '--with-xsl' '--with-jpeg-
dir=/usr/lib' '--with-png-dir=/usr/lib' '--with-ttf=/usr/lib' '--
enable-zip' '--with-freetype-dir=/usr/lib' '--with-bz2' '--enable-
sockets' '--with-kerberos' '--with-mcrypt' '--enable-sysvshm' '--
enable-sysvsem' '--with-config-file-path=/etc'

The following script is expected to exit normally but it crashes when 
USE_ZEND_ALLOC=1 . The following script does not crash when
USE_ZEND_ALLOC=0. 

I apologize for the length of the script, it is a short as I was able 
to make it and still manage to get it to crash. 


_
?php

class MVCallback  {
protected $key;
protected $object; /*The object to call the method on*/
protected $method; /*the method name */
protected $arguments = array();
static public function initialize($object,$method,$arguments = 
array()){
$callback = new self();
$callback-object = $object;
$callback-method = $method;
$callback-arguments = $arguments;
return $callback;
}
}

class callback_db_column  {
protected $callback = null;
protected $format_function;

public function __construct($name,$column_name=_U ){
$this-set_format_func('sprintf');
}

public function callback(){
return $this-callback;
}

public function set_callback($aMVCallback){
$this-callback = $aMVCallback;
return $this;
}
   
protected function  set_format_func($aString){
$this-format_function = $aString;
}
}


class foo  {
protected $columns = array();
 
function  add_column($col){
$this-columns[] = $col;
}

public function 
add_column_for_date($column_name,$value_name,$format_function){
$col = new callback_db_column($column_name,$value_name);
   $col-set_callback(
MVCallback::initialize($this,

'value_with_timezone',

array($format_function,$value_name))
);

$this-add_column($col);
}


function __construct($base_table=_U) {
$this-add_column_for_date(COL_RES_START,RES_START, 
'stamp_to_string');
$this-add_column_for_date(COL_RES_END, RES_END, 
'stamp_to_string');
$this-add_column_for_date(COL_RES_START_SHORT, RES_START, 
'stamp_to_input_string');
$this-add_column_for_date(COL_RES_END_SHORT, RES_END, 
'stamp_to_input_string');

}
}

for($i=1; $i=5000; ++$i){
$foo = new foo($u='foo');
}




#19175 [Com]: highlight_file bug?

2008-06-26 Thread carlmcdade at gmail dot com
 ID:   19175
 Comment by:   carlmcdade at gmail dot com
 Reported By:  bjarte at gandtech dot com
 Status:   No Feedback
 Bug Type: Scripting Engine problem
 Operating System: Windows 2000
 PHP Version:  4.2.2
 New Comment:

Same problem with PHP 5.2.5 on Windows XP.


Previous Comments:


[2005-10-18 01:35:41] el_flipis at yahoo dot es

I'm using PHP 5.0.5 and i experience the same problem. This code:

$desc = fopen(temp.php,w);
fwrite($desc,?php.$cphp.?);
ob_start();
highlight_file(temp.php);
$code_ret = ob_get_contents();
ob_end_clean();
fclose($desc);
unlink(temp.php);
echo $code_ret;

stops after a certain lenght of file. I don't know why it happens, i've
tried whith highlight_string() and the result is the very same.



[2002-09-23 07:59:38] [EMAIL PROTECTED]

No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to Open. Thank you.





[2002-08-29 23:08:35] [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-08-29 12:07:34] bjarte at gandtech dot com

highlight_file() seams to stop after a sertan length, try highlight a
big file to get the bug. The apache server seams to stop data after a
sertan number of bytes.




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



#45370 [NEW]: make install doesn't work

2008-06-26 Thread caio53 at gmail dot xom
From: caio53 at gmail dot xom
Operating system: Mac OS X 10.5.3
PHP version:  5.2.6
PHP Bug Type: *Compile Issues
Bug description:  make install doesn't work

Description:

make install doesn't really install anything.

Build complete.
Don't forget to run 'make test'.

[EMAIL PROTECTED]/php-5.2.6: sudo make install
Password:
Installing PHP SAPI module:   cgi
Installing PHP CGI binary: /usr/bin/
Installing PHP CLI binary:/usr/bin/
Installing PHP CLI man page:  /usr/man/man1/
Installing build environment: /usr/lib/php/build/
Installing header files:  /usr/include/php/
Installing helper programs:   /usr/bin/
  program: phpize
  program: php-config
Installing man pages: /usr/man/man1/
  page: phpize.1
  page: php-config.1
Installing PDO headers:  /usr/include/php/ext/pdo/
Installing ZIP headers:  /usr/include/php/ext/zip/lib

[EMAIL PROTECTED]/php-5.2.6: php
-bash: /usr/bin/php: No such file or directory

[EMAIL PROTECTED]/php-5.2.6: ./sapi/cli/php -v
PHP 5.2.6 (cli) (built: Jun 26 2008 18:10:03) 
Copyright (c) 1997-2008 The PHP Group
Zend Engine v2.2.0, Copyright (c) 1998-2008 Zend Technologies

I copied ~/php-5.2.6/sapi/cli/php to /usr/bin and it seems to be 
working.


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



#38111 [Com]: PHP crashes IIS worker process and application pool

2008-06-26 Thread leo at calinfomgmt dot com
 ID:   38111
 Comment by:   leo at calinfomgmt dot com
 Reported By:  svendavidh at hotmail dot com
 Status:   Feedback
 Bug Type: IIS related
 Operating System: Windows Server 2003 Std. Ed. R2
 PHP Version:  5.1.4
 Assigned To:  pajoye
 New Comment:

Same problem here. We are also using the ISAPI install of PHP. Maybe
someone will use this backtrace to fix a problem that seems to pleg the
entire 5.1.x version.


Previous Comments:


[2008-06-25 18:02:32] kevin dot webb at f2bc dot net

Since it's an ISAPI istall of PHP there is no php.exe process to tag.
This is a crash dump will all IIS related process flaged and using the
PHP debug.

Thread 0 - System ID 6548
Entry point   w3wp!wmainCRTStartup 
Create time   6/25/2008 9:58:56 AM 
Time spent in user mode   0 Days 0:0:0.78 
Time spent in kernel mode   0 Days 0:0:0.62 






Function Arg 1 Arg 2 Arg 3   Source 
w3core!W3_SERVER::Terminate+164  01001418 010013e4 
  
w3core!UlW3Start+280 0007 00263978 
w3wp!wmain+22a 0007 00263978 00264560
w3wp!wmainCRTStartup+12f   bffdb000
kernel32!BaseProcessStart+23 010018f8  78746341   





W3CORE!W3_SERVER::TERMINATE+164In
w3wp__PID__2044__Date__06_25_2008__Time_10_26_06AM__734__Second_Chance_Exception_C005.dmp
the assembly instruction at w3core!W3_SERVER::Terminate+164 in
c:\WINDOWS\system32\inetsrv\w3core.dll from Microsoft Corporation has
caused an access violation exception (0xC005) when trying to read
from memory location 0x608fc030 on thread 0

Module Information 
Image Name: c:\WINDOWS\system32\inetsrv\w3core.dll   Symbol Type:  PDB

Base address: 0x5a39   Time Stamp:  Sat Feb 17 06:01:40 2007  
Checksum: 0x00064439   Comments:   
COM DLL: False   Company Name:  Microsoft Corporation 
ISAPIExtension: False   File Description:  IIS Web Server Core 
ISAPIFilter: False   File Version:  6.0.3790.3959
(srv03_sp2_rtm.070216-1710) 
Managed DLL: False   Internal Name:  w3core.dll 
VB DLL: False   Legal Copyright:  © Microsoft Corporation. All rights
reserved. 
Loaded Image Name:  w3core.dll   Legal Trademarks:   
Mapped Image Name: Original filename:  w3core.dll 
Module name:  w3core   Private Build:   
Single Threaded:  False   Product Name:  Internet Information Services

Module Size:  352.00 KBytes   Product Version:  6.0.3790.3959 
Symbol File Name: 
c:\symcache\w3core.pdb\1BD3D6C6BC5C44D3B496F792D23444952\w3core.pdb  
Special Build:  



[2008-06-25 16:33:14] kevin dot webb at f2bc dot net

Here you go.

Thread 0 - System ID 9988
Entry point   w3wp!wmainCRTStartup 
Create time   6/24/2008 9:06:45 PM 
Time spent in user mode   0 Days 0:0:0.93 
Time spent in kernel mode   0 Days 0:0:0.62 






Function Arg 1 Arg 2 Arg 3   Source 
w3core!W3_SERVER::Terminate+164  01001418 010013e4 
  
w3core!UlW3Start+280 0007 00263978 
w3wp!wmain+22a 0007 00263978 00264560
w3wp!wmainCRTStartup+12f   bffdb000
kernel32!BaseProcessStart+23 010018f8  78746341   





W3CORE!W3_SERVER::TERMINATE+164In
w3wp__PID__9860__Date__06_24_2008__Time_09_27_54PM__62__Second_Chance_Exception_C005.dmp
the assembly instruction at w3core!W3_SERVER::Terminate+164 in
c:\WINDOWS\system32\inetsrv\w3core.dll from Microsoft Corporation has
caused an access violation exception (0xC005) when trying to read
from memory location 0x608fc030 on thread 0

Module Information 
Image Name: c:\WINDOWS\system32\inetsrv\w3core.dll   Symbol Type:  PDB

Base address: 0x5a39   Time Stamp:  Sat Feb 17 06:01:40 2007  
Checksum: 0x00064439   Comments:   
COM DLL: False   Company Name:  Microsoft Corporation 
ISAPIExtension: False   File Description:  IIS Web Server Core 
ISAPIFilter: False   File Version:  6.0.3790.3959
(srv03_sp2_rtm.070216-1710) 
Managed DLL: False   Internal Name:  w3core.dll 
VB DLL: False   Legal Copyright:  © Microsoft Corporation. All rights
reserved. 
Loaded Image Name:  w3core.dll   Legal Trademarks:   
Mapped Image Name: Original filename:  w3core.dll 
Module name:  w3core   Private Build:   
Single Threaded:  False   Product Name:  Internet Information Services

Module Size:  352.00 KBytes   Product Version:  6.0.3790.3959 
Symbol File Name: 
c:\symcache\w3core.pdb\1BD3D6C6BC5C44D3B496F792D23444952\w3core.pdb  
Special Build:  



[2008-06-25 06:54:37] [EMAIL PROTECTED]

To generate a usable backtrace see:

http://bugs.php.net/bugs-generating-backtrace-win32.php 

A script to reproduce it could help as well (even if many scripts may
crash, at least one can help to fix one issue).

I'm waiting some new 

#45371 [NEW]: SWFBitmap object can not be returned

2008-06-26 Thread letmegetone at hotmail dot com
From: letmegetone at hotmail dot com
Operating system: Windows XP SP3
PHP version:  4.4.8
PHP Bug Type: Ming related
Bug description:  SWFBitmap object can not be returned

Description:

I want to put some worked codes into a function, in order to make my main
script shorter.
All other MING classes work well,such as SWFSprite,SWFShape, except
SWFBitmap.
I can get the error message from apache2:
 PHP Fatal error:  output() [a
href='function.output'function.output/a]: Initial Jpeg marker not found!


It seems that the SWFBitmap object can not be returned in a function.

I tried test like this:
CODE I  + CODE III :FAILED
CODE II + CODE IV  :WORKS
CODE I  + CODE II  + CODE III  : WORKS

Reproduce code:
---
function get_b()//CODE I
{
   $mfile=xx.jpg;   $fp=fopen($mfile,r);
   $string=fread($fp,filesize($mfile));
   $b = new SWFBitmap($string);
   fclose($fp);
   return $b;
}
   $mfile=xx.jpg;   $fp=fopen($mfile,r);//CODE II
   $string=fread($fp,filesize($mfile));
   $b = new SWFBitmap($string);
   fclose($fp);

   $s = new SWFShape();

   $scale= $s-addFill(get_b()); //CODE III
   $scale= $s-addFill($b);  //CODE IV

Expected result:

Can I put the code with the SWFBitmap object into a function?


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



#45371 [Com]: SWFBitmap object can not be returned

2008-06-26 Thread letmegetone at hotmail dot com
 ID:   45371
 Comment by:   letmegetone at hotmail dot com
 Reported By:  letmegetone at hotmail dot com
 Status:   Open
 Bug Type: Ming related
 Operating System: Windows XP SP3
 PHP Version:  4.4.8
 New Comment:

I posted the completed CODES on a Chinese-based website:
http://club.phpe.net/index.php?act=STf=15t=13441s=


Previous Comments:


[2008-06-27 05:02:59] letmegetone at hotmail dot com

Description:

I want to put some worked codes into a function, in order to make my
main script shorter.
All other MING classes work well,such as SWFSprite,SWFShape, except
SWFBitmap.
I can get the error message from apache2:
 PHP Fatal error:  output() [a
href='function.output'function.output/a]: Initial Jpeg marker not
found! 

It seems that the SWFBitmap object can not be returned in a function.

I tried test like this:
CODE I  + CODE III :FAILED
CODE II + CODE IV  :WORKS
CODE I  + CODE II  + CODE III  : WORKS

Reproduce code:
---
function get_b()//CODE I
{
   $mfile=xx.jpg;   $fp=fopen($mfile,r);
   $string=fread($fp,filesize($mfile));
   $b = new SWFBitmap($string);
   fclose($fp);
   return $b;
}
   $mfile=xx.jpg;   $fp=fopen($mfile,r);//CODE II
   $string=fread($fp,filesize($mfile));
   $b = new SWFBitmap($string);
   fclose($fp);

   $s = new SWFShape();

   $scale= $s-addFill(get_b()); //CODE III
   $scale= $s-addFill($b);  //CODE IV

Expected result:

Can I put the code with the SWFBitmap object into a function?






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