Bug #60626 [Opn->Fbk]: filter_var crash

2011-12-31 Thread pajoye
Edit report at https://bugs.php.net/bug.php?id=60626&edit=1

 ID: 60626
 Updated by: paj...@php.net
 Reported by:stephanvanruth at gmail dot com
 Summary:filter_var crash
-Status: Open
+Status: Feedback
 Type:   Bug
 Package:*General Issues
 Operating System:   Win 7 x64
 PHP Version:5.4.0RC4
-Assigned To:
+Assigned To:pajoye
 Block user comment: N
 Private report: N

 New Comment:

It sounds to me like your stack is too small, are you using it within Apache?

Can you try in CLI using php.exe t.php and then using php.exe -n t.php please?


Previous Comments:

[2011-12-29 22:29:48] stephanvanruth at gmail dot com

Description:

Crash when a string longer than 225 characters (while containing @) is passed 
to filter_var

Test script:
---
filter_var('the-total-len...@of-an-entire-address.cannot-be-longer-than-two-hundred-and-fifty-four-characters.and-this-address-is-254-characters-exactly.so-it-should-be-valid.and-im-going-to-add-some-more-words-here.to-increase-the-lenght-blah-blah-blah-blah-bla.org',
 FILTER_VALIDATE_EMAIL);

Expected result:

return the input given

Actual result:
--
crash






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


[PHP-BUG] Req #60630 [NEW]: I'd like to see two functions added to php: str_begins_with and str_ends_with

2011-12-31 Thread regality at gmail dot com
From: 
Operating system: Linux
PHP version:  5.4.0RC4
Package:  *General Issues
Bug Type: Feature/Change Request
Bug description:I'd like to see two functions added to php: str_begins_with and 
str_ends_with

Description:

I would like to see to string functions added to php. I know they are easy
to 
implement in userland, but it would be nice to have them in the core.
I coded them up and attached a patch.
The functions are:

  str_begins_with(string $haystack, string $needle [, $case_insensitive =
false])

and 

  str_ends_with(string $haystack, string $needle [, $case_insensitive =
false])

I think they are pretty self explanatory, check if a string begins with or
ends 
with another string.


-- 
Edit bug report at https://bugs.php.net/bug.php?id=60630&edit=1
-- 
Try a snapshot (PHP 5.4):
https://bugs.php.net/fix.php?id=60630&r=trysnapshot54
Try a snapshot (PHP 5.3):
https://bugs.php.net/fix.php?id=60630&r=trysnapshot53
Try a snapshot (trunk):  
https://bugs.php.net/fix.php?id=60630&r=trysnapshottrunk
Fixed in SVN:
https://bugs.php.net/fix.php?id=60630&r=fixed
Fixed in SVN and need be documented: 
https://bugs.php.net/fix.php?id=60630&r=needdocs
Fixed in release:
https://bugs.php.net/fix.php?id=60630&r=alreadyfixed
Need backtrace:  
https://bugs.php.net/fix.php?id=60630&r=needtrace
Need Reproduce Script:   
https://bugs.php.net/fix.php?id=60630&r=needscript
Try newer version:   
https://bugs.php.net/fix.php?id=60630&r=oldversion
Not developer issue: 
https://bugs.php.net/fix.php?id=60630&r=support
Expected behavior:   
https://bugs.php.net/fix.php?id=60630&r=notwrong
Not enough info: 
https://bugs.php.net/fix.php?id=60630&r=notenoughinfo
Submitted twice: 
https://bugs.php.net/fix.php?id=60630&r=submittedtwice
register_globals:
https://bugs.php.net/fix.php?id=60630&r=globals
PHP 4 support discontinued:  
https://bugs.php.net/fix.php?id=60630&r=php4
Daylight Savings:https://bugs.php.net/fix.php?id=60630&r=dst
IIS Stability:   
https://bugs.php.net/fix.php?id=60630&r=isapi
Install GNU Sed: 
https://bugs.php.net/fix.php?id=60630&r=gnused
Floating point limitations:  
https://bugs.php.net/fix.php?id=60630&r=float
No Zend Extensions:  
https://bugs.php.net/fix.php?id=60630&r=nozend
MySQL Configuration Error:   
https://bugs.php.net/fix.php?id=60630&r=mysqlcfg



Req #60630 [Opn]: I'd like to see two functions added to php: str_begins_with and str_ends_with

2011-12-31 Thread pajoye
Edit report at https://bugs.php.net/bug.php?id=60630&edit=1

 ID: 60630
 Updated by: paj...@php.net
 Reported by:regality at gmail dot com
 Summary:I'd like to see two functions added to php:
 str_begins_with and str_ends_with
 Status: Open
 Type:   Feature/Change Request
 Package:*General Issues
 Operating System:   Linux
 PHP Version:5.4.0RC4
 Block user comment: N
 Private report: N

 New Comment:

substr allows that very easily, for example with negative offset for the end 
with 
part of your request.


Previous Comments:

[2011-12-31 12:08:51] regality at gmail dot com

Description:

I would like to see to string functions added to php. I know they are easy to 
implement in userland, but it would be nice to have them in the core.
I coded them up and attached a patch.
The functions are:

  str_begins_with(string $haystack, string $needle [, $case_insensitive = 
false])

and 

  str_ends_with(string $haystack, string $needle [, $case_insensitive = false])

I think they are pretty self explanatory, check if a string begins with or ends 
with another string.







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


Req #60630 [Opn]: I'd like to see two functions added to php: str_begins_with and str_ends_with

2011-12-31 Thread pajoye
Edit report at https://bugs.php.net/bug.php?id=60630&edit=1

 ID: 60630
 Updated by: paj...@php.net
 Reported by:regality at gmail dot com
 Summary:I'd like to see two functions added to php:
 str_begins_with and str_ends_with
 Status: Open
 Type:   Feature/Change Request
 Package:*General Issues
 Operating System:   Linux
 PHP Version:5.4.0RC4
 Block user comment: N
 Private report: N

 New Comment:

However if you like to propose them, please write a RFC and a patch. The RFC 
process is described here: https://wiki.php.net/rfc/voting

Cheers,


Previous Comments:

[2011-12-31 12:15:44] paj...@php.net

substr allows that very easily, for example with negative offset for the end 
with 
part of your request.


[2011-12-31 12:08:51] regality at gmail dot com

Description:

I would like to see to string functions added to php. I know they are easy to 
implement in userland, but it would be nice to have them in the core.
I coded them up and attached a patch.
The functions are:

  str_begins_with(string $haystack, string $needle [, $case_insensitive = 
false])

and 

  str_ends_with(string $haystack, string $needle [, $case_insensitive = false])

I think they are pretty self explanatory, check if a string begins with or ends 
with another string.







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


[PHP-BUG] Bug #60631 [NEW]: PHP-FPM fails to launch with APC extension

2011-12-31 Thread nicolas dot kermarc at gmail dot com
From: 
Operating system: Ubuntu 11.10 server
PHP version:  5.4.0RC4
Package:  FPM related
Bug Type: Bug
Bug description:PHP-FPM fails to launch with APC extension

Description:

I compiled APC with the good phpize (located in my /opt/php54/bin folder)
and 
PHP-FPM fails to launch, going for an invalid pointer error.

Expected result:

PHP-FPM running.

Actual result:
--
*** glibc detected *** /opt/php54/sbin/php-fpm: free(): invalid pointer: 
0x7fb4b9a64af8 ***
=== Backtrace: =
/lib/x86_64-linux-gnu/libc.so.6(+0x78a96)[0x7fb4b8194a96]
/lib/x86_64-linux-gnu/libc.so.6(cfree+0x6c)[0x7fb4b8198d7c]
/opt/php54/sbin/php-fpm(destroy_zend_class+0x235)[0x7147a5]
/opt/php54/sbin/php-fpm(zend_hash_clean+0x70)[0x72b4d0]
/usr/local/lib/php/extensions/no-debug-non-zts-
20100525/apc.so(apc_interned_strings_shutdown+0x20)[0x7fb4b538a190]
/usr/local/lib/php/extensions/no-debug-non-zts-
20100525/apc.so(apc_module_shutdown+0x12a)[0x7fb4b5383a0a]
/usr/local/lib/php/extensions/no-debug-non-zts-20100525/apc.so(+0xaddf)
[0x7fb4b5378ddf]
/opt/php54/sbin/php-fpm[0x724bc3]
/opt/php54/sbin/php-fpm[0x729d74]
/opt/php54/sbin/php-fpm(zend_hash_graceful_reverse_destroy+0x18)[0x72b5a8]
/opt/php54/sbin/php-fpm[0x71dce8]
/opt/php54/sbin/php-fpm(php_module_shutdown+0x2a)[0x6c038a]
/opt/php54/sbin/php-fpm[0x7ca349]
/opt/php54/sbin/php-fpm[0x7c3d06]
/opt/php54/sbin/php-fpm[0x7cfdea]
/opt/php54/sbin/php-fpm[0x7c2ff5]
/opt/php54/sbin/php-fpm[0x42af69]
/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xed)[0x7fb4b813d30d]
/opt/php54/sbin/php-fpm[0x42c089]
=== Memory map: 
0040-00c42000 r-xp  08:02 49020964   
/opt/php54/sbin/php-fpm
00e41000-00e42000 r--p 00841000 08:02 49020964   
/opt/php54/sbin/php-fpm
00e42000-00e5 rw-p 00842000 08:02 49020964   
/opt/php54/sbin/php-fpm
00e5-00e6f000 rw-p  00:00 0 
01eca000-020fc000 rw-p  00:00 0 
[heap]
7fb4b000-7fb4b0021000 rw-p  00:00 0 
7fb4b0021000-7fb4b400 ---p  00:00 0 
7fb4b5158000-7fb4b516d000 r-xp  08:02 10354806   
/lib/x86_64-linux-gnu/libgcc_s.so.1
7fb4b516d000-7fb4b536c000 ---p 00015000 08:02 10354806   
/lib/x86_64-linux-gnu/libgcc_s.so.1
7fb4b536c000-7fb4b536d000 r--p 00014000 08:02 10354806   
/lib/x86_64-linux-gnu/libgcc_s.so.1
7fb4b536d000-7fb4b536e000 rw-p 00015000 08:02 10354806   
/lib/x86_64-linux-gnu/libgcc_s.so.1
7fb4b536e000-7fb4b5391000 r-xp  08:02 35128454   
/usr/local/lib/php/extensions/no-debug-non-zts-20100525/apc.so
7fb4b5391000-7fb4b559 ---p 00023000 08:02 35128454   
/usr/local/lib/php/extensions/no-debug-non-zts-20100525/apc.so
7fb4b559-7fb4b5592000 r--p 00022000 08:02 35128454   
/usr/local/lib/php/extensions/no-debug-non-zts-20100525/apc.so
7fb4b5592000-7fb4b5593000 rw-p 00024000 08:02 35128454   
/usr/local/lib/php/extensions/no-debug-non-zts-20100525/apc.so
7fb4b5593000-7fb4b559c000 rw-p  00:00 0 
7fb4b559c000-7fb4b559e000 r-xp  08:02 10354911   
/lib/x86_64-linux-gnu/libkeyutils.so.1.3
7fb4b559e000-7fb4b579d000 ---p 2000 08:02 10354911   
/lib/x86_64-linux-gnu/libkeyutils.so.1.3
7fb4b579d000-7fb4b579e000 r--p 1000 08:02 10354911   
/lib/x86_64-linux-gnu/libkeyutils.so.1.3
7fb4b579e000-7fb4b579f000 rw-p 2000 08:02 10354911   
/lib/x86_64-linux-gnu/libkeyutils.so.1.3
7fb4b579f000-7fb4b57a2000 r-xp  08:02 10358667   
/lib/x86_64-linux-gnu/libgpg-error.so.0.8.0
7fb4b57a2000-7fb4b59a1000 ---p 3000 08:02 10358667   
/lib/x86_64-linux-gnu/libgpg-error.so.0.8.0
7fb4b59a1000-7fb4b59a2000 r--p 2000 08:02 10358667   
/lib/x86_64-linux-gnu/libgpg-error.so.0.8.0
7fb4b59a2000-7fb4b59a3000 rw-p 3000 08:02 10358667   
/lib/x86_64-linux-gnu/libgpg-error.so.0.8.0
7fb4b59a3000-7fb4b59b3000 r-xp  08:02 34603572   
/usr/lib/x86_64-linux-gnu/libtasn1.so.3.1.11
7fb4b59b3000-7fb4b5bb2000 ---p 0001 08:02 34603572   
/usr/lib/x86_64-linux-gnu/libtasn1.so.3.1.11
7fb4b5bb2000-7fb4b5bb3000 r--p f000 08:02 34603572   
/usr/lib/x86_64-linux-gnu/libtasn1.so.3.1.11
7fb4b5bb3000-7fb4b5bb4000 rw-p 0001 08:02 34603572   
/usr/lib/x86_64-linux-gnu/libtasn1.so.3.1.11
7fb4b5bb4000-7fb4b5bbb000 r-xp  08:02 34607836   
/usr/lib/x86_64-linux-gnu/libkrb5support.so.0.1
7fb4b5bbb000-7fb4b5dba000 ---p 7000 08:02 34607836   
/usr/lib/x86_64-linux-gnu/libkrb5support.so.0.1
7fb4b5dba000-7fb4b5dbb000 r--p 6000 08:02 34607836   
/usr/lib/x86_64-linux-gnu/libkrb5support.so.0.1
7fb4b5dbb000-7fb

Bug #60626 [Fbk->Asn]: filter_var crash

2011-12-31 Thread stephanvanruth at gmail dot com
Edit report at https://bugs.php.net/bug.php?id=60626&edit=1

 ID: 60626
 User updated by:stephanvanruth at gmail dot com
 Reported by:stephanvanruth at gmail dot com
 Summary:filter_var crash
-Status: Feedback
+Status: Assigned
 Type:   Bug
 Package:*General Issues
 Operating System:   Win 7 x64
 PHP Version:5.4.0RC4
 Assigned To:pajoye
 Block user comment: N
 Private report: N

 New Comment:

t.php:



Success!
test.txt has been created and contains the given string.

works with both:
php t.php
php -n t.php

Thnx for this, whenever I 'think' I have found a bug, I will try this first.
I'm gonna google "Apache stack too small" now.

Happy New Year!

Stephan


Previous Comments:

[2011-12-31 11:14:15] paj...@php.net

It sounds to me like your stack is too small, are you using it within Apache?

Can you try in CLI using php.exe t.php and then using php.exe -n t.php please?


[2011-12-29 22:29:48] stephanvanruth at gmail dot com

Description:

Crash when a string longer than 225 characters (while containing @) is passed 
to filter_var

Test script:
---
filter_var('the-total-len...@of-an-entire-address.cannot-be-longer-than-two-hundred-and-fifty-four-characters.and-this-address-is-254-characters-exactly.so-it-should-be-valid.and-im-going-to-add-some-more-words-here.to-increase-the-lenght-blah-blah-blah-blah-bla.org',
 FILTER_VALIDATE_EMAIL);

Expected result:

return the input given

Actual result:
--
crash






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


[PHP-BUG] Bug #60632 [NEW]: openssl_seal fails with AES

2011-12-31 Thread brett at silcon dot com
From: 
Operating system: Ubuntu 10.04 LTS
PHP version:  5.4.0RC4
Package:  OpenSSL related
Bug Type: Bug
Bug description:openssl_seal fails with AES

Description:

The following test script segfaults in both PHP 5.3.8 and PHP 5.4.0RC4 even

though OpenSSL is supposed to support AES in PHP 5.4.0.

In the attached script running with method 'aes256' or 'AES-256-CFB' both 
segfault.

PHP 5.4.0 just prints a segfault, but in my PHP 5.3.8 from Zend Server, it
prints 
a full printout first.

I don't know if this is an expected wontfix or if its a genuinely
overlooked 
item.

Test script:
---
 'sha256',
 'x509_extensions' => 'v3_ca',
 'private_key_bits' => 4096,
 'private_key_type' => OPENSSL_KEYTYPE_RSA,
 'encrypt_key' => false
 ));
$details = openssl_pkey_get_details($pkey);
$Tpubkey = $details['key'];
$pubkey = openssl_pkey_get_public($Tpubkey);
$encrypted = null;
$ekeys = array();
$result = openssl_seal('test phrase', $encrypted, $ekeys, array($pubkey),
'aes256');
//$result = openssl_seal('test phrase', $encrypted, $ekeys, array($pubkey),
'AES-256-CFB');


Expected result:

I would expect encrypted text placed in $encrypted and AES encrypted
session keys 
placed in $ekeys.


Actual result:
--
PHP 5.4.0
blt@php54:~$ php-5.4.0RC4/sapi/cli/php phpsealtest.php 
Segmentation fault


PHP 5.3.8

blt@aurora:~$ /usr/local/zend/bin/php phpsealtest.php 
[31.12.2011 14:14:29 ERROR] [ ZendExtensionManager.cpp : 661 ( sig_handler
) ] 
ZendExtensionManager got SIG 11 at pid 1583 ! 
[31.12.2011 14:14:29 ERROR] [ ZendExtensionManager.cpp : 674 ( sig_handler
) ] 
Crash happened during IDLE stage 
[31.12.2011 14:14:29 ERROR] [ ZendExtensionManager.cpp : 677 ( sig_handler
) ] 
The stack trace follows: 
[31.12.2011 14:14:29 SYSTEM] Obtained 17 stack frames 
[31.12.2011 14:14:29 SYSTEM] 
/usr/local/zend/lib/ZendExtensionManager.so(+0x28df5) [0x7f62e378fdf5] 
[31.12.2011 14:14:29 SYSTEM] 
/usr/local/zend/lib/ZendExtensionManager.so(+0x1724a) [0x7f62e377e24a] 
[31.12.2011 14:14:29 SYSTEM] /lib/libc.so.6(+0x33af0) [0x7f62e3c81af0] 
[31.12.2011 14:14:29 SYSTEM] /lib/libc.so.6(memcpy+0x1e) [0x7f62e3cd4cae] 
[31.12.2011 14:14:29 SYSTEM] /usr/local/zend/bin/php(SHA1_Update+0x13e) 
[0x75ca2e] 
[31.12.2011 14:14:29 SYSTEM] /usr/local/zend/bin/php() [0x7833f7] 
[31.12.2011 14:14:29 SYSTEM] /usr/local/zend/bin/php() [0x782d66] 
[31.12.2011 14:14:29 SYSTEM] /usr/local/zend/bin/php(EVP_SealInit+0x14f) 
[0x72cc0f] 
[31.12.2011 14:14:29 SYSTEM] /usr/local/zend/bin/php() [0x498893] 
[31.12.2011 14:14:29 SYSTEM] /usr/local/zend/bin/php() [0x692c93] 
[31.12.2011 14:14:29 SYSTEM] /usr/local/zend/bin/php(execute+0x1d3)
[0x692293] 
[31.12.2011 14:14:29 SYSTEM] /usr/local/zend/lib/debugger/php-
5.3.x/ZendDebugger.so(+0xed9b) [0x7f62d866fd9b] 
[31.12.2011 14:14:29 SYSTEM]
/usr/local/zend/bin/php(zend_execute_scripts+0x159) 
[0x66bae9] 
[31.12.2011 14:14:29 SYSTEM]
/usr/local/zend/bin/php(php_execute_script+0x1b8) 
[0x619968] 
[31.12.2011 14:14:29 SYSTEM] /usr/local/zend/bin/php() [0x6f5b94] 
[31.12.2011 14:14:29 SYSTEM] /lib/libc.so.6(__libc_start_main+0xfd) 
[0x7f62e3c6cc4d] 
[31.12.2011 14:14:29 SYSTEM] /usr/local/zend/bin/php() [0x4614aa] 
Segmentation fault


-- 
Edit bug report at https://bugs.php.net/bug.php?id=60632&edit=1
-- 
Try a snapshot (PHP 5.4):
https://bugs.php.net/fix.php?id=60632&r=trysnapshot54
Try a snapshot (PHP 5.3):
https://bugs.php.net/fix.php?id=60632&r=trysnapshot53
Try a snapshot (trunk):  
https://bugs.php.net/fix.php?id=60632&r=trysnapshottrunk
Fixed in SVN:
https://bugs.php.net/fix.php?id=60632&r=fixed
Fixed in SVN and need be documented: 
https://bugs.php.net/fix.php?id=60632&r=needdocs
Fixed in release:
https://bugs.php.net/fix.php?id=60632&r=alreadyfixed
Need backtrace:  
https://bugs.php.net/fix.php?id=60632&r=needtrace
Need Reproduce Script:   
https://bugs.php.net/fix.php?id=60632&r=needscript
Try newer version:   
https://bugs.php.net/fix.php?id=60632&r=oldversion
Not developer issue: 
https://bugs.php.net/fix.php?id=60632&r=support
Expected behavior:   
https://bugs.php.net/fix.php?id=60632&r=notwrong
Not enough info: 
https://bugs.php.net/fix.php?id=60632&r=notenoughinfo
Submitted twice: 
https://bugs.php.net/fix.php?id=60632&r=submittedtwice
register_globals:
https://bugs.php.net/fix.php?id=60632&r=globals
PHP 4 support discontinued:  
https://bugs.php.net/fix.php?id=60632&r=php4
Daylight Savings:https://bugs.php.net/fix.php?id=60632&r=dst
IIS Stability:   
https://bugs.php.net/fix.php?id=60632&r=isapi
Install GNU Sed: 
https://bugs.php.net/fix.php?id=60632&r=gnused
Floating point limitations: