#47874 [Fbk-Opn]: crash while prepare statement

2009-04-06 Thread jan dot schmidt at vitronic dot de
 ID:   47874
 User updated by:  jan dot schmidt at vitronic dot de
 Reported By:  jan dot schmidt at vitronic dot de
-Status:   Feedback
+Status:   Open
 Bug Type: PDO related
 Operating System: Win XP SP3
 PHP Version:  5.2.9
 New Comment:

I'm sure the 5.0 is loaded:

phpinfo:

pdo_mysql
PDO Driver for MySQL, client library version5.0.51a


I've tested already the 5.3 because of the native mysql driver.

phpinfo of PHP Version 5.3.0beta2-dev: 

pdo_mysql
PDO Driver for MySQLenabled
Client API version  mysqlnd 5.0.5-dev - 081106 - $Revision: 1.3.2.22 $



but this configuration crashed too.


Previous Comments:


[2009-04-03 19:39:09] johan...@php.net

Please check that a 5.0 libmysql.dll is being loaded, not the 5.1
version from the server, see phpinfo() output.



[2009-04-02 08:32:15] jan dot schmidt at vitronic dot de

Description:

I'm running an Apache 2.2.9 Webserver and a MySQL 5.1.31 Database and
want to insert a lot of rows over PDO MySQL Extension. But if the
testscript is very often requested, php crashes while preparing a
statement.

I find out that the easiest way to reproduce the crash is to open the
testscript in firefox and keep the F5 Key pressed.

For the backtrace i used the php 5.2 snap from 2009-04-01.

Only the pdo and pdo_mysql extensions are loaded.

Reproduce code:
---
?php
$dbhandle = new PDO('mysql:host=localhost', 'root',
'mypass',array(PDO::ATTR_PERSISTENT = true));
$dbhandle-exec('SET CHARACTER SET utf8');
$dbhandle-exec('CREATE DATABASE testdb');
$dbhandle-exec('CREATE TABLE testdb.testtable(id bigint(20) NOT NULL
AUTO_INCREMENT, testcol text collate utf8_unicode_ci NOT NULL, PRIMARY
KEY(id))');
for($i = 0;$i  100;$i++)
{
$stmt = $dbhandle-prepare('INSERT INTO testdb.testtable (testcol)
VALUES (:testcol)');
$stmt-bindValue(':testcol','testentrie nr '.$i,PDO::PARAM_STR);
$stmt-execute();
}
?

Expected result:

Script insert 100 rows to Table testtable.

Actual result:
--
Script Crashes

Backtrace:

_zend_mm_free_int(_zend_mm_heap * 0x0110faf8, void * 0x002e) line
1974 + 132 bytes
_efree(void * 0x00fb5200) line 2306 + 11 bytes
_zval_ptr_dtor(_zval_struct * * 0x0558fa8c) line 415 + 37 bytes
zend_std_write_property(_zval_struct * 0x015e2b9a, _zval_struct *
0x05d6d530, _zval_struct * 0x00fb5200, void * * * 0x05d6d230) line 417 +
12 bytes
pdo_stmt_construct(_pdo_stmt_t * 0x015e2a0d, _zval_struct * 0x05d6d348,
_zend_class_entry * 0x05d6d530, _zval_struct * 0x00fb5090, void * * *
0x) line 447
zim_PDO_prepare(int 7916969, _zval_struct * 0x00fb5090, _zval_struct *
* 0x05d6d530, _zval_struct * 0x, int 93948008, void * * *
0x0001) line 581 + 22 bytes
zend_do_fcall_common_helper_SPEC(_zend_execute_data * 0x0078c5c5, void
* * * 0x0558fbb0) line 200 + 61 bytes
ZEND_DO_FCALL_BY_NAME_SPEC_HANDLER(_zend_execute_data * 0x0558fbb0,
void * * * 0x0110ece0) line 322 + 17 bytes
execute(_zend_op_array * 0x0082e6fd, void * * * 0x0008) line 92 +
12 bytes
php_execute_script(_zend_file_handle * 0x05d6d4dc, void * * *
0x) line 2023 + 18 bytes
05d6d19c()
05d6d190()
PHP_PDO! pdo_row_object_handlers + 200 bytes






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



#47874 [Opn-Fbk]: crash while prepare statement

2009-04-06 Thread pajoye
 ID:   47874
 Updated by:   paj...@php.net
 Reported By:  jan dot schmidt at vitronic dot de
-Status:   Open
+Status:   Feedback
 Bug Type: PDO related
 Operating System: Win XP SP3
 PHP Version:  5.2.9
 New Comment:

5.3 does not use the libmysql library. Check your PATH, the PHP
directory has to be 1st in the list, before MySQL.

Does it happen in CLI too?


Previous Comments:


[2009-04-06 07:09:47] jan dot schmidt at vitronic dot de

I'm sure the 5.0 is loaded:

phpinfo:

pdo_mysql
PDO Driver for MySQL, client library version5.0.51a


I've tested already the 5.3 because of the native mysql driver.

phpinfo of PHP Version 5.3.0beta2-dev: 

pdo_mysql
PDO Driver for MySQLenabled
Client API version  mysqlnd 5.0.5-dev - 081106 - $Revision: 1.3.2.22 $



but this configuration crashed too.



[2009-04-03 19:39:09] johan...@php.net

Please check that a 5.0 libmysql.dll is being loaded, not the 5.1
version from the server, see phpinfo() output.



[2009-04-02 08:32:15] jan dot schmidt at vitronic dot de

Description:

I'm running an Apache 2.2.9 Webserver and a MySQL 5.1.31 Database and
want to insert a lot of rows over PDO MySQL Extension. But if the
testscript is very often requested, php crashes while preparing a
statement.

I find out that the easiest way to reproduce the crash is to open the
testscript in firefox and keep the F5 Key pressed.

For the backtrace i used the php 5.2 snap from 2009-04-01.

Only the pdo and pdo_mysql extensions are loaded.

Reproduce code:
---
?php
$dbhandle = new PDO('mysql:host=localhost', 'root',
'mypass',array(PDO::ATTR_PERSISTENT = true));
$dbhandle-exec('SET CHARACTER SET utf8');
$dbhandle-exec('CREATE DATABASE testdb');
$dbhandle-exec('CREATE TABLE testdb.testtable(id bigint(20) NOT NULL
AUTO_INCREMENT, testcol text collate utf8_unicode_ci NOT NULL, PRIMARY
KEY(id))');
for($i = 0;$i  100;$i++)
{
$stmt = $dbhandle-prepare('INSERT INTO testdb.testtable (testcol)
VALUES (:testcol)');
$stmt-bindValue(':testcol','testentrie nr '.$i,PDO::PARAM_STR);
$stmt-execute();
}
?

Expected result:

Script insert 100 rows to Table testtable.

Actual result:
--
Script Crashes

Backtrace:

_zend_mm_free_int(_zend_mm_heap * 0x0110faf8, void * 0x002e) line
1974 + 132 bytes
_efree(void * 0x00fb5200) line 2306 + 11 bytes
_zval_ptr_dtor(_zval_struct * * 0x0558fa8c) line 415 + 37 bytes
zend_std_write_property(_zval_struct * 0x015e2b9a, _zval_struct *
0x05d6d530, _zval_struct * 0x00fb5200, void * * * 0x05d6d230) line 417 +
12 bytes
pdo_stmt_construct(_pdo_stmt_t * 0x015e2a0d, _zval_struct * 0x05d6d348,
_zend_class_entry * 0x05d6d530, _zval_struct * 0x00fb5090, void * * *
0x) line 447
zim_PDO_prepare(int 7916969, _zval_struct * 0x00fb5090, _zval_struct *
* 0x05d6d530, _zval_struct * 0x, int 93948008, void * * *
0x0001) line 581 + 22 bytes
zend_do_fcall_common_helper_SPEC(_zend_execute_data * 0x0078c5c5, void
* * * 0x0558fbb0) line 200 + 61 bytes
ZEND_DO_FCALL_BY_NAME_SPEC_HANDLER(_zend_execute_data * 0x0558fbb0,
void * * * 0x0110ece0) line 322 + 17 bytes
execute(_zend_op_array * 0x0082e6fd, void * * * 0x0008) line 92 +
12 bytes
php_execute_script(_zend_file_handle * 0x05d6d4dc, void * * *
0x) line 2023 + 18 bytes
05d6d19c()
05d6d190()
PHP_PDO! pdo_row_object_handlers + 200 bytes






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



#47903 [Opn-Ver]: Precision about @ operator

2009-04-06 Thread kalle
 ID:   47903
 Updated by:   ka...@php.net
 Reported By:  cFreed at orange dot fr
-Status:   Open
+Status:   Verified
-Bug Type: Documentation problem
+Bug Type: Scripting Engine problem
-Operating System: Win XP
+Operating System: Irrelevant
-PHP Version:  Irrelevant
+PHP Version:  5.2.9
 New Comment:

Verified in the PHP_5_2 branch only, PHP_5_3 and HEAD does not produce
this, reclassified


Previous Comments:


[2009-04-05 19:05:35] cFreed at orange dot fr

Description:

A case where the error-control operator @ does NOT work, despite of
what the manual says.

Reproduce code:
---
---
From manual page: language.operators.errorcontrol
---
The manual says:
A simple rule of thumb is: if you can take the value of something, you
can prepend the @ operator to it.

This is not always true.

As shown by the example given, this works, assuming $cache IS AN
ARRAY:
?php
$value = @$cache[$key]; 
// will not issue a notice if the index $key doesn't exist.
?

But it does not work if $cache IS A STRING, and $key is an integer
higher than strlen($cache)-1. in other words:
?php
$str='abc';
$val...@$str[5];
// will issue the notice Uninitialized string offset 5 in
?






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



#47905 [Opn-Bgs]: strtotime() Reverses Time Zone Offsets

2009-04-06 Thread derick
 ID:   47905
 Updated by:   der...@php.net
 Reported By:  casey dot php at caseyftw dot com
-Status:   Open
+Status:   Bogus
 Bug Type: Date/time related
 Operating System: Ubuntu Linux
 PHP Version:  5.2.9
 New Comment:

You're wrong. The actual result is perfectly correct.


Previous Comments:


[2009-04-06 05:07:13] casey dot php at caseyftw dot com

Description:

When using strtotime($timezone), where $timezone is the timezone
abbreviation, it adds negative offsets and subtracts positive offsets to
the time.

If you add a date string, e.g. April 10, 2009 9:20 AM MDT, the same
problem occurs.

Reproduce code:
---
?php
 // It is currently 9:55 pm PDT. Default time zone is PDT.
 echo date('g:i a', strtotime('HADT')) .  \n;
 echo date('g:i a', strtotime('AKDT')) .  \n;
 echo date('g:i a', strtotime('PDT')) .  \n; // This is the only
correct one.
 echo date('g:i a', strtotime('MDT')) .  \n;
 echo date('g:i a', strtotime('CDT')) .  \n;
 echo date('g:i a', strtotime('EDT')) .  \n;
?

Expected result:

7:55 pm
8:55 pm
9:55 pm
10:55 pm
11:55 pm
12:55 am

Actual result:
--
11:55 pm
10:55 pm
9:55 pm
8:55 pm
7:55 pm
6:55 pm





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



#47892 [Opn-Bgs]: mktime issue PHP4 vs 5.29

2009-04-06 Thread jani
 ID:   47892
 Updated by:   j...@php.net
 Reported By:  tommykvoom at gmail dot com
-Status:   Open
+Status:   Bogus
 Bug Type: PHP options/info functions
 Operating System: Linux
 PHP Version:  5.2.9
 New Comment:

Because PHP 5 is more strict about it. This is not a bug.


Previous Comments:


[2009-04-03 17:32:13] tommykvoom at gmail dot com

Description:

Question ...
Why does this return an error with PHP5, but not with PHP4:

# PHP Warning [PHP]:: mktime() expects parameter 3 to be long, string
given in file /home/web20con/public_html/netoffice/includes/library.php
line 931

In this code: (as referenced in the error msg above)

function createDate($storedDate, $gmtUser)
{
global $gmtTimezone;

if ($gmtTimezone == 'true') {
if ($storedDate != '') {
$extractHour = substr($storedDate, 11, 2);
$extractMinute = substr($storedDate, 14, 2);
$extractYear = substr($storedDate, 0, 4);
$extractMonth = substr($storedDate, 5, 2);
$extractDay = substr($storedDate, 8, 2);

   return(date(Y-m-d H:i, mktime($extractHour + $gmtUser,
$extractMinute, '', $extractMonth, $extractDay, $extractYear)));
  
}
} else {
return($storedDate);
}
}

Reproduce code:
---
---
From manual page: function.mktime
---
Question ...
Why does this return an error with PHP5, but not with PHP4:

# PHP Warning [PHP]:: mktime() expects parameter 3 to be long, string
given in file /home/web20con/public_html/netoffice/includes/library.php
line 931

In this code: (as referenced in the error msg above)

function createDate($storedDate, $gmtUser)
{
global $gmtTimezone;

if ($gmtTimezone == 'true') {
if ($storedDate != '') {
$extractHour = substr($storedDate, 11, 2);
$extractMinute = substr($storedDate, 14, 2);
$extractYear = substr($storedDate, 0, 4);
$extractMonth = substr($storedDate, 5, 2);
$extractDay = substr($storedDate, 8, 2);

   return(date(Y-m-d H:i, mktime($extractHour + $gmtUser,
$extractMinute, '', $extractMonth, $extractDay, $extractYear)));
  
}
} else {
return($storedDate);
}
}

Expected result:

No errors.

This bug appears in the open source program 
NetOffice Version : 2.6.0b2 






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



#47896 [Opn-Bgs]: Cookie delete

2009-04-06 Thread jani
 ID:   47896
 Updated by:   j...@php.net
 Reported By:  G dot B dot Yahav at gmail dot com
-Status:   Open
+Status:   Bogus
 Bug Type: Unknown/Other Function
 Operating System: WINDOWS SERVER
 PHP Version:  5.2.9
 New Comment:

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

Thank you for your interest in PHP.




Previous Comments:


[2009-04-04 19:37:07] G dot B dot Yahav at gmail dot com

Description:

Hey,
i got a problen about deleting cookie array.
when i use the code above with normal cookie, all work good, but when i
defined a cookie array i cannot delete it.

Reproduce code:
---
?php

// the cookie array name is PearServices_ClientSession

if( isset( $_COOKIE['PearServices_ClientSession'] ) )
{
foreach ( $_COOKIE['PearServices_ClientSession'] as $k 
= $v )
{
pearRegistry::DeleteCookie( 
PearServices_ClientSession[.$k.]
);
}
}
// pearRegistry::deletecookie function

final static function DeleteCookie( $name )
{
setcookie( $name, , time() -3600 );
}
?

Expected result:

Cookie disappire

Actual result:
--
Cookie still in browser...





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



#47886 [Asn]: file system time functions not backported from 5.3/6, eg touch

2009-04-06 Thread d_kelsey at uk dot ibm dot com
 ID:   47886
 User updated by:  d_kelsey at uk dot ibm dot com
 Reported By:  d_kelsey at uk dot ibm dot com
 Status:   Assigned
 Bug Type: Filesystem function related
 Operating System: Windows XP
 PHP Version:  5.2.9
 Assigned To:  pajoye
 New Comment:

new test has been committed to cvs for php 5.2 stream


Previous Comments:


[2009-04-03 13:06:34] paj...@php.net

If it works in 5.2, yes please do :)

Thanks!



[2009-04-03 13:02:34] d_kelsey at uk dot ibm dot com

Its new to runtests. Anything inside the %r...%r section is treated as
a regular expression.

If you want I can commit an update to the 5.2.x test ?



[2009-04-03 12:51:38] paj...@php.net

No, they will not be backported.

Does the | operator works in 5.2 run-tests? I never used it :)



[2009-04-03 12:07:30] d_kelsey at uk dot ibm dot com

Description:

touch_basic-win32.phpt test fails once we entered DST. I see in 5.3/5
this area has been looked into because the microsoft C runtime functions
appear to be sensitive to DST (by design!) 

I was wondering if this code was going to be backported to 5.2.x stream
? If not then maybe the expectf section for touch_basic-win32.phpt
should be changed from 
mtime=1
atime=20470
to
mtime=%r1|6400%r
atime=%r20470|16870%r







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



#47873 [Opn-Fbk]: PHP can not parse extension_dir

2009-04-06 Thread jani
 ID:   47873
 Updated by:   j...@php.net
 Reported By:  ronaldo dot sy at gmail dot com
-Status:   Open
+Status:   Feedback
-Bug Type: *Configuration Issues
+Bug Type: PHP options/info functions
 Operating System: Windows 7
 PHP Version:  5.2.9
 New Comment:

And you haven't set the extension_dir in registry..? (yes, that's
possible too :) Replace the php.ini file with one that has ONLY that one
line which sets extension_dir (and paste the same line here too).


Previous Comments:


[2009-04-02 09:22:40] ronaldo dot sy at gmail dot com

Yes, because when I check the Loaded Configuration File fiels at 
phpinfo, it show to the correct php.ini file (which located at 
c:\php\php.ini)



[2009-04-02 07:38:06] paj...@php.net

Using a php.ini I suppose? If yes, are you the php.ini is loaded?



[2009-04-02 06:06:07] ronaldo dot sy at gmail dot com

Description:

It seems PHP can not parse the location of extension_dir. I already 
change the location at php.ini, but every time I open the phpinfo 
page the extension_dir keep pointing to c:\php5, After I use version 
5.28 the problem is gone. I use IIS version 7.5 






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



#47285 [Com]: strtotime() still leaks memory

2009-04-06 Thread davide dot ferrari at atrapalo dot com
 ID:   47285
 Comment by:   davide dot ferrari at atrapalo dot com
 Reported By:  danger at FreeBSD dot org
 Status:   Assigned
 Bug Type: Date/time related
 Operating System: FreeBSD
 PHP Version:  5.2.8
 Assigned To:  derick
 New Comment:

Sorry for being dumb but does this leak affect memory_limit ? I mean, I
can reproduce the memleak with Linux and PHP 5.2.9 but
memory_get_usage() output seems constant, although memory occupied by
the process itself is getting biger every second, so there's clearly a
memleak.
I ask this because I don't know if there is an actual relationship
between this bug and some strange cronjob deaths I'm experiencing with
PHP 5.2.9.

TIA


Previous Comments:


[2009-03-30 12:25:48] kimc at operamail dot com

The last patch fixes the memory leak for me.



[2009-03-11 15:36:05] bloudon at townnews dot com

Leak also observed in 5.2.8 and 5.2.9 on Linux.

This patch (against 5.2.9) is working out for us so far in our dev
environment:

--- ext/date/php_date.orig.c2009-03-11 10:07:36.0 -0500
+++ ext/date/php_date.c 2009-03-11 10:12:40.0 -0500
@@ -1108,7 +1108,7 @@
long  preset_ts, ts;

timelib_time *t, *now;
-   timelib_tzinfo *tzi;
+   timelib_tzinfo *tzi, *old_tzi;

tzi = get_timezone_info(TSRMLS_C);

@@ -1119,10 +1119,14 @@
initial_ts = emalloc(25);
snprintf(initial_ts, 24, @%ld UTC, preset_ts);
t = timelib_strtotime(initial_ts, strlen(initial_ts), NULL,
DATE_TIMEZONEDB); /* we ignore the error here, as this should never fail
*/
+   old_tzi = t-tz_info;
timelib_update_ts(t, tzi);
now-tz_info = tzi;
now-zone_type = TIMELIB_ZONETYPE_ID;
timelib_unixtime2local(now, t-sse);
+   if ( old_tzi ) {
+   timelib_tzinfo_dtor(old_tzi);
+   }
timelib_time_dtor(t);
efree(initial_ts);
} else if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, s|l,
times, time_len, preset_ts) != FAILURE) {
@@ -1141,6 +1145,7 @@
}

t = timelib_strtotime(times, time_len, error, DATE_TIMEZONEDB);
+   old_tzi = t-tz_info;
error1 = error-error_count;
timelib_error_container_dtor(error);
timelib_fill_holes(t, now, TIMELIB_NO_CLONE);
@@ -1148,6 +1153,9 @@
ts = timelib_date_to_int(t, error2);

timelib_time_dtor(now);
+   if ( old_tzi ) {
+   timelib_tzinfo_dtor(old_tzi);
+   }
timelib_time_dtor(t);

if (error1 || error2) {



[2009-03-09 21:41:58] martin at 925 dot dk

Removing UTC from the timestamp in php_date.c also fixes the leak:

--- php_date_.c 2009-03-09 22:30:15.0 +0100
+++ php_date.c  2009-03-09 22:30:21.0 +0100
@@ -1117,7 +1117,7 @@
now = timelib_time_ctor();
 
initial_ts = emalloc(25);
-   snprintf(initial_ts, 24, @%ld UTC, preset_ts);
+   snprintf(initial_ts, 24, @%ld, preset_ts);
t = timelib_strtotime(initial_ts, strlen(initial_ts), 
NULL, DATE_TIMEZONEDB); /* we ignore the error here, as this should 
never fail */
timelib_update_ts(t, tzi);
now-tz_info = tzi;



[2009-03-09 18:46:22] martin at 925 dot dk

This patch (which reverts the fix for bug 45529) against parse_date.c 
seems to fix the leak:

Hence this patch against parse_date.c:
--- parse_date_.c   2009-03-09 19:33:37.0 +0100
+++ parse_date.c2009-03-09 19:33:45.0 +0100
@@ -733,7 +733,7 @@
}
 #endif
/* If we have a TimeZone identifier to start with, use 
it */
-   if (strstr(tz_abbr, /) || strcmp(tz_abbr, UTC) == 
0) {
+   if (strstr(tz_abbr, /)) {
if ((res = timelib_parse_tzfile(tz_abbr, 
tzdb)) != NULL) {
t-tz_info = res;
t-zone_type = TIMELIB_ZONETYPE_ID;



[2009-02-27 14:48:14] maarten at vivesta dot com

Same here. I've added a date_default_timezone_set() before using 
strtotime() and it removed the error but not the leak.



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

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



#47902 [Fbk]: free_op1 warnings

2009-04-06 Thread pajoye
 ID:  47902
 Updated by:  paj...@php.net
 Reported By: pierre dot php at gmail dot com
 Status:  Feedback
 Bug Type:Compile Warning
 PHP Version: 5.3CVS-2009-04-05 (snap)
 Assigned To: dmitry
 New Comment:

It is not that important to fix, you asked me to open a bug about it
:)

However, there is no inaccurate behavior, if the code using this
variable is unreachable, then the variable is not used at all (typically
if (0) will striped out).


Previous Comments:


[2009-04-06 11:25:34] dmi...@php.net

These warnings occurs because of inaccurate C compiler behaviour.
In case you look into zend\zend_vm_execute.h(17488) and the whole
function, you would see that free_op1 is used in this function, however
the code which references the variable is unreachable.

A general solution to eliminate such warnings would require parsing of
C source code. I don't think it make sense to invest time into it to
just to remove warnings.



[2009-04-05 17:23:52] pierre dot php at gmail dot com

Description:

zend\zend_vm_execute.h(17488) : warning C4101: 'free_op1' :
unreferenced local variable

dozen of times, the generation script could be fixed to silent them.






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



#47903 [Ver-Asn]: @ operator does not work with string offsets (PHP_5_2 only!)

2009-04-06 Thread jani
 ID:   47903
 Updated by:   j...@php.net
 Reported By:  cFreed at orange dot fr
-Status:   Verified
+Status:   Assigned
 Bug Type: Scripting Engine problem
 Operating System: *
 PHP Version:  5.2.9
-Assigned To:  
+Assigned To:  felipe
 New Comment:

Felipe, this same (?) issue was reported in bug #39018 and was supposed
to be closed too..was the fix omitted from PHP_5_2 branch?



Previous Comments:


[2009-04-06 08:34:36] ka...@php.net

Verified in the PHP_5_2 branch only, PHP_5_3 and HEAD does not produce
this, reclassified



[2009-04-05 19:05:35] cFreed at orange dot fr

Description:

A case where the error-control operator @ does NOT work, despite of
what the manual says.

Reproduce code:
---
---
From manual page: language.operators.errorcontrol
---
The manual says:
A simple rule of thumb is: if you can take the value of something, you
can prepend the @ operator to it.

This is not always true.

As shown by the example given, this works, assuming $cache IS AN
ARRAY:
?php
$value = @$cache[$key]; 
// will not issue a notice if the index $key doesn't exist.
?

But it does not work if $cache IS A STRING, and $key is an integer
higher than strlen($cache)-1. in other words:
?php
$str='abc';
$val...@$str[5];
// will issue the notice Uninitialized string offset 5 in
?






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



#47906 [NEW]: CURLOPT_POSTFIELDS accepts only strings

2009-04-06 Thread klas at k-k-k dot biz
From: klas at k-k-k dot biz
Operating system: windows
PHP version:  5.2.9
PHP Bug Type: Scripting Engine problem
Bug description:  CURLOPT_POSTFIELDS accepts only strings

Description:

Inserting array (key=value) as CURLOPT_POSTFIELDS doesn't work although
documentation states:

 This can either be passed as a urlencoded string like
'para1=val1para2=val2...' or as an array with the field name as key and
field data as value. 

Reproduce code:
---
$url=example.php;
$process = curl_init($url);
$data= array ('somefield'='somedata')
curl_setopt($process, CURLOPT_POSTFIELDS, $data);
curl_exec($process);
curl_close($process);

Expected result:

input field somefield with value somedata posted to example.php

Actual result:
--
Empty field/value

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



#42596 [Csd-Bgs]: session.save_path MODE option will not set write bit for group or world

2009-04-06 Thread bjori
 ID:   42596
 Updated by:   bj...@php.net
 Reported By:  randy at rcs-comp dot com
-Status:   Closed
+Status:   Bogus
 Bug Type: Session related
 Operating System: Linux
 PHP Version:  5.2.4
 New Comment:

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

Thank you for your interest in PHP.

Fix your umask().


Previous Comments:


[2007-09-11 01:20:22] randy at rcs-comp dot com

THANK YOU!



[2007-09-10 23:43:13] il...@php.net

This bug has been fixed in CVS.

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





[2007-09-08 03:47:00] randy at rcs-comp dot com

Description:

When using the mode parameter in session_save_path (or presumably
session.save_path) it will not set the write bit correctly for anyone
but the owner of the file.  Read and execute bits are set correctly.

This is important b/c I would like to setguid on the session directory
so that a non-priveleged user (the website reseller) can clean it out. 
That way, all I have to do is add apache to the user's group, and no
more problems with clearing out sessions.

Reproduce code:
---
?php
$pm = '0;0600;'.dirname(__FILE__).'/sessions';
session_save_path($pm);
session_start();
die('hello world');
?

// delete the session file just created

?php
$pm = '0;0660;'.dirname(__FILE__).'/sessions';
session_save_path($pm);
session_start();
die('hello world');
?

// delete the session file just created

?php
$pm = '0;0777;'.dirname(__FILE__).'/sessions';
session_save_path($pm);
session_start();
die('hello world');
?



Expected result:

[r...@host sessions]# ls -l
total 0
-rw---  1 apache apache 0 Sep  7 23:30 sess_b1fb...

[r...@host sessions]# ls -l
total 0
-rw-rw  1 apache apache 0 Sep  7 23:31 sess_b1fb...

[r...@host sessions]# ls -l
total 0
-rwxrwxrwx  1 apache apache 0 Sep  7 23:40 sess_b1fb...

Actual result:
--
[r...@host sessions]# ls -l
total 0
-rw---  1 apache apache 0 Sep  7 23:30 sess_b1fb...

[r...@host sessions]# ls -l
total 0
-rw-r-  1 apache apache 0 Sep  7 23:31 sess_b1fb...
^^   Permission does not have write bit

[r...@host sessions]# ls -l
total 0
-rwxr-xr-x  1 apache apache 0 Sep  7 23:40 sess_b1fb...
^^   Permission does not have write bits





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



#47874 [Fbk-Opn]: crash while prepare statement

2009-04-06 Thread jan dot schmidt at vitronic dot de
 ID:   47874
 User updated by:  jan dot schmidt at vitronic dot de
 Reported By:  jan dot schmidt at vitronic dot de
-Status:   Feedback
+Status:   Open
 Bug Type: PDO related
 Operating System: Win XP SP3
 PHP Version:  5.2.9
 New Comment:

The PHP Directory is the first in the list.

I can't reproduce it in CLI.


Previous Comments:


[2009-04-06 07:16:16] paj...@php.net

5.3 does not use the libmysql library. Check your PATH, the PHP
directory has to be 1st in the list, before MySQL.

Does it happen in CLI too?



[2009-04-06 07:09:47] jan dot schmidt at vitronic dot de

I'm sure the 5.0 is loaded:

phpinfo:

pdo_mysql
PDO Driver for MySQL, client library version5.0.51a


I've tested already the 5.3 because of the native mysql driver.

phpinfo of PHP Version 5.3.0beta2-dev: 

pdo_mysql
PDO Driver for MySQLenabled
Client API version  mysqlnd 5.0.5-dev - 081106 - $Revision: 1.3.2.22 $



but this configuration crashed too.



[2009-04-03 19:39:09] johan...@php.net

Please check that a 5.0 libmysql.dll is being loaded, not the 5.1
version from the server, see phpinfo() output.



[2009-04-02 08:32:15] jan dot schmidt at vitronic dot de

Description:

I'm running an Apache 2.2.9 Webserver and a MySQL 5.1.31 Database and
want to insert a lot of rows over PDO MySQL Extension. But if the
testscript is very often requested, php crashes while preparing a
statement.

I find out that the easiest way to reproduce the crash is to open the
testscript in firefox and keep the F5 Key pressed.

For the backtrace i used the php 5.2 snap from 2009-04-01.

Only the pdo and pdo_mysql extensions are loaded.

Reproduce code:
---
?php
$dbhandle = new PDO('mysql:host=localhost', 'root',
'mypass',array(PDO::ATTR_PERSISTENT = true));
$dbhandle-exec('SET CHARACTER SET utf8');
$dbhandle-exec('CREATE DATABASE testdb');
$dbhandle-exec('CREATE TABLE testdb.testtable(id bigint(20) NOT NULL
AUTO_INCREMENT, testcol text collate utf8_unicode_ci NOT NULL, PRIMARY
KEY(id))');
for($i = 0;$i  100;$i++)
{
$stmt = $dbhandle-prepare('INSERT INTO testdb.testtable (testcol)
VALUES (:testcol)');
$stmt-bindValue(':testcol','testentrie nr '.$i,PDO::PARAM_STR);
$stmt-execute();
}
?

Expected result:

Script insert 100 rows to Table testtable.

Actual result:
--
Script Crashes

Backtrace:

_zend_mm_free_int(_zend_mm_heap * 0x0110faf8, void * 0x002e) line
1974 + 132 bytes
_efree(void * 0x00fb5200) line 2306 + 11 bytes
_zval_ptr_dtor(_zval_struct * * 0x0558fa8c) line 415 + 37 bytes
zend_std_write_property(_zval_struct * 0x015e2b9a, _zval_struct *
0x05d6d530, _zval_struct * 0x00fb5200, void * * * 0x05d6d230) line 417 +
12 bytes
pdo_stmt_construct(_pdo_stmt_t * 0x015e2a0d, _zval_struct * 0x05d6d348,
_zend_class_entry * 0x05d6d530, _zval_struct * 0x00fb5090, void * * *
0x) line 447
zim_PDO_prepare(int 7916969, _zval_struct * 0x00fb5090, _zval_struct *
* 0x05d6d530, _zval_struct * 0x, int 93948008, void * * *
0x0001) line 581 + 22 bytes
zend_do_fcall_common_helper_SPEC(_zend_execute_data * 0x0078c5c5, void
* * * 0x0558fbb0) line 200 + 61 bytes
ZEND_DO_FCALL_BY_NAME_SPEC_HANDLER(_zend_execute_data * 0x0558fbb0,
void * * * 0x0110ece0) line 322 + 17 bytes
execute(_zend_op_array * 0x0082e6fd, void * * * 0x0008) line 92 +
12 bytes
php_execute_script(_zend_file_handle * 0x05d6d4dc, void * * *
0x) line 2023 + 18 bytes
05d6d19c()
05d6d190()
PHP_PDO! pdo_row_object_handlers + 200 bytes






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



#47903 [Asn]: @ operator does not work with string offsets (PHP_5_2 only!)

2009-04-06 Thread felipe
 ID:   47903
 Updated by:   fel...@php.net
 Reported By:  cFreed at orange dot fr
 Status:   Assigned
 Bug Type: Scripting Engine problem
 Operating System: *
 PHP Version:  5.2.9
 Assigned To:  felipe
 New Comment:

Yes, these fix was just committed in 5.3+.


Previous Comments:


[2009-04-06 11:40:45] j...@php.net

Felipe, this same (?) issue was reported in bug #39018 and was supposed
to be closed too..was the fix omitted from PHP_5_2 branch?




[2009-04-06 08:34:36] ka...@php.net

Verified in the PHP_5_2 branch only, PHP_5_3 and HEAD does not produce
this, reclassified



[2009-04-05 19:05:35] cFreed at orange dot fr

Description:

A case where the error-control operator @ does NOT work, despite of
what the manual says.

Reproduce code:
---
---
From manual page: language.operators.errorcontrol
---
The manual says:
A simple rule of thumb is: if you can take the value of something, you
can prepend the @ operator to it.

This is not always true.

As shown by the example given, this works, assuming $cache IS AN
ARRAY:
?php
$value = @$cache[$key]; 
// will not issue a notice if the index $key doesn't exist.
?

But it does not work if $cache IS A STRING, and $key is an integer
higher than strlen($cache)-1. in other words:
?php
$str='abc';
$val...@$str[5];
// will issue the notice Uninitialized string offset 5 in
?






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



#47902 [Asn-Fbk]: free_op1 warnings

2009-04-06 Thread dmitry
 ID:  47902
 Updated by:  dmi...@php.net
 Reported By: pierre dot php at gmail dot com
-Status:  Assigned
+Status:  Feedback
 Bug Type:Compile Warning
 PHP Version: 5.3CVS-2009-04-05 (snap)
 Assigned To: dmitry
 New Comment:

These warnings occurs because of inaccurate C compiler behaviour.
In case you look into zend\zend_vm_execute.h(17488) and the whole
function, you would see that free_op1 is used in this function, however
the code which references the variable is unreachable.

A general solution to eliminate such warnings would require parsing of
C source code. I don't think it make sense to invest time into it to
just to remove warnings.


Previous Comments:


[2009-04-05 17:23:52] pierre dot php at gmail dot com

Description:

zend\zend_vm_execute.h(17488) : warning C4101: 'free_op1' :
unreferenced local variable

dozen of times, the generation script could be fixed to silent them.






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



#47880 [Asn-Csd]: Garbage Collector crashes

2009-04-06 Thread dmitry
 ID:   47880
 Updated by:   dmi...@php.net
 Reported By:  patric at zap dot lu
-Status:   Assigned
+Status:   Closed
 Bug Type: Scripting Engine problem
 Operating System: Debian Lenny
 PHP Version:  5.3.0RC1
 Assigned To:  dmitry
 New Comment:

The crash described in last two posts is fixed in CVS. However it can
be unrelated to GC crash mentioned in the first backtrace.


Previous Comments:


[2009-04-06 09:34:47] dmi...@php.net

Thanks for test.
This is the smallest script which demonstrates the crash.

?php
class bomb {
  static function go($n){
   $backtrace = debug_backtrace(false);
   $backtrace[1]['args'][1] = 'bomb';
  }
}
call_user_func_array(array('bomb', 'go'), array(0));
?

The bug is not related to GC, so may be the crash in GC shown by the
first backtrace is a side effect of this one, but it also may be some
different unrelated bug.




[2009-04-04 10:12:38] patric at zap dot lu

Yes the last testcase created infinite recursion, nevertheless it
should not core dump but reach memory exhausted at the end?

I got a new testcase, I isolated the parts in the framework which
lead to the segfault.

Stripped it down to some weird chain of operations, which lead to
segfault.

This time no deep recursion, at a depth of 18 it begins to segfault.


The piece of code:

class bomb {
static function go($pDepth) {
if ($pDepth0)
 call_user_func_array(array('bomb', 'go'),array($pDepth-1));

 $backtrace = debug_backtrace(false);
 foreach ($backtrace as $k=$e) 
  foreach ($e['args'] as $kk=$arg)
   if (is_array($arg))
$backtrace[$k]['args'][$kk]= 'Foobar';  

 }
}

bomb::go(18);   

### GDB ###

Program terminated with signal 11, Segmentation fault.
[New process 25022]
#0  _zend_mm_free_int (heap=0x9eb81b8, p=0x9fe2da0) at
/blade/install/daemon/php/Zend/zend_alloc.c:1979
1979if (ZEND_MM_IS_FREE_BLOCK(next_block)) {
(gdb) bt
#0  _zend_mm_free_int (heap=0x9eb81b8, p=0x9fe2da0) at
/blade/install/daemon/php/Zend/zend_alloc.c:1979
#1  0x0832114d in _zval_ptr_dtor (zval_ptr=0x9feb5bc) at
/blade/install/daemon/php/Zend/zend_variables.h:35
#2  0x08337c1e in zend_hash_destroy (ht=0x9fdfc44) at
/blade/install/daemon/php/Zend/zend_hash.c:526
#3  0x0832be75 in _zval_dtor_func (zvalue=0x9fe27c4) at
/blade/install/daemon/php/Zend/zend_variables.c:43
#4  0x0832114d in _zval_ptr_dtor (zval_ptr=0x9fdae88) at
/blade/install/daemon/php/Zend/zend_variables.h:35
#5  0x08337c1e in zend_hash_destroy (ht=0x9febac4) at
/blade/install/daemon/php/Zend/zend_hash.c:526
#6  0x0832be75 in _zval_dtor_func (zvalue=0x9fe0eb8) at
/blade/install/daemon/php/Zend/zend_variables.c:43
#7  0x0832114d in _zval_ptr_dtor (zval_ptr=0x9feb590) at
/blade/install/daemon/php/Zend/zend_variables.h:35
#8  0x08337c1e in zend_hash_destroy (ht=0x9fdf82c) at
/blade/install/daemon/php/Zend/zend_hash.c:526
#9  0x0832be75 in _zval_dtor_func (zvalue=0x9fdf1c0) at
/blade/install/daemon/php/Zend/zend_variables.c:43
#10 0x0832114d in _zval_ptr_dtor (zval_ptr=0xa0111c0) at
/blade/install/daemon/php/Zend/zend_variables.h:35
#11 0x0834e816 in zend_leave_helper_SPEC (execute_data=0x1) at
/blade/install/daemon/php/Zend/zend_vm_execute.h:157
#12 0x08354b8e in execute (op_array=0x9fdd56c) at
/blade/install/daemon/php/Zend/zend_vm_execute.h:104
#13 0x08321ab7 in zend_call_function (fci=0xbfe4521c,
fci_cache=0xbfe45240)
at /blade/install/daemon/php/Zend/zend_execute_API.c:936
#14 0x08269947 in zif_call_user_func_array (ht=2,
return_value=0x9fdefd0, return_value_ptr=0x0, this_ptr=0x0,
return_value_used=0)
at /blade/install/daemon/php/ext/standard/basic_functions.c:4745
#15 0x08376a59 in zend_do_fcall_common_helper_SPEC
(execute_data=0xa010ee8) at
/blade/install/daemon/php/Zend/zend_vm_execute.h:313
#16 0x08354b8e in execute (op_array=0x9fdd56c) at
/blade/install/daemon/php/Zend/zend_vm_execute.h:104
#17 0x08321ab7 in zend_call_function (fci=0xbfe4542c,
fci_cache=0xbfe45450)
at /blade/install/daemon/php/Zend/zend_execute_API.c:936
#18 0x08269947 in zif_call_user_func_array (ht=2,
return_value=0x9fdedc4, return_value_ptr=0x0, this_ptr=0x0,
return_value_used=0)
at /blade/install/daemon/php/ext/standard/basic_functions.c:4745
#19 0x08376a59 in zend_do_fcall_common_helper_SPEC
(execute_data=0xa010c78) at
/blade/install/daemon/php/Zend/zend_vm_execute.h:313
#20 0x08354b8e in execute (op_array=0x9fdd56c) at
/blade/install/daemon/php/Zend/zend_vm_execute.h:104
#21 0x08321ab7 in zend_call_function (fci=0xbfe4563c,
fci_cache=0xbfe45660)
at /blade/install/daemon/php/Zend/zend_execute_API.c:936
#22 0x08269947 in zif_call_user_func_array (ht=2,
return_value=0x9fdebb8, return_value_ptr=0x0, this_ptr=0x0,
return_value_used=0)
at 

#47820 [NoF-Opn]: mysql_connect(localhost) dooesn't work

2009-04-06 Thread busia at tiscali dot it
 ID:   47820
 User updated by:  busia at tiscali dot it
 Reported By:  busia at tiscali dot it
-Status:   No Feedback
+Status:   Open
 Bug Type: MySQL related
 Operating System: Windows Vista
 PHP Version:  5.3.0RC1
 New Comment:

I removed the line without results. The problem persist.


Previous Comments:


[2009-04-06 01:00:00] php-bugs at lists dot php dot net

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



[2009-03-29 01:38:50] ka...@php.net

Try open your hosts file in:
%SystemRoot%\System32\Drivers\etc\hosts

and remove the IPv6 address (::1) or uncomment it, what your looking
for is:
::1 127.0.0.1

Remove that and it should work



[2009-03-28 11:35:44] busia at tiscali dot it

Description:

After the update from 5.2.9 to 5.3.0RC1 the command

if(!$db = mysql_connect(localhost, root, root)) {
die(mysql_error(). .mysql_errno());
}

cause mysql timeout

if I use, instead:
if(!$db = mysql_connect(127.0.0.1, root, root)) {
die(mysql_error(). .mysql_errno());
}

All works. In php 5.2.9 all worked well.

Mysql Version is 5.0.77 (installed as windows service)
PHP Version is 5.3.0RC1






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



#46444 [Opn-Fbk]: invalid session.save_path crashes when --with-pic is used

2009-04-06 Thread bjori
 ID:   46444
 Updated by:   bj...@php.net
 Reported By:  hostmaster at uuism dot net
-Status:   Open
+Status:   Feedback
 Bug Type: Session related
 Operating System: Fedora Core 4
 PHP Version:  5.2CVS-2008-11-02
 New Comment:

Please try using this CVS snapshot:

  http://snaps.php.net/php5.2-latest.tar.gz
 
For Windows:

  http://windows.php.net/snapshots/

Please try the next snapshot dated _after_ this message.


Previous Comments:


[2009-01-02 15:41:58] crrodriguez at opensuse dot org

Same here

Program received signal SIGSEGV, Segmentation fault.
0x75d56560 in strlen () from /lib64/libc.so.6
(gdb) bt full
#0  0x75d56560 in strlen () from /lib64/libc.so.6
No symbol table info available.
#1  0x005a06d8 in ps_open_files (mod_data=0xddd960,
save_path=0x7b Address 0x7b out of bounds, session_name=0xaaa37a
PHPSESSID)
at /home/cristian/php5/ext/session/mod_files.c:325
data = (ps_files *) 0xfdfaf0
p = 0xdeff7a ;213
last = 0xdeff74 ,23123;213
argv = {0xdeff50
123;:/really\\completely:::/invalid;;,23123;213, 0xdeff54
:/really\\completely:::/invalid;;,23123;213,
  0xdeff73 ;,23123;213}
argc = 4
dirdepth = 123
filemode = 0
#2  0x00599118 in php_session_initialize () at
/home/cristian/php5/ext/session/session.c:512
val = 0xfde576 L)\r#65533;\r#65533;\r#65533;
vallen = 0
#3  0x0059d732 in php_session_start () at
/home/cristian/php5/ext/session/session.c:1479
ppid = (zval **) 0xfdc678
data = (zval **) 0x78
p = 0x887fd0 H\211l$#65533;L\211|$#65533;H\215-#65533;}M
value = 0x0
nrand = 32767
lensess = 9
#4  0x0059ed3d in zif_session_start (ht=0,
return_value=0xfdc6c8, return_value_ptr=0x0, this_ptr=0x0,
return_value_used=0)
at /home/cristian/php5/ext/session/session.c:1886
No locals.
#5  0x00818899 in zend_do_fcall_common_helper_SPEC
(execute_data=0x77e6f090) at
/home/cristian/php5/Zend/zend_vm_execute.h:313
opline = (zend_op *) 0xfddff0
should_change_scope = 0 '\0'
#6  0x0081df90 in ZEND_DO_FCALL_SPEC_CONST_HANDLER
(execute_data=0x77e6f090) at
/home/cristian/php5/Zend/zend_vm_execute.h:1564
opline = (zend_op *) 0xfddff0
fname = (zval *) 0xfde020
#7  0x00817987 in execute (op_array=0xfdd418) at
/home/cristian/php5/Zend/zend_vm_execute.h:104
ret = 0
execute_data = (zend_execute_data *) 0x77e6f090
nested = 1 '\001'
original_in_execution = 0 '\0'
#8  0x007e77e9 in zend_execute_scripts (type=8, retval=0x0,
file_count=3) at /home/cristian/php5/Zend/zend.c:1181
files = {{gp_offset = 40, fp_offset = 48, overflow_arg_area =
0x7fffb7e0, reg_save_area = 0x7fffb720}}
i = 1
file_handle = (zend_file_handle *) 0x7fffdc60
orig_op_array = (zend_op_array *) 0x0
orig_retval_ptr_ptr = (zval **) 0x0
#9  0x0076a1d9 in php_execute_script
(primary_file=0x7fffdc60) at /home/cristian/php5/main/main.c:2101
realfile =
/home/cristian/php5/ext/session/tests/016.phpt\000\000#65533;#65533;#65533;#65533;#65533;\177\000\000#65533;\n|\000\000\000\000\000#65533;r#65533;#65533;#65533;\177\000\000p~#65533;,
'\0' repeats 13 times,
uct\000#65533;\a\000\000X\000\000\000\000\000#65533;p#65533;#65533;#65533;\177\000\000\020#65533;#65533;#65533;#65533;\177\000\000z\005\177\000\000\000\000\000\002\000\000\000#65533;\177\000\000X\000\000\000\000\000V\a\000\000\000\000\000\000\202\005\000\000\000\000\000\000#65533;mQ#65533;#65533;\177\000\000\210#65533;#65533;\000\000\000\00---Type
return to continue, or q return to quit---
0\000P#65533;#65533;#65533;#65533;\177\000\000\030#65533;#65533;#65533;#65533;\177\000\000#65533;\214\222D\000\000\000\000\000#65533;#65533;...
__orig_bailout = (jmp_buf *) 0x7fffdaf0
__bailout = {{__jmpbuf = {8945616, 1504162217199220120,
4369584, 140737488346800, 0, 0, 1504162220334462360,
  -1504162127358118504}, __mask_was_saved = 0, __saved_mask =
{__val = {140737353931176, 0, 4294967295, 47784, 14397440, 4369584,
140737488346800, 0, 0, 0, 140737351963577, 1, 0, 0,
7301032, 140737317299080
prepend_file_p = (zend_file_handle *) 0x0
append_file_p = (zend_file_handle *) 0x0
prepend_file = {type = ZEND_HANDLE_FILENAME, filename = 0x0,
opened_path = 0x0, handle = {fd = 0, fp = 0x0, stream = {
  handle = 0x0, isatty = 0, mmap = {len = 0, pos = 0, map = 0x0,
buf = 0x0, old_handle = 0x0, old_closer = 0}, reader = 0, fsizer = 0,
  closer = 0}}, free_filename = 0 '\0'}
append_file = {type = ZEND_HANDLE_FILENAME, filename = 0x0,
opened_path = 0x0, handle = {fd = 0, fp = 0x0, stream = {handle = 0x0,
  isatty = 0, mmap = {len = 0, pos = 0, map = 0x0, buf = 0x0,
old_handle = 0x0, old_closer = 0}, 

#47880 [Asn]: Garbage Collector crashes

2009-04-06 Thread dmitry
 ID:   47880
 Updated by:   dmi...@php.net
 Reported By:  patric at zap dot lu
 Status:   Assigned
 Bug Type: Scripting Engine problem
 Operating System: Debian Lenny
 PHP Version:  5.3.0RC1
 Assigned To:  dmitry
 New Comment:

Thanks for test.
This is the smallest script which demonstrates the crash.

?php
class bomb {
  static function go($n){
   $backtrace = debug_backtrace(false);
   $backtrace[1]['args'][1] = 'bomb';
  }
}
call_user_func_array(array('bomb', 'go'), array(0));
?

The bug is not related to GC, so may be the crash in GC shown by the
first backtrace is a side effect of this one, but it also may be some
different unrelated bug.



Previous Comments:


[2009-04-04 10:12:38] patric at zap dot lu

Yes the last testcase created infinite recursion, nevertheless it
should not core dump but reach memory exhausted at the end?

I got a new testcase, I isolated the parts in the framework which
lead to the segfault.

Stripped it down to some weird chain of operations, which lead to
segfault.

This time no deep recursion, at a depth of 18 it begins to segfault.


The piece of code:

class bomb {
static function go($pDepth) {
if ($pDepth0)
 call_user_func_array(array('bomb', 'go'),array($pDepth-1));

 $backtrace = debug_backtrace(false);
 foreach ($backtrace as $k=$e) 
  foreach ($e['args'] as $kk=$arg)
   if (is_array($arg))
$backtrace[$k]['args'][$kk]= 'Foobar';  

 }
}

bomb::go(18);   

### GDB ###

Program terminated with signal 11, Segmentation fault.
[New process 25022]
#0  _zend_mm_free_int (heap=0x9eb81b8, p=0x9fe2da0) at
/blade/install/daemon/php/Zend/zend_alloc.c:1979
1979if (ZEND_MM_IS_FREE_BLOCK(next_block)) {
(gdb) bt
#0  _zend_mm_free_int (heap=0x9eb81b8, p=0x9fe2da0) at
/blade/install/daemon/php/Zend/zend_alloc.c:1979
#1  0x0832114d in _zval_ptr_dtor (zval_ptr=0x9feb5bc) at
/blade/install/daemon/php/Zend/zend_variables.h:35
#2  0x08337c1e in zend_hash_destroy (ht=0x9fdfc44) at
/blade/install/daemon/php/Zend/zend_hash.c:526
#3  0x0832be75 in _zval_dtor_func (zvalue=0x9fe27c4) at
/blade/install/daemon/php/Zend/zend_variables.c:43
#4  0x0832114d in _zval_ptr_dtor (zval_ptr=0x9fdae88) at
/blade/install/daemon/php/Zend/zend_variables.h:35
#5  0x08337c1e in zend_hash_destroy (ht=0x9febac4) at
/blade/install/daemon/php/Zend/zend_hash.c:526
#6  0x0832be75 in _zval_dtor_func (zvalue=0x9fe0eb8) at
/blade/install/daemon/php/Zend/zend_variables.c:43
#7  0x0832114d in _zval_ptr_dtor (zval_ptr=0x9feb590) at
/blade/install/daemon/php/Zend/zend_variables.h:35
#8  0x08337c1e in zend_hash_destroy (ht=0x9fdf82c) at
/blade/install/daemon/php/Zend/zend_hash.c:526
#9  0x0832be75 in _zval_dtor_func (zvalue=0x9fdf1c0) at
/blade/install/daemon/php/Zend/zend_variables.c:43
#10 0x0832114d in _zval_ptr_dtor (zval_ptr=0xa0111c0) at
/blade/install/daemon/php/Zend/zend_variables.h:35
#11 0x0834e816 in zend_leave_helper_SPEC (execute_data=0x1) at
/blade/install/daemon/php/Zend/zend_vm_execute.h:157
#12 0x08354b8e in execute (op_array=0x9fdd56c) at
/blade/install/daemon/php/Zend/zend_vm_execute.h:104
#13 0x08321ab7 in zend_call_function (fci=0xbfe4521c,
fci_cache=0xbfe45240)
at /blade/install/daemon/php/Zend/zend_execute_API.c:936
#14 0x08269947 in zif_call_user_func_array (ht=2,
return_value=0x9fdefd0, return_value_ptr=0x0, this_ptr=0x0,
return_value_used=0)
at /blade/install/daemon/php/ext/standard/basic_functions.c:4745
#15 0x08376a59 in zend_do_fcall_common_helper_SPEC
(execute_data=0xa010ee8) at
/blade/install/daemon/php/Zend/zend_vm_execute.h:313
#16 0x08354b8e in execute (op_array=0x9fdd56c) at
/blade/install/daemon/php/Zend/zend_vm_execute.h:104
#17 0x08321ab7 in zend_call_function (fci=0xbfe4542c,
fci_cache=0xbfe45450)
at /blade/install/daemon/php/Zend/zend_execute_API.c:936
#18 0x08269947 in zif_call_user_func_array (ht=2,
return_value=0x9fdedc4, return_value_ptr=0x0, this_ptr=0x0,
return_value_used=0)
at /blade/install/daemon/php/ext/standard/basic_functions.c:4745
#19 0x08376a59 in zend_do_fcall_common_helper_SPEC
(execute_data=0xa010c78) at
/blade/install/daemon/php/Zend/zend_vm_execute.h:313
#20 0x08354b8e in execute (op_array=0x9fdd56c) at
/blade/install/daemon/php/Zend/zend_vm_execute.h:104
#21 0x08321ab7 in zend_call_function (fci=0xbfe4563c,
fci_cache=0xbfe45660)
at /blade/install/daemon/php/Zend/zend_execute_API.c:936
#22 0x08269947 in zif_call_user_func_array (ht=2,
return_value=0x9fdebb8, return_value_ptr=0x0, this_ptr=0x0,
return_value_used=0)
at /blade/install/daemon/php/ext/standard/basic_functions.c:4745
#23 0x08376a59 in zend_do_fcall_common_helper_SPEC
(execute_data=0xa010a08) at
/blade/install/daemon/php/Zend/zend_vm_execute.h:313
#24 0x08354b8e in execute (op_array=0x9fdd56c) at

#47873 [Fbk-Opn]: PHP can not parse extension_dir

2009-04-06 Thread ronaldo dot sy at gmail dot com
 ID:   47873
 User updated by:  ronaldo dot sy at gmail dot com
 Reported By:  ronaldo dot sy at gmail dot com
-Status:   Feedback
+Status:   Open
 Bug Type: PHP options/info functions
 Operating System: Windows 7
 PHP Version:  5.2.9
 New Comment:

I remove my current 5.2.8 PHP, and using the php.ini from 5.2.8 as 
reference, and it work now. You can remove this bug entry. Thanks for 
all the help.


Previous Comments:


[2009-04-06 08:58:42] j...@php.net

And you haven't set the extension_dir in registry..? (yes, that's
possible too :) Replace the php.ini file with one that has ONLY that one
line which sets extension_dir (and paste the same line here too).



[2009-04-02 09:22:40] ronaldo dot sy at gmail dot com

Yes, because when I check the Loaded Configuration File fiels at 
phpinfo, it show to the correct php.ini file (which located at 
c:\php\php.ini)



[2009-04-02 07:38:06] paj...@php.net

Using a php.ini I suppose? If yes, are you the php.ini is loaded?



[2009-04-02 06:06:07] ronaldo dot sy at gmail dot com

Description:

It seems PHP can not parse the location of extension_dir. I already 
change the location at php.ini, but every time I open the phpinfo 
page the extension_dir keep pointing to c:\php5, After I use version 
5.28 the problem is gone. I use IIS version 7.5 






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



#47873 [Opn-Bgs]: PHP can not parse extension_dir

2009-04-06 Thread jani
 ID:   47873
 Updated by:   j...@php.net
 Reported By:  ronaldo dot sy at gmail dot com
-Status:   Open
+Status:   Bogus
 Bug Type: PHP options/info functions
 Operating System: Windows 7
 PHP Version:  5.2.9
 New Comment:

Bogused by Request.


Previous Comments:


[2009-04-06 12:46:43] ronaldo dot sy at gmail dot com

I remove my current 5.2.8 PHP, and using the php.ini from 5.2.8 as 
reference, and it work now. You can remove this bug entry. Thanks for 
all the help.



[2009-04-06 08:58:42] j...@php.net

And you haven't set the extension_dir in registry..? (yes, that's
possible too :) Replace the php.ini file with one that has ONLY that one
line which sets extension_dir (and paste the same line here too).



[2009-04-02 09:22:40] ronaldo dot sy at gmail dot com

Yes, because when I check the Loaded Configuration File fiels at 
phpinfo, it show to the correct php.ini file (which located at 
c:\php\php.ini)



[2009-04-02 07:38:06] paj...@php.net

Using a php.ini I suppose? If yes, are you the php.ini is loaded?



[2009-04-02 06:06:07] ronaldo dot sy at gmail dot com

Description:

It seems PHP can not parse the location of extension_dir. I already 
change the location at php.ini, but every time I open the phpinfo 
page the extension_dir keep pointing to c:\php5, After I use version 
5.28 the problem is gone. I use IIS version 7.5 






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



#47576 [Opn-Fbk]: continue i; working wrong on foreach

2009-04-06 Thread jani
 ID:   47576
 Updated by:   j...@php.net
 Reported By:  fischikowski at web dot de
-Status:   Open
+Status:   Feedback
 Bug Type: Scripting Engine problem
 Operating System: Windows Vista 32bit
 PHP Version:  5.2.9
 New Comment:

Works fine on windows, linux 32/64bit for me.


Previous Comments:


[2009-03-10 14:43:21] fischikowski at web dot de

I don't think to use any. I am using PHP on an apache-webserver, if
that makes a difference.

Could also not reproduce this on linux with Version 5.2.6, had no
higher versions on a linux system to test it. Will try that later.



[2009-03-10 13:51:43] scott...@php.net

I can't reproduce this on Linux or OS X

Do you have any Zend Extensions enabled such as eAccelerator, APC, Zend
Optimizer or anything like that?



[2009-03-10 10:42:39] fischikowski at web dot de

Except from the ?php and ? I already posted the shorter script.

?php
function test() {
$array = array(test);
foreach($array as $element) {
for($j=0;$j5;$j++) {
continue 2;
}
//inserting code here affects return-value
return true;
}
return false;
}

echo test()?true:false;
?



[2009-03-05 17:34:29] fischikowski at web dot de

Description:

The echo ; affects the return true; below.
As long as the echo is there everything works as expected, if you put
// in front of the echo, the return will be called even if it should
not.

Reproduce code:
---
function matchHostList($host, $list_file) {
$host = explode(., $host);

//$list_contents = explode(\n, file_get_contents($list_file));
$list_contents = array(www.google.de);
foreach($list_contents as $list_host) {
$list_host = explode(., rtrim($list_host));

//if the list-host is more specific than the tested host we 
can't
match
if(count($host)  count($list_host))
continue;

for($i = 1;$i=count($list_host)  $i = count($host);$i++) {
if($list_host[count($list_host)-$i] != 
$host[count($host)-$i])
continue 2;
}
echo ; //this is necessary to avoid wrong return

return true;
}

return false;
}
echo matchHostList(false.google.de, )?true:false;

Expected result:

When running as shown above this returns false (because continue 2;
continues the loop above the return true;), this is OK.

If you remove the echo ; above the return true; You would expect
that nothing changes (because we only removed some null-output), but in
fact the return value changes to true.

Actual result:
--
see Expected result





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



#47090 [Opn-Fbk]: Memory leak with non-debug build in stream_socket_client() when USE_ZEND_ALLOC=1

2009-04-06 Thread jani
 ID:   47090
 Updated by:   j...@php.net
 Reported By:  dominique dot fournier at grenoble dot cnrs dot fr dot
-Status:   Open
+Status:   Feedback
 Bug Type: Streams related
 Operating System: Linux
 PHP Version:  5.2.8
 New Comment:

Please try using this CVS snapshot:

  http://snaps.php.net/php5.2-latest.tar.gz
 
For Windows:

  http://windows.php.net/snapshots/

And when you test new versions, UPDATE the version field to reflect the
last version you could reproduce this. 

Also: minimize the configure line to the bare minimum one with which
you can still reproduce this, disable ALL shared extensions, etc. The
line you showed above contains stuff that hasn't existed for years..


Previous Comments:


[2009-01-14 10:48:50] dominique dot fournier at grenoble dot cnrs dot
fr dot 

More informations :
CVS version has the problem too. BUT : when PHP is compiled with
--enable-debug option, the leak disapear. Without debug, and with
USE_ZEND_ALLOC=1, the problem persist.

./configure --prefix=/usr --disable-cgi
--with-config-file-path=/etc/php5/cli
--with-config-file-scan-dir=/etc/php5/cli/conf.d --build=i486-linux-gnu
--host=i486-linux-gnu --mandir=/usr/share/man --enable-memory-limit
--with-regex=php --disable-rpath --disable-static --with-pic
--with-layout=GNU --with-pear=/usr/share/php --enable-calendar
--enable-sysvsem --enable-sysvshm --enable-sysvmsg --enable-track-vars
--enable-trans-sid --enable-bcmath --with-bz2 --enable-ctype --with-db4
--without-gdbm --with-iconv --enable-exif --enable-filepro --enable-ftp
--with-gettext --enable-mbstring --with-pcre-regex=/usr --enable-shmop
--enable-sockets --enable-wddx --with-libxml-dir=/usr --with-zlib
--with-kerberos=/usr --with-openssl=/usr --enable-dbx --enable-soap
--enable-zip --with-mime-magic=/usr/share/file/magic.mime
--with-exec-dir=/usr/lib/php5/libexec --without-mm --disable-pdo
--without-mysql --without-sybase-ct --without-sqlite --enable-pcntl
--with-ncurses=/usr --enable-debug
OR --disable-debug



[2009-01-14 02:28:22] crrodriguez at opensuse dot org

Cannot reproduce,memory usage is stable with 5_2 and 5_3.



[2009-01-13 16:26:42] dominique dot fournier at grenoble dot cnrs dot
fr dot 

Description:

When export USE_ZEND_ALLOC=1, before run the following script in CLI,
there is a memory_leak.
When export USE_ZEND_ALLOC=0, the script leave on the same value.
The IP in the script is available, but the port is closed (no service
available on this port).

Reproduce code:
---
?
  for ($i =0 ; $i 30 ; $i++)
  {
$...@stream_socket_client('tcp://127.0.0.1:800', $error, $err);
unset ($fp);
unset ($error);
unset ($err);
echo memory_get_usage().\n;
  }
?


Expected result:

Always the same value (in my case, when ALLOC=0, 8200)

Actual result:
--
49936
50016
50044
... repeat with an increment 30 times





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



#47870 [Opn-Fbk]: array() returns NULL

2009-04-06 Thread jani
 ID:   47870
 Updated by:   j...@php.net
 Reported By:  mbecc...@php.net
-Status:   Open
+Status:   Feedback
 Bug Type: Arrays related
 Operating System: FreeBSD 6.2
 PHP Version:  5.3CVS-2009-04-01 (CVS)
 New Comment:

Can you reproduce this with PHP_5_2 branch?


Previous Comments:


[2009-04-02 09:11:25] mbecc...@php.net

I've tried to reduce the affected test to a smaller test case with no
luck. As soon as I remove something from it. It suddenly starts to pass
with no segfault.



[2009-04-02 00:36:03] mbecc...@php.net

mat...@phenom-ubuntu:~/OX-trunk/tests$ valgrind --tool=memcheck
--num-callers=30 --log-file=php.log /usr/local/bin/php run.php
--type=unit --level=file --layer=dal --folder=lib/OA/Dal/Maintenance
--file=Priority_getZoneImpressionForecasts.dal.test.php --format=text
--host=test Priority_getZoneImpressionForecasts.dal.test.php
Segmentation fault
mat...@phenom-ubuntu:~/OX-trunk/tests$ cat php.log
==11808== Memcheck, a memory error detector.
==11808== Copyright (C) 2002-2007, and GNU GPL'd, by Julian Seward et
al.
==11808== Using LibVEX rev 1854, a library for dynamic binary
translation.
==11808== Copyright (C) 2004-2007, and GNU GPL'd, by OpenWorks LLP.
==11808== Using valgrind-3.3.1-Debian, a dynamic binary instrumentation
framework.
==11808== Copyright (C) 2000-2007, and GNU GPL'd, by Julian Seward et
al.
==11808== For more details, rerun with: -v
==11808== 
==11808== My PID = 11808, parent PID = 10101.  Prog and args are:
==11808==/usr/local/bin/php
==11808==run.php
==11808==--type=unit
==11808==--level=file
==11808==--layer=dal
==11808==--folder=lib/OA/Dal/Maintenance
==11808==--file=Priority_getZoneImpressionForecasts.dal.test.php
==11808==--format=text
==11808==--host=test
==11808==Priority_getZoneImpressionForecasts.dal.test.php
==11808== 
==11808== Conditional jump or move depends on uninitialised value(s)
==11808==at 0x7FF79D: _zval_ptr_dtor (zend_execute_API.c:430)
==11808==by 0x824537: zend_hash_clean (zend_hash.c:552)
==11808==by 0x849231: zend_leave_helper_SPEC
(zend_vm_execute.h:208)
==11808==by 0x8DC019: ZEND_RETURN_SPEC_CV_HANDLER
(zend_vm_execute.h:22098)
==11808==by 0x848774: execute (zend_vm_execute.h:104)
==11808==by 0x814198: zend_execute_scripts (zend.c:1188)
==11808==by 0x768884: php_execute_script (main.c:2157)
==11808==by 0x9125CE: main (php_cli.c:1159)
==11808== 
==11808== Conditional jump or move depends on uninitialised value(s)
==11808==at 0x7FF861: _zval_ptr_dtor (zend_execute_API.c:441)
==11808==by 0x824537: zend_hash_clean (zend_hash.c:552)
==11808==by 0x849231: zend_leave_helper_SPEC
(zend_vm_execute.h:208)
==11808==by 0x8DC019: ZEND_RETURN_SPEC_CV_HANDLER
(zend_vm_execute.h:22098)
==11808==by 0x848774: execute (zend_vm_execute.h:104)
==11808==by 0x814198: zend_execute_scripts (zend.c:1188)
==11808==by 0x768884: php_execute_script (main.c:2157)
==11808==by 0x9125CE: main (php_cli.c:1159)
==11808== 
==11808== Conditional jump or move depends on uninitialised value(s)
==11808==at 0x881939: zend_assign_to_variable (zend_execute.c:664)
==11808==by 0x8FCC90: ZEND_ASSIGN_SPEC_CV_VAR_HANDLER
(zend_vm_execute.h:27359)
==11808==by 0x848774: execute (zend_vm_execute.h:104)
==11808==by 0x814198: zend_execute_scripts (zend.c:1188)
==11808==by 0x768884: php_execute_script (main.c:2157)
==11808==by 0x9125CE: main (php_cli.c:1159)
==11808== 
==11808== Conditional jump or move depends on uninitialised value(s)
==11808==at 0x881991: zend_assign_to_variable (zend_execute.c:669)
==11808==by 0x8FCC90: ZEND_ASSIGN_SPEC_CV_VAR_HANDLER
(zend_vm_execute.h:27359)
==11808==by 0x848774: execute (zend_vm_execute.h:104)
==11808==by 0x814198: zend_execute_scripts (zend.c:1188)
==11808==by 0x768884: php_execute_script (main.c:2157)
==11808==by 0x9125CE: main (php_cli.c:1159)
==11808== 
==11808== Conditional jump or move depends on uninitialised value(s)
==11808==at 0x881A77: zend_assign_to_variable (zend_execute.c:684)
==11808==by 0x8FCC90: ZEND_ASSIGN_SPEC_CV_VAR_HANDLER
(zend_vm_execute.h:27359)
==11808==by 0x848774: execute (zend_vm_execute.h:104)
==11808==by 0x814198: zend_execute_scripts (zend.c:1188)
==11808==by 0x768884: php_execute_script (main.c:2157)
==11808==by 0x9125CE: main (php_cli.c:1159)
==11808== 
==11808== Conditional jump or move depends on uninitialised value(s)
==11808==at 0x881939: zend_assign_to_variable (zend_execute.c:664)
==11808==by 0x8EF8A8: ZEND_ASSIGN_SPEC_CV_TMP_HANDLER
(zend_vm_execute.h:25711)
==11808==by 0x848774: execute (zend_vm_execute.h:104)
==11808==by 0x814198: zend_execute_scripts (zend.c:1188)
==11808==by 0x768884: php_execute_script (main.c:2157)
==11808==by 

#47907 [NEW]: Segmentation fault during many preg_matches

2009-04-06 Thread tafkad at web dot de
From: tafkad at web dot de
Operating system: Linux Debian Lenny
PHP version:  5.2.9
PHP Bug Type: PCRE related
Bug description:  Segmentation fault during many preg_matches

Description:

I use a class(phpcc) to transform a searchstring into an SQL where clause.
If it has many options like brackets or operators or if it is a very long
string php ends in a segmentation fault. I've tested it with two php
version 5.2.6 and 5.2.9. I use the cli version.

I've created a test script with a for loop that generates a simple
searchstatement with 2000 searchterms. If I run this script it crash. When
I'll decrase the amount of searchterms to 1000 it will run clean.

GDB shows preg_match as last execute, thats why I think there must be an
error.

The script uses a very huge amount of memory(I've configured php.ini with
1024M).

php.ini changes from against default(debian)
max_execution_time = 3 ; 30 ; Maximum execution time of each
script, in seconds
max_input_time = 6 ; 60 ; Maximum amount of time each script may spend
parsing request data
;max_input_nesting_level = 64 ; Maximum input variable nesting level
memory_limit = 1024M ; 32M  ; Maximum amount of memory a script may
consume (32MB)

Active modules (php -m)
[PHP Modules]
bcmath,bz2,calendar,ctype,curl,date,dba,dbase,dom,exif,ffmpeg,filter,ftp,gd,gettext,hash,iconv,json,libxml,mbstring,mime_magic,mysql,mysqli,ncurses,openssl,pcntl,pcre,PDO,pdo_mysql,posix,readline,Reflection,session,shmop,SimpleXML,soap,sockets,SPL,standard,sysvmsg,sysvsem,sysvshm,tidy,tokenizer,wddx,xml,xmlreader,xmlwriter,zip,zlib

Reproduce code:
---
Code is to long.
Under http://paste.root-zone.info/debug.tar.gz is a dir with the class and
an testscript.


Expected result:

Before the script can finish, php crashes.

Actual result:
--
#23 0x004783db in match (eptr=0x0,
ecode=0x107108e8 'TESTSTR1160' or OR_ID = 'TESTSTR1161' or
OR_ID = 'TESTSTR1162' or OR_ID = 'TESTSTR1163' or OR_ID =
'TESTSTR1164' or OR_ID = 'TESTSTR1165' or OR_ID = 'TESTSTR1166'
or OR_ID..., mstart=0x2 Address 0x2 out of bounds,
offset_top=32767, md=0x0, ims=15, eptrb=0x47a157, flags=0, rdepth=0)
at /usr/src/php5/source/php5-5.2.9/ext/pcre/pcrelib/pcre_exec.c:1184
#24 0x0047a157 in match (eptr=0x1 Address 0x1 out of bounds,
ecode=0x107108e8 'TESTSTR1160' or OR_ID = 'TESTSTR1161' or
OR_ID = 'TESTSTR1162' or OR_ID = 'TESTSTR1163' or OR_ID =
'TESTSTR1164' or OR_ID = 'TESTSTR1165' or OR_ID = 'TESTSTR1166'
or OR_ID..., mstart=0x2 Address 0x2 out of bounds,
offset_top=32767, md=0x0, ims=3, eptrb=0x4803f4, flags=0, rdepth=0)
at /usr/src/php5/source/php5-5.2.9/ext/pcre/pcrelib/pcre_exec.c:714
#25 0x004803f4 in match (eptr=0x2ed1fe5 ,
ecode=0x107108e8 'TESTSTR1160' or OR_ID = 'TESTSTR1161' or
OR_ID = 'TESTSTR1162' or OR_ID = 'TESTSTR1163' or OR_ID =
'TESTSTR1164' or OR_ID = 'TESTSTR1165' or OR_ID = 'TESTSTR1166'
or OR_ID..., mstart=0x27c2b71e0 Address 0x27c2b71e0 out of bounds,
offset_top=32767, md=0x0, ims=45889320, eptrb=0x481f97, flags=0, rdepth=0)
at /usr/src/php5/source/php5-5.2.9/ext/pcre/pcrelib/pcre_exec.c:2035
#26 0x00481f97 in php_pcre_exec (argument_re=0x10716821,
extra_data=0x2ed2016, subject=0x20 Address 0x20 out of bounds,
length=275843303, start_offset=0,
options=275843304, offsets=0x488020, offsetcount=275614368) at
/usr/src/php5/source/php5-5.2.9/ext/pcre/pcrelib/pcre_exec.c:4844
#27 0x00488020 in php_pcre_match_impl (pce=0x107108e8,
subject=0x5f390048662f Address 0x5f390048662f out of bounds,
subject_len=0, return_value=0x10718550,
subpats=0xc106f7fd0, global=0, use_flags=4753947, flags=0,
start_offset=0) at /usr/src/php5/source/php5-5.2.9/ext/pcre/php_pcre.c:621
#28 0x00488a1b in php_do_pcre_match (ht=3,
return_value=0x106f7fd0, return_value_ptr=0x7fff7c2b31a0,
this_ptr=0x7fff7c2b31b0, return_value_used=208324, global=0)
at /usr/src/php5/source/php5-5.2.9/ext/pcre/php_pcre.c:513
#29 0x006c01ad in zend_do_fcall_common_helper_SPEC
(execute_data=0x7fff7c2b7b60) at
/usr/src/php5/source/php5-5.2.9/Zend/zend_vm_execute.h:200
#30 0x006ac6a4 in execute (op_array=0x2be9420) at
/usr/src/php5/source/php5-5.2.9/Zend/zend_vm_execute.h:92
#31 0x006bfabe in zend_do_fcall_common_helper_SPEC
(execute_data=0x7fff7c2b8410) at
/usr/src/php5/source/php5-5.2.9/Zend/zend_vm_execute.h:234
#32 0x006ac6a4 in execute (op_array=0x2bbd4e8) at
/usr/src/php5/source/php5-5.2.9/Zend/zend_vm_execute.h:92
#33 0x006bfabe in zend_do_fcall_common_helper_SPEC
(execute_data=0x7fff7c2b9110) at
/usr/src/php5/source/php5-5.2.9/Zend/zend_vm_execute.h:234
#34 0x006ac6a4 in execute (op_array=0x2be08b8) at
/usr/src/php5/source/php5-5.2.9/Zend/zend_vm_execute.h:92

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

#47870 [Fbk]: array() returns NULL

2009-04-06 Thread mbeccati
 ID:   47870
 Updated by:   mbecc...@php.net
 Reported By:  mbecc...@php.net
 Status:   Feedback
 Bug Type: Arrays related
 Operating System: FreeBSD 6.2
 PHP Version:  5.3CVS-2009-04-01 (CVS)
 New Comment:

Nope. Latest 5.1 and 5.2 work perfectly fine.


Previous Comments:


[2009-04-06 12:59:18] j...@php.net

Can you reproduce this with PHP_5_2 branch?



[2009-04-02 09:11:25] mbecc...@php.net

I've tried to reduce the affected test to a smaller test case with no
luck. As soon as I remove something from it. It suddenly starts to pass
with no segfault.



[2009-04-02 00:36:03] mbecc...@php.net

mat...@phenom-ubuntu:~/OX-trunk/tests$ valgrind --tool=memcheck
--num-callers=30 --log-file=php.log /usr/local/bin/php run.php
--type=unit --level=file --layer=dal --folder=lib/OA/Dal/Maintenance
--file=Priority_getZoneImpressionForecasts.dal.test.php --format=text
--host=test Priority_getZoneImpressionForecasts.dal.test.php
Segmentation fault
mat...@phenom-ubuntu:~/OX-trunk/tests$ cat php.log
==11808== Memcheck, a memory error detector.
==11808== Copyright (C) 2002-2007, and GNU GPL'd, by Julian Seward et
al.
==11808== Using LibVEX rev 1854, a library for dynamic binary
translation.
==11808== Copyright (C) 2004-2007, and GNU GPL'd, by OpenWorks LLP.
==11808== Using valgrind-3.3.1-Debian, a dynamic binary instrumentation
framework.
==11808== Copyright (C) 2000-2007, and GNU GPL'd, by Julian Seward et
al.
==11808== For more details, rerun with: -v
==11808== 
==11808== My PID = 11808, parent PID = 10101.  Prog and args are:
==11808==/usr/local/bin/php
==11808==run.php
==11808==--type=unit
==11808==--level=file
==11808==--layer=dal
==11808==--folder=lib/OA/Dal/Maintenance
==11808==--file=Priority_getZoneImpressionForecasts.dal.test.php
==11808==--format=text
==11808==--host=test
==11808==Priority_getZoneImpressionForecasts.dal.test.php
==11808== 
==11808== Conditional jump or move depends on uninitialised value(s)
==11808==at 0x7FF79D: _zval_ptr_dtor (zend_execute_API.c:430)
==11808==by 0x824537: zend_hash_clean (zend_hash.c:552)
==11808==by 0x849231: zend_leave_helper_SPEC
(zend_vm_execute.h:208)
==11808==by 0x8DC019: ZEND_RETURN_SPEC_CV_HANDLER
(zend_vm_execute.h:22098)
==11808==by 0x848774: execute (zend_vm_execute.h:104)
==11808==by 0x814198: zend_execute_scripts (zend.c:1188)
==11808==by 0x768884: php_execute_script (main.c:2157)
==11808==by 0x9125CE: main (php_cli.c:1159)
==11808== 
==11808== Conditional jump or move depends on uninitialised value(s)
==11808==at 0x7FF861: _zval_ptr_dtor (zend_execute_API.c:441)
==11808==by 0x824537: zend_hash_clean (zend_hash.c:552)
==11808==by 0x849231: zend_leave_helper_SPEC
(zend_vm_execute.h:208)
==11808==by 0x8DC019: ZEND_RETURN_SPEC_CV_HANDLER
(zend_vm_execute.h:22098)
==11808==by 0x848774: execute (zend_vm_execute.h:104)
==11808==by 0x814198: zend_execute_scripts (zend.c:1188)
==11808==by 0x768884: php_execute_script (main.c:2157)
==11808==by 0x9125CE: main (php_cli.c:1159)
==11808== 
==11808== Conditional jump or move depends on uninitialised value(s)
==11808==at 0x881939: zend_assign_to_variable (zend_execute.c:664)
==11808==by 0x8FCC90: ZEND_ASSIGN_SPEC_CV_VAR_HANDLER
(zend_vm_execute.h:27359)
==11808==by 0x848774: execute (zend_vm_execute.h:104)
==11808==by 0x814198: zend_execute_scripts (zend.c:1188)
==11808==by 0x768884: php_execute_script (main.c:2157)
==11808==by 0x9125CE: main (php_cli.c:1159)
==11808== 
==11808== Conditional jump or move depends on uninitialised value(s)
==11808==at 0x881991: zend_assign_to_variable (zend_execute.c:669)
==11808==by 0x8FCC90: ZEND_ASSIGN_SPEC_CV_VAR_HANDLER
(zend_vm_execute.h:27359)
==11808==by 0x848774: execute (zend_vm_execute.h:104)
==11808==by 0x814198: zend_execute_scripts (zend.c:1188)
==11808==by 0x768884: php_execute_script (main.c:2157)
==11808==by 0x9125CE: main (php_cli.c:1159)
==11808== 
==11808== Conditional jump or move depends on uninitialised value(s)
==11808==at 0x881A77: zend_assign_to_variable (zend_execute.c:684)
==11808==by 0x8FCC90: ZEND_ASSIGN_SPEC_CV_VAR_HANDLER
(zend_vm_execute.h:27359)
==11808==by 0x848774: execute (zend_vm_execute.h:104)
==11808==by 0x814198: zend_execute_scripts (zend.c:1188)
==11808==by 0x768884: php_execute_script (main.c:2157)
==11808==by 0x9125CE: main (php_cli.c:1159)
==11808== 
==11808== Conditional jump or move depends on uninitialised value(s)
==11808==at 0x881939: zend_assign_to_variable (zend_execute.c:664)
==11808==by 0x8EF8A8: ZEND_ASSIGN_SPEC_CV_TMP_HANDLER
(zend_vm_execute.h:25711)
==11808==by 0x848774: execute (zend_vm_execute.h:104)

#47870 [Fbk-Opn]: array() returns NULL

2009-04-06 Thread mbeccati
 ID:   47870
 Updated by:   mbecc...@php.net
 Reported By:  mbecc...@php.net
-Status:   Feedback
+Status:   Open
 Bug Type: Arrays related
 Operating System: FreeBSD 6.2
 PHP Version:  5.3CVS-2009-04-01 (CVS)


Previous Comments:


[2009-04-06 13:05:25] mbecc...@php.net

Nope. Latest 5.1 and 5.2 work perfectly fine.



[2009-04-06 12:59:18] j...@php.net

Can you reproduce this with PHP_5_2 branch?



[2009-04-02 09:11:25] mbecc...@php.net

I've tried to reduce the affected test to a smaller test case with no
luck. As soon as I remove something from it. It suddenly starts to pass
with no segfault.



[2009-04-02 00:36:03] mbecc...@php.net

mat...@phenom-ubuntu:~/OX-trunk/tests$ valgrind --tool=memcheck
--num-callers=30 --log-file=php.log /usr/local/bin/php run.php
--type=unit --level=file --layer=dal --folder=lib/OA/Dal/Maintenance
--file=Priority_getZoneImpressionForecasts.dal.test.php --format=text
--host=test Priority_getZoneImpressionForecasts.dal.test.php
Segmentation fault
mat...@phenom-ubuntu:~/OX-trunk/tests$ cat php.log
==11808== Memcheck, a memory error detector.
==11808== Copyright (C) 2002-2007, and GNU GPL'd, by Julian Seward et
al.
==11808== Using LibVEX rev 1854, a library for dynamic binary
translation.
==11808== Copyright (C) 2004-2007, and GNU GPL'd, by OpenWorks LLP.
==11808== Using valgrind-3.3.1-Debian, a dynamic binary instrumentation
framework.
==11808== Copyright (C) 2000-2007, and GNU GPL'd, by Julian Seward et
al.
==11808== For more details, rerun with: -v
==11808== 
==11808== My PID = 11808, parent PID = 10101.  Prog and args are:
==11808==/usr/local/bin/php
==11808==run.php
==11808==--type=unit
==11808==--level=file
==11808==--layer=dal
==11808==--folder=lib/OA/Dal/Maintenance
==11808==--file=Priority_getZoneImpressionForecasts.dal.test.php
==11808==--format=text
==11808==--host=test
==11808==Priority_getZoneImpressionForecasts.dal.test.php
==11808== 
==11808== Conditional jump or move depends on uninitialised value(s)
==11808==at 0x7FF79D: _zval_ptr_dtor (zend_execute_API.c:430)
==11808==by 0x824537: zend_hash_clean (zend_hash.c:552)
==11808==by 0x849231: zend_leave_helper_SPEC
(zend_vm_execute.h:208)
==11808==by 0x8DC019: ZEND_RETURN_SPEC_CV_HANDLER
(zend_vm_execute.h:22098)
==11808==by 0x848774: execute (zend_vm_execute.h:104)
==11808==by 0x814198: zend_execute_scripts (zend.c:1188)
==11808==by 0x768884: php_execute_script (main.c:2157)
==11808==by 0x9125CE: main (php_cli.c:1159)
==11808== 
==11808== Conditional jump or move depends on uninitialised value(s)
==11808==at 0x7FF861: _zval_ptr_dtor (zend_execute_API.c:441)
==11808==by 0x824537: zend_hash_clean (zend_hash.c:552)
==11808==by 0x849231: zend_leave_helper_SPEC
(zend_vm_execute.h:208)
==11808==by 0x8DC019: ZEND_RETURN_SPEC_CV_HANDLER
(zend_vm_execute.h:22098)
==11808==by 0x848774: execute (zend_vm_execute.h:104)
==11808==by 0x814198: zend_execute_scripts (zend.c:1188)
==11808==by 0x768884: php_execute_script (main.c:2157)
==11808==by 0x9125CE: main (php_cli.c:1159)
==11808== 
==11808== Conditional jump or move depends on uninitialised value(s)
==11808==at 0x881939: zend_assign_to_variable (zend_execute.c:664)
==11808==by 0x8FCC90: ZEND_ASSIGN_SPEC_CV_VAR_HANDLER
(zend_vm_execute.h:27359)
==11808==by 0x848774: execute (zend_vm_execute.h:104)
==11808==by 0x814198: zend_execute_scripts (zend.c:1188)
==11808==by 0x768884: php_execute_script (main.c:2157)
==11808==by 0x9125CE: main (php_cli.c:1159)
==11808== 
==11808== Conditional jump or move depends on uninitialised value(s)
==11808==at 0x881991: zend_assign_to_variable (zend_execute.c:669)
==11808==by 0x8FCC90: ZEND_ASSIGN_SPEC_CV_VAR_HANDLER
(zend_vm_execute.h:27359)
==11808==by 0x848774: execute (zend_vm_execute.h:104)
==11808==by 0x814198: zend_execute_scripts (zend.c:1188)
==11808==by 0x768884: php_execute_script (main.c:2157)
==11808==by 0x9125CE: main (php_cli.c:1159)
==11808== 
==11808== Conditional jump or move depends on uninitialised value(s)
==11808==at 0x881A77: zend_assign_to_variable (zend_execute.c:684)
==11808==by 0x8FCC90: ZEND_ASSIGN_SPEC_CV_VAR_HANDLER
(zend_vm_execute.h:27359)
==11808==by 0x848774: execute (zend_vm_execute.h:104)
==11808==by 0x814198: zend_execute_scripts (zend.c:1188)
==11808==by 0x768884: php_execute_script (main.c:2157)
==11808==by 0x9125CE: main (php_cli.c:1159)
==11808== 
==11808== Conditional jump or move depends on uninitialised value(s)
==11808==at 0x881939: zend_assign_to_variable (zend_execute.c:664)
==11808==by 

#47906 [Opn]: CURLOPT_POSTFIELDS accepts only strings

2009-04-06 Thread klas at k-k-k dot biz
 ID:   47906
 User updated by:  klas at k-k-k dot biz
 Reported By:  klas at k-k-k dot biz
 Status:   Open
-Bug Type: Documentation problem
+Bug Type: Scripting Engine problem
 Operating System: windows
 PHP Version:  5.2.9
 New Comment:

Sorry, but that doesn't work. 

Note that this is a different problem that the one described on that
page.


Previous Comments:


[2009-04-06 12:46:24] j...@php.net

You just need to disable the Expect header cURL sends by default:

http://the-stickman.com/web-development/php-and-curl-disabling-100-continue-header/




[2009-04-06 11:48:31] klas at k-k-k dot biz

Description:

Inserting array (key=value) as CURLOPT_POSTFIELDS doesn't work
although documentation states:

 This can either be passed as a urlencoded string like
'para1=val1para2=val2...' or as an array with the field name as key
and field data as value. 

Reproduce code:
---
$url=example.php;
$process = curl_init($url);
$data= array ('somefield'='somedata')
curl_setopt($process, CURLOPT_POSTFIELDS, $data);
curl_exec($process);
curl_close($process);

Expected result:

input field somefield with value somedata posted to example.php

Actual result:
--
Empty field/value





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



#47908 [NEW]: problem with error error: Allowed memory size of 134217728 bytes exhausted

2009-04-06 Thread kiet dot tran at enscm dot fr
From: kiet dot tran at enscm dot fr
Operating system: linux Redhat ES 4.7
PHP version:  5.2.9
PHP Bug Type: Performance problem
Bug description:  problem with error error: Allowed memory size of 134217728 
bytes exhausted

Description:

I have this function which runs well on Php 4.9 :

function lire_structure($inlist_stru,$link) {
if ($inlist_stru=='') return '';
$stmt = OCIParse($link,select STRU_ID,STRU_MOLFILE from
sub_structure_view where stru_id in(.$inlist_stru.));
OCIExecute($stmt);
while (OCIFetchInto ($stmt, $row, OCI_RETURN_LOBS)) {
$i++;
$tabstru[$row[0]]=$row[1];
//echo $ibr;
}
return $tabstru;
}


But when I used it on php 5.2.9 :

I have this following error :
Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to
allocate 524288 bytes)

So I change the memory limit of php.ini from 128 M to 512 (256 m is not
enough) and the function works well.
But I'm asking why with php 4.9 where the memory limit of php.ini is only
at 8 M, the function works well?

I see in internet forum that php 5 releases memory no correctly.
Could you help me?

Actual result:
--
I have this following error :
Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to
allocate 524288 bytes)


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



#47902 [Fbk]: free_op1 warnings

2009-04-06 Thread kalle
 ID:  47902
 Updated by:  ka...@php.net
 Reported By: pierre dot php at gmail dot com
 Status:  Feedback
 Bug Type:Compile Warning
 PHP Version: 5.3CVS-2009-04-05 (snap)
 Assigned To: dmitry
 New Comment:

Dmitry, I looked at the MSDN for C4101 for example:

struct a {
 static int b() {
  return 1;
 }
};

int main() {
 A c;
 int d = c.func();

 return d;
}

The A c; line generates a C4101 because b is a static function and
therefore no instance is needed to call it, in C++ that would mean main
should looks like:

int main() {
 int d = A::func();

 return d;
}


Its documentation is at:
http://msdn.microsoft.com/en-us/library/c733d5h9(VS.80).aspx


Previous Comments:


[2009-04-06 11:37:04] paj...@php.net

It is not that important to fix, you asked me to open a bug about it
:)

However, there is no inaccurate behavior, if the code using this
variable is unreachable, then the variable is not used at all (typically
if (0) will striped out).



[2009-04-06 11:25:34] dmi...@php.net

These warnings occurs because of inaccurate C compiler behaviour.
In case you look into zend\zend_vm_execute.h(17488) and the whole
function, you would see that free_op1 is used in this function, however
the code which references the variable is unreachable.

A general solution to eliminate such warnings would require parsing of
C source code. I don't think it make sense to invest time into it to
just to remove warnings.



[2009-04-05 17:23:52] pierre dot php at gmail dot com

Description:

zend\zend_vm_execute.h(17488) : warning C4101: 'free_op1' :
unreferenced local variable

dozen of times, the generation script could be fixed to silent them.






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



#47906 [Opn-Fbk]: CURLOPT_POSTFIELDS accepts only strings

2009-04-06 Thread iliaa
 ID:   47906
 Updated by:   il...@php.net
 Reported By:  klas at k-k-k dot biz
-Status:   Open
+Status:   Feedback
 Bug Type: Scripting Engine problem
 Operating System: windows
 PHP Version:  5.2.9
 New Comment:

Works fine for me with both 5.2 and 5.3. What version of libcurl are
you 
using?


Previous Comments:


[2009-04-06 13:11:04] klas at k-k-k dot biz

Sorry, but that doesn't work. 

Note that this is a different problem that the one described on that
page.



[2009-04-06 12:46:24] j...@php.net

You just need to disable the Expect header cURL sends by default:

http://the-stickman.com/web-development/php-and-curl-disabling-100-continue-header/




[2009-04-06 11:48:31] klas at k-k-k dot biz

Description:

Inserting array (key=value) as CURLOPT_POSTFIELDS doesn't work
although documentation states:

 This can either be passed as a urlencoded string like
'para1=val1para2=val2...' or as an array with the field name as key
and field data as value. 

Reproduce code:
---
$url=example.php;
$process = curl_init($url);
$data= array ('somefield'='somedata')
curl_setopt($process, CURLOPT_POSTFIELDS, $data);
curl_exec($process);
curl_close($process);

Expected result:

input field somefield with value somedata posted to example.php

Actual result:
--
Empty field/value





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



#47909 [NEW]: summer hour withda date object

2009-04-06 Thread asylow at free dot fr
From: asylow at free dot fr
Operating system: windows XP
PHP version:  5.2.9
PHP Bug Type: Date/time related
Bug description:  summer hour withda date object

Description:

Hi,
When adding +2 hours  to '2009-10-25 01:00:00', '03:00:00' is obtained,
skipping the second '02:00:00' that exists during that night.



Reproduce code:
---
Comparison between using +1 hour to the object and adding +3600 to the
timestamp :

?php
$date1 = '2009-10-25 01:00:00';

$obj_date = date_create($date1);
$timestamp = strtotime($date1);

$timestamp += 3600;
$obj_date-modify('+1 hour');
echo '+1 hourbr';
echo  'timestamp : ' . date('H:i:s',$timestamp) . ' ' . $timestamp .
'br/';
echo 'date_obj : ' . $obj_date-format('H:i:s') . ' ' .
$obj_date-format('U') . 'brbr';

echo '+2 hoursbr';
$timestamp += 3600;
$obj_date-modify('+1 hour');
echo  'timestamp : ' . date('H:i:s',$timestamp) . ' ' . $timestamp .
'br/';
echo 'date_obj : ' . $obj_date-format('H:i:s') . ' ' .
$obj_date-format('U') . 'brbr';
?

Expected result:

+1 hour
timestamp : 02:00:00 1256428800
date_obj : 02:00:00 1256432400

+2 hours
timestamp : 02:00:00 1256432400
date_obj : 02:00:00 1256432400

Actual result:
--
+1 hour
timestamp : 02:00:00 1256428800
date_obj : 02:00:00 1256432400

+2 hours
timestamp : 02:00:00 1256432400
date_obj : 03:00:00 1256436000

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



#47909 [Opn-Bgs]: summer hour withda date object

2009-04-06 Thread derick
 ID:   47909
 Updated by:   der...@php.net
 Reported By:  asylow at free dot fr
-Status:   Open
+Status:   Bogus
 Bug Type: Date/time related
 Operating System: windows XP
 PHP Version:  5.2.9
 New Comment:

This is how it is supposed to work. The relative date modifiers are for
*clock time*, not *real time*. 


Previous Comments:


[2009-04-06 14:17:51] asylow at free dot fr

Description:

Hi,
When adding +2 hours  to '2009-10-25 01:00:00', '03:00:00' is obtained,
skipping the second '02:00:00' that exists during that night.



Reproduce code:
---
Comparison between using +1 hour to the object and adding +3600 to the
timestamp :

?php
$date1 = '2009-10-25 01:00:00';

$obj_date = date_create($date1);
$timestamp = strtotime($date1);

$timestamp += 3600;
$obj_date-modify('+1 hour');
echo '+1 hourbr';
echo  'timestamp : ' . date('H:i:s',$timestamp) . ' ' . $timestamp .
'br/';
echo 'date_obj : ' . $obj_date-format('H:i:s') . ' ' .
$obj_date-format('U') . 'brbr';

echo '+2 hoursbr';
$timestamp += 3600;
$obj_date-modify('+1 hour');
echo  'timestamp : ' . date('H:i:s',$timestamp) . ' ' . $timestamp .
'br/';
echo 'date_obj : ' . $obj_date-format('H:i:s') . ' ' .
$obj_date-format('U') . 'brbr';
?

Expected result:

+1 hour
timestamp : 02:00:00 1256428800
date_obj : 02:00:00 1256432400

+2 hours
timestamp : 02:00:00 1256432400
date_obj : 02:00:00 1256432400

Actual result:
--
+1 hour
timestamp : 02:00:00 1256428800
date_obj : 02:00:00 1256432400

+2 hours
timestamp : 02:00:00 1256432400
date_obj : 03:00:00 1256436000





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



#28038 [Com]: Sent incorrect RCPT TO commands to SMTP server

2009-04-06 Thread php at shitware dot nl
 ID:   28038
 Comment by:   php at shitware dot nl
 Reported By:  jordi at jcanals dot net
 Status:   Open
 Bug Type: Mail related
 Operating System: win32 only
 PHP Version:  5CVS, 6CVS (2008-10-24)
 New Comment:

I'm no C expert, but wouldn't this provide a quick fix:

instead of:

snprintf(Buffer, MAIL_BUFFER_SIZE, RCPT TO:%s\r\n, token);

use:

snprintf(Buffer, MAIL_BUFFER_SIZE, token[(strlen(token)-1)] ==  ?
RCPT TO:%s\r\n : RCPT TO:%s\r\n, token);

for EVERY use of token (including RPath)?

(plain e-mail addresses are still placed between ..., formatted
e-mail addresses get in the transaction unaltered)

I tried setting up the Windows build environment to test this, but got
lost in the different how-to's ...


Previous Comments:


[2009-03-12 19:49:06] feamsr00 at feamsternet dot net

exact same here *bump*
PHP 5.2.8 (cli) (built: Feb  4 2009 17:55:55)
Microsoft Windows XP [Version 5.1.2600]



[2009-02-24 23:25:22] mark at lbisat dot com

By modifying the following in PHP.ini

[mail function]
sendmail_from = em...@domain.com

It fixed the issue for me on Windows 2003 Server SP2.



[2009-02-19 19:39:06] alexcomboy at hotmail dot co dot uk

It does not work with this either:
Windows XP SP2 or SP3, IIS 5.1, PHP 5.2.8



[2009-01-19 21:20:39] abba000 at o2 dot pl

4 years have passed and nothing... What the hell? This is really
important! Anybody knows how to fix it?



[2009-01-12 11:49:18] julioworld at hotmail dot com

I also had this problem and I solved it by adding this line in the
php.ini in the section [mail function]:

[mail function]
sendmail_from = em...@domain.com



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

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



#47906 [Fbk-Opn]: CURLOPT_POSTFIELDS accepts only strings

2009-04-06 Thread klas at k-k-k dot biz
 ID:   47906
 User updated by:  klas at k-k-k dot biz
 Reported By:  klas at k-k-k dot biz
-Status:   Feedback
+Status:   Open
 Bug Type: Scripting Engine problem
 Operating System: windows
-PHP Version:  5.2.9
+PHP Version:  5.2.8
 New Comment:

I'm using xampp that currently comes with php 5.2.8. and libcurl 7.16.0


Previous Comments:


[2009-04-06 14:15:24] il...@php.net

Works fine for me with both 5.2 and 5.3. What version of libcurl are
you 
using?



[2009-04-06 13:11:04] klas at k-k-k dot biz

Sorry, but that doesn't work. 

Note that this is a different problem that the one described on that
page.



[2009-04-06 12:46:24] j...@php.net

You just need to disable the Expect header cURL sends by default:

http://the-stickman.com/web-development/php-and-curl-disabling-100-continue-header/




[2009-04-06 11:48:31] klas at k-k-k dot biz

Description:

Inserting array (key=value) as CURLOPT_POSTFIELDS doesn't work
although documentation states:

 This can either be passed as a urlencoded string like
'para1=val1para2=val2...' or as an array with the field name as key
and field data as value. 

Reproduce code:
---
$url=example.php;
$process = curl_init($url);
$data= array ('somefield'='somedata')
curl_setopt($process, CURLOPT_POSTFIELDS, $data);
curl_exec($process);
curl_close($process);

Expected result:

input field somefield with value somedata posted to example.php

Actual result:
--
Empty field/value





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



#47906 [Opn-Fbk]: CURLOPT_POSTFIELDS accepts only strings

2009-04-06 Thread pajoye
 ID:   47906
 Updated by:   paj...@php.net
 Reported By:  klas at k-k-k dot biz
-Status:   Open
+Status:   Feedback
 Bug Type: Scripting Engine problem
 Operating System: windows
 PHP Version:  5.2.8
 New Comment:

Please try a 5.3 VC9 snapshot (using cli, IIS with NTS, or
apachelounge.com's apache for the ts version).

You can fetch at http://windows.php.net


Previous Comments:


[2009-04-06 14:35:15] klas at k-k-k dot biz

I'm using xampp that currently comes with php 5.2.8. and libcurl 7.16.0



[2009-04-06 14:15:24] il...@php.net

Works fine for me with both 5.2 and 5.3. What version of libcurl are
you 
using?



[2009-04-06 13:11:04] klas at k-k-k dot biz

Sorry, but that doesn't work. 

Note that this is a different problem that the one described on that
page.



[2009-04-06 12:46:24] j...@php.net

You just need to disable the Expect header cURL sends by default:

http://the-stickman.com/web-development/php-and-curl-disabling-100-continue-header/




[2009-04-06 11:48:31] klas at k-k-k dot biz

Description:

Inserting array (key=value) as CURLOPT_POSTFIELDS doesn't work
although documentation states:

 This can either be passed as a urlencoded string like
'para1=val1para2=val2...' or as an array with the field name as key
and field data as value. 

Reproduce code:
---
$url=example.php;
$process = curl_init($url);
$data= array ('somefield'='somedata')
curl_setopt($process, CURLOPT_POSTFIELDS, $data);
curl_exec($process);
curl_close($process);

Expected result:

input field somefield with value somedata posted to example.php

Actual result:
--
Empty field/value





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



#47906 [Fbk]: CURLOPT_POSTFIELDS accepts only strings

2009-04-06 Thread pajoye
 ID:   47906
 Updated by:   paj...@php.net
 Reported By:  klas at k-k-k dot biz
 Status:   Feedback
 Bug Type: Scripting Engine problem
 Operating System: windows
 PHP Version:  5.2.8
 New Comment:

sorry, 5.2.9-1 will do it as well :)


Previous Comments:


[2009-04-06 14:42:14] paj...@php.net

Please try a 5.3 VC9 snapshot (using cli, IIS with NTS, or
apachelounge.com's apache for the ts version).

You can fetch at http://windows.php.net



[2009-04-06 14:35:15] klas at k-k-k dot biz

I'm using xampp that currently comes with php 5.2.8. and libcurl 7.16.0



[2009-04-06 14:15:24] il...@php.net

Works fine for me with both 5.2 and 5.3. What version of libcurl are
you 
using?



[2009-04-06 13:11:04] klas at k-k-k dot biz

Sorry, but that doesn't work. 

Note that this is a different problem that the one described on that
page.



[2009-04-06 12:46:24] j...@php.net

You just need to disable the Expect header cURL sends by default:

http://the-stickman.com/web-development/php-and-curl-disabling-100-continue-header/




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

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



#47880 [Csd]: Garbage Collector crashes

2009-04-06 Thread patric at zap dot lu
 ID:   47880
 User updated by:  patric at zap dot lu
 Reported By:  patric at zap dot lu
 Status:   Closed
 Bug Type: Scripting Engine problem
 Operating System: Debian Lenny
 PHP Version:  5.3.0RC1
 Assigned To:  dmitry
 New Comment:

Thanks, had no segfault with the latest CVS.
Seems to work for me.
patric


Previous Comments:


[2009-04-06 11:14:02] dmi...@php.net

The crash described in last two posts is fixed in CVS. However it can
be unrelated to GC crash mentioned in the first backtrace.



[2009-04-06 09:34:47] dmi...@php.net

Thanks for test.
This is the smallest script which demonstrates the crash.

?php
class bomb {
  static function go($n){
   $backtrace = debug_backtrace(false);
   $backtrace[1]['args'][1] = 'bomb';
  }
}
call_user_func_array(array('bomb', 'go'), array(0));
?

The bug is not related to GC, so may be the crash in GC shown by the
first backtrace is a side effect of this one, but it also may be some
different unrelated bug.




[2009-04-04 10:12:38] patric at zap dot lu

Yes the last testcase created infinite recursion, nevertheless it
should not core dump but reach memory exhausted at the end?

I got a new testcase, I isolated the parts in the framework which
lead to the segfault.

Stripped it down to some weird chain of operations, which lead to
segfault.

This time no deep recursion, at a depth of 18 it begins to segfault.


The piece of code:

class bomb {
static function go($pDepth) {
if ($pDepth0)
 call_user_func_array(array('bomb', 'go'),array($pDepth-1));

 $backtrace = debug_backtrace(false);
 foreach ($backtrace as $k=$e) 
  foreach ($e['args'] as $kk=$arg)
   if (is_array($arg))
$backtrace[$k]['args'][$kk]= 'Foobar';  

 }
}

bomb::go(18);   

### GDB ###

Program terminated with signal 11, Segmentation fault.
[New process 25022]
#0  _zend_mm_free_int (heap=0x9eb81b8, p=0x9fe2da0) at
/blade/install/daemon/php/Zend/zend_alloc.c:1979
1979if (ZEND_MM_IS_FREE_BLOCK(next_block)) {
(gdb) bt
#0  _zend_mm_free_int (heap=0x9eb81b8, p=0x9fe2da0) at
/blade/install/daemon/php/Zend/zend_alloc.c:1979
#1  0x0832114d in _zval_ptr_dtor (zval_ptr=0x9feb5bc) at
/blade/install/daemon/php/Zend/zend_variables.h:35
#2  0x08337c1e in zend_hash_destroy (ht=0x9fdfc44) at
/blade/install/daemon/php/Zend/zend_hash.c:526
#3  0x0832be75 in _zval_dtor_func (zvalue=0x9fe27c4) at
/blade/install/daemon/php/Zend/zend_variables.c:43
#4  0x0832114d in _zval_ptr_dtor (zval_ptr=0x9fdae88) at
/blade/install/daemon/php/Zend/zend_variables.h:35
#5  0x08337c1e in zend_hash_destroy (ht=0x9febac4) at
/blade/install/daemon/php/Zend/zend_hash.c:526
#6  0x0832be75 in _zval_dtor_func (zvalue=0x9fe0eb8) at
/blade/install/daemon/php/Zend/zend_variables.c:43
#7  0x0832114d in _zval_ptr_dtor (zval_ptr=0x9feb590) at
/blade/install/daemon/php/Zend/zend_variables.h:35
#8  0x08337c1e in zend_hash_destroy (ht=0x9fdf82c) at
/blade/install/daemon/php/Zend/zend_hash.c:526
#9  0x0832be75 in _zval_dtor_func (zvalue=0x9fdf1c0) at
/blade/install/daemon/php/Zend/zend_variables.c:43
#10 0x0832114d in _zval_ptr_dtor (zval_ptr=0xa0111c0) at
/blade/install/daemon/php/Zend/zend_variables.h:35
#11 0x0834e816 in zend_leave_helper_SPEC (execute_data=0x1) at
/blade/install/daemon/php/Zend/zend_vm_execute.h:157
#12 0x08354b8e in execute (op_array=0x9fdd56c) at
/blade/install/daemon/php/Zend/zend_vm_execute.h:104
#13 0x08321ab7 in zend_call_function (fci=0xbfe4521c,
fci_cache=0xbfe45240)
at /blade/install/daemon/php/Zend/zend_execute_API.c:936
#14 0x08269947 in zif_call_user_func_array (ht=2,
return_value=0x9fdefd0, return_value_ptr=0x0, this_ptr=0x0,
return_value_used=0)
at /blade/install/daemon/php/ext/standard/basic_functions.c:4745
#15 0x08376a59 in zend_do_fcall_common_helper_SPEC
(execute_data=0xa010ee8) at
/blade/install/daemon/php/Zend/zend_vm_execute.h:313
#16 0x08354b8e in execute (op_array=0x9fdd56c) at
/blade/install/daemon/php/Zend/zend_vm_execute.h:104
#17 0x08321ab7 in zend_call_function (fci=0xbfe4542c,
fci_cache=0xbfe45450)
at /blade/install/daemon/php/Zend/zend_execute_API.c:936
#18 0x08269947 in zif_call_user_func_array (ht=2,
return_value=0x9fdedc4, return_value_ptr=0x0, this_ptr=0x0,
return_value_used=0)
at /blade/install/daemon/php/ext/standard/basic_functions.c:4745
#19 0x08376a59 in zend_do_fcall_common_helper_SPEC
(execute_data=0xa010c78) at
/blade/install/daemon/php/Zend/zend_vm_execute.h:313
#20 0x08354b8e in execute (op_array=0x9fdd56c) at
/blade/install/daemon/php/Zend/zend_vm_execute.h:104
#21 0x08321ab7 in zend_call_function (fci=0xbfe4563c,
fci_cache=0xbfe45660)
at 

#43402 [Com]: FILTER_VALIDATE_EMAIL is not RFC2822 compliant

2009-04-06 Thread damien at mc-kenna dot com
 ID:   43402
 Comment by:   damien at mc-kenna dot com
 Reported By:  nobody at example dot org
 Status:   Open
 Bug Type: Feature/Change Request
 Operating System: *
 PHP Version:  5.2.5
 New Comment:

An extremely detailed analysis of the various RFC requirements and 
errata has been compiled, along with CPAL 1.0-licensed code:
http://www.dominicsayers.com/isemail/
If PHP is going to bother having any support for email validation it 
needs to be authoritative rather than well this should work for most 
uses.


Previous Comments:


[2008-10-01 10:16:49] alexanderpas at yahoo dot co dot uk

RFC5322 is out, which obsoletes RFC2822
http://tools.ietf.org/html/rfc5322



[2008-09-22 16:01:39] nobody at example dot org

I see no reason support for hostnames can't be added. 

 filter_var ($addr, FILTER_VALIDATE_EMAIL, FILTER_PERMIT_NON_FQDNS);

That's fine on a LAN and the additional flag stops web miscreants doing
what would, if this were the default behaviour, otherwise be
inevitable.

Back on topic, FILTER_VALIDATE_EMAIL validates nothing. It fails to
ensure an address is syntactically valid. 

?php

function _ ($_, $inv = false) {
  $bool = (filter_var ($_, FILTER_VALIDATE_EMAIL) === $_);
  echo (($inv)? !$bool: $bool)? 'OK  ': 'ERR ', $_\n;
}


// RFC2821
// 4.1.2
// Should pass
_ ('escaped\qu...@example.org');

// 4.5.3.1
// should both fail
_ ('this-local-part-is-over-64-chars-in-length-'
  .'and-therefore-not-va...@na.tld', true);
_ ('test@'.str_repeat('d', 256).'.com', true);

// RFC2822 ('=' and '?' still fail as of PHP 5.3.0alpha3-dev) 
_ (!#$%'*+-/=.?^_`{|}...@[1.0.0.127]);



[2008-09-17 12:41:05] matt at mattfarina dot com

RFC 2822 allows for email addresses like u...@localhost or
u...@example. But, RFC 2821 (SMTP Standard) does not allow for those.
See sections 4.1.2 and 4.13 for more detail.

The question with email addresses is should we support RFC 2822 or
2821? For routing FILTER_VALIDATE_EMAIL currently follows RFC 2821.



[2008-09-16 20:00:59] matt at mattfarina dot com

Please correct me if I'm wrong but isn't localhost an alias and RFC
2822 requires a fully qualified domain name or IP address. That would be
the issue with f...@localhost.



[2008-09-16 19:37:41] drewish at katherinehouse dot com

The current code also bounces valid email addresses like
f...@localhost. I haven't been able to test out the suggested regex.



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

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



#47910 [NEW]: Error line in the default php.ini files

2009-04-06 Thread dandelion8888 at gmail dot com
From: dandelion at gmail dot com
Operating system: Linux/Debian
PHP version:  5.3.0RC1
PHP Bug Type: *Configuration Issues
Bug description:  Error line in the default php.ini files

Description:

When I compiled PHP 5.3.0RC1 on Debian 5.0, both default configuration
files: php.ini-development , php.ini-production had a missing semicolon on
the line 581. The ini file wasn't parsed from that line down. It took me a
while to find it out.

Reproduce code:
---
http://www.php.net/manual/en/errorfunc.configuration.php#ini.track-errors


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



#47900 [Com]: fileinfo build fails

2009-04-06 Thread bespoleznyak at narod dot ru
 ID:   47900
 Comment by:   bespoleznyak at narod dot ru
 Reported By:  besoleznyak at narod dot ru
 Status:   Feedback
 Bug Type: Compile Failure
 Operating System: linux gentoo
 PHP Version:  5.3CVS-2009-04-05 (CVS)
 Assigned To:  pajoye
 New Comment:

Yes, after buildconf biulding successfully completed.
Thank you. I'm sorry :( .


Previous Comments:


[2009-04-05 13:23:45] paj...@php.net

Please try buildconf first, then run configure --... make clean make



[2009-04-05 12:20:39] besoleznyak at narod dot ru

Description:

In some last cvs-revisions (brunch PHP_5_3) I get build error. GCC
4.1.2

Reproduce code:
---
$ cvs up

$ ./configure --prefix=/mnt/hde2/php/build --enable-debug
--enable-bcmath --enable-ftp --enable-intl --enable-mbstring
--enable-pcntl --enable-shmop --enable-soap --enable-sockets
--enable-sysvmsg --enable-sysvsem --enable-sysvshm --enable-wddx
--enable-zip --with-apxs2=/usr/sbin/apxs --with-zlib --with-bz2
--with-curl --with-curlwrappers  --with-gd --with-t1lib  --with-gettext 
--with-gmp  --with-mhash  --with-mysql  --with-pdo-pgsql 
--with-pdo-mysql  --with-pgsql   --with-readline --with-xsl --with-pear

$ make

Actual result:
--
ext/fileinfo/libmagic/.libs/apprentice.o: In function
`set_test_type':
/mnt/hde2/php/php5/ext/fileinfo/libmagic/apprentice.c:567: undefined
reference to `file_looks_utf8'
ext/fileinfo/libmagic/.libs/ascmagic.o: In function `file_ascmagic':
/mnt/hde2/php/php5/ext/fileinfo/libmagic/ascmagic.c:90: undefined
reference to `file_encoding'
ext/fileinfo/libmagic/.libs/funcs.o: In function `file_buffer':
/mnt/hde2/php/php5/ext/fileinfo/libmagic/funcs.c:185: undefined
reference to `file_encoding'
/mnt/hde2/php/php5/ext/fileinfo/libmagic/funcs.c:224: undefined
reference to `file_trycdf'
ext/mbstring/libmbfl/mbfl/.libs/mbfl_convert.o:(.data+0x204):
undefined reference to `vtbl_cp850_wchar'
ext/mbstring/libmbfl/mbfl/.libs/mbfl_convert.o:(.data+0x208):
undefined reference to `vtbl_wchar_cp850'
ext/mbstring/libmbfl/mbfl/.libs/mbfl_encoding.o:(.data+0x128):
undefined reference to `mbfl_encoding_cp850'
ext/mbstring/libmbfl/mbfl/.libs/mbfl_ident.o:(.data+0x9c): undefined
reference to `vtbl_identify_cp850'
Zend/.libs/zend_execute_API.o: In function `init_executor':
/mnt/hde2/php/php5/Zend/zend_execute_API.c:127: undefined reference
to `zend_init_fpu'
Zend/.libs/zend_execute_API.o: In function `shutdown_executor':
/mnt/hde2/php/php5/Zend/zend_execute_API.c:338: undefined reference
to `zend_shutdown_fpu'
collect2: ld returned 1 exit status






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



#47900 [Fbk-Bgs]: fileinfo build fails

2009-04-06 Thread pajoye
 ID:   47900
 Updated by:   paj...@php.net
 Reported By:  besoleznyak at narod dot ru
-Status:   Feedback
+Status:   Bogus
 Bug Type: Compile Failure
 Operating System: linux gentoo
 PHP Version:  5.3CVS-2009-04-05 (CVS)
 Assigned To:  pajoye
 New Comment:

No bug  bogus


Previous Comments:


[2009-04-06 17:37:39] bespoleznyak at narod dot ru

Yes, after buildconf biulding successfully completed.
Thank you. I'm sorry :( .



[2009-04-05 13:23:45] paj...@php.net

Please try buildconf first, then run configure --... make clean make



[2009-04-05 12:20:39] besoleznyak at narod dot ru

Description:

In some last cvs-revisions (brunch PHP_5_3) I get build error. GCC
4.1.2

Reproduce code:
---
$ cvs up

$ ./configure --prefix=/mnt/hde2/php/build --enable-debug
--enable-bcmath --enable-ftp --enable-intl --enable-mbstring
--enable-pcntl --enable-shmop --enable-soap --enable-sockets
--enable-sysvmsg --enable-sysvsem --enable-sysvshm --enable-wddx
--enable-zip --with-apxs2=/usr/sbin/apxs --with-zlib --with-bz2
--with-curl --with-curlwrappers  --with-gd --with-t1lib  --with-gettext 
--with-gmp  --with-mhash  --with-mysql  --with-pdo-pgsql 
--with-pdo-mysql  --with-pgsql   --with-readline --with-xsl --with-pear

$ make

Actual result:
--
ext/fileinfo/libmagic/.libs/apprentice.o: In function
`set_test_type':
/mnt/hde2/php/php5/ext/fileinfo/libmagic/apprentice.c:567: undefined
reference to `file_looks_utf8'
ext/fileinfo/libmagic/.libs/ascmagic.o: In function `file_ascmagic':
/mnt/hde2/php/php5/ext/fileinfo/libmagic/ascmagic.c:90: undefined
reference to `file_encoding'
ext/fileinfo/libmagic/.libs/funcs.o: In function `file_buffer':
/mnt/hde2/php/php5/ext/fileinfo/libmagic/funcs.c:185: undefined
reference to `file_encoding'
/mnt/hde2/php/php5/ext/fileinfo/libmagic/funcs.c:224: undefined
reference to `file_trycdf'
ext/mbstring/libmbfl/mbfl/.libs/mbfl_convert.o:(.data+0x204):
undefined reference to `vtbl_cp850_wchar'
ext/mbstring/libmbfl/mbfl/.libs/mbfl_convert.o:(.data+0x208):
undefined reference to `vtbl_wchar_cp850'
ext/mbstring/libmbfl/mbfl/.libs/mbfl_encoding.o:(.data+0x128):
undefined reference to `mbfl_encoding_cp850'
ext/mbstring/libmbfl/mbfl/.libs/mbfl_ident.o:(.data+0x9c): undefined
reference to `vtbl_identify_cp850'
Zend/.libs/zend_execute_API.o: In function `init_executor':
/mnt/hde2/php/php5/Zend/zend_execute_API.c:127: undefined reference
to `zend_init_fpu'
Zend/.libs/zend_execute_API.o: In function `shutdown_executor':
/mnt/hde2/php/php5/Zend/zend_execute_API.c:338: undefined reference
to `zend_shutdown_fpu'
collect2: ld returned 1 exit status






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



#47773 [Com]: cURL multi crashes

2009-04-06 Thread daniel at haxx dot se
 ID:   47773
 Comment by:   daniel at haxx dot se
 Reported By:  entpman at gmail dot com
 Status:   Assigned
 Bug Type: cURL related
 Operating System: win32 only - WIN XP SP2
 PHP Version:  5.2.9
 Assigned To:  pajoye
 New Comment:

I'm convinced this is a bug in libcurl, see this analysis by 
Sergii Volchkov:

http://curl.haxx.se/mail/lib-2009-04/0028.html

(AFAIK, there is nobody working on a fix for this.)


Previous Comments:


[2009-03-25 15:29:52] entpman at gmail dot com

I tried version 5.3.0RC2-dev same results.



[2009-03-25 14:08:06] entpman at gmail dot com

Description:

The program will work fine for hundreds of downloads then suddenly
crashes.

Reproduce code:
---
?php
$data = downloadurls(
array(
array(
'url' = 'http://www.google.com'
),
array(
'url' = 'http://www.yahoo.com'
)
)
);

// of course more urls are needs

function downloadurls($downloads,$cookie = null){   
$timeout = 30;  
$mcurl = curl_multi_init();
$agent = Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.12)
Gecko/2009201 Firefox/3.0.0.1;

foreach($downloads as $key=$download){ 
$url = $download['url'];
$ch = curl_init();   
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
curl_setopt($ch, CURLOPT_TIMEOUT, $timeout);
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER,0);
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 15);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST,0);
curl_setopt($ch, CURLOPT_USERAGENT, $agent);
if(!empty($download['postdata'])){
curl_setopt($ch, CURLOPT_POST, 1); 
curl_setopt($ch, CURLOPT_POSTFIELDS,$download['postdata']); 
}   
if(!empty($cookie)){
@unlink($cookie);
//echo added cookie\n;
curl_setopt($ch, CURLOPT_COOKIEFILE, $cookie);
curl_setopt($ch, CURLOPT_COOKIEJAR, $cookie);
}
if(!empty($download['proxy'])){
curl_setopt($ch, CURLOPT_PROXY, $download['proxy']);
}
curl_multi_add_handle($mcurl, $ch);
$downloads[$key]['handle'] = $ch;   
}

do {
$n=curl_multi_exec($mcurl,$active);
usleep(100);
}   
while ($active);

foreach($downloads as $key=$download){ 
$ch = $download['handle'];
$done_content = curl_multi_getcontent($ch);
if(curl_errno($ch) == 0) {
$downloads[$key]['picture'] = $done_content;
} else {
exit('error');  
}
curl_multi_remove_handle($mcurl, $ch);
curl_close($ch);   
}

curl_multi_close($mcurl);
return $downloads;
}
?

Actual result:
--
backtrace:

php_curl.dll!_Curl_llist_insert_next()  + 0x48 bytes
php_curl.dll!_Curl_hash_add()  + 0x74 bytes 
php_curl.dll!_Curl_cache_addr()  + 0x6d bytes   
php_curl.dll!_Curl_addrinfo4_callback()  + 0x82 bytes   
php_curl.dll!_Curl_addrinfo4_callback()  + 0x14 bytes   
php_curl.dll!_Curl_getaddrinfo()  + 0x317 bytes 
msvcrt.dll!77c3a3b0()   
[Frames below may be incorrect and/or missing, no symbols loaded for
msvcrt.dll] 
kernel32.dll!7c80b683() 





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



#47910 [Opn-Fbk]: Error line in the default php.ini files

2009-04-06 Thread jani
 ID:   47910
 Updated by:   j...@php.net
 Reported By:  dandelion at gmail dot com
-Status:   Open
+Status:   Feedback
-Bug Type: *Configuration Issues
+Bug Type: *General Issues
 Operating System: Linux/Debian
 PHP Version:  5.3.0RC1
 New Comment:

Please try using this CVS snapshot:

  http://snaps.php.net/php5.2-latest.tar.gz
 
For Windows:

  http://windows.php.net/snapshots/




Previous Comments:


[2009-04-06 16:12:57] dandelion at gmail dot com

Description:

When I compiled PHP 5.3.0RC1 on Debian 5.0, both default configuration
files: php.ini-development , php.ini-production had a missing semicolon
on the line 581. The ini file wasn't parsed from that line down. It took
me a while to find it out.

Reproduce code:
---
http://www.php.net/manual/en/errorfunc.configuration.php#ini.track-errors






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



#47662 [Opn-Fbk]: Crash with more that 63 named Subpattern

2009-04-06 Thread jani
 ID:   47662
 Updated by:   j...@php.net
 Reported By:  gmblar+php at gmail dot com
-Status:   Open
+Status:   Feedback
 Bug Type: PCRE related
 Operating System: MacOSX 10.5
 PHP Version:  5.2.9
 New Comment:

Thank you for this bug report. To properly diagnose the problem, we
need a backtrace to see what is happening behind the scenes. To
find out how to generate a backtrace, please read
http://bugs.php.net/bugs-generating-backtrace.php for *NIX and
http://bugs.php.net/bugs-generating-backtrace-win32.php for Win32

Once you have generated a backtrace, please submit it to this bug
report and change the status back to Open. Thank you for helping
us make PHP better.




Previous Comments:


[2009-03-26 15:02:00] mmcnicklebugs at googlemail dot com

I can't replicate on Linux/Ubuntu 8.04 with 5.3CVS or 5.2.*

When I increase the number of patterns to a large number (say 6) I
get a suitable warning:

Warning: preg_match(): Compilation failed: too many named subpatterns
(maximum 1) at offset 148903 in
/home/martin/php_bugs/pcre/47622/test.php on line 10



[2009-03-15 14:37:22] gmblar+php at gmail dot com

Description:

With more than 63 Subpattern in a Regular-Expression, PHP crashes with
a 
Segmention-Fault.

Reproduce code:
---
?php

$regex = '@';
// works with $bar63
for($bar=0; $bar64; $bar++) {
$regex .= '((?Pfoo'.$bar.'))';
}
$regex .= '@';
 
preg_match($regex, 'foobar');

?

Expected result:

Nothing

Actual result:
--
$ php foobar.php
Segmentation fault






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



#46218 [Opn-Fbk]: apache2 reaches max clients limit with error in php_stdiop_set_option

2009-04-06 Thread jani
 ID:   46218
 Updated by:   j...@php.net
 Reported By:  funky2step at gmail dot com
-Status:   Open
+Status:   Feedback
 Bug Type: Streams related
 Operating System: RHEL ES Rel 4 (Nahant Update 6)
 PHP Version:  5.2.6
 New Comment:

What MPM did you use with Apache2?


Previous Comments:


[2009-03-25 16:11:16] funky2step at gmail dot com

We fixed this in the end by ditching apache2 and running php5 with
apache 1.3.41
The problem has not occurred in the month or so since implementing it
and considering it used to happen at least once per day, I think this is
a decent solution.



[2009-03-13 14:23:01] mibrahim at mibrahim dot net

Same exact problem. Tested it by lowering MaxClients, apache hangs
within 1 minute. The only temporary solution is to increase MaxClients
way up, and restart the server with a cron job every period of time.



[2008-11-07 09:09:38] funky2step at googlemail dot com

I installed the latest snapshot of PHP5 (PHP 5.2.7RC3-dev) and the
problem remains. In fact it has happened twice in the space of 24
hours.
This problem doesn't just occur with this particular server and its
associated site but on all other php5.2.6 and apache2 installations.
Has no-one else seen this serious problem with busy sites using this
software?



[2008-11-06 10:38:02] funky2step at googlemail dot com

Thanks for the reply. Do you actually know if there is a problem with
the main release of php 5.2. I'm slightly cautious about installing a
snapshot because it is a busy production site. Are there any issues with
installing a snapshot?



[2008-10-07 09:11:33] funky2step at googlemail dot com

Does anyone have any ideas about this? It's causing a lot of problems
as it happens quite frequently.



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

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



#46070 [Opn-Fbk]: realpath() fails with safe-mode enabled on 64 bit systems

2009-04-06 Thread jani
 ID:   46070
 Updated by:   j...@php.net
 Reported By:  dougcsd at yahoo dot com
-Status:   Open
+Status:   Feedback
 Bug Type: Safe Mode/open_basedir
 Operating System: BlueWhite64 (linux)
 PHP Version:  5CVS-2008-11-11
 New Comment:

Please try using this CVS snapshot:

  http://snaps.php.net/php5.2-latest.tar.gz
 
For Windows:

  http://windows.php.net/snapshots/




Previous Comments:


[2008-09-13 12:30:29] dougcsd at yahoo dot com

Minor code change produced a correct result.  Appears the issue is
related to more than three levels up.  Just so happends that this is
also the safe mode chroot directory:

/var/www/html/

Directory /var/www/html
AddType application/x-httpd-php .php
php_admin_flag safe_mode on
#php_flag assert.warning off
#php_admin_flag assert.warning off
php_admin_value safe_mode_exec_dir /var/www/html/
php_admin_value open_basedir /var/www/html/


$osd_root_path2 = realpath(dirname(__FILE__) . '/../../') . '/';
$dump=fopen(/var/www/html/chat/dumptest,w);
  fprintf($dump,%s\n%s\n,dirname(__FILE__),$osd_root_path2);
fclose($dump);

/var/www/html/chat/inc/cmses
/var/www/html/chat/



[2008-09-13 12:09:27] dougcsd at yahoo dot com

Description:

This code segment runs in a file included from an upper level script. 
The same script appears to work correctly when PHP is compiled with the
same options on a 32 bit OS.

Apache 2.2 compiled from source

All php compiled from source

Linux kernel 2.6.26.2 compiled from source.  

libc:
-rwxr-xr-x 1 root root 1658189 2008-04-22 03:51 libc-2.7.so*
lrwxrwxrwx 1 root root  11 2008-06-17 18:22 libc.so.6 -
libc-2.7.so*

r...@server1:/lib# gcc --version
gcc (GCC) 4.2.3
Copyright (C) 2007 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is
NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE.

./configure  --with-apxs2=/usr/local/apache2/bin/apxs
--with-mysql=/usr/local/my
sql --with-zlib --with-gd --with-jpeg-dir=/usr --with-png-dir=/usr
--prefix=/usr
/local/php5 --enable-mbstring

Code:

$osd_root_path2 = realpath(dirname(__FILE__) . '/../../../') . '/';
$dump=fopen(/var/www/html/chat/dumptest,w);
  fprintf($dump,%s\n%s\n,dirname(__FILE__),$osd_root_path2);
fclose($dump);

The file output was the same on 5.2.6 through 5.3.Alpha3

Output when safe mode is on:
/var/www/html/chat/inc/cmses
/

Output when safe mode is off:
/var/www/html/chat/inc/cmses
/var/www/html/


Reproduce code:
---
$osd_root_path2 = realpath(dirname(__FILE__) . '/../../../') . '/';
$dump=fopen(/var/www/html/chat/dumptest,w);
  fprintf($dump,%s\n%s\n,dirname(__FILE__),$osd_root_path2);
fclose($dump);



Expected result:

Output when safe mode is off:
/var/www/html/chat/inc/cmses
/var/www/html/


Actual result:
--
Output when safe mode is on:
/var/www/html/chat/inc/cmses
/





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



#46277 [Opn-Bgs]: implicit reference is not safe to use

2009-04-06 Thread jani
 ID:   46277
 Updated by:   j...@php.net
 Reported By:  ido at niger dot co dot il
-Status:   Open
+Status:   Bogus
 Bug Type: Scripting Engine problem
 Operating System: *
 PHP Version:  5CVS, 6CVS (2008-10-22)
 New Comment:

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

http://www.php.net/manual/en/language.references.whatdo.php




Previous Comments:


[2008-10-12 10:26:04] ido at niger dot co dot il

Description:

The example prints 9 as the value of $a , though it should be 8;
The fact the referencing $a[0] causes $a[0] to become a reference
itself , is dangerous in cases like this where it is possible to change
the value of $a[0] though it was not originally defined as a reference.





Reproduce code:
---
function a($c){
  $c[0] = 9;
}

$a[0] = 8;

$c = $a[0];
a($a);
echo $a[0];

Expected result:

The value of $a should be 8

Actual result:
--
The value printed is 9





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



#47910 [Fbk-Opn]: Error line in the default php.ini files

2009-04-06 Thread dandelion8888 at gmail dot com
 ID:   47910
 User updated by:  dandelion at gmail dot com
 Reported By:  dandelion at gmail dot com
-Status:   Feedback
+Status:   Open
 Bug Type: *General Issues
 Operating System: Linux/Debian
 PHP Version:  5.3.0RC1
 New Comment:

Snapshot PHP5.2 works fine, because 5.2 uses different vesion of
php.ini than 5.3.
In php.inis in 5.3.0RC1 there are comments marked with semicolons and
one of the semicolons is missing - line 581 - so it's impossible to
configure PHP if somebody doesn't know about it.
The error is in php-5.3.0RC1.tar.gz downloaded directly from php.net.
There is no need to compile it to find where it is.


Previous Comments:


[2009-04-06 20:57:34] j...@php.net

Please try using this CVS snapshot:

  http://snaps.php.net/php5.2-latest.tar.gz
 
For Windows:

  http://windows.php.net/snapshots/





[2009-04-06 16:12:57] dandelion at gmail dot com

Description:

When I compiled PHP 5.3.0RC1 on Debian 5.0, both default configuration
files: php.ini-development , php.ini-production had a missing semicolon
on the line 581. The ini file wasn't parsed from that line down. It took
me a while to find it out.

Reproduce code:
---
http://www.php.net/manual/en/errorfunc.configuration.php#ini.track-errors






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



#47910 [Opn-Fbk]: Error line in the default php.ini files

2009-04-06 Thread jani
 ID:   47910
 Updated by:   j...@php.net
 Reported By:  dandelion at gmail dot com
-Status:   Open
+Status:   Feedback
 Bug Type: *General Issues
 Operating System: Linux/Debian
 PHP Version:  5.3.0RC1
 New Comment:

Please try using this CVS snapshot:

  http://snaps.php.net/php5.3-latest.tar.gz
 
For Windows:

  http://windows.php.net/snapshots/

Oops, I meant this snapshot of course. (According to CVS, it should 
have fixed inis)


Previous Comments:


[2009-04-06 21:33:22] dandelion at gmail dot com

Snapshot PHP5.2 works fine, because 5.2 uses different vesion of
php.ini than 5.3.
In php.inis in 5.3.0RC1 there are comments marked with semicolons and
one of the semicolons is missing - line 581 - so it's impossible to
configure PHP if somebody doesn't know about it.
The error is in php-5.3.0RC1.tar.gz downloaded directly from php.net.
There is no need to compile it to find where it is.



[2009-04-06 20:57:34] j...@php.net

Please try using this CVS snapshot:

  http://snaps.php.net/php5.2-latest.tar.gz
 
For Windows:

  http://windows.php.net/snapshots/





[2009-04-06 16:12:57] dandelion at gmail dot com

Description:

When I compiled PHP 5.3.0RC1 on Debian 5.0, both default configuration
files: php.ini-development , php.ini-production had a missing semicolon
on the line 581. The ini file wasn't parsed from that line down. It took
me a while to find it out.

Reproduce code:
---
http://www.php.net/manual/en/errorfunc.configuration.php#ini.track-errors






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



#47910 [Fbk-Csd]: Error line in the default php.ini files

2009-04-06 Thread pajoye
 ID:   47910
 Updated by:   paj...@php.net
 Reported By:  dandelion at gmail dot com
-Status:   Feedback
+Status:   Closed
 Bug Type: *General Issues
 Operating System: Linux/Debian
 PHP Version:  5.3.0RC1
 New Comment:

This bug has been fixed in CVS.

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




Previous Comments:


[2009-04-06 22:18:41] j...@php.net

Please try using this CVS snapshot:

  http://snaps.php.net/php5.3-latest.tar.gz
 
For Windows:

  http://windows.php.net/snapshots/

Oops, I meant this snapshot of course. (According to CVS, it should 
have fixed inis)



[2009-04-06 21:33:22] dandelion at gmail dot com

Snapshot PHP5.2 works fine, because 5.2 uses different vesion of
php.ini than 5.3.
In php.inis in 5.3.0RC1 there are comments marked with semicolons and
one of the semicolons is missing - line 581 - so it's impossible to
configure PHP if somebody doesn't know about it.
The error is in php-5.3.0RC1.tar.gz downloaded directly from php.net.
There is no need to compile it to find where it is.



[2009-04-06 20:57:34] j...@php.net

Please try using this CVS snapshot:

  http://snaps.php.net/php5.2-latest.tar.gz
 
For Windows:

  http://windows.php.net/snapshots/





[2009-04-06 16:12:57] dandelion at gmail dot com

Description:

When I compiled PHP 5.3.0RC1 on Debian 5.0, both default configuration
files: php.ini-development , php.ini-production had a missing semicolon
on the line 581. The ini file wasn't parsed from that line down. It took
me a while to find it out.

Reproduce code:
---
http://www.php.net/manual/en/errorfunc.configuration.php#ini.track-errors






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



#47662 [Fbk-Opn]: Crash with more that 63 named Subpattern

2009-04-06 Thread gmblar+php at gmail dot com
 ID:   47662
 User updated by:  gmblar+php at gmail dot com
 Reported By:  gmblar+php at gmail dot com
-Status:   Feedback
+Status:   Open
 Bug Type: PCRE related
 Operating System: MacOSX 10.5
 PHP Version:  5.2.9
 New Comment:

Problem only appears if PHP is compiled with 64-bit Support (x86_64)


$ gdb ./php
GNU gdb 6.3.50-20050815 (Apple version gdb-962) (Sat Jul 26 08:14:40 
UTC 2008)
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and 
you are
welcome to change it and/or distribute copies of it under certain 
conditions.
Type show copying to see the conditions.
There is absolutely no warranty for GDB.  Type show warranty for 
details.
This GDB was configured as i386-apple-darwin...Reading symbols for 
shared libraries .. done

(gdb) run ./test.php
Starting program: /Users/Blar/Sites/php/php-5.2.9/sapi/cli/php 
./test.php
warning: posix_spawn failed, trying execvp, error: 86
Reading symbols for shared libraries +.. done

Program received signal EXC_BAD_ACCESS, Could not access memory.
Reason: KERN_INVALID_ADDRESS at address: 0x00010079ae10
0x00010002308f in make_subpats_table (num_subpats=257, 
pce=0x101008b60) at /Users/Blar/Sites/php/php-
5.2.9/ext/pcre/php_pcre.c:213
213 subpat_names[name_idx] = name_table + 
2;
(gdb) bt
#0  0x00010002308f in make_subpats_table (num_subpats=257, 
pce=0x101008b60) at /Users/Blar/Sites/php/php-
5.2.9/ext/pcre/php_pcre.c:213
#1  0x0001000243b7 in php_pcre_match_impl (pce=0x101008b60, 
subject=0x10071a998 foobar, subject_len=6, return_value=0x10071ad10,

subpats=0x0, global=0, use_flags=0, 
flags=0, start_offset=0) at /Users/Blar/Sites/php/php-
5.2.9/ext/pcre/php_pcre.c:598
#2  0x000100024196 in php_do_pcre_match (ht=2, 
return_value=0x10071ad10, return_value_ptr=0x0, this_ptr=0x0, 
return_value_used=0, global=0) at /Users/Blar/Sites/php/php-
5.2.9/ext/pcre/php_pcre.c:513
#3  0x000100025017 in zif_preg_match (ht=2, 
return_value=0x10071ad10, return_value_ptr=0x0, this_ptr=0x0, 
return_value_used=0) at /Users/Blar/Sites/php/php-
5.2.9/ext/pcre/php_pcre.c:762
#4  0x0001002f0803 in zend_do_fcall_common_helper_SPEC 
(execute_data=0x7fff5fbfebd0) at zend_vm_execute.h:200
#5  0x0001002f72b3 in ZEND_DO_FCALL_SPEC_CONST_HANDLER 
(execute_data=0x7fff5fbfebd0) at zend_vm_execute.h:1729
#6  0x0001002f0223 in execute (op_array=0x1007198d0) at 
zend_vm_execute.h:92
#7  0x0001002c599b in zend_execute_scripts (type=8, retval=0x0, 
file_count=3) at /Users/Blar/Sites/php/php-5.2.9/Zend/zend.c:1134
#8  0x000100263d28 in php_execute_script 
(primary_file=0x7fff5fbff5c0) at /Users/Blar/Sites/php/php-
5.2.9/main/main.c:2023
#9  0x000100351d7c in main (argc=2, argv=0x7fff5fbff728) at 
/Users/Blar/Sites/php/php-5.2.9/sapi/cli/php_cli.c:1133


Previous Comments:


[2009-04-06 21:00:31] j...@php.net

Thank you for this bug report. To properly diagnose the problem, we
need a backtrace to see what is happening behind the scenes. To
find out how to generate a backtrace, please read
http://bugs.php.net/bugs-generating-backtrace.php for *NIX and
http://bugs.php.net/bugs-generating-backtrace-win32.php for Win32

Once you have generated a backtrace, please submit it to this bug
report and change the status back to Open. Thank you for helping
us make PHP better.





[2009-03-26 15:02:00] mmcnicklebugs at googlemail dot com

I can't replicate on Linux/Ubuntu 8.04 with 5.3CVS or 5.2.*

When I increase the number of patterns to a large number (say 6) I
get a suitable warning:

Warning: preg_match(): Compilation failed: too many named subpatterns
(maximum 1) at offset 148903 in
/home/martin/php_bugs/pcre/47622/test.php on line 10



[2009-03-15 14:37:22] gmblar+php at gmail dot com

Description:

With more than 63 Subpattern in a Regular-Expression, PHP crashes with
a 
Segmention-Fault.

Reproduce code:
---
?php

$regex = '@';
// works with $bar63
for($bar=0; $bar64; $bar++) {
$regex .= '((?Pfoo'.$bar.'))';
}
$regex .= '@';
 
preg_match($regex, 'foobar');

?

Expected result:

Nothing

Actual result:
--
$ php foobar.php
Segmentation fault






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



#47662 [Opn]: Crash with more that 127 named Subpattern

2009-04-06 Thread gmblar+php at gmail dot com
 ID:   47662
 User updated by:  gmblar+php at gmail dot com
-Summary:  Crash with more that 63 named Subpattern
 Reported By:  gmblar+php at gmail dot com
 Status:   Open
 Bug Type: PCRE related
 Operating System: MacOSX 10.5
 PHP Version:  5.2.9
 New Comment:

PCRE fails with more that 127 Subpattern if PHP compiled as 64-Bit-
Binary


Previous Comments:


[2009-04-06 23:17:11] gmblar+php at gmail dot com

Problem only appears if PHP is compiled with 64-bit Support (x86_64)


$ gdb ./php
GNU gdb 6.3.50-20050815 (Apple version gdb-962) (Sat Jul 26 08:14:40 
UTC 2008)
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and 
you are
welcome to change it and/or distribute copies of it under certain 
conditions.
Type show copying to see the conditions.
There is absolutely no warranty for GDB.  Type show warranty for 
details.
This GDB was configured as i386-apple-darwin...Reading symbols for 
shared libraries .. done

(gdb) run ./test.php
Starting program: /Users/Blar/Sites/php/php-5.2.9/sapi/cli/php 
./test.php
warning: posix_spawn failed, trying execvp, error: 86
Reading symbols for shared libraries +.. done

Program received signal EXC_BAD_ACCESS, Could not access memory.
Reason: KERN_INVALID_ADDRESS at address: 0x00010079ae10
0x00010002308f in make_subpats_table (num_subpats=257, 
pce=0x101008b60) at /Users/Blar/Sites/php/php-
5.2.9/ext/pcre/php_pcre.c:213
213 subpat_names[name_idx] = name_table + 
2;
(gdb) bt
#0  0x00010002308f in make_subpats_table (num_subpats=257, 
pce=0x101008b60) at /Users/Blar/Sites/php/php-
5.2.9/ext/pcre/php_pcre.c:213
#1  0x0001000243b7 in php_pcre_match_impl (pce=0x101008b60, 
subject=0x10071a998 foobar, subject_len=6, return_value=0x10071ad10,

subpats=0x0, global=0, use_flags=0, 
flags=0, start_offset=0) at /Users/Blar/Sites/php/php-
5.2.9/ext/pcre/php_pcre.c:598
#2  0x000100024196 in php_do_pcre_match (ht=2, 
return_value=0x10071ad10, return_value_ptr=0x0, this_ptr=0x0, 
return_value_used=0, global=0) at /Users/Blar/Sites/php/php-
5.2.9/ext/pcre/php_pcre.c:513
#3  0x000100025017 in zif_preg_match (ht=2, 
return_value=0x10071ad10, return_value_ptr=0x0, this_ptr=0x0, 
return_value_used=0) at /Users/Blar/Sites/php/php-
5.2.9/ext/pcre/php_pcre.c:762
#4  0x0001002f0803 in zend_do_fcall_common_helper_SPEC 
(execute_data=0x7fff5fbfebd0) at zend_vm_execute.h:200
#5  0x0001002f72b3 in ZEND_DO_FCALL_SPEC_CONST_HANDLER 
(execute_data=0x7fff5fbfebd0) at zend_vm_execute.h:1729
#6  0x0001002f0223 in execute (op_array=0x1007198d0) at 
zend_vm_execute.h:92
#7  0x0001002c599b in zend_execute_scripts (type=8, retval=0x0, 
file_count=3) at /Users/Blar/Sites/php/php-5.2.9/Zend/zend.c:1134
#8  0x000100263d28 in php_execute_script 
(primary_file=0x7fff5fbff5c0) at /Users/Blar/Sites/php/php-
5.2.9/main/main.c:2023
#9  0x000100351d7c in main (argc=2, argv=0x7fff5fbff728) at 
/Users/Blar/Sites/php/php-5.2.9/sapi/cli/php_cli.c:1133



[2009-04-06 21:00:31] j...@php.net

Thank you for this bug report. To properly diagnose the problem, we
need a backtrace to see what is happening behind the scenes. To
find out how to generate a backtrace, please read
http://bugs.php.net/bugs-generating-backtrace.php for *NIX and
http://bugs.php.net/bugs-generating-backtrace-win32.php for Win32

Once you have generated a backtrace, please submit it to this bug
report and change the status back to Open. Thank you for helping
us make PHP better.





[2009-03-26 15:02:00] mmcnicklebugs at googlemail dot com

I can't replicate on Linux/Ubuntu 8.04 with 5.3CVS or 5.2.*

When I increase the number of patterns to a large number (say 6) I
get a suitable warning:

Warning: preg_match(): Compilation failed: too many named subpatterns
(maximum 1) at offset 148903 in
/home/martin/php_bugs/pcre/47622/test.php on line 10



[2009-03-15 14:37:22] gmblar+php at gmail dot com

Description:

With more than 63 Subpattern in a Regular-Expression, PHP crashes with
a 
Segmention-Fault.

Reproduce code:
---
?php

$regex = '@';
// works with $bar63
for($bar=0; $bar64; $bar++) {
$regex .= '((?Pfoo'.$bar.'))';
}
$regex .= '@';
 
preg_match($regex, 'foobar');

?

Expected result:

Nothing

Actual result:
--
$ php foobar.php
Segmentation fault






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



#47903 [Asn-Csd]: @ operator does not work with string offsets (PHP_5_2 only!)

2009-04-06 Thread felipe
 ID:   47903
 Updated by:   fel...@php.net
 Reported By:  cFreed at orange dot fr
-Status:   Assigned
+Status:   Closed
 Bug Type: Scripting Engine problem
 Operating System: *
 PHP Version:  5.2.9
 Assigned To:  felipe
 New Comment:

This bug has been fixed in CVS.

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




Previous Comments:


[2009-04-06 11:59:28] fel...@php.net

Yes, these fix was just committed in 5.3+.



[2009-04-06 11:40:45] j...@php.net

Felipe, this same (?) issue was reported in bug #39018 and was supposed
to be closed too..was the fix omitted from PHP_5_2 branch?




[2009-04-06 08:34:36] ka...@php.net

Verified in the PHP_5_2 branch only, PHP_5_3 and HEAD does not produce
this, reclassified



[2009-04-05 19:05:35] cFreed at orange dot fr

Description:

A case where the error-control operator @ does NOT work, despite of
what the manual says.

Reproduce code:
---
---
From manual page: language.operators.errorcontrol
---
The manual says:
A simple rule of thumb is: if you can take the value of something, you
can prepend the @ operator to it.

This is not always true.

As shown by the example given, this works, assuming $cache IS AN
ARRAY:
?php
$value = @$cache[$key]; 
// will not issue a notice if the index $key doesn't exist.
?

But it does not work if $cache IS A STRING, and $key is an integer
higher than strlen($cache)-1. in other words:
?php
$str='abc';
$val...@$str[5];
// will issue the notice Uninitialized string offset 5 in
?






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



#47766 [Fbk-Opn]: php-cgi.exe crashes

2009-04-06 Thread ipseno at yahoo dot com
 ID:   47766
 User updated by:  ipseno at yahoo dot com
 Reported By:  ipseno at yahoo dot com
-Status:   Feedback
+Status:   Open
 Bug Type: CGI related
 Operating System: Win XP SP3
 PHP Version:  5.3CVS-2009-03-24 (snap)
 Assigned To:  pajoye
 New Comment:

I've installed same OS on a new box, with sam Apache and PHP and Mysql
ver.s and confs

Then I've put only that .php file in Apache dir and parsed it with
php-cgi.exe

Crash occurred immediately! So now I know, that cause, is not from some
custom configurations or some safety software or any other third party
software.

Next, VERY GOOD part, is that even that file requires() few external
files and objects, on that testing server I did not gave them to the
script, because I've found out, that crash occurs, before any inclusion
occurs, that is  crash occurs at a core of PHP's startup.

This means I can send you an evil script, as I don't need to give you
protected classes.

But you must promise, you will destroy it and erase it permanently
after you are done.


Previous Comments:


[2009-04-05 22:38:35] paj...@php.net

Thansk for the backtrace, I still need a script to reproduce the
problem. Or can you give me access to this box or to the app you use?
The crash looks weird, in the lexer.



[2009-04-05 22:23:03] ipseno at yahoo dot com

And my answer to your templated request is above at:
[25 Mar 1:16pm UTC] ipseno at yahoo dot com

I've just downloaded latest 5.3.0RC2-dev, Build Date: Apr 5 2009
22:55:43 
Crash still occurs, by returning 500 Internal server error.

Here is a brand new Crash report that gives best info so far...


Thread 0 - System ID 3192Entry point  php_cgi!mainCRTStartup
Create time   6.4.2009 0:16:56
Time spent in user mode   0 Days 0:0:0.0
Time spent in kernel mode 0 Days 0:0:0.78



FunctionArg 1   Arg 2   Arg 3 Source
php5!lex_scan+2c26  00c0c8e40001002f  
php5!zendlex+2f 00c0c8dc00c0deac00fdce30  
php5!zendparse+15a  00fdce3000020040  
php5!compile_file+b000c0deac000800c0cc48  
php5!phar_open_from_filename+2d600c0deac0008   
00c0deac  
php5!zend_execute_scripts+4e00080003
  
php5!php_execute_script+1c8 00c0deac0040a4f00001
  
php_cgi!main+ab0000100dc2be800dc3080  
php_cgi!memset+160  7ffdf000  
kernel32!BaseProcessStart+23004061ea
  



PHP5!LEX_SCAN+2C26In
php-cgi__PID__4564__Date__04_06_2009__Time_12_17_03AM__46__Second_Chance_Exception_C005.dmp
the assembly instruction at php5!lex_scan+2c26 in D:\Program
Files\php\php5.dll from The PHP Group has caused an access violation
exception (0xC005) when trying to read from memory location
0x02331000 on thread 0Module Information
Image Name: D:\Program Files\php\php5.dll Symbol Type:  PDB
Base address:   0x1000Time Stamp:   Sun Apr 05 23:56:26 2009 
Checksum:   0x00550f1fComments: 
COM DLL:False Company Name: The PHP Group
ISAPIExtension: False File Description: PHP Script Interpreter
ISAPIFilter:False File Version: 5.3.0RC2-dev
Managed DLL:False Internal Name:PHP Script Interpreter
VB DLL: False Legal Copyright:  Copyright © 1997-2008 The PHP Group
Loaded Image Name:  php5.dll  Legal Trademarks: PHP
Mapped Image Name:Original filename:php5.dll
Module name:php5  Private Build:
Single Threaded:False Product Name: PHP
Module Size:5,45 MBytes   Product Version:  5.3.0RC2-dev
Symbol File Name:
D:\Interport\php-debug-pack-5.3-nts-win32-VC9-x86-latest\php5.pdb   
 
Special Build:  



[2009-03-29 12:00:39] paj...@php.net

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

A proper reproducing script starts with ?php and ends with ?,
is max. 10-20 lines long and does not require any external 
resources such as databases, etc. If the script requires a 
database to demonstrate the issue, please make sure it creates 
all necessary tables, stored procedures etc.

Please avoid embedding huge scripts into the report.





[2009-03-29 11:45:19] ipseno at yahoo dot com

I have just used lattest windows snapshot of VC9 x86 Non Thread Safe.

Bug is 

#47911 [NEW]: file_exists slow performance

2009-04-06 Thread webmaster at 303030 dot com
From: webmaster at 303030 dot com
Operating system: winxp
PHP version:  5.2.9
PHP Bug Type: Performance problem
Bug description:  file_exists slow performance 

Description:

i have one script which use file_exists 
am upfrading from php4 
after upgrade my page take 7 or 10 seconds to exectuted 
i test the same script under php4 it take less than 1 second
i remove file_exists from the script the page executed less than 1 second

so i bleve that the problem is in file_exists 

Reproduce code:
---
?
$mokhatatpicp=../mokhatatpic/.$row[mokhatatid]..pdf;
$mokhatatpicj=../mokhatatpic/.$row[mokhatatid]..jpg;


 
if(file_exists($mokhatatpicp))
{
$mokhatatpicp=mokhatatpic/.$row[mokhatatid]..pdf;
echoa href=#  
onclick=\showModalDialog('../picview.hnt?myx=$mokhatatpicphex=embed%20' 
,'ÓÈÍÇä','width:1200;resizable: yes; help: no; status:no; scroll:
no;');return false;\  img src=../images/image.jpg border=0/a;
}
elseif(file_exists($mokhatatpicj))
{
$mokhatatpicj=mokhatatpic/.$row[mokhatatid]..jpg;
echoa href=#  
onclick=\showModalDialog('../picview.hnt?myx=$mokhatatpicj' 
,'ÓÈÍÇä','full-screen:yes;resizable: yes; help: no; status:no; scroll:
no;');return false;\  img src=../images/image.jpg border=0/a;
}
else
{echo img src=../images/delete.gif border=0;}
 
?

Expected result:

this only snippt of the code so i didnot expect any result 

Actual result:
--
this only snippt of the code so i didnot expect any result 

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