Req #64608 [Asn->Opn]: Anonymous Function Dereferencing

2013-04-07 Thread laruence
Edit report at https://bugs.php.net/bug.php?id=64608&edit=1

 ID: 64608
 Updated by: larue...@php.net
 Reported by:j dot doyle133 at gmail dot com
 Summary:Anonymous Function Dereferencing
-Status: Assigned
+Status: Open
 Type:   Feature/Change Request
 Package:*General Issues
 Operating System:   All
 PHP Version:5.5.0beta1
 Assigned To:laruence
 Block user comment: N
 Private report: N



Previous Comments:

[2013-04-08 02:48:52] larue...@php.net

there is already a PR about this. https://github.com/php/php-src/pull/301


[2013-04-07 23:09:05] j dot doyle133 at gmail dot com

Description:

The anonymous functions wouldn't really be complete without dereferencing, 
making 
it easier for developers to split their code up into chunks, and having one 
return  
value. Database calls that are only going to be called once for example, but 
need 
to be stored in an array. There's no point making a whole function for it and 
no 
point setting it to a variable to be run once.

Test script:
---
$my_array = [
'key_1' => function() {
 return mt_rand();
}(),

'database' => function() {
$db  = new PDO("mysql:host=127.0.0.1; port=3306;", "root", "");
$sth = $db->prepare("SELECT * FROM `users` WHERE `username`=? LIMIT 1");
$sth->bindParam(1, 'Test');
$sth->execute();
return $sth->fetch(PDO::FETCH_ASSOC);
}()
];

Expected result:

An array with two values, a random value on 'key_1' and an associative array on 
'database'.

Actual result:
--
Parse error: syntax error, unexpected '(', expecting ']' in php shell code on 
line 
4

When leaving out the parentheses; two closure classes.






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


Req #64608 [Asn->Opn]: Anonymous Function Dereferencing

2013-04-07 Thread laruence
Edit report at https://bugs.php.net/bug.php?id=64608&edit=1

 ID: 64608
 Updated by: larue...@php.net
 Reported by:j dot doyle133 at gmail dot com
 Summary:Anonymous Function Dereferencing
-Status: Assigned
+Status: Open
 Type:   Feature/Change Request
 Package:*General Issues
 Operating System:   All
 PHP Version:5.5.0beta1
 Assigned To:laruence
 Block user comment: N
 Private report: N



Previous Comments:

[2013-04-08 02:48:52] larue...@php.net

there is already a PR about this. https://github.com/php/php-src/pull/301


[2013-04-07 23:09:05] j dot doyle133 at gmail dot com

Description:

The anonymous functions wouldn't really be complete without dereferencing, 
making 
it easier for developers to split their code up into chunks, and having one 
return  
value. Database calls that are only going to be called once for example, but 
need 
to be stored in an array. There's no point making a whole function for it and 
no 
point setting it to a variable to be run once.

Test script:
---
$my_array = [
'key_1' => function() {
 return mt_rand();
}(),

'database' => function() {
$db  = new PDO("mysql:host=127.0.0.1; port=3306;", "root", "");
$sth = $db->prepare("SELECT * FROM `users` WHERE `username`=? LIMIT 1");
$sth->bindParam(1, 'Test');
$sth->execute();
return $sth->fetch(PDO::FETCH_ASSOC);
}()
];

Expected result:

An array with two values, a random value on 'key_1' and an associative array on 
'database'.

Actual result:
--
Parse error: syntax error, unexpected '(', expecting ']' in php shell code on 
line 
4

When leaving out the parentheses; two closure classes.






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


Bug #64609 [Com]: pg_convert barfs on enum columns

2013-04-07 Thread jasen at treshna dot com
Edit report at https://bugs.php.net/bug.php?id=64609&edit=1

 ID: 64609
 Comment by: jasen at treshna dot com
 Reported by:jasen at treshna dot com
 Summary:pg_convert  barfs on enum columns
 Status: Open
 Type:   Bug
 Package:PostgreSQL related
 Operating System:   linux
 PHP Version:5.4.13
 Block user comment: N
 Private report: N

 New Comment:

on looking at the source 
php_pgsql_convert() in ext/pgsql/pgsql.c 

It looks like this usage goes against the design principles of pg_convert and 
thus pg_insert pg_delete pg_update (etc...) perhaps the documentation could be 
ammended to reflect this.


other things I noticed

 no support of ipv6
 attempts to validate dates using regex


Previous Comments:

[2013-04-08 02:21:09] jasen at treshna dot com

Description:

pg_convert, pg_update, pg_insert 
can't handle inputs that reference enum columns.

syntactically enum columns can be treated like string columns.



Test script:
---
11,'label'=>'fail','num'=>'gamma')));


Expected result:

some text starting with the word Array

Actual result:
--
nothing.






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


Req #64608 [Opn]: Anonymous Function Dereferencing

2013-04-07 Thread laruence
Edit report at https://bugs.php.net/bug.php?id=64608&edit=1

 ID: 64608
 Updated by: larue...@php.net
 Reported by:j dot doyle133 at gmail dot com
 Summary:Anonymous Function Dereferencing
 Status: Open
 Type:   Feature/Change Request
 Package:*General Issues
 Operating System:   All
 PHP Version:5.5.0beta1
 Block user comment: N
 Private report: N

 New Comment:

there is already a PR about this. https://github.com/php/php-src/pull/301


Previous Comments:

[2013-04-07 23:09:05] j dot doyle133 at gmail dot com

Description:

The anonymous functions wouldn't really be complete without dereferencing, 
making 
it easier for developers to split their code up into chunks, and having one 
return  
value. Database calls that are only going to be called once for example, but 
need 
to be stored in an array. There's no point making a whole function for it and 
no 
point setting it to a variable to be run once.

Test script:
---
$my_array = [
'key_1' => function() {
 return mt_rand();
}(),

'database' => function() {
$db  = new PDO("mysql:host=127.0.0.1; port=3306;", "root", "");
$sth = $db->prepare("SELECT * FROM `users` WHERE `username`=? LIMIT 1");
$sth->bindParam(1, 'Test');
$sth->execute();
return $sth->fetch(PDO::FETCH_ASSOC);
}()
];

Expected result:

An array with two values, a random value on 'key_1' and an associative array on 
'database'.

Actual result:
--
Parse error: syntax error, unexpected '(', expecting ']' in php shell code on 
line 
4

When leaving out the parentheses; two closure classes.






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


Req #64607 [Opn]: If second parameter is present, parse_str should return the generated array.

2013-04-07 Thread laruence
Edit report at https://bugs.php.net/bug.php?id=64607&edit=1

 ID: 64607
 Updated by: larue...@php.net
 Reported by:sdeonline at gmail dot com
 Summary:If second parameter is present, parse_str should
 return the generated array.
 Status: Open
 Type:   Feature/Change Request
 Package:Strings related
 Operating System:   Irrelevant
 PHP Version:Irrelevant
 Block user comment: N
 Private report: N

 New Comment:

it will be big BC break,  and I don't see any strong reason why need this.

thanks


Previous Comments:

[2013-04-07 22:22:47] sdeonline at gmail dot com

Description:

---
>From manual page: 
>http://www.php.net/function.parse-str#refsect1-function.parse-
str-returnvalues
---

In my humble opinion parse_str should be able to return the array it generates 
when it's not parsing to global vars. 
This could save lines of code and be more understandable.

This is quite useful if converting a received method variable as a parameter to 
another method that requires an array parameter. Because you don't need an 
extra 
line to just parse the string.

Test script:
---
// Initial string
$string = 'foo=bar&fruit=apple';

// This works:
// parse_str($string,$array);
// print_r($array);

// Now this would be better!
print_r(parse_str($string,true));

// Or the easy to the eyes version (but it quite misses the point.
$array = parse_str($string,true);
print_r($array);

Expected result:

Array 
( 
[foo] => bar 
[fruit] => apple 
)
Array 
( 
[foo] => bar 
[fruit] => apple 
)

Actual result:
--
Fatal error: Only variables can be passed by reference on line 9






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


[PHP-BUG] Bug #64609 [NEW]: pg_convert barfs on enum columns

2013-04-07 Thread jasen at treshna dot com
From: jasen at treshna dot com
Operating system: linux
PHP version:  5.4.13
Package:  PostgreSQL related
Bug Type: Bug
Bug description:pg_convert  barfs on enum columns

Description:

pg_convert, pg_update, pg_insert 
can't handle inputs that reference enum columns.

syntactically enum columns can be treated like string columns.



Test script:
---
11,'label'=>'fail','num'=>'gamma')));


Expected result:

some text starting with the word Array

Actual result:
--
nothing.

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



[PHP-BUG] Req #64608 [NEW]: Anonymous Function Dereferencing

2013-04-07 Thread j dot doyle133 at gmail dot com
From: j dot doyle133 at gmail dot com
Operating system: All
PHP version:  5.5.0beta1
Package:  *General Issues
Bug Type: Feature/Change Request
Bug description:Anonymous Function Dereferencing

Description:

The anonymous functions wouldn't really be complete without dereferencing,
making 
it easier for developers to split their code up into chunks, and having one
return  
value. Database calls that are only going to be called once for example,
but need 
to be stored in an array. There's no point making a whole function for it
and no 
point setting it to a variable to be run once.

Test script:
---
$my_array = [
'key_1' => function() {
 return mt_rand();
}(),

'database' => function() {
$db  = new PDO("mysql:host=127.0.0.1; port=3306;", "root", "");
$sth = $db->prepare("SELECT * FROM `users` WHERE `username`=? LIMIT
1");
$sth->bindParam(1, 'Test');
$sth->execute();
return $sth->fetch(PDO::FETCH_ASSOC);
}()
];

Expected result:

An array with two values, a random value on 'key_1' and an associative
array on 
'database'.

Actual result:
--
Parse error: syntax error, unexpected '(', expecting ']' in php shell code
on line 
4

When leaving out the parentheses; two closure classes.

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



[PHP-BUG] Req #64607 [NEW]: If second parameter is present, parse_str should return the generated array.

2013-04-07 Thread sdeonline at gmail dot com
From: sdeonline at gmail dot com
Operating system: Irrelevant
PHP version:  Irrelevant
Package:  Strings related
Bug Type: Feature/Change Request
Bug description:If second parameter is present, parse_str should return the 
generated array.

Description:

---
>From manual page:
http://www.php.net/function.parse-str#refsect1-function.parse-
str-returnvalues
---

In my humble opinion parse_str should be able to return the array it
generates 
when it's not parsing to global vars. 
This could save lines of code and be more understandable.

This is quite useful if converting a received method variable as a
parameter to 
another method that requires an array parameter. Because you don't need an
extra 
line to just parse the string.

Test script:
---
// Initial string
$string = 'foo=bar&fruit=apple';

// This works:
// parse_str($string,$array);
// print_r($array);

// Now this would be better!
print_r(parse_str($string,true));

// Or the easy to the eyes version (but it quite misses the point.
$array = parse_str($string,true);
print_r($array);

Expected result:

Array 
( 
[foo] => bar 
[fruit] => apple 
)
Array 
( 
[foo] => bar 
[fruit] => apple 
)

Actual result:
--
Fatal error: Only variables can be passed by reference on line 9

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



Bug #64462 [Asn->Csd]: Bug in libmagic included with fileinfo extension

2013-04-07 Thread ab
Edit report at https://bugs.php.net/bug.php?id=64462&edit=1

 ID: 64462
 Updated by: a...@php.net
 Reported by:vitalif at mail dot ru
 Summary:Bug in libmagic included with fileinfo extension
-Status: Assigned
+Status: Closed
 Type:   Bug
 Package:Filesystem function related
 PHP Version:5.5.0alpha5
 Assigned To:ab
 Block user comment: N
 Private report: N

 New Comment:

Just upgraded to libmagic 5.14 in PHP 5.4+ dev branches, please test.


Previous Comments:

[2013-03-21 12:36:02] vitalif at mail dot ru

For testing you should first get any Visio document, for example this one from 
a public SVN repository:

http://visipy.googlecode.com/svn-history/r3/trunk/test/testfile.vsd

And then run

https://bugs.php.net/bug.php?id=64462&edit=1


[PHP-BUG] Bug #64606 [NEW]: php crashes when wrtiting stream

2013-04-07 Thread pbxanime at gmail dot com
From: pbxanime at gmail dot com
Operating system: Centos 5.8
PHP version:  5.4.13
Package:  Streams related
Bug Type: Bug
Bug description:php crashes when wrtiting stream

Description:

I use the latest stable XCache and the latest stable Lighttpd.

I store sessions with memcache:

session.save_handler = memcache
session.save_path =
"unix:///tmp/memcached.socket:0?persistent=1&weight=1&timeout=1&retry_interval=15"

php is compiled with the following, I removed directories, but they are
correctly linked:

./configure \
--disable-fileinfo \
--disable-pdo \
--enable-exif \
--enable-fpm \
--enable-ftp \
--enable-gd-native-ttf \
--enable-libxml \
--enable-mbstring \
--enable-zip \
--prefix= \
--with-apxs2= \
--with-bz2 \
--with-curl= \
--with-freetype-dir= \
--with-gd \
--with-gettext \
--with-imap= \
--with-imap-ssl= \
--with-jpeg-dir= \
--with-png-dir= \
--with-kerberos \
--with-libxml-dir= \
--with-mcrypt= \
--with-mysql= \
--with-mysql-sock= \
--with-mysqli= \
--with-openssl= \
--with-openssl-dir= \
--with-pcre-regex= \
--with-png-dir= \
--with-xpm-dir= \
--with-zlib \
--with-zlib-dir=

Test script:
---
I store sessions like this:

IF (!ISSET($_SESSION)) {
SESSION_START();
}
IF($_SESSION['user_session_last_access']+180 < TIME()){
$_SESSION['user_session_last_access'] = TIME();

}

It's nothing special and it works normally.

Actual result:
--
I don't know how to dupicate this bug, it just happens randomly every few
to several hours:

FPM Log:

[07-Apr-2013 08:35:05.926454] DEBUG: pid 25374, fpm_got_signal(), line 72:
received SIGCHLD
[07-Apr-2013 08:35:05.926552] WARNING: pid 25374, fpm_children_bury(), line
252: [pool ] child 534 exited on signal 11 (SIGSEGV - core dumped) after
34.242946 seconds from start
[07-Apr-2013 08:35:05.926939] NOTICE: pid 25374, fpm_children_make(), line
421: [pool ] child 575 started
[07-Apr-2013 08:35:05.926980] DEBUG: pid 25374, fpm_event_loop(), line 411:
event module triggered 1 events

Backtrace:

#0  0x08304f47 in _php_stream_write (stream=0x9556b88,
buf=0xb77c5000 "set 0b58f7308927b881bd2d5273f0dc8de7 0 1440
38\r\nuser_session_last_access|i:1365338080;\r\n", count=88)
at /usr/src/php-5.4.13/main/streams/streams.c:1238
1238if (buf == NULL || count == 0 || stream->ops->write ==
NULL) {
(gdb) bt
#0  0x08304f47 in _php_stream_write (stream=0x9556b88,
buf=0xb77c5000 "set 0b58f7308927b881bd2d5273f0dc8de7 0 1440
38\r\nuser_session_last_access|i:1365338080;\r\n", count=88)
at /usr/src/php-5.4.13/main/streams/streams.c:1238
#1  0x00764506 in ?? ()
#2  0x09556b88 in ?? ()
#3  0xb77c5000 in ?? ()
#4  0x0058 in ?? ()
#5  0xbfb79f0e in ?? ()
#6  0x in ?? ()
(gdb) frame 0
#0  0x08304f47 in _php_stream_write (stream=0x9556b88,
buf=0xb77c5000 "set 0b58f7308927b881bd2d5273f0dc8de7 0 1440
38\r\nuser_session_last_access|i:1365338080;\r\n", count=88)
at /usr/src/php-5.4.13/main/streams/streams.c:1238
1238if (buf == NULL || count == 0 || stream->ops->write ==
NULL) {


Another Backtrace:


#0  _php_stream_write_filtered (stream=0x95564a8, buf=0x96c9100 "",
count=3216473280, flags=0) at
/usr/src/php-5.4.13/main/streams/streams.c:1177
1177status = filter->fops->filter(stream, filter,
brig_inp, brig_outp,
(gdb) bt
#0  _php_stream_write_filtered (stream=0x95564a8, buf=0x96c9100 "",
count=3216473280, flags=0) at
/usr/src/php-5.4.13/main/streams/streams.c:1177
#1  0x007620bb in ?? ()
#2  0x in ?? ()
(gdb) frame 0
#0  _php_stream_write_filtered (stream=0x95564a8, buf=0x96c9100 "",
count=3216473280, flags=0) at
/usr/src/php-5.4.13/main/streams/streams.c:1177
1177status = filter->fops->filter(stream, filter,
brig_inp, brig_outp,

-- 
Edit bug report at https://bugs.php.net/bug.php?id=64606&edit=1
-- 
Try a snapshot (PHP 5.4):   
https://bugs.php.net/fix.php?id=64606&r=trysnapshot54
Try a snapshot (PHP 5.3):   
https://bugs.php.net/fix.php?id=64606&r=trysnapshot53
Try a snapshot (trunk): 
https://bugs.php.net/fix.php?id=64606&r=trysnapshottrunk
Fixed in SVN:   https://bugs.php.net/fix.php?id=64606&r=fixed
Fixed in release:   https://bugs.php.net/fix.php?id=64606&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=64606&r=needtrace
Need Reproduce Script:  https://bugs.php.net/fix.php?id=64606&r=needscript
Try newer version:  https://bugs.php.net/fix.php?id=64606&r=oldversion
Not developer issue:https://bugs.php.net/fix.php?id=64606&r=support
Expected behavior:  https://bugs.php.net/fix.php?id=64606&r=notwrong
Not enough info:
https://bugs.php.net/fix.php?id=64606&r=notenoughinfo
Submitted twice:
https://bugs.php.net/fix.php?id=64606&r=submittedtwice
register_globals:   https://bugs.php.net/fix.php?id=64606&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=64606&r=php4
Daylight Savings:   https://bu

Bug #64604 [Opn]: parse_url is inconsistent with specified port

2013-04-07 Thread franssen dot roland at gmail dot com
Edit report at https://bugs.php.net/bug.php?id=64604&edit=1

 ID: 64604
 User updated by:franssen dot roland at gmail dot com
 Reported by:franssen dot roland at gmail dot com
-Summary:parse_url without is inconsistent with specified
 port
+Summary:parse_url is inconsistent with specified port
 Status: Open
 Type:   Bug
 Package:URL related
 Operating System:   Linux
 PHP Version:5.4.13
 Block user comment: N
 Private report: N

 New Comment:

typo.


Previous Comments:

[2013-04-07 13:14:49] franssen dot roland at gmail dot com

Description:

Please see the test script. parse_url() is inconsistent with 
"//localhost:80/path"

Test script:
---
http://localhost:80/path'));

Expected result:

# //localhost/path
array(2) {
  ["host"]=>
  string(9) "localhost"
  ["path"]=>
  string(5) "/path"
}

# //localhost:80/path
array(2) {
  ["host"]=>
  string(9) "localhost"
  ["port"]=>
  int(80)
  ["path"]=>
  string(5) "/path"
}

# //localhost:/path
array(2) {
  ["host"]=>
  string(9) "localhost"
  ["path"]=>
  string(5) "/path"
}

# http://localhost:80/path
array(4) {
  ["scheme"]=>
  string(4) "http"
  ["host"]=>
  string(9) "localhost"
  ["port"]=>
  int(80)
  ["path"]=>
  string(5) "/path"
}

Actual result:
--
# //localhost/path
array(2) {
  ["host"]=>
  string(9) "localhost"
  ["path"]=>
  string(5) "/path"
}

# //localhost:80/path
bool(false)

# //localhost:/path
array(2) {
  ["host"]=>
  string(9) "localhost"
  ["path"]=>
  string(5) "/path"
}

# http://localhost:80/path
array(4) {
  ["scheme"]=>
  string(4) "http"
  ["host"]=>
  string(9) "localhost"
  ["port"]=>
  int(80)
  ["path"]=>
  string(5) "/path"
}






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


[PHP-BUG] Bug #64604 [NEW]: parse_url without is inconsistent with specified port

2013-04-07 Thread franssen dot roland at gmail dot com
From: franssen dot roland at gmail dot com
Operating system: Linux
PHP version:  5.4.13
Package:  URL related
Bug Type: Bug
Bug description:parse_url without is inconsistent with specified port

Description:

Please see the test script. parse_url() is inconsistent with
"//localhost:80/path"

Test script:
---
http://localhost:80/path'));

Expected result:

# //localhost/path
array(2) {
  ["host"]=>
  string(9) "localhost"
  ["path"]=>
  string(5) "/path"
}

# //localhost:80/path
array(2) {
  ["host"]=>
  string(9) "localhost"
  ["port"]=>
  int(80)
  ["path"]=>
  string(5) "/path"
}

# //localhost:/path
array(2) {
  ["host"]=>
  string(9) "localhost"
  ["path"]=>
  string(5) "/path"
}

# http://localhost:80/path
array(4) {
  ["scheme"]=>
  string(4) "http"
  ["host"]=>
  string(9) "localhost"
  ["port"]=>
  int(80)
  ["path"]=>
  string(5) "/path"
}

Actual result:
--
# //localhost/path
array(2) {
  ["host"]=>
  string(9) "localhost"
  ["path"]=>
  string(5) "/path"
}

# //localhost:80/path
bool(false)

# //localhost:/path
array(2) {
  ["host"]=>
  string(9) "localhost"
  ["path"]=>
  string(5) "/path"
}

# http://localhost:80/path
array(4) {
  ["scheme"]=>
  string(4) "http"
  ["host"]=>
  string(9) "localhost"
  ["port"]=>
  int(80)
  ["path"]=>
  string(5) "/path"
}

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



Bug #60723 [Com]: error_log error time has changed to UTC ignoring default timezo

2013-04-07 Thread andrea dot ganduglia at gmail dot com
Edit report at https://bugs.php.net/bug.php?id=60723&edit=1

 ID: 60723
 Comment by: andrea dot ganduglia at gmail dot com
 Reported by:olemarkus at gentoo dot org
 Summary:error_log error time has changed to UTC ignoring
 default timezo
 Status: Closed
 Type:   Bug
 Package:Date/time related
 Operating System:   Gentoo Linux
 PHP Version:5.3.9
 Assigned To:derick
 Block user comment: N
 Private report: N

 New Comment:

I can confirm that the problem persist on Debian testing

# apt-cache policy php5
php5:
  Installed: 5.4.4-14
  Candidate: 5.4.4-14
  Version table:
 *** 5.4.4-14 0
500 http://mirrors.gandi.net/debian/ wheezy/main amd64 Packages
100 /var/lib/dpkg/status

# tail -1 error.log
[07-Apr-2013 11:30:56 UTC] PHP Strict Standards ...


Previous Comments:

[2013-03-06 19:25:12] pixelchutes at gmail dot com

I can confirm this has indeed been patched (Confirmed for v5.3.22)

BEFORE:
[04-Mar-2013 00:39:07 UTC] PHP Warning:

AFTER:
[06-Mar-2013 06:27:16 America/Denver] PHP Warning:


[2013-02-25 11:14:51] martin dot marques at gmail dot com

Don't see the fix in Debians testing packages (specifically 5.4.4), still 
seeing the UTC time instead of the local time:

# apt-cache policy php5
php5:
  Instalados: 5.4.4-13
  Candidato:  5.4.4-13
  Tabla de versión:
 5.5.0~alpha4-1 0
 40 http://ftp.de.debian.org/debian/ experimental/main i386 Packages
 *** 5.4.4-13 0
500 http://ftp.de.debian.org/debian/ testing/main i386 Packages
 50 http://ftp.de.debian.org/debian/ unstable/main i386 Packages
100 /var/lib/dpkg/status
 5.3.3-7+squeeze14 0
500 http://security.debian.org/ squeeze/updates/main i386 Packages
500 http://ftp.de.debian.org/debian/ stable/main i386 Packages

>From the log file:

[25-Feb-2013 11:05:46 UTC] PHP Deprecated:  Assigning the return value of new 
by reference is deprecated in /usr/share/php/MDB2.php on line 390


[2013-01-28 15:24:11] spam2 at rhsoft dot net

i do not see anything fixed 
errorlog still contains the timezone

PHP 5.3.21 as also 5.4.11

[28-Jan-2013 16:22:38 Europe/Vienna] PHP Parse error:  syntax error, unexpected 
end of file in Command line code on line 1

the sysadmin knows his timezone well enough...


[2012-10-10 21:19:40] pixelchutes at gmail dot com

Should hopefully be released in 5.3.18, since 5.3.17 was released just a few 
days 
before the patch was committed (13-Sep-2012 vs 23-Sep-2012). Glad to hear this 
has been resolved, thanks!


[2012-09-24 03:04:55] larue...@php.net

hey, committed to 5.3 5.4 branches, will fixed in next release, thanks




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

https://bugs.php.net/bug.php?id=60723


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


Bug #64592 [Opn->Asn]: ReflectionClass::getMethods() returns methods out of scope

2013-04-07 Thread felipe
Edit report at https://bugs.php.net/bug.php?id=64592&edit=1

 ID: 64592
 Updated by: fel...@php.net
 Reported by:benjamin dot morel at gmail dot com
 Summary:ReflectionClass::getMethods() returns methods out of
 scope
-Status: Open
+Status: Assigned
 Type:   Bug
 Package:Reflection related
 Operating System:   Linux
 PHP Version:5.4.13
-Assigned To:
+Assigned To:johannes
 Block user comment: N
 Private report: N

 New Comment:

Hey Johannes, what do you think about this behavior? Since reflection has 
worked in this way for a long time...


Previous Comments:

[2013-04-06 16:25:28] benjamin dot morel at gmail dot com

@felipe, did you read the bug before closing it? We're not talking about "not 
accessible", but "not in scope".
This is totally different.

The fact is, if you run my example, getMethods() and getProperties() do not 
behave 
in the same way, thus either this is a bug in getMethods(), and if not, this is 
a 
bug in getProperties().

But I'm pretty sure it's getProperties() that behaves correctly here.
Could you please comment on this?


[2013-04-06 15:27:46] fel...@php.net

It is not intended to just show the accessible ones, hence we already have 
introduced method like ReflectionMethod::setAccessible().


[2013-04-06 15:11:19] benjamin dot morel at gmail dot com

Works like a charm with your patch, thanks!
Any chance that gets into 5.4, or at least 5.5 (if there is a fear of breaking 
BC 
with existing libraries that would rely on this behaviour)?


[2013-04-06 13:19:41] larue...@php.net

The following patch has been added/updated:

Patch Name: bug64592.patch
Revision:   1365254381
URL:
https://bugs.php.net/patch-display.php?bug=64592&patch=bug64592.patch&revision=1365254381


[2013-04-06 11:54:57] benjamin dot morel at gmail dot com

But at least, getMethods() and getProperties() should behave in the same way, 
shouldn't they?




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

https://bugs.php.net/bug.php?id=64592


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


Req #64603 [Opn]: missing function to close persistent connection

2013-04-07 Thread slavb18 at gmail dot com
Edit report at https://bugs.php.net/bug.php?id=64603&edit=1

 ID: 64603
 User updated by:slavb18 at gmail dot com
 Reported by:slavb18 at gmail dot com
 Summary:missing function to close persistent connection
 Status: Open
 Type:   Feature/Change Request
 Package:PDO related
 Operating System:   Any
 PHP Version:5.3.23
 Block user comment: N
 Private report: N

 New Comment:

may be there is also third way to resolve problem

1. PDO class should have function
public function isValid(){
return TRUE; // or some embedded functional like start/finish transaction ? 
dont know how it work with other drivers
}
2. derived class override & implement method isValid() (like in my example)
3. php before returning PDO class from connection pool should call isValid() 
method, and if validation the result is false, then automatically refresh 
connection


Previous Comments:

[2013-04-07 07:13:03] slavb18 at gmail dot com

there is similiar Bug #40681 with oracle


[2013-04-07 07:11:12] slavb18 at gmail dot com

Description:

PHP PDO class is missing ability to close persistent connection:
__destruct does not close it, even if I call 
setAttribute(PDO::ATTR_PERSISTENT,FALSE) before destruction
May be __destruct should analyze PDO::ATTR_PERSISTENT attribute or there should 
be explicit function to close persistent connection.

Need to close invalid (shutdown) peristent connection demonstrate example below:

Example with firebird:
1. establish persistent connect in php
2. shutdown connection on server
3. try to get persistent connect from php again
there will be error "General error: -902 connection shutdown"

I can check connection validity in my pdo derived class like this:
public function isValid(){
$valid=TRUE;
try {
$this->beginTransaction();
$this->commit();
} catch (PDOException $e){
$valid=FALSE;
}
return $valid;
}

but I can not "refresh" or "close" my broken connection, there is no function 
to free it in php connection pool







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


Req #64603 [Opn]: missing function to close persistent connection

2013-04-07 Thread slavb18 at gmail dot com
Edit report at https://bugs.php.net/bug.php?id=64603&edit=1

 ID: 64603
 User updated by:slavb18 at gmail dot com
 Reported by:slavb18 at gmail dot com
 Summary:missing function to close persistent connection
 Status: Open
 Type:   Feature/Change Request
 Package:PDO related
 Operating System:   Any
 PHP Version:5.3.23
 Block user comment: N
 Private report: N

 New Comment:

there is similiar Bug #40681 with oracle


Previous Comments:

[2013-04-07 07:11:12] slavb18 at gmail dot com

Description:

PHP PDO class is missing ability to close persistent connection:
__destruct does not close it, even if I call 
setAttribute(PDO::ATTR_PERSISTENT,FALSE) before destruction
May be __destruct should analyze PDO::ATTR_PERSISTENT attribute or there should 
be explicit function to close persistent connection.

Need to close invalid (shutdown) peristent connection demonstrate example below:

Example with firebird:
1. establish persistent connect in php
2. shutdown connection on server
3. try to get persistent connect from php again
there will be error "General error: -902 connection shutdown"

I can check connection validity in my pdo derived class like this:
public function isValid(){
$valid=TRUE;
try {
$this->beginTransaction();
$this->commit();
} catch (PDOException $e){
$valid=FALSE;
}
return $valid;
}

but I can not "refresh" or "close" my broken connection, there is no function 
to free it in php connection pool







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


[PHP-BUG] Req #64603 [NEW]: missing function to close persistent connection

2013-04-07 Thread slavb18 at gmail dot com
From: slavb18 at gmail dot com
Operating system: Any
PHP version:  5.3.23
Package:  PDO related
Bug Type: Feature/Change Request
Bug description:missing function to close persistent connection

Description:

PHP PDO class is missing ability to close persistent connection:
__destruct does not close it, even if I call
setAttribute(PDO::ATTR_PERSISTENT,FALSE) before destruction
May be __destruct should analyze PDO::ATTR_PERSISTENT attribute or there
should be explicit function to close persistent connection.

Need to close invalid (shutdown) peristent connection demonstrate example
below:

Example with firebird:
1. establish persistent connect in php
2. shutdown connection on server
3. try to get persistent connect from php again
there will be error "General error: -902 connection shutdown"

I can check connection validity in my pdo derived class like this:
public function isValid(){
$valid=TRUE;
try {
$this->beginTransaction();
$this->commit();
} catch (PDOException $e){
$valid=FALSE;
}
return $valid;
}

but I can not "refresh" or "close" my broken connection, there is no
function to free it in php connection pool


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