Bug #62928 [Com]: sem_acquire won't lock on forked environment

2013-03-20 Thread peter dot bridgman at dexdyne dot com
Edit report at https://bugs.php.net/bug.php?id=62928edit=1

 ID: 62928
 Comment by: peter dot bridgman at dexdyne dot com
 Reported by:agustin dot moyano at gmail dot com
 Summary:sem_acquire won't lock on forked environment
 Status: Open
 Type:   Bug
 Package:Semaphore related
 Operating System:   openSUSE 12.1 (x86_64)
 PHP Version:5.4.6
 Block user comment: N
 Private report: N

 New Comment:

I don't believe this to be a bug as described. What is happening here is due to 
the [, int $auto_release = 1 
] part of the sem_get function signature (see 
http://www.php.net/manual/en/function.sem-get.php). When each 
process terminates, as auto_release is set to 1, the semaphore is automatically 
released, thus allowing one 
other (blocking) call to sem_acquire to succeed. That successful call then 
results in the process 
terminating, 'auto_release'-ing the semaphore and allowing the next sem_acquire 
to succeed.

Replacing the sem_get calls in the example with something like $sem = 
sem_get('1234', 1, 0666, 0); SHOULD 
results in the behaviour you desire. HOWEVER, Bug #52701 means that this 
doesn't work either; in fact, there 
is no working way to prevent a SysV semaphore from automatically being released 
upon process termination at 
the moment.

Nonetheless, fundamentally the semaphores ARE working; this can be verified 
with the addition of the 
following lines after each of your echo x acquired in... lines.

sleep(1);
die(Process dead..PHP_EOL);

Tested with:

PHP 5.3.3 (cli) (built: Feb 22 2013 02:51:11)
PHP 5.3.3-7+squeeze14 with Suhosin-Patch (cli) (built: Aug  6 2012 14:18:06)


Previous Comments:

[2012-08-24 20:14:46] agustin dot moyano at gmail dot com

Description:

The actual php version is 

# php --version
PHP 5.5.0-dev (cli) (built: Aug 24 2012 16:34:36) 
Copyright (c) 1997-2012 The PHP Group
Zend Engine v2.4.0, Copyright (c) 1998-2012 Zend Technologies

php was configured with:
./configure --enable-sysvsem --enable-sysvshm --enable-pcntl

sem_acquire won't lock when a forked process acquires the semaphore. This 
behaviour is the same whether sem_get is called in every process or before the 
first pcntl_fork. 

It would seem sem_acquire treats forked processes as if they where the same 
process as the father, even if the got different pid.

I also tryed this bug with 

$ php --version
PHP 5.3.10-1ubuntu3.2 with Suhosin-Patch (cli) (built: Jun 13 2012 17:19:58) 
Copyright (c) 1997-2012 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2012 Zend Technologies

in 

$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:Ubuntu 12.04.1 LTS
Release:12.04
Codename:   precise

whith exactly the same results. Thanks.

Test script:
---
?php
$pid = pcntl_fork();
if ($pid == -1) {
die(could not fork 1);
} else if ($pid) {
$pid = pcntl_fork();
if ($pid == -1) {
die(could not fork 2);
} else if($pid) {
$sem = sem_get('1234');
echo father try acquire $sem\n;
$time = microtime();
sem_acquire($sem);
echo father acquired in .($time-microtime()).\n;
} else {
$sem = sem_get('1234');
echo son 2 try acquire $sem\n;
$time=microtime();
sem_acquire($sem);
echo son 2 acquired in .($time-microtime()).\n;
}
} else {
$sem = sem_get('1234');
echo son 1 try acquire $sem\n;
$time=microtime();
sem_acquire($sem);
echo son 1 acquired in .($time-microtime()).\n;
}
?

Expected result:

storage-tests:~ # php prueba.php 
father try acquire Resource id #4   
 
father acquired in -4.69964E-5  
 
son 2 try acquire Resource id #4
 
son 1 try acquire Resource id #4

Actual result:
--
storage-tests:~ # php prueba.php 
father try acquire Resource id #4   
 
father acquired in -4.69964E-5  
 
son 2 try acquire Resource id #4
 
son 1 try acquire Resource id #4
 
son 2 acquired in -0.000105999  
 
son 1

Bug #63344 [Com]: pg_query_params() doesn't pass parts of strings past zero byte character

2012-10-24 Thread peter dot kehl at gmail dot com
Edit report at https://bugs.php.net/bug.php?id=63344edit=1

 ID: 63344
 Comment by: peter dot kehl at gmail dot com
 Reported by:peter dot kehl at gmail dot com
 Summary:pg_query_params() doesn't pass parts of strings past
 zero byte character
 Status: Assigned
 Type:   Bug
 Package:PostgreSQL related
 Operating System:   CentOS 6.2; possibly irrelevant
 PHP Version:5.4.8
 Assigned To:yohgaki
 Block user comment: N
 Private report: N

 New Comment:

OK, pg_query_params() works as defined by Postgres. Thank you.

However, I suggest a change of Example #1 at http://www.php.net/serialize. That 
example saves a result of serialize() to an ODBC database. I have no way of 
testing whether that works with strings containing zero byte(s). Anyway, that 
example may lead people to save a result of serialize() using Postgres (or 
MSSQL mssql_query()), which fail.

Please change that example to use base64_encode() and base64_decode(), and add 
a note that serialize() generates a string which may contain zero byte(s).


Previous Comments:

[2012-10-24 06:35:04] larue...@php.net

The following patch has been added/updated:

Patch Name: bug63344.patch
Revision:   1351060504
URL:
https://bugs.php.net/patch-display.php?bug=63344patch=bug63344.patchrevision=1351060504


[2012-10-24 06:34:33] larue...@php.net

according to http://www.postgresql.org/docs/8.0/static/libpq-exec.html

the current PHP's wrapper of PQexecParams doesn't support binary data.

a simple fix is attached


[2012-10-24 04:39:53] peter dot kehl at gmail dot com

Description:

This may not be a code problem, but a documentation problem.

At the top, this is similar to https://bugs.php.net/bug.php?id=45491edit=2, 
but not the same. If the current behaviour is intended, then it should be 
documented at www.php.net/pg_query_params - because current documentation 
doesn't mention that it doesn't support zero bytes.

Summary
If I call pg_query_params( $connection, $sql_query_with_dollar_placeholders, 
$params ) with all three parameters, and $params is an array with at least 1 
value which is a string, which contains 1 or more zero bye characters (in PHP 
it's chr(0) or \0), then that zero byte character(s) and anything right from 
it (in the same string) won't be passed to Postgres server.

I've checked Postgres server logs, and the values come truncated just before 
the first zero byte character.

That is probably due to Postgres using/treating strings like C language does, 
ended with a zero byte character. However, in PHP a string can contain one or 
multiple zero byte characters. This happens when e.g. using output of PHP's 
function serialize().

Side note
I'm curious whether there is any way to set a Postgres varchar/text column to 
contain one or more zero byte characters. Following fails in pgAdmin (which 
uses UTF-8):
INSERT INTO null_character_test(value) VALUES( E'First\0Second');

Environment:
--
PHP server:
CentOS 6.3
Linux localhost.localdomain 2.6.32-279.el6.x86_64 #1 SMP Fri Jun 22 12:19:21 
UTC 2012 x86_64 x86_64 x86_64 GNU/Linux

Compiled PHP 5.4.8
./configure --prefix=/usr/local/php --with-pgsql  --with-apxs2=/usr/sbin/apxs 
--enable-mbstring 

/usr/local/php/bin/php -v
PHP 5.4.8 (cli) (built: Oct 24 2012 14:49:11) 
Copyright (c) 1997-2012 The PHP Group
Zend Engine v2.4.0, Copyright (c) 1998-2012 Zend Technologies

Postgres server (and also a PHP server, where the same problem applies)
CentOS 6.2
Linux pkehlcentos.racpnet.localhost.local 2.6.32-220.el6.x86_64 #1 SMP Tue Dec 
6 19:48:22 GMT 2011 x86_64 x86_64 x86_64 GNU/Linux

PostgreSQL 8.4.11 on x86_64-redhat-linux-gnu, compiled by GCC gcc (GCC) 4.4.6 
20110731 (Red Hat 4.4.6-3), 64-bit.

/usr/local/php/bin/php -v
PHP 5.4.4 (cli) (built: Aug 15 2012 14:07:53) 
Copyright (c) 1997-2012 The PHP Group
Zend Engine v2.4.0, Copyright (c) 1998-2012 Zend Technologies
with Xdebug v2.2.1, Copyright (c) 2002-2012, by Derick Rethans



Test script:
---
CREATE TABLE null_character_test( value varchar(255) );

?php
$params= array(
Only the first part (this one) gets saved to DB.\0Anything after a 
null character (this) gets removed.
 );
// PHP's strlen() counts characters past the null character.
echo Number of characters in the problem string, as reported by PHP's 
strlen():  .strlen( $params[0]);

$con= pg_connect( host='10.10.6.62' port='5432' 
dbname='moodlepkehlcentos22' user='moodlepkehlcentos22' 
password='pkehlcentos22moodle', PGSQL_CONNECT_FORCE_NEW );
$sql= 'INSERT INTO null_character_test(value) VALUES($1)';
pg_query_params( $con, $sql, $params );


Expected result

[PHP-BUG] Bug #63344 [NEW]: pg_query_params() doesn't pass parts of strings past zero byte character

2012-10-23 Thread peter dot kehl at gmail dot com
From: peter dot kehl at gmail dot com
Operating system: CentOS 6.2; possibly irrelevant
PHP version:  5.4.8
Package:  PostgreSQL related
Bug Type: Bug
Bug description:pg_query_params() doesn't pass parts of strings past zero byte 
character

Description:

This may not be a code problem, but a documentation problem.

At the top, this is similar to
https://bugs.php.net/bug.php?id=45491edit=2, but not the same. If the
current behaviour is intended, then it should be documented at
www.php.net/pg_query_params - because current documentation doesn't mention
that it doesn't support zero bytes.

Summary
If I call pg_query_params( $connection,
$sql_query_with_dollar_placeholders, $params ) with all three parameters,
and $params is an array with at least 1 value which is a string, which
contains 1 or more zero bye characters (in PHP it's chr(0) or \0), then
that zero byte character(s) and anything right from it (in the same string)
won't be passed to Postgres server.

I've checked Postgres server logs, and the values come truncated just
before the first zero byte character.

That is probably due to Postgres using/treating strings like C language
does, ended with a zero byte character. However, in PHP a string can
contain one or multiple zero byte characters. This happens when e.g. using
output of PHP's function serialize().

Side note
I'm curious whether there is any way to set a Postgres varchar/text column
to contain one or more zero byte characters. Following fails in pgAdmin
(which uses UTF-8):
INSERT INTO null_character_test(value) VALUES( E'First\0Second');

Environment:
--
PHP server:
CentOS 6.3
Linux localhost.localdomain 2.6.32-279.el6.x86_64 #1 SMP Fri Jun 22
12:19:21 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux

Compiled PHP 5.4.8
./configure --prefix=/usr/local/php --with-pgsql 
--with-apxs2=/usr/sbin/apxs --enable-mbstring 

/usr/local/php/bin/php -v
PHP 5.4.8 (cli) (built: Oct 24 2012 14:49:11) 
Copyright (c) 1997-2012 The PHP Group
Zend Engine v2.4.0, Copyright (c) 1998-2012 Zend Technologies

Postgres server (and also a PHP server, where the same problem applies)
CentOS 6.2
Linux pkehlcentos.racpnet.localhost.local 2.6.32-220.el6.x86_64 #1 SMP Tue
Dec 6 19:48:22 GMT 2011 x86_64 x86_64 x86_64 GNU/Linux

PostgreSQL 8.4.11 on x86_64-redhat-linux-gnu, compiled by GCC gcc (GCC)
4.4.6 20110731 (Red Hat 4.4.6-3), 64-bit.

/usr/local/php/bin/php -v
PHP 5.4.4 (cli) (built: Aug 15 2012 14:07:53) 
Copyright (c) 1997-2012 The PHP Group
Zend Engine v2.4.0, Copyright (c) 1998-2012 Zend Technologies
with Xdebug v2.2.1, Copyright (c) 2002-2012, by Derick Rethans



Test script:
---
CREATE TABLE null_character_test( value varchar(255) );

?php
$params= array(
Only the first part (this one) gets saved to DB.\0Anything after a
null character (this) gets removed.
 );
// PHP's strlen() counts characters past the null character.
echo Number of characters in the problem string, as reported by PHP's
strlen():  .strlen( $params[0]);

$con= pg_connect( host='10.10.6.62' port='5432'
dbname='moodlepkehlcentos22' user='moodlepkehlcentos22'
password='pkehlcentos22moodle', PGSQL_CONNECT_FORCE_NEW );
$sql= 'INSERT INTO null_character_test(value) VALUES($1)';
pg_query_params( $con, $sql, $params );


Expected result:

SELECT * FROM null_character_test WHERE value LIKE 'Only the first part
(this one) gets saved to DB.%Anything after a null character (this) gets
removed.'

-- that should match 1 row

Actual result:
--
SELECT * FROM null_character_test WHERE value='Only the first part (this
one) gets saved to DB.'

-- that matches 1 row

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

[PHP-BUG] Bug #62599 [NEW]: Some SPL Exceptions do not display any backtrace / error message via mod_php5

2012-07-18 Thread peter at netkey dot at
From: peter at netkey dot at
Operating system: FreeBSD
PHP version:  5.4.4
Package:  SPL related
Bug Type: Bug
Bug description:Some SPL Exceptions do not display any backtrace / error 
message via mod_php5

Description:

When called via apache2 (mod_php5), some SPL exception do not display any 
information: BadFunctionCallException, 
InvalidArgumentException, 
OutOfBoundsException, 
RuntimeException and 
UnexpectedValueException. 
When called vi CLI the backtrace and exception message is displayed. All
other 
SPL exceptions display the expected message / backtrace.


PHP was installed via the ports system, before the upgrade form 5.3 to 5.4
the 
mentioned exceptions displayed message and backtrace.


Test script:
---
?php
throw new InvalidArgumentException('SDF');
?

Expected result:

Fatal error: Uncaught exception 'InvalidArgumentException' with message
'SDF' in 
/path/to/script.php

Actual result:
--
Fatal error: in /path/to/script.php

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



Bug #54735 [Com]: xml_parse_into_struct gives uncomplete array

2012-04-26 Thread peter dot e dot lind at gmail dot com
Edit report at https://bugs.php.net/bug.php?id=54735edit=1

 ID: 54735
 Comment by: peter dot e dot lind at gmail dot com
 Reported by:phpnet at phoen dot de
 Summary:xml_parse_into_struct gives uncomplete array
 Status: Open
 Type:   Bug
 Package:*XML functions
 Operating System:   Windows XPSP2
 PHP Version:5.3.6
 Block user comment: N
 Private report: N

 New Comment:

Doesn't seem to be a bug on Linux (PHP 5.3.3-7+squeeze8 with Suhosin-Patch 
(cli)) - when I save the test-script in utf-8 the output is as expected. 
However, if I save it as ISO-8859-15, the xml parsing stops, as one would 
expect, when it hits the illegal character - an ISO-8859-15 € would be 
illegal 
in utf-8 and xml parsers must stop when they reach illegal content.

The docs could be improved though, as http://dk.php.net/manual/en/function.xml-
parser-create.php specifies that The supported encodings are ISO-8859-1, UTF-8 
and US-ASCII. but in the context it appears to only be the case for output. 
However, the behaviour suggests those three character sets also restrict input. 
Some comments in the php code also suggest that this is the case.


Previous Comments:

[2011-05-14 13:29:54] phpnet at phoen dot de

Description:

hi,

configuration: Windows XP with XAMPP 1.7.3 (nothing special)

xml_parse_into_struct returns an uncomplete array if there is an unexpected 
sign(maybe utf8).
All after € in the array is missing. No error or messed up character shows 
up.
It doesn't help to set any options.

$myxml=utf8_encode($myxml);

and afterwards

can fix the problem surprisingly.

thanks,H.







Test script:
---
?php
$myxml=XMLFELD1blubb/FELD1FELD2dies hier sonderzeichen 
€/FELD2FELD3feld3/FELD3/XML;
  
$p = xml_parser_create();
xml_parse_into_struct($p, $myxml, $vals, $index);
xml_parser_free($p);

print_r($vals); 
php?

Expected result:

sth like this

Array ( [0] =
Array ( [tag] = XML [type] = open [level] = 1 [value] = ) [1] = Array ( 
[tag] = FELD1 [type] = complete [level] = 2 [value] = blubb ) [2] = Array 
( [tag] = XML [value] = [type] = cdata [level] = 1 ) [3] = Array ( [tag] 
= FELD2 [type] = complete [level] = 2 [value] = dies hier sonderzeichen 
€) [3] = Array ( [tag] = XML [value] = [type] = cdata [level] = 1 ) [3] 
= Array ( [tag] = FELD3 [type] = complete[level] = 2 [value] = feld3))

Actual result:
--
Array ( [0] =
Array ( [tag] = XML [type] = open [level] = 1 [value] = ) [1] = Array ( 
[tag] = FELD1 [type] = complete [level] = 2 [value] = blubb ) [2] = Array 
( [tag] = XML [value] = [type] = cdata [level] = 1 ) [3] = Array ( [tag] 
= FELD2 [type] = open [level] = 2 [value] = dies hier sonderzeichen ) ) 






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


Req #41191 [Com]: Request for method to always retrieve POST body

2012-02-07 Thread peter dot e dot lind at gmail dot com
Edit report at https://bugs.php.net/bug.php?id=41191edit=1

 ID: 41191
 Comment by: peter dot e dot lind at gmail dot com
 Reported by:jfrim at idirect dot com
 Summary:Request for method to always retrieve POST body
 Status: Open
 Type:   Feature/Change Request
 Package:Feature/Change Request
 Operating System:   Win98
 PHP Version:5.2.1
 Block user comment: N
 Private report: N

 New Comment:

This is still quite a bother:
When you send a POST request of type multipart/form-data, the POST data is 
parsed 
no matter what and you have no chance to check the request body. If the POST 
request is invalid somehow (for instance, if the boundary is set wrong) the 
parser throws away the entire request body leaving you in the dark as to why 
there's no data coming through. Essentially, you are left with The request is 
invalid somehow, but I have no clue as to why - and if you cannot reproduce 
the 
error yourself, you're completely screwed.


Previous Comments:

[2011-01-18 11:01:06] novikov at doroga dot tv

When the Java MIDP client sends wrong multipart/form-data message because of 
wrong Java implementation, I don't have a chance to fix the problem on the 
server side using PHP, just because I don't have any way to get a raw POST data.


[2007-04-25 20:12:36] jfrim at idirect dot com

Description:

Currently there exists no way in PHP to retrieve the POST body when a form is 
sent using multipart/form-data.  This is a problem for implementing protocols 
like HTTP digest authentication, which require the server to calculate a hash 
of the received POST body.

If making the POST body available on the php://input stream AT ALL TIMES 
regardless of the encoding type is impractical (possibly due to memory 
requirements when the POST body is very large), an alternative would be to 
stream the POST body, unaltered, directly to a temporary file.  (Similar to the 
way files uploaded with HTML forms are streamed to temporary files referenced 
in the $_FILES[] superglobal.)

This would allow authors to fully implement HTTP digest authentication in their 
scripts, and open up any other other possible situations where one might 
require an exact bit-accurate copy of the POST body.








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


Bug #48507 [Com]: fgetcsv() ignoring special characters

2011-10-28 Thread peter dot e dot lind at gmail dot com
Edit report at https://bugs.php.net/bug.php?id=48507edit=1

 ID: 48507
 Comment by: peter dot e dot lind at gmail dot com
 Reported by:krynble at yahoo dot com dot br
 Summary:fgetcsv() ignoring special characters
 Status: Bogus
 Type:   Bug
 Package:Filesystem function related
 Operating System:   Unix
 PHP Version:5.*
 Block user comment: N
 Private report: N

 New Comment:

This is definitely still a bug - my locale is set to da_DK.utf8, the file I'm 
trying to read is in UTF8 (confirmed with a hex-editor but in fact does not 
matter - the behaviour is the same, UTF8 or ISO-8859-1) yet special characters 
are still thrown away when they are first in a field


Previous Comments:

[2011-10-18 13:59:30] me at monicag dot it

Quoting my fellows above: how comes this is not a bug?


[2011-10-10 10:03:58] ghosh at q-one dot com

Sorry. I don't understand why this isn't a bug either. Could someone please 
elaborate? I tried setting all different kinds of locale to no avail. The first 
letter of a string starting with a UTF-8 character is always missing. IMHO, 
fgetcsv should work as a simple string operation (or - whatever weird things it 
does right now - at least have a parameter to do so - count this as a feature 
request if you wish). I think, the current behavior is totally confusing. For 
instance, I don't understand why only the first character is missing but the 
problem doesnt appear if a character is in the middle of a string.


[2011-07-17 16:19:28] max dot wildgrube at web dot de

The problem does also appears if the special char is preceded by a blank. This 
blank also disappears.

I use this ugly workaround:
1. first reading the complete csv file into a variable: $import
2. $import = preg_replace ({(^|\t)([€-ÿ ])}m, $1~~$2, $import); 
3. after fgetcsv; for each $field of the row array: $field = str_replace ('~~', 
'', $field);

This means: before using fgetcsv inserting a magic sequence (e.g. ~~) on the 
beginning of a field which begins with a blank or a special char; after parsing 
with fgetcsv removing it from each field.

Max.


[2011-07-08 08:39:50] php-bug-48507 at bsrealm dot net

This IS a bug. Whatever locale is, I expect this function to read everything 
between delimiter characters without stripping the contents. Besides, docs say 
that files in one-byte encoding would read wrong, and there is a different 
case. This bug causes serious portability issue. In my case, this function was 
used to read custom database that was storing descriptions entered by users. 
Some descriptions were in utf-8 enconding. Function just had to read whatever 
was between delimiter characters and it worked like that on Windows hosting and 
stopped working after moving to Unix hosting. Note, file itself is not utf-8 
encoded and it should not be. It is not related to locale. It must read data, 
even if it's binary, between delimiters.


[2011-02-26 02:46:32] gjorgjioski at gmail dot com

This is short example:

kategorija  širina platišč   število

read:
kategorija
irina platišč
tevilo

expected:
kategorija
širina platišč
Å¡tevilo




The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at

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


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


Bug #59916 [Com]: Can't use module on Fedora 15

2011-10-21 Thread peter at ptm dot pp dot ru
Edit report at https://bugs.php.net/bug.php?id=59916edit=1

 ID: 59916
 Comment by: peter at ptm dot pp dot ru
 Reported by:mark dot frost at lightningsource dot com
 Summary:Can't use module on Fedora 15
 Status: Open
 Type:   Bug
 Package:expect
 Operating System:   Fedora 15
 PHP Version:5.3.6
 Block user comment: N
 Private report: N

 New Comment:

Have the same problem in CentOS 6.

# rpm -q expect expect-devel tcl tcl-devel php php-devel
expect-5.44.1.15-2.el6.x86_64
expect-devel-5.44.1.15-2.el6.x86_64
tcl-8.5.7-6.el6.x86_64
tcl-devel-8.5.7-6.el6.x86_64
php-5.3.8-5.el6.remi.x86_64
php-devel-5.3.8-5.el6.remi.x86_64

# php -m | grep expect
PHP Warning:  PHP Startup: Unable to load dynamic library 
'/usr/lib64/php/modules/expect.so' - /usr/lib64/php/modules/expect.so: 
undefined 
symbol: Tcl_GetStringResult in Unknown on line 0


Previous Comments:

[2011-08-30 16:21:16] mark dot frost at lightningsource dot com

It looks like I dont get this issue with version 0.2.7 of the 
code, but I do get the Segmentation Fault issue. I thought 
that piece of information might be helpful.


[2011-08-30 12:44:05] mark dot frost at lightningsource dot com

Description:

I've been trying to install this package on Fedora 15, but 
have been unsuccessful thus far. 

With the most recent version, after either a PECL install or 
manually installing it from source, I receive the following: 


PHP Warning:  PHP Startup: Unable to load dynamic library 
'/usr/lib64/php/modules/expect.so' - 
/usr/lib64/php/modules/expect.so: undefined symbol: 
Tcl_GetStringResult in Unknown on line 0

Here's the versions Im running of all of the relevant 
packages: 


[mfrost@localhost expect-0.3.0]$ rpm -q expect expect-devel 
tcl tcl-devel php php-devel
expect-5.45-3.fc15.x86_64
expect-devel-5.45-3.fc15.x86_64
tcl-8.5.9-3.fc15.x86_64
tcl-devel-8.5.9-3.fc15.x86_64
php-5.3.6-2.fc15.x86_64
php-devel-5.3.6-2.fc15.x86_64


For the moment, I'd be equally happy with an actual fix, as 
with a work-around. I'd just like to get the module 
installed so I can use it. 

Reproduce code:
---
[mfrost@localhost expect-0.3.0]$ sudo pecl install expect-beta
[mfrost@localhost expect-0.3.0]$ php myscript.php

Expected result:

I expect the script to run and be able to load the module. 

Actual result:
--
PHP Warning:  PHP Startup: Unable to load dynamic library 
'/usr/lib64/php/modules/expect.so' - 
/usr/lib64/php/modules/expect.so: undefined symbol: 
Tcl_GetStringResult in Unknown on line 0


PHP Warning:  fopen(): Unable to find the wrapper expect - 
did you forget to enable it when you configured PHP? in 
/home/mfrost/ssh_development/class.ssh.php on line 20
PHP Warning:  fopen(expect://...@lvis05): failed to open 
stream: No such file or directory in 
/home/mfrost/ssh_development/class.ssh.php on line 20







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


[PHP-BUG] Bug #55702 [NEW]: AMQP Exception handling

2011-09-15 Thread peter dot colclough at toolstation dot com
From: 
Operating system: Linux
PHP version:  5.3.8
Package:  Unknown/Other Function
Bug Type: Bug
Bug description:AMQP Exception handling

Description:

AMQPExchangeException, and possibly others, do not supply the error code in
$e-code, element. Only as a part of teh actual text message. 
This makes error trapping slightly complex, slow and horrible.

Test script:
---
try{
  
$this-oProdExchange-declare($sName, $npExchangeType); 

}catch(AMQPExchangeException $e){
   $code = $e-getCode(); // $code = 0... always
}

Expected result:

If the exchange being used generates a:
[message:protected] = Server channel error: 406, message:
PRECONDITION_FAILED...
I would expect:

[code:protected] = 406   Not [code:protected] = 0





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



[PHP-BUG] Bug #55384 [NEW]: AMQP::consume()

2011-08-09 Thread peter dot colclough at toolstation dot com
From: 
Operating system: Ubuntu 10 , 64Bit
PHP version:  5.3.7RC4
Package:  Unknown/Other Function
Bug Type: Bug
Bug description:AMQP::consume()

Description:

---
From manual page: http://www.php.net/amqpqueue.consume
---
Using this against a RabbitMQ server...

This is a very small snippet of very simple code. If you use the consume on
a durable message on a durable queue, this just eats up memory, and kills
teh machine, when it hits around 7k messages.
Using get() all is Ok. It looks like a memory leak somewhere in teh AMQP
code

Test script:
---
include_once('../config/config.php');
$nMessNum = 4000;
$nCount = 0;
$nTimeLimit = 600;

$nI = 0;
$sMessRoute = '';
while($nI++  1){
$sMessRoute .= 'a';
} 

$nstart = microtime_float();
$amp = new AMQPConnection($RABBIT_SERVERS);
if($amp-connect()){
echo('Connected to Host'.\n);
// Declare a new exchange
$options = AMQP_DURABLE;
$ex = new AMQPExchange($amp,'stone_warren');
$ex-declare('stone_warren', AMQP_EX_TYPE_FANOUT, AMQP_DURABLE);
  
// Create a new queue
$q = new AMQPQueue($amp);
$q-declare('queue1',AMQP_DURABLE);

// Bind it on the exchange to routing.key
$ex-bind('queue1', 'routing.key');

// consume a message to the exchange with a routing key...and ack it.
$options = array(
'min'=1,
   'max'=10,
   'ack'=true
);

$nMsgCount = 0;
$tsStart = time();
   
while(1){   // Forever

   $nCount++;
   // This dies soon... after about 7k messages
   $msg = $q-consume($options);
   //$msg = $q-get(0);
   echo(print_r($msg, true).\n);

   usleep(1);
   if((file_exists('consumer'.$nType.'.stop')) ||
  ((time() - $tsStart) $nTimeLimit)){
   break;
}
}

}else{
echo(Failed to connect \n);
} 
// END OF CODE


Expected result:

Should run forever, consuming messages placed on the queue by a similar
process. Using get() I was able to process 23m messages over a 3 day
period. Using consume(), I die in a matter of minutes.


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



[PHP-BUG] Bug #55259 [NEW]: penssl extension does not get the DH parameters from DH key resource

2011-07-21 Thread peter at vereshagin dot org
From: 
Operating system: freebsd-7.4
PHP version:  5.3.6
Package:  OpenSSL related
Bug Type: Bug
Bug description:penssl extension does not get the DH parameters from DH key 
resource

Description:

This is the same for lang/php5 port as of 5.3.6_1 and for the SVN version
as of:
===
Path: .
URL: https://svn.php.net/repository/php/php-src/branches/PHP_5_3
Repository Root: https://svn.php.net/repository
Repository UUID: c90b9560-bf6c-de11-be94-00142212c4b1
Revision: 313330
Node Kind: directory
Schedule: normal
Last Changed Author: stas
Last Changed Rev: 313316
Last Changed Date: 2011-07-17 11:03:19 +0400 (Sun, 17 Jul 2011)
===
I had rebuilt the security/php5-openssl port, too with these svn sources
rewriting from them with 'rsync -rlcC' right after the 'make extract'.
Current workaround is to disable the openssl extension and use a different
extension for diffie-hellman algorithm
Below is the 'php -i' output:
===
PHP Version 5.3.7RC4-dev


System  FreeBSD teh.ost 7.4-STABLE FreeBSD 7.4-STABLE #10: Mon May 2
16:12:55 MSD 2011
pe...@vereshagin.org:/usr/local/obj/usr/local/src/sys/JUICY i386
Build Date  Jul 21 2011 16:18:28
Configure Command'./configure' '--with-layout=GNU' 
'--localstatedir=/var'
'--with-config-file-scan-dir=/usr/local/etc/php' '--disable-all'
'--enable-libxml' '--with-libxml-dir=/usr/local'
'--with-pcre-regex=/usr/local' '--with-zlib-dir=/usr' '--program-prefix='
'--disable-cli' '--enable-embed=shared' '--enable-fpm'
'--with-fpm-user=www' '--with-fpm-group=www' '--with-regex=php'
'--with-zend-vm=CALL' '--enable-debug' '--enable-zend-multibyte'
'--prefix=/usr/local' '--mandir=/usr/local/man'
'--infodir=/usr/local/info/' '--build=i386-portbld-freebsd7.4'
Server API  FPM/FastCGI
Virtual Directory Support   disabled
Configuration File (php.ini) Path   /usr/local/etc
Loaded Configuration File   /usr/local/etc/php.ini
Scan this dir for additional .ini files /usr/local/etc/php
Additional .ini files parsed/usr/local/etc/php/extensions.ini
PHP API 20090626
PHP Extension   20090626
Zend Extension  220090626
Zend Extension BuildAPI220090626,NTS,debug
PHP Extension Build API20090626,NTS,debug
Debug Build yes
Thread Safety   disabled
Zend Memory Manager enabled
Zend Multibyte Support  enabled
IPv6 Supportenabled
Registered PHP Streams  php, file, glob, data, http, ftp, compress.zlib,
compress.bzip2, zip, https, ftps
Registered Stream Socket Transports tcp, udp, unix, udg, ssl, sslv3, sslv2,
tls
Registered Stream Filters   string.rot13, string.toupper, string.tolower,
string.strip_tags, convert.*, consumed, dechunk, zlib.*, bzip2.*,
convert.iconv.*, mcrypt.*, mdecrypt.*

This server is protected with the Suhosin Patch 0.9.10
Copyright (c) 2006-2007 Hardened-PHP Project Copyright (c) 2007-2011
SektionEins GmbH

This program makes use of the Zend Scripting Language Engine:
Zend Engine v2.3.0, Copyright (c) 1998-2011 Zend Technologies

PHP Credits

Configuration

bcmath

BCMath support  enabled

Directive   Local Value Master Value
bcmath.scale0   0

bz2

BZip2 Support   Enabled
Stream Wrapper support  compress.bzip2://
Stream Filter support   bzip2.decompress, bzip2.compress
BZip2 Version   1.0.5, 10-Dec-2007

calendar

Calendar supportenabled

cgi-fcgi

php-fpm active

Directive   Local Value Master Value
cgi.discard_path0   0
cgi.fix_pathinfo1   1
cgi.force_redirect  1   1
cgi.nph 0   0
cgi.redirect_status_env no valueno value
cgi.rfc2616_headers 0   0
fastcgi.error_headerno valueno value
fastcgi.logging 1   1
fpm.config  no valueno value

Core

PHP Version 5.3.7RC4-dev

Directive   Local Value Master Value
allow_call_time_pass_reference  On  On
allow_url_fopen On  On
allow_url_include   Off Off
always_populate_raw_post_data   Off Off
arg_separator.input
arg_separator.output   
asp_tagsOff Off
auto_append_fileno valueno value
auto_globals_jitOn  On
auto_prepend_file   no valueno value
browscapno valueno value
default_charset no valueno value
default_mimetypetext/html   text/html
define_syslog_variables Off Off
detect_unicode  On  On
disable_classes no valueno value
disable_functions   no valueno value
display_errors  On  On
display_startup_errors  Off Off
doc_rootno valueno value
docref_ext  no valueno value
docref_root no valueno value
enable_dl   On  On
error_append_string no valueno value
error_log   /tmp/php.log/tmp/php.log
error_prepend_stringno valueno value
error_reporting 30719   30719
exit_on_timeout Off Off
expose_php  On  On
extension_dir   /usr/local/lib/php/20090626-debug   
/usr/local/lib/php/20090626-debug

Bug #54729 [Com]: mail is not sent when the body contains a specific web-link

2011-05-18 Thread peter dot ihrler at ku-eichstaett dot de
Edit report at http://bugs.php.net/bug.php?id=54729edit=1

 ID: 54729
 Comment by: peter dot ihrler at ku-eichstaett dot de
 Reported by:peter dot ihrler at ku-eichstaett dot de
 Summary:mail is not sent when the body contains a specific
 web-link
 Status: Open
 Type:   Bug
 Package:Scripting Engine problem
 Operating System:   sles11, opensuse
 PHP Version:5.2.17
 Block user comment: N
 Private report: N

 New Comment:

I am sorry for this. My emails didn't pass our anti-spam-filter. That is
why they never where received. The links like http://www.ku-ett.de.ms;
are interpreted as phishing-links.

Peter


Previous Comments:

[2011-05-13 16:07:21] peter dot ihrler at ku-eichstaett dot de

Description:

mail() does not send an email when the body contains a specific
web-link. This happens also with 5.3.3.



It seems that mail() does interpret the Link and doesn't send an e-mail
if after the .de is something appended. 









Test script:
---
html

body

?php

// The first mail is sent, the second not.

phpinfo(-1);

mail( to...@ku-ett.de, Good Link, http://www.ku-ett.de;);

mail( to...@ku-ett.de, Bad Link, http://www.ku-ett.de.ms;);

?

/body

/html







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


Bug #54444 [Com]: Multiple Queries on a single conenction

2011-05-13 Thread peter dot colclough at toolstation dot com
Edit report at http://bugs.php.net/bug.php?id=5edit=1

 ID: 5
 Comment by: peter dot colclough at toolstation dot com
 Reported by:peter dot colclough at toolstation dot com
 Summary:Multiple Queries on a single conenction
 Status: Bogus
 Type:   Bug
 Package:MySQLi related
 Operating System:   Ubuntu 10 64 bit
 PHP Version:5.3SVN-2011-04-01 (SVN)
 Block user comment: N
 Private report: N

 New Comment:

Johannes,



I accept what you, and Ulf, are saying, however do you think it
right that the language shouold dictate what the application developer
can do? While it would be really dumb to have 6 x 10 gig results stored
on the server, it may be a necessity, and memory is not a main issue
these days. Its up to the app developer how they store the data, and
where it is stored mid query.

We are processing, on average, 1000 queries a second over any 24 hr
period. Some of those have complex joins, which in turn cause table
locks. By using multiple prepared statements, we can get around that
issue, and speed up total throughput.



Will let you know when the driver is available in alpha... so you can
pass comments, if you are interested.


Previous Comments:

[2011-05-11 11:12:25] johan...@php.net

The server won't process a second query unless all data from the
previous has been fetched. As Ulf said you can buffer the result set
locally so you can send the next query. We don't do this intentionally
by default as loading result sets in memory can be very hard when they
are large.


[2011-05-10 12:01:00] peter dot colclough at toolstation dot com

True... but it doesn't do this ($conn is a connection) ... and don't
copy this code.. its not good.. but gets the point across:





$basesql = 'SELECT SQL_NO_CACHE id from table1 ';

$baseqry = bmysqli_query($basesql, $conn);



$qry  = bmysqli_query('Select SQL_NO_CACHE * from table2 where id2 = ?
',$conn);

$qry1 = bmysqli_query('Select SQL_NO_CACHE * from table3 where id3 = ?
',$conn);

$qry2 = bmysqli_query('Select SQL_NO_CACHE * from table4 where id4 = ?
',$conn);



while(TRUE){

   $nBaseRes = bmysqli_fetch($baseqry);

   if(empty($nBaseRes)){

   break;

   }

   $aId  = array(0 =$nBaseRes['id']);

   // The first bound query

   bmysqli_execute($qry, $aId);

   $nRes  = bmysqli_fetch($qry);

   $aVals = array(0=$nRes['id2']);



   bmysqli_execute($qry1, $aVals);  



while(TRUE){// careful Peter

$nRes1 = bmysqli_fetch($qry1);

if(empty($nRes1)){

break;

}



$aItems = array(0 = $nRes1['id3']);



bmysqli_execute($qry2, $aItems);



while(TRUE){// careful Peter

   $nRes2 = bmysqli_fetch($qry2);

   if(empty($nRes2)){

break;

   }







}





}


[2011-05-09 17:00:40] u...@php.net

Hmm, you can prepare as many statements as you want per connection. But
once you have executed a statement on a connection you must fetch its
results before you can execute another statement. The result set
blocks the line. 



You can, of course, do an implicit fetch on the C level upon execute but
that's the exact opposite of the default fetch method (unbuffered) used
for prepared statements by MySQL. 



Its a one-liner to do that fetch in user land. No need for changes on
the C level.



$mysqli = new mysqli(localhost, root, root, test);

$stmt1 = $mysqli-prepare(SELECT 1 AS _one FROM DUAL);

$stmt2 = $mysqli-prepare(SELECT 2 AS _two FROM DUAL);



/* execute */

if (!$stmt1-execute())

  printf([001] [%d] %s\n, $stmt1-errno, $stmt1-error);



/* clear line by fetching result set */

$res1 = $stmt1-get_result();





/* execute */

if (!$stmt2-execute())

  printf([002] [%d] %s\n, $stmt2-errno, $stmt2-error);



/* clear line by fetching result set */

$res2 = $stmt2-get_result();



/* fetching second first */

while ($row = $res2-fetch_assoc())

  var_dump($row);

$res2-free();



while ($row = $res1-fetch_assoc())

  var_dump($row);

$res1-free();


[2011-05-09 16:35:37] peter dot colclough at toolstation dot com

Thanks for teh feedback. I was also getting that error, just wanted to
make sure it wasn't 'me'... but actually expected behaviour.



Am now devbeloping my own, that allows multiple statements per
connection, as well as multiple 'prepare' statements. This will be open
sourced when ready.



The current mysqli interface should have been able to do this, but it
was obviously decided not to allow it... which is a bit

[PHP-BUG] Bug #54729 [NEW]: mail is not sent when the body contains a specific web-link

2011-05-13 Thread peter dot ihrler at ku-eichstaett dot de
From: 
Operating system: sles11, opensuse
PHP version:  5.2.17
Package:  Scripting Engine problem
Bug Type: Bug
Bug description:mail is not sent when the body contains a specific web-link

Description:

mail() does not send an email when the body contains a specific web-link.
This happens also with 5.3.3.



It seems that mail() does interpret the Link and doesn't send an e-mail if
after the .de is something appended. 









Test script:
---
html

body

?php

// The first mail is sent, the second not.

phpinfo(-1);

mail( to...@ku-ett.de, Good Link, http://www.ku-ett.de;);

mail( to...@ku-ett.de, Bad Link, http://www.ku-ett.de.ms;);

?

/body

/html


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



Bug #54444 [Com]: Multiple Queries on a single conenction

2011-05-10 Thread peter dot colclough at toolstation dot com
Edit report at http://bugs.php.net/bug.php?id=5edit=1

 ID: 5
 Comment by: peter dot colclough at toolstation dot com
 Reported by:peter dot colclough at toolstation dot com
 Summary:Multiple Queries on a single conenction
 Status: Bogus
 Type:   Bug
 Package:MySQLi related
 Operating System:   Ubuntu 10 64 bit
 PHP Version:5.3SVN-2011-04-01 (SVN)
 Block user comment: N
 Private report: N

 New Comment:

True... but it doesn't do this ($conn is a connection) ... and don't
copy this code.. its not good.. but gets the point across:





$basesql = 'SELECT SQL_NO_CACHE id from table1 ';

$baseqry = bmysqli_query($basesql, $conn);



$qry  = bmysqli_query('Select SQL_NO_CACHE * from table2 where id2 = ?
',$conn);

$qry1 = bmysqli_query('Select SQL_NO_CACHE * from table3 where id3 = ?
',$conn);

$qry2 = bmysqli_query('Select SQL_NO_CACHE * from table4 where id4 = ?
',$conn);



while(TRUE){

   $nBaseRes = bmysqli_fetch($baseqry);

   if(empty($nBaseRes)){

   break;

   }

   $aId  = array(0 =$nBaseRes['id']);

   // The first bound query

   bmysqli_execute($qry, $aId);

   $nRes  = bmysqli_fetch($qry);

   $aVals = array(0=$nRes['id2']);



   bmysqli_execute($qry1, $aVals);  



while(TRUE){// careful Peter

$nRes1 = bmysqli_fetch($qry1);

if(empty($nRes1)){

break;

}



$aItems = array(0 = $nRes1['id3']);



bmysqli_execute($qry2, $aItems);



while(TRUE){// careful Peter

   $nRes2 = bmysqli_fetch($qry2);

   if(empty($nRes2)){

break;

   }







}





}


Previous Comments:

[2011-05-09 17:00:40] u...@php.net

Hmm, you can prepare as many statements as you want per connection. But
once you have executed a statement on a connection you must fetch its
results before you can execute another statement. The result set
blocks the line. 



You can, of course, do an implicit fetch on the C level upon execute but
that's the exact opposite of the default fetch method (unbuffered) used
for prepared statements by MySQL. 



Its a one-liner to do that fetch in user land. No need for changes on
the C level.



$mysqli = new mysqli(localhost, root, root, test);

$stmt1 = $mysqli-prepare(SELECT 1 AS _one FROM DUAL);

$stmt2 = $mysqli-prepare(SELECT 2 AS _two FROM DUAL);



/* execute */

if (!$stmt1-execute())

  printf([001] [%d] %s\n, $stmt1-errno, $stmt1-error);



/* clear line by fetching result set */

$res1 = $stmt1-get_result();





/* execute */

if (!$stmt2-execute())

  printf([002] [%d] %s\n, $stmt2-errno, $stmt2-error);



/* clear line by fetching result set */

$res2 = $stmt2-get_result();



/* fetching second first */

while ($row = $res2-fetch_assoc())

  var_dump($row);

$res2-free();



while ($row = $res1-fetch_assoc())

  var_dump($row);

$res1-free();


[2011-05-09 16:35:37] peter dot colclough at toolstation dot com

Thanks for teh feedback. I was also getting that error, just wanted to
make sure it wasn't 'me'... but actually expected behaviour.



Am now devbeloping my own, that allows multiple statements per
connection, as well as multiple 'prepare' statements. This will be open
sourced when ready.



The current mysqli interface should have been able to do this, but it
was obviously decided not to allow it... which is a bit of a pain.



Thanks again for your input


[2011-05-09 16:14:45] u...@php.net

You can answer this question yourself by adding a bit of error handling
to your script such as ...



$mysqli = new mysqli(localhost, root, root, test);

$stmt1 = $mysqli-prepare(SELECT 1 AS _one FROM DUAL);

$stmt2 = $mysqli-prepare(SELECT 2 AS _two FROM DUAL);



if (!$stmt1-execute() || !($meta1 = $stmt2-result_metadata()))

  printf([001] [%d] %s\n, $stmt1-errno, $stmt1-error);



if (!$stmt2-execute() || !($meta2 = $stmt2-result_metadata()))

  printf([002] [%d] %s\n, $stmt2-errno, $stmt2-error);





... and the answer is:



[002] [2014] Commands out of sync; you can't run this command now


[2011-04-01 16:13:48] peter dot colclough at toolstation dot com

Description:

Hi, trying to build a generic DB object handler for mySqli, and have hit
an issue where we can't have more than one open query on the same
connection. Is this a bug or 'expected behaviour'?

Looking at the mysqli.c source code, it looks like it should have been
possible, but it looks like the second object overwrites the first...



I have put a sample snippet below

Bug #54444 [Com]: Multiple Queries on a single conenction

2011-05-09 Thread peter dot colclough at toolstation dot com
Edit report at http://bugs.php.net/bug.php?id=5edit=1

 ID: 5
 Comment by: peter dot colclough at toolstation dot com
 Reported by:peter dot colclough at toolstation dot com
 Summary:Multiple Queries on a single conenction
 Status: Bogus
 Type:   Bug
 Package:MySQLi related
 Operating System:   Ubuntu 10 64 bit
 PHP Version:5.3SVN-2011-04-01 (SVN)
 Block user comment: N
 Private report: N

 New Comment:

Thanks for teh feedback. I was also getting that error, just wanted to
make sure it wasn't 'me'... but actually expected behaviour.



Am now devbeloping my own, that allows multiple statements per
connection, as well as multiple 'prepare' statements. This will be open
sourced when ready.



The current mysqli interface should have been able to do this, but it
was obviously decided not to allow it... which is a bit of a pain.



Thanks again for your input


Previous Comments:

[2011-05-09 16:14:45] u...@php.net

You can answer this question yourself by adding a bit of error handling
to your script such as ...



$mysqli = new mysqli(localhost, root, root, test);

$stmt1 = $mysqli-prepare(SELECT 1 AS _one FROM DUAL);

$stmt2 = $mysqli-prepare(SELECT 2 AS _two FROM DUAL);



if (!$stmt1-execute() || !($meta1 = $stmt2-result_metadata()))

  printf([001] [%d] %s\n, $stmt1-errno, $stmt1-error);



if (!$stmt2-execute() || !($meta2 = $stmt2-result_metadata()))

  printf([002] [%d] %s\n, $stmt2-errno, $stmt2-error);





... and the answer is:



[002] [2014] Commands out of sync; you can't run this command now


[2011-04-01 16:13:48] peter dot colclough at toolstation dot com

Description:

Hi, trying to build a generic DB object handler for mySqli, and have hit
an issue where we can't have more than one open query on the same
connection. Is this a bug or 'expected behaviour'?

Looking at the mysqli.c source code, it looks like it should have been
possible, but it looks like the second object overwrites the first...



I have put a sample snippet below of what I am trying to achieve if
this helps.



Any help greatly appreciated



OS: 2.6.32-21-generic #32-Ubuntu SMP Fri Apr 16 08:09:38 UTC 2010 x86_64
GNU/Linux

PHP Version = 5.3.2-1ubuntu4.5







Test script:
---
-- Code Snippet -

$sqlstock = 'select foo1 from bar1 where foo1 =?';

$sqltime  = 'select foo2, foo3 from bar2 where foo4 =?';



$varinp = ;

$abindVars = array(0=$varinp);



$varProd = '';

$conn = dbi-db_conn;

$sprod = '';

$timestart = microtime_float();



// Get a statement

$aRes = array();

$aRes2 = array();



// Init 2 Statements

$stmt  = mysqli_stmt_init($conn);

$stmt2  = mysqli_stmt_init($conn);



// Prepare 2 statements

mysqli_stmt_prepare($stmt,$sqlstock);

mysqli_stmt_prepare($stmt2,$sqltime);



// Set the bind variable

$varinp = PXX00019263;



// Bind the statements  

mysqli_stmt_bind_param($stmt,'s', $varinp);

mysqli_stmt_bind_param($stmt2,'s', $varinp);



// Execute - Second one fails   

mysqli_stmt_execute($stmt);

mysqli_stmt_execute($stmt2);



// Set up field Defs

$aFieldDefs = array();

$aFieldDefs2 = array();



// Get result Metadata

$result = mysqli_stmt_result_metadata($stmt);

$result2 = mysqli_stmt_result_metadata($stmt2);





$nCount = 0;

while($aFieldDefs[$nCount] = mysqli_fetch_field($result)){

echo('Field = '.print_r($aFieldDefs, true).\r\n);

$aRes[$aFieldDefs[$nCount++]-name] = null;

}



$nCount = 0;

while($aFieldDefs2[$nCount] = mysqli_fetch_field($result2)){

echo('Field = '.print_r($aFieldDefs2, true).\r\n);

$aRes2[$aFieldDefs2[$nCount++]-name] = null;

}



// Bind Results

mysqli_stmt_bind_result($stmt, $aRes['foo1']);

mysqli_stmt_bind_result($stmt2, $aRes2['foo2'], $aRes2['foo3'])

// Fetch Results

mysqli_stmt_fetch($stmt);

mysqli_stmt_fetch($stmt2);



echo(print_r($aRes, true).\r\n);

echo(print_r($aRes2, true).\r\n);

--- End Code Snippet --

Expected result:

Array

(

[foo1] = 'PXX00019263'

)



Array

(

[foo2] = 2009-09-15 12:05:02

[foo3] = -00-00 00:00:00

)



Actual result:
--
Array

(

[foo1] = 

)



Array

(

[foo2] = 2009-09-15 12:05:02

[foo3] = -00-00 00:00:00

)








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


[PHP-BUG] Bug #54547 [NEW]: wrong equality of string numbers

2011-04-16 Thread peter dot ritt at gmx dot net
From: 
Operating system: linux
PHP version:  5.3.6
Package:  Unknown/Other Function
Bug Type: Bug
Bug description:wrong equality of string numbers

Description:

comparison of strings using == shows wrong results when both strings are
numbers (digits) around PHP_MAX_INT;

the same comparison using === works correctly;

tested on 64 bit systems only, affects also PHP 5.3.5

Test script:
---
$a = '9223372036854775807';

$b = '9223372036854775808';

if ($a == $b) {

echo $a == $b\n;

}

else {

echo $a != $b\n;

}

// displays 9223372036854775807 == 9223372036854775808



Expected result:

should display

9223372036854775807 != 9223372036854775808

Actual result:
--
displays

9223372036854775807 == 9223372036854775808

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



[PHP-BUG] Bug #54444 [NEW]: Multiple Queries on a single conenction

2011-04-01 Thread peter dot colclough at toolstation dot com
From: 
Operating system: Ubuntu 10 64 bit
PHP version:  5.3SVN-2011-04-01 (SVN)
Package:  MySQLi related
Bug Type: Bug
Bug description:Multiple Queries on a single conenction

Description:

Hi, trying to build a generic DB object handler for mySqli, and have hit an
issue where we can't have more than one open query on the same connection.
Is this a bug or 'expected behaviour'?

Looking at the mysqli.c source code, it looks like it should have been
possible, but it looks like the second object overwrites the first...



I have put a sample snippet below of what I am trying to achieve if
this helps.



Any help greatly appreciated



OS: 2.6.32-21-generic #32-Ubuntu SMP Fri Apr 16 08:09:38 UTC 2010 x86_64
GNU/Linux

PHP Version = 5.3.2-1ubuntu4.5







Test script:
---
-- Code Snippet -

$sqlstock = 'select foo1 from bar1 where foo1 =?';

$sqltime  = 'select foo2, foo3 from bar2 where foo4 =?';



$varinp = ;

$abindVars = array(0=$varinp);



$varProd = '';

$conn = dbi-db_conn;

$sprod = '';

$timestart = microtime_float();



// Get a statement

$aRes = array();

$aRes2 = array();



// Init 2 Statements

$stmt  = mysqli_stmt_init($conn);

$stmt2  = mysqli_stmt_init($conn);



// Prepare 2 statements

mysqli_stmt_prepare($stmt,$sqlstock);

mysqli_stmt_prepare($stmt2,$sqltime);



// Set the bind variable

$varinp = PXX00019263;



// Bind the statements  

mysqli_stmt_bind_param($stmt,'s', $varinp);

mysqli_stmt_bind_param($stmt2,'s', $varinp);



// Execute - Second one fails   

mysqli_stmt_execute($stmt);

mysqli_stmt_execute($stmt2);



// Set up field Defs

$aFieldDefs = array();

$aFieldDefs2 = array();



// Get result Metadata

$result = mysqli_stmt_result_metadata($stmt);

$result2 = mysqli_stmt_result_metadata($stmt2);





$nCount = 0;

while($aFieldDefs[$nCount] = mysqli_fetch_field($result)){

echo('Field = '.print_r($aFieldDefs, true).\r\n);

$aRes[$aFieldDefs[$nCount++]-name] = null;

}



$nCount = 0;

while($aFieldDefs2[$nCount] = mysqli_fetch_field($result2)){

echo('Field = '.print_r($aFieldDefs2, true).\r\n);

$aRes2[$aFieldDefs2[$nCount++]-name] = null;

}



// Bind Results

mysqli_stmt_bind_result($stmt, $aRes['foo1']);

mysqli_stmt_bind_result($stmt2, $aRes2['foo2'], $aRes2['foo3'])

// Fetch Results

mysqli_stmt_fetch($stmt);

mysqli_stmt_fetch($stmt2);



echo(print_r($aRes, true).\r\n);

echo(print_r($aRes2, true).\r\n);

--- End Code Snippet --

Expected result:

Array

(

[foo1] = 'PXX00019263'

)



Array

(

[foo2] = 2009-09-15 12:05:02

[foo3] = -00-00 00:00:00

)



Actual result:
--
Array

(

[foo1] = 

)



Array

(

[foo2] = 2009-09-15 12:05:02

[foo3] = -00-00 00:00:00

)



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



Req #36424 [Com]: Keeping reference info through recursive calls to serialize()

2010-12-10 Thread peter at desk dot nl
Edit report at http://bugs.php.net/bug.php?id=36424edit=1

 ID: 36424
 Comment by: peter at desk dot nl
 Reported by:mastabog at hotmail dot com
 Summary:Keeping reference info through recursive calls to
 serialize()
 Status: Assigned
 Type:   Feature/Change Request
 Package:Unknown/Other Function
 Operating System:   *
 PHP Version:5.2.14-dev
 Assigned To:mike
 Block user comment: N
 Private report: N

 New Comment:

I've just been bitten by this bug (in php 5.3.3), cost me half a day to
figure it out... it's highly annoying because I can't go back to using
__sleep and __wakeup without much rewriting, and while working around it
is feasible, it's pretty hacky in my situation.



what has happened to the patch mentioned in may ? was it ever committed
?


Previous Comments:

[2010-05-26 09:24:41] m...@php.net

Automatic comment from SVN on behalf of mike
Revision: http://svn.php.net/viewvc/?view=revisionamp;revision=299770
Log: Added support for object references in recursive serialize() calls.
FR #36424


[2010-05-21 13:08:07] mastabog at hotmail dot com

I still don't understand why this is not seen as a bug. My example shows
that without implements Serializable object references are honoured
(as expected) while with implements Serializable object references are
broken (which is unexpected).



Seeing you classified this as feature request makes me think that
breaking object references was actually intended behaviour or that there
is a way to maintain object references when implementing Serializable.
Can you then please provide the body of the serialize() and
unserialize() methods in class A in the example below that will maintain
object references as expected, i.e. $new_oC-A === $new_oC-B-A?



class A implements Serializable

{

public function serialize ()

{

[...]

}



function unserialize($serialized)

{

[...]

}

}



class B extends A

{

public $A;

}



class C extends A

{

public $A;

public $B;

}



$oC = new C();

$oC-A = new A();

$oC-B = new B();

$oC-B-A = $oC-A;



echo $oC-A === $oC-B-A ? yes : no, \n; 

$ser = serialize($oC);

$new_oC = unserialize($ser);

echo $new_oC-A === $new_oC-B-A ? yes : no, \n;


[2010-05-21 11:19:54] m...@php.net

Reclassified as Change Request.



JFYI: http://news.php.net/php.internals/48369


[2010-05-20 23:21:02] mastabog at hotmail dot com

Why has the status of this been changed to bogus?



Are we to understand that the devs regard this as being intended
behaviour, i.e. the Serializable interface breaks object references of
objects implementing it?



The initial reproduce code shows that what was an object reference
before is no longer a reference after unserialization ... this is a bug.
There may be other (better) reproduce codes but the bug is still there.
Why not try and fix it?



Well, I tried but I think I will give up ... it's been 4+ years!


[2010-05-20 18:31:13] mastabog at hotmail dot com

If you remove implements Serializable then it works as expected and
the reproduce code shows that. Revealing the bug was what my report was
about.



It's a bug. It surprises me that nobody wants to fix it after more than
4 years ... apparently it's just me that considers this bug to be
important which is why I still avoid using the Serializable interface
altogether. It's unreliable.




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/bug.php?id=36424


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


Bug #52452 [Com]: Curl cannt work

2010-11-03 Thread peter dot bailey97 at ntlworld dot com
Edit report at http://bugs.php.net/bug.php?id=52452edit=1

 ID: 52452
 Comment by: peter dot bailey97 at ntlworld dot com
 Reported by:bluephp at gmail dot com
 Summary:Curl cannt work
 Status: Closed
 Type:   Bug
 Package:cURL related
 Operating System:   windows 2003 server
 PHP Version:5.2.14
 Assigned To:pajoye
 Block user comment: N

 New Comment:

I'm having the same problem with both the windows installer and the
zipped up binaries.



Apache error log reports:

PHP Warning:  PHP Startup: Unable to load dynamic library
'{obscured}php_curl.dll' - The specified module could not be found.\r\n
in Unknown on line 0



I replaced the 5.2.14 php_curl.dll (stamped 21/07/10 18:44) with the old
backup I had from 5.2.6 and the problem appears to go away. I'm not that
comfortable with swapping in such an old DLL though.


Previous Comments:

[2010-11-01 05:00:36] time_4_a_break at yahoo dot com

Search your computer for a valid zlib.dll file.  I used the version that
came with Macromedia Dreamweaver 8.  No error.


[2010-10-24 21:46:33] paj...@php.net

Fetch the releases from  http://windows.php.net/download/ 


[2010-10-24 20:47:55] spencer19_82 at hotmail dot com

Hi,



I don't understand why the status of this bug is Closed. The problem
still exists 

in 5.2.14. 



Has a patch been released, if so where? If not, what is the workaround?




Thanks,



RS


[2010-10-19 13:48:33] pankaj dot jangid at gmail dot com

The CURL in my installation is still not working. I tool 2010-07-27
5.2.14 release. I have tried putting zlib 1.2.5 as well as zlib 1.2.3 in
to C:\WINDOWS\System32 directory.


[2010-10-19 13:22:07] pankaj dot jangid at gmail dot com

The binaries on the main PHP download page
(http://php.net/downloads.php) still contain the bug (build date :
2007-07-21).



People are downloading a buggy releases and cribbing about PHP. Please
fix that. That's just an HTML edit.




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/bug.php?id=52452


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


Bug #51695 [Com]: CLI interactive mode broken without readline/editline

2010-08-18 Thread peter at niederlag dot de
Edit report at http://bugs.php.net/bug.php?id=51695edit=1

 ID: 51695
 Comment by: peter at niederlag dot de
 Reported by:IMadeThisUpForBugzilla at yahoo dot com
 Summary:CLI interactive mode broken without
 readline/editline
 Status: Open
 Type:   Bug
 Package:CGI related
 Operating System:   Windows XP SP 3
 PHP Version:5.3.2
 Block user comment: N

 New Comment:

unfortunatly as of now this makes the interactive shell mostly useless
for debian users. :-


Previous Comments:

[2010-05-02 00:35:50] geiss...@php.net

This can be reproduced by building the CLI SAPI without
readline/editline support (like we currently do at Debian because of an
editline bug.)



One has to send an EOF so that the input is processed, but one can not
do anything afterwards: php exits.


[2010-04-29 12:07:45] IMadeThisUpForBugzilla at yahoo dot com

Description:

Run php at the command line in Windows in interactive mode (php -a),
echo something, nothing happens until the process is ended (see test
script for example command line session). Doesn't work in PHP 5.3.X.
Does work in PHP 5.2.X.



Tried Zend build, version shipped with eclipse, and version distributed
on windows.php.net VC6 and VC9.

Test script:
---
c:\php .\php.exe -an

Interactive mode enabled



?php

echo 'hi';

^Z

hi

c:\php 



Expected result:

Session example included. Should output the string 'hi' to the console
after echo 'hi'; (this is correct in PHP 5.2.X)

Actual result:
--
Nothing output after executing echo 'hi'; line. See test script for
example session at command line.






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


Bug #51630 [Opn-Csd]: Can't call userland functions from __sleep()

2010-06-18 Thread peter dot dishman at telephoneticsvip dot co dot uk
Edit report at http://bugs.php.net/bug.php?id=51630edit=1

 ID:   51630
 User updated by:  peter dot dishman at telephoneticsvip dot co dot uk
 Reported by:  peter dot dishman at telephoneticsvip dot co dot uk
 Summary:  Can't call userland functions from __sleep()
-Status:   Open
+Status:   Closed
 Type: Bug
 Package:  Session related
 Operating System: Windows XP SP2
 PHP Version:  5.2.13

 New Comment:

I've tried this again, and it appears to be caused by apc. If I disable
apc, the 

problem goes away.

I'm not on the latest version of apc so am closing this bug.


Previous Comments:

[2010-05-01 15:31:39] peter dot dishman at telephoneticsvip dot co dot
uk

There don't seem to be any snapshots available at that windows url?


[2010-04-30 01:26:53] fel...@php.net

Please try using this snapshot:

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

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

I cannot reproduce it on 5.2.14-dev.


[2010-04-22 10:49:03] peter dot dishman at telephoneticsvip dot co dot
uk

Description:

Prior to v5.2.10 you could call userland functions in the magic method 

__sleep(). Now in 5.2.10, .11, .12 and .13 I just get a fatal error
undefined 

function when I try to do so.



I've tested this in 5.3.2 and it works correctly as it does in 5.2.9 and
before.



This is running on the standard 5.2.13 TS VS6 build and my session
configuration 

is: 

[Session]

session.save_handler = files

session.save_path = c:/php/tmp

session.use_cookies = 1

session.use_only_cookies = 1

session.name = sID

session.auto_start = 0

session.cookie_lifetime = 0

session.cookie_path = /

session.cookie_domain =

session.cookie_httponly = 

session.serialize_handler = php

session.gc_probability = 1

session.gc_divisor = 1000

session.gc_maxlifetime = 9000

session.bug_compat_42 = 0

session.bug_compat_warn = 1

session.referer_check =

session.entropy_length = 0

session.entropy_file =

session.cache_limiter = nocache

session.cache_expire = 180

session.use_trans_sid = 0

session.hash_function = 0

session.hash_bits_per_character = 5

url_rewriter.tags = 

a=href,area=href,frame=src,input=src,form=,fieldset=,iframe=src

Test script:
---
?php

function inc ($foo) {

return ($foo + 1);

}



class foo {

function __construct() {

$this-bar = 0;

}

function __sleep() {

$this-bar = inc($this-bar);

return array('bar');

}   

public $bar;

}



session_start();

if (!isset($_SESSION['foo'])) {

$_SESSION['foo'] = new foo();

}

$foo = $_SESSION['foo'];



echo foo-bar = .$foo-bar.br;

?

Expected result:

As you refresh the page given by the script, you should just see the
number 

increment each time with no errors generated.

Actual result:
--
In 5.2.13, after refreshing the page you get:

Fatal error: Call to undefined function inc() in C:\test\sleeptest.php
on line 12 



This worked correctly in 5.2.9 and before, and also works in 5.3.2






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


[PHP-BUG] Bug #52102 [NEW]: PHP5 under Apache2 on 64 bit system is not completely 64 bit

2010-06-16 Thread peter at ubuntu dot com
From: 
Operating system: Ubuntu 10.04
PHP version:  5.3.2
Package:  Apache related
Bug Type: Bug
Bug description:PHP5 under Apache2 on 64 bit system is not completely 64 bit

Description:

Something in PHP5 running under apache2 under Ubuntu 9.10 is not fully 64
bit 

aware on a 64 bit system. PHP scripts run under Apache correctly under
Ubuntu 

8.04 (PHP 5.2.4). Under Ubuntu 9.10 (PHP 5.2.10) and 10.04 (PHP 5.3.2),
some 

place a value is being treated as 32 bits on a 64 bit system and is
wrapping 

instead of using full 64 bits. Related to sending large data ( 4G) in
response 

to an HTTP post request.



Did not test with Ubuntu 8.10 or 9.04 - both PHP 5.2.6.



What happens: Data aborts based on wrap. Calculated number of bytes to be
served 

are correct (4G) as listed in the HTTP length header. Actual bytes served
are 

(size)  0x instead of (size)  0x on 64 bit
system.



Most of data is being transfered via fpassthru($openFileHandle) call,
providing 

4G bytes of data.

Test script:
---
?php 

header(Connection: close);

// NOTE:  File test.txt needs to be more than 2^32 bytes.  Pick a large
file, over 0x1 bytes 

//in size, such as
http://cdimage.debian.org/debian-cd/5.0.4/amd64/iso-dvd/debian-504-amd64-DVD-1.iso


$name = /var/www/test.txt;

$fs = filesize($name);

$fp = fopen($name,'rb');

$httpByteLen = $fs;

header(Connection: close);

header(Content-Type: application/octet-stream);

header(Content-Length:  . $httpByteLen);

header(HTTP/1.1 200 OK);

set_time_limit(0);

fpassthru($fp);

exit;

?

Expected result:

The entire ISO file to be downloaded.

Actual result:
--
Tested using the test script (attached), and using the suggested debian dvd
.iso 

image as the input file.  The ISO is 4,697,126,912 bytes. Download socket
is 

closed after 402,159,616 bytes, which again is the file size  0x.

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



Bug #51159 [Com]: session_set_save_handler Memory Corruption

2010-05-26 Thread info at das-peter dot ch
Edit report at http://bugs.php.net/bug.php?id=51159edit=1

 ID:   51159
 Comment by:   info at das-peter dot ch
 Reported by:  achristianson at yakabod dot com
 Summary:  session_set_save_handler Memory Corruption
 Status:   Open
 Type: Bug
 Package:  Scripting Engine problem
 Operating System: CentOS 5.4
 PHP Version:  5.3.1

 New Comment:

Hi there,



can confirm this behavior with gc enabled/disabled.

My current installation:

php 5.3.2 for win x86 [API220090626,TS,VC6 ]

Compiler VC6, thread safe



Run under Apache 2.2



Cheers,

Peter


Previous Comments:

[2010-03-01 12:46:00] achristianson at yakabod dot com

We tried with GC off and we get the same result.


[2010-02-28 16:52:02] j...@php.net

Try turn garbage collection of so we know if it's that.. zend.enable_gc
= off, IIRC. :)


[2010-02-26 19:08:01] achristianson at yakabod dot com

We tried this with Zend MM and garbage collection turned on and off. No


change in result.


[2010-02-26 18:49:11] achristianson at yakabod dot com

Small typo: I put 5.2.1 and 5.2.3RC3 text along with my backtraces. I 

meant to type 5.3.1 and 5.3.2RC3 respectively.


[2010-02-26 18:39:55] achristianson at yakabod dot com

Description:

Use of session_set_save_handler seems to cause memory corruption under 

certain conditions.



Inside of _write, there is code that causes a fatal error. The 

corruption seems to not happen if this is removed.



I get the problem in both 5.3.1 and 5.3.2RC3

Reproduce code:
---
?php

session_set_save_handler('_open', '_close', '_read', '_write',
'_destroy', '_gc');

session_start();

session_write_close();

function _write() {

  self::$x = null;

}

function _destroy() {}

function _gc() {}

function _open() {}

function _close() {}

function _read() {}

for($i = 0; $i  1; $i++)

{

  $exampleArray[] = new C();

}

class C { }



Expected result:

No segmentation fault

Actual result:
--
5.2.1 backtrace:



Program received signal SIGSEGV, Segmentation fault.

0x014899c0 in ZEND_ASSIGN_SPEC_CV_CONST_HANDLER 

(execute_data=0x9a6ee80) at /root/php-5.3.1/Zend/zend_execute.c:302

302zval ***ptr = CV_OF(node-u.var);

(gdb) bt

#0  0x014899c0 in ZEND_ASSIGN_SPEC_CV_CONST_HANDLER 

(execute_data=0x9a6ee80) at /root/php-5.3.1/Zend/zend_execute.c:302

#1  0x0142d55d in execute (op_array=0x9a0e260) at /root/php-

5.3.1/Zend/zend_vm_execute.h:104

#2  0x0140bd57 in zend_execute_scripts (type=8, retval=0x0, 

file_count=3) at /root/php-5.3.1/Zend/zend.c:1194

#3  0x013bbf4e in php_execute_script (primary_file=0xbfa7c8c0) at 

/root/php-5.3.1/main/main.c:2225

#4  0x0148ad2b in php_handler (r=0x9a56160) at /root/php-

5.3.1/sapi/apache2handler/sapi_apache2.c:648

#5  0x08077bf3 in ap_invoke_handler ()

#6  0x080868df in ap_process_request ()

#7  0x080839e8 in ?? ()

#8  0x09a56160 in ?? ()

#9  0x0004 in ?? ()

#10 0x09a56160 in ?? ()

#11 0x0987c2f8 in ?? ()

#12 0x0002 in ?? ()

#13 0x09a43be8 in ?? ()

#14 0xbfa7c9c8 in ?? ()

#15 0x0807ff45 in ap_process_connection ()



5.2.3RC3 backtrace:



Program received signal SIGSEGV, Segmentation fault.

_zval_ptr_dtor (zval_ptr=0xbf900928) at /root/php-

5.3.2RC3/Zend/zend.h:385

385return --pz-refcount__gc;

(gdb) bt

#0  _zval_ptr_dtor (zval_ptr=0xbf900928) at /root/php-

5.3.2RC3/Zend/zend.h:385

#1  0x014674fc in zend_do_fcall_common_helper_SPEC 

(execute_data=0x8558d30) at /root/php-5.3.2RC3/Zend/zend_execute.h:316

#2  0x01441b3d in execute (op_array=0x84f66d0) at /root/php-

5.3.2RC3/Zend/zend_vm_execute.h:104

#3  0x01420207 in zend_execute_scripts (type=8, retval=0x0, 

file_count=3) at /root/php-5.3.2RC3/Zend/zend.c:1194

#4  0x013cfe7e in php_execute_script (primary_file=0xbf902c10) at 

/root/php-5.3.2RC3/main/main.c:2260

#5  0x0149f22b in php_handler (r=0x853e5b8) at /root/php-

5.3.2RC3/sapi/apache2handler/sapi_apache2.c:655

#6  0x08077bf3 in ap_invoke_handler ()

#7  0x080868df in ap_process_request ()

#8  0x080839e8 in ?? ()

#9  0x0853e5b8 in ?? ()

#10 0x0004 in ?? ()

#11 0x0853e5b8 in ?? ()

#12 0x08388758 in ?? ()

#13 0x0002 in ?? ()

#14 0x0852c040 in ?? ()

#15 0xbf902d18 in ?? ()

#16 0x0807ff45 in ap_process_connection ()






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


Bug #51298 [Com]: Error when loading php5apache2_2.dll

2010-05-25 Thread peter dot martin at spam dot la
Edit report at http://bugs.php.net/bug.php?id=51298edit=1

 ID:   51298
 Comment by:   peter dot martin at spam dot la
 Reported by:  trotsky_icepick at hotmail dot com
 Summary:  Error when loading php5apache2_2.dll
 Status:   Assigned
 Type: Bug
 Package:  Apache2 related
 Operating System: Windows Vista SP2
 PHP Version:  5.3.2
 Assigned To:  pajoye

 New Comment:

I've got faulting module php5ts.dll error while starting the Apache
server with PHP and Postgres in following instalation:

- httpd-2.2.15-win32-x86-openssl-0.9.8m-r2.msi

- php-5.3.2-Win32-VC6-x86.zip

httpd.conf:

- nothing unusual configured

php.ini configuration:

- set up my own php error log file error_log = C:/PHP/logs/error.log

- uncomment PgSQL extension



The solution for this was to modify httpd.conf as follows:

LoadModule php5_module C:/PHP/php5apache2_2.dll

PHPIniDir C:/PHP

# added

Loadfile C:/PHP/php5ts.dll 

Loadfile C:/PHP/libpq.dll



Try it and send response...:)


Previous Comments:

[2010-05-19 17:18:00] paj...@php.net

If you feel like you can fix this bug within days, heh, please go ahead.


[2010-05-19 17:10:33] williams at uncc dot edu

There is still a problem with the Windows PHP binaries.  From 4/19
pajoye seems to believe it is a date bug to fix as soon as possible.
It has been a month!



I have php-5.3.2-Win32-VC6-x86 and httpd-2.2.15-win32-x86-no_ssl
installed.  If I run phpinfo() (in web page) more than once (first run -
get results, second or later runs within a few seconds - get crash) I
get this error message:



AppName httpd.exe  AppVer 2.2.15.0  ModName php5ts.dll

ModVer 5.3.2.0  offset 001d79b5



I have searched for other versions of php5ts.dll - none

I have NOT mixed vc9 PHP with Apache



PHP seems to run okay in command-line, ie I can run phpinfo() in cmd box
with no problem.  I If run as test web page I get the error.



Here are php -m /php -m -n results:



C:\php -m

[PHP Modules]

bcmath

calendar

com_dotnet

Core

ctype

date

dom

ereg

filter

ftp

hash

iconv

json

libxml

mcrypt

mhash

mysqlnd

odbc

pcre

PDO

Phar

Reflection

session

SimpleXML

SPL

standard

tokenizer

wddx

xml

xmlreader

xmlwriter

zip

zlib



[Zend Modules]





C:\php -m -n

[PHP Modules]

bcmath

calendar

com_dotnet

Core

ctype

date

dom

ereg

filter

ftp

hash

iconv

json

libxml

mcrypt

mhash

mysqlnd

odbc

pcre

PDO

Phar

Reflection

session

SimpleXML

SPL

standard

tokenizer

wddx

xml

xmlreader

xmlwriter

zip

zlib



[Zend Modules]



I have disabled all but core modules.


[2010-04-30 15:43:09] slowchaos at msn dot com

Update I have Apached 2.2.15 and PHP 5.3.2 running just fine (WinXP
system). I'm not sure of the difference in 5.2 and 5.3 - I'm not a nuts
and bolts php guy - but all is now well in my world :)


[2010-04-30 06:55:02] slowchaos at msn dot com

Had this problem with Apache 2.2.15 and PHP 5.2.13. Tried rolling back
to earlier versions of PHP - back to PHP 5.2.10. Same thing. Rolled back
to Apache 2.2.14 - still same issue. My apache crashes when trying to
enable mysqli or mysql extension. System path is correct. Libmysql is in
appropriate place. Mcrypt also crashes the server as well as a few
others.


[2010-04-20 01:48:09] paj...@php.net

It happens to be a date bug (thread safety issue). We are trying to get
a fix as soon as possible.




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/bug.php?id=51298


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


Bug #51630 [Fbk-Opn]: Can't call userland functions from __sleep()

2010-05-01 Thread peter dot dishman at telephoneticsvip dot co dot uk
Edit report at http://bugs.php.net/bug.php?id=51630edit=1

 ID:   51630
 User updated by:  peter dot dishman at telephoneticsvip dot co dot uk
 Reported by:  peter dot dishman at telephoneticsvip dot co dot uk
 Summary:  Can't call userland functions from __sleep()
-Status:   Feedback
+Status:   Open
 Type: Bug
 Package:  Session related
 Operating System: Windows XP SP2
 PHP Version:  5.2.13

 New Comment:

There don't seem to be any snapshots available at that windows url?


Previous Comments:

[2010-04-30 01:26:53] fel...@php.net

Please try using this snapshot:

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

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

I cannot reproduce it on 5.2.14-dev.


[2010-04-22 10:49:03] peter dot dishman at telephoneticsvip dot co dot
uk

Description:

Prior to v5.2.10 you could call userland functions in the magic method 

__sleep(). Now in 5.2.10, .11, .12 and .13 I just get a fatal error
undefined 

function when I try to do so.



I've tested this in 5.3.2 and it works correctly as it does in 5.2.9 and
before.



This is running on the standard 5.2.13 TS VS6 build and my session
configuration 

is: 

[Session]

session.save_handler = files

session.save_path = c:/php/tmp

session.use_cookies = 1

session.use_only_cookies = 1

session.name = sID

session.auto_start = 0

session.cookie_lifetime = 0

session.cookie_path = /

session.cookie_domain =

session.cookie_httponly = 

session.serialize_handler = php

session.gc_probability = 1

session.gc_divisor = 1000

session.gc_maxlifetime = 9000

session.bug_compat_42 = 0

session.bug_compat_warn = 1

session.referer_check =

session.entropy_length = 0

session.entropy_file =

session.cache_limiter = nocache

session.cache_expire = 180

session.use_trans_sid = 0

session.hash_function = 0

session.hash_bits_per_character = 5

url_rewriter.tags = 

a=href,area=href,frame=src,input=src,form=,fieldset=,iframe=src

Test script:
---
?php

function inc ($foo) {

return ($foo + 1);

}



class foo {

function __construct() {

$this-bar = 0;

}

function __sleep() {

$this-bar = inc($this-bar);

return array('bar');

}   

public $bar;

}



session_start();

if (!isset($_SESSION['foo'])) {

$_SESSION['foo'] = new foo();

}

$foo = $_SESSION['foo'];



echo foo-bar = .$foo-bar.br;

?

Expected result:

As you refresh the page given by the script, you should just see the
number 

increment each time with no errors generated.

Actual result:
--
In 5.2.13, after refreshing the page you get:

Fatal error: Call to undefined function inc() in C:\test\sleeptest.php
on line 12 



This worked correctly in 5.2.9 and before, and also works in 5.3.2






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


[PHP-BUG] Bug #51630 [NEW]: Can't call userland functions from __sleep()

2010-04-22 Thread peter dot dishman at telephoneticsvip dot co dot uk
From: 
Operating system: Windows XP SP2
PHP version:  5.2.13
Package:  Session related
Bug Type: Bug
Bug description:Can't call userland functions from __sleep()

Description:

Prior to v5.2.10 you could call userland functions in the magic method 

__sleep(). Now in 5.2.10, .11, .12 and .13 I just get a fatal error
undefined 

function when I try to do so.



I've tested this in 5.3.2 and it works correctly as it does in 5.2.9 and
before.



This is running on the standard 5.2.13 TS VS6 build and my session
configuration 

is: 

[Session]

session.save_handler = files

session.save_path = c:/php/tmp

session.use_cookies = 1

session.use_only_cookies = 1

session.name = sID

session.auto_start = 0

session.cookie_lifetime = 0

session.cookie_path = /

session.cookie_domain =

session.cookie_httponly = 

session.serialize_handler = php

session.gc_probability = 1

session.gc_divisor = 1000

session.gc_maxlifetime = 9000

session.bug_compat_42 = 0

session.bug_compat_warn = 1

session.referer_check =

session.entropy_length = 0

session.entropy_file =

session.cache_limiter = nocache

session.cache_expire = 180

session.use_trans_sid = 0

session.hash_function = 0

session.hash_bits_per_character = 5

url_rewriter.tags = 

a=href,area=href,frame=src,input=src,form=,fieldset=,iframe=src

Test script:
---
?php

function inc ($foo) {

return ($foo + 1);

}



class foo {

function __construct() {

$this-bar = 0;

}

function __sleep() {

$this-bar = inc($this-bar);

return array('bar');

}   

public $bar;

}



session_start();

if (!isset($_SESSION['foo'])) {

$_SESSION['foo'] = new foo();

}

$foo = $_SESSION['foo'];



echo foo-bar = .$foo-bar.br;

?

Expected result:

As you refresh the page given by the script, you should just see the number


increment each time with no errors generated.

Actual result:
--
In 5.2.13, after refreshing the page you get:

Fatal error: Call to undefined function inc() in C:\test\sleeptest.php on
line 12 



This worked correctly in 5.2.9 and before, and also works in 5.3.2

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



Req #51229 [Com]: consecutives sorting with usort and uasort

2010-03-10 Thread peter at f-is dot eu
Edit report at http://bugs.php.net/bug.php?id=51229edit=1

 ID:   51229
 Comment by:   peter at f-is dot eu
 Reported by:  kanea at free dot fr
 Summary:  consecutives sorting with usort and uasort
 Status:   Open
 Type: Feature/Change Request
 Package:  Arrays related
 Operating System: All
 PHP Version:  5.2.13

 New Comment:

This behavior is documented:

Note: If two members compare as equal, their order in the sorted array
is undefined.



You should adapt your comparison function so it checks on both a AND b,
in one function.


Previous Comments:

[2010-03-07 17:52:45] kanea at free dot fr

Description:

on an array with collection of the same object

the object have 2 property a et b

Exemple:

[

  object:{a=3, b=2}

  object:{a=0, b=2}

  object:{a=2, b=3}

  object:{a=1, b=2}





If you make a first sort with the good fonction and usort on property a,
you obtain 



[

  object:{a=0, b=2}

  object:{a=1, b=2}

  object:{a=2, b=3}

  object:{a=3, b=2}

]

The result is that you intend



Now if you make a second sort with another function and usort on
property b, you obtain

[

  object:{a=3, b=2}

  object:{a=1, b=2}

  object:{a=0, b=2}

  object:{a=2, b=3}

]

The result is not you can wait. I think that's because the read of the
array is make in inverse way.



A possible solution is to mark the placed elements. And not move
elements not tested before or after them the marked element.



Best Regards





Test script:
---
?php

function compa($a, $b){ if($a['a']$b['a']) return 1; else return
($a['a']$b['a'])?-1:0; }

function compb($a, $b){ if($a['b']$b['b']) return 1; else return
($a['b']$b['b'])?-1:0; }

$a = array(array('a'=1, 'b'=2), array('a'=2, 'b'=3), array('a'=3,
'b'=2), array('a'=0, 'b'=2), array('a'=4, 'b'=2));

usort($a, 'compa');

print_r($a);

usort($a, 'compb');

print_r($a);

?



Expected result:

Array

(

[0] = Array

(

[a] = 0

[b] = 2

)

[1] = Array

(

[a] = 1

[b] = 2

)

[2] = Array

(

[a] = 3

[b] = 2

)

[3] = Array

(

[a] = 2

[b] = 3

)

)



Actual result:
--
Array

(

[0] = Array

(

[a] = 3

[b] = 2

)



[1] = Array

(

[a] = 1

[b] = 2

)



[2] = Array

(

[a] = 0

[b] = 2

)



[3] = Array

(

[a] = 2

[b] = 3

)



)








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


#51009 [NEW]: PDO with pgsql returning NULL when integer expected in prepared query

2010-02-10 Thread peter at allicient dot co dot uk
From: peter at allicient dot co dot uk
Operating system: FreeBSD 8.0
PHP version:  5.2.12
PHP Bug Type: PDO related
Bug description:  PDO with pgsql returning NULL when integer expected in 
prepared query

Description:

When using a prepared SELECT query of the form SELECT table_a.column_id,
table_a.column_some_string FROM table_a LEFT OUTER JOIN table_b ON
(table_a.column_id = table_b.foreign_key_id) - which executes successfully
- there is a problem fetching the results.

Using fetchAll( PDO::FETCH_ASSOC ) returns the rows with the strings
intact but the column_id (integer) as NULL.  PDO::FETCH_BOTH shows that
numerically indexed rows have the column_id as expected but the error still
present when indexed by the column name.

The same query performed via pgadmin3 returns the expected results, and is
the same as PDO::FETCH_NUM so there is definitely a problem with
PDO::FETCH_ASSOC.

Other SELECT queries work as expected, it seems to be related to the LEFT
OUTER JOIN.

It can be coded around but is nonetheless a curious error.

Expected result:

For the PDO::FETCH_ASSOC to return the same data as PDO::FETCH_NUM.


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



#49081 [Com]: DateTime::diff calculates diffs incorrectly

2009-12-15 Thread peter dot schleif at gmx dot de
 ID:   49081
 Comment by:   peter dot schleif at gmx dot de
 Reported By:  nate at frickenate dot com
 Status:   Assigned
 Bug Type: Date/time related
 Operating System: *
 PHP Version:  5.3.0
 Assigned To:  derick
 New Comment:

More simple code to reproduce error:

?php
   date_default_timezone_set('Europe/Berlin');
   $d1 = new DateTime('2010-01-01 06:00:00');
   $d2 = new DateTime('2010-01-31 10:00:00');
   $d  = $d1-diff($d2);
   print_r($d);
?

Expected:
-
   [m] = 0
   [d] = 30

Actual:
---
   [m] = 1
   [d] = 2


Previous Comments:


[2009-07-27 22:55:24] nate at frickenate dot com

Description:

DateTime::diff calculates diffs incorrectly.

As an example, the diff of 2009-01-01 and 2009-03-31 *should be* 2
months, 30 days. 2009-01-01 + 2 months = 2009-03-01, + 30 days =
2009-03-31. Taking 2009-01-01 and using DateTime::add() to add 'P2M30D'
does indeed result in 2009-03-31. This is correct.

However, running the diff() of 2009-01-01 and 2009-03-31 returns 3
months, 2 days. add()ing 2009-01-01 + 'P3M2D' returns 2009-04-03
instead of 2009-03-31 (as it should, since the diff that told us to add
3M2D was incorrect).

Reproduce code:
---
?

$jan_1 = new DateTime('2009-01-01');
$mar_31 = new DateTime('2009-03-31');

var_dump(date_diff($jan_1, $mar_31));
var_dump($jan_1-add(new DateInterval('P2M30D'))); // correct period
var_dump($jan_1-add(new DateInterval('P3M2D')));  // incorrect period

// END EXAMPLE CODE - following is just extra fluff


// here's the replacement function I am currently
// using to calculate the correct diff until the
// built-in method is patched and functional
function date_diff2 ($t1, $t2) {
if (! preg_match('/^\d+\z/', $t1)  ($t1 = strtotime($t1)) ===
false)
return false;

if (! preg_match('/^\d+\z/', $t2)  ($t2 = strtotime($t2)) ===
false)
return false;

if ($t1  $t2)
list($t1, $t2) = array($t2, $t1);

$diffs = array(
'years' = 0, 'months' = 0, 'days' = 0,
'hours' = 0, 'minutes' = 0, 'seconds' = 0,
);

foreach (array_keys($diffs) as $interval) {
while ($t2 = ($t3 = strtotime(+1 ${interval}, $t1))) {
$t1 = $t3;
++$diffs[$interval];
}
}

return $diffs;
}


?

Expected result:

object(DateInterval)#3 (8) {
  [y]=
  int(0)
  [m]=
  int(2)
  [d]=
  int(30)
  [h]=
  int(0)
  [i]=
  int(0)
  [s]=
  int(0)
  [invert]=
  int(0)
  [days]=
  int(89)
}
object(DateTime)#1 (3) {
  [date]=
  string(19) 2009-03-31 00:00:00
  [timezone_type]=
  int(3)
  [timezone]=
  string(16) America/Montreal
}
object(DateTime)#1 (3) {
  [date]=
  string(19) 2009-07-03 00:00:00
  [timezone_type]=
  int(3)
  [timezone]=
  string(16) America/Montreal
}


Actual result:
--
object(DateInterval)#3 (8) {
  [y]=
  int(0)
  [m]=
  int(3)
  [d]=
  int(2)
  [h]=
  int(0)
  [i]=
  int(0)
  [s]=
  int(0)
  [invert]=
  int(0)
  [days]=
  int(89)
}
object(DateTime)#1 (3) {
  [date]=
  string(19) 2009-03-31 00:00:00
  [timezone_type]=
  int(3)
  [timezone]=
  string(16) America/Montreal
}
object(DateTime)#1 (3) {
  [date]=
  string(19) 2009-07-03 00:00:00
  [timezone_type]=
  int(3)
  [timezone]=
  string(16) America/Montreal
}






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



#50199 [Bgs]: date_parse_from_format() fails to parse ISO 8601 date

2009-11-21 Thread peter dot ritt at gmx dot net
 ID:   50199
 User updated by:  peter dot ritt at gmx dot net
 Reported By:  peter dot ritt at gmx dot net
 Status:   Bogus
 Bug Type: Date/time related
 Operating System: *
 PHP Version:  5.3, 6
 New Comment:

double checked docs, only found:
Format accepted by date() with some extras.
no info concerning those extras;
would you mind providing more details in the docs?
thanks


Previous Comments:


[2009-11-19 13:28:11] il...@php.net

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

The c format is not supported by the date_parse_from_format() 
function.



[2009-11-16 23:14:15] peter dot ritt at gmx dot net

Description:

date_parse_from_format refuses to read '2009-11-17T00:08:24+01:00';
error: The format separator does not match

Reproduce code:
---
$d = date('c');
echo $d;
echo \n;
print_r(date_parse_from_format('c', $d));


Expected result:

array with data as specified in function.date-parse-from-format.php

Actual result:
--
Array
(
[year] =
[month] =
[day] =
[hour] =
[minute] =
[second] =
[fraction] =
[warning_count] = 0
[warnings] = Array
(
)

[error_count] = 2
[errors] = Array
(
[0] = The format separator does not match
[1] = Trailing data
)

[is_localtime] =
)






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



#50199 [NEW]: date_parse_from_format won't parse ISO 8601

2009-11-16 Thread peter dot ritt at gmx dot net
From: peter dot ritt at gmx dot net
Operating system: linux
PHP version:  5.3.0
PHP Bug Type: Date/time related
Bug description:  date_parse_from_format won't parse ISO 8601

Description:

date_parse_from_format refuses to read '2009-11-17T00:08:24+01:00';
error: The format separator does not match

Reproduce code:
---
$d = date('c');
echo $d;
echo \n;
print_r(date_parse_from_format('c', $d));


Expected result:

array with data as specified in function.date-parse-from-format.php

Actual result:
--
Array
(
[year] =
[month] =
[day] =
[hour] =
[minute] =
[second] =
[fraction] =
[warning_count] = 0
[warnings] = Array
(
)

[error_count] = 2
[errors] = Array
(
[0] = The format separator does not match
[1] = Trailing data
)

[is_localtime] =
)


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



#50074 [NEW]: wrap-tags Config Option in tidy

2009-11-04 Thread t dot peter at retepsamoht dot de
From: t dot peter at retepsamoht dot de
Operating system: Linux
PHP version:  5.2.11
PHP Bug Type: Feature/Change Request
Bug description:  wrap-tags Config Option in tidy

Description:

I´d really like to have a config option in tidy_parse_string() that
enables/disables wraps within tags. 

This would make code reading much easier, especially for HTML/PHP
Beginners. 

Reproduce code:
---
---
From manual page: book.tidy
---

?php
$html = 'div id=mainmenuspan class=activeHome/span| 
a href=planung.php title=PlanungPlanung/a| 
a href=audio.php title=AudioAudio/a|
a href=video.php title=VideoVideo/a| 
a href=netzwerk.php title=NetzwerkNetzwerk/a| 
a href=service.php title=ServiceService/a| 
a href=shop.php title=ShopShop/a| 
a href=referenzen.php title=ReferenzenReferenzen/a|
a href=kontakt.php title=KontaktKontakt/a| 
a href=impressum.php title=ImpressumImpressum/a| 
a href=agbs.php title=AGBsAGBs/a/div';


$config = array('indent' = TRUE,
'output-xhtml' = TRUE,
'wrap' = 200);

$tidy = tidy_parse_string($html, $config);

print_r($tidy-getConfig());
?


Expected result:

No breaks within tags. Nice and easy to read.

div id=mainmenu
  span class=activeHome/span| 
  a href=planung.php title=PlanungPlanung/a| 
  a href=audio.php title=AudioAudio/a|
  a href=video.php title=VideoVideo/a| 
  a href=netzwerk.php title=NetzwerkNetzwerk/a| 
  a href=service.php title=ServiceService/a| 
  a href=shop.php title=ShopShop/a| 
  a href=referenzen.php title=ReferenzenReferenzen/a|
  a href=kontakt.php title=KontaktKontakt/a| 
  a href=impressum.php title=ImpressumImpressum/a| 
  a href=agbs.php title=AGBsAGBs/a
/div


Actual result:
--
Something like that: Breaks within tags. 


div id=mainmenu
  span class=activeHome/span| a href=planung.php
  title=PlanungPlanung/a| a href=audio.php   
  title=AudioAudio/a|
  a href=video.php title=VideoVideo/a| 
  a href=netzwerk.php title=NetzwerkNetzwerk/a| a  
  href=service.php title=ServiceService/a| a 
  href=shop.php title=ShopShop/a| a href=referenzen.php 
  title=ReferenzenReferenzen/a| a href=kontakt.php 
  title=KontaktKontakt/a| a href=impressum.php  
  title=ImpressumImpressum/a| a href=agbs.php
  title=AGBsAGBs/a
/div


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



#45002 [Com]: __get() and __set() don't work for static variable calls

2009-09-24 Thread peter dot rother at gmail dot com
 ID:   45002
 Comment by:   peter dot rother at gmail dot com
 Reported By:  jb2386 at hotmail dot com
 Status:   Open
 Bug Type: Feature/Change Request
 Operating System: Any
 PHP Version:  5.2.6
 New Comment:

'Twould be seriously nice to have this feature…please let us know if

anything can be done soon.


Previous Comments:


[2009-08-01 15:25:58] atrauzzi at gmail dot com

I'd have to say I'm waiting on this feature as well.

Is there a snapshot I could be using to test it out?



[2009-07-30 21:21:58] some at email dot com

When to expect resolving this bug



[2009-05-13 15:38:49] rcavallari at hotmail dot com

Any news about __{get,set}Static in the mainline?



[2009-01-08 08:51:30] jeremie dot bordier at gmail dot com

Could this patch be reviewed and committed ? It's been a long time now
for a such little feature...



[2008-11-25 03:50:55] cleeder at gmail dot com

How long until we can expect to see this patch in the production
version of PHP?



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

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



#48693 [NEW]: Double declaration of __lambda_func when lambda wrongly formatted

2009-06-25 Thread peter at lvp-media dot com
From: peter at lvp-media dot com
Operating system: n/a
PHP version:  5.3CVS-2009-06-25 (snap)
PHP Bug Type: Scripting Engine problem
Bug description:  Double declaration of __lambda_func when lambda wrongly 
formatted

Description:

When creating a new lambda function using create_function, any code behind
an extra right curly brace (which closes the function) gets executed. This
is known and expected behaviour of eval, so no problem so far. However,
when the function itself does not contain parsing errors, while the code
after it does, the function gets created (and becomes available) while
zend_eval_stringl() returns false. Therefore the function's name,
defaulting to LAMBDA_TEMP_FUNCNAME, will not be changed and any future
calls to create_functions will fail using a fatal error (Cannot redeclare
__lambda_func()). Reproduce code is included.

The echo should output 1, however, the fatal error gets thrown instead.
While this absolutely isn't a problem that (should) occur very often,
fixing it seemed fairly easy so I created two patches.

The first patch checks whether any function named LAMBDA_TEMP_FUNCNAME
exists if zend_eval_stringl() fails, and if it does, renames it to
lambda_%d as would be done if the eval succeeded. After all, the function
itself was fine, so the function name can be returned as well.
zend_eval_stringl() outputs the parse error automatically so the
script-owner gets informed of the problem as well. The second patch is
easier, it simply removes any function called LAMBDA_TEMP_FUNCNAME if it
exists.

PATCH 1:

--- zend_builtin_functions.c2009-06-25 15:23:45.0 +0200
+++ zend_builtin_functions_new.c2009-06-25 15:40:34.0
+0200
@@ -1737,8 +1737,8 @@ ZEND_FUNCTION(create_function)
efree(eval_name);

-   if (retval==SUCCESS) {
+   if (retval==SUCCESS || zend_hash_find(EG(function_table),
LAMBDA_TEMP_FUNCNAME, sizeof(LAMBDA_TEMP_FUNCNAME), (void **)
func)!=FAILURE) {
zend_function new_function, *func;

-   if (zend_hash_find(EG(function_table),
LAMBDA_TEMP_FUNCNAME, sizeof(LAMBDA_TEMP_FUNCNAME), (void **)
func)==FAILURE) {
+   if (retval==SUCCESS  zend_hash_find(EG(function_table),
LAMBDA_TEMP_FUNCNAME, sizeof(LAMBDA_TEMP_FUNCNAME), (void **)
func)==FAILURE) {
zend_error(E_ERROR, Unexpected inconsistency in
create_function());
RETURN_FALSE;

PATCH 2:

--- zend_builtin_functions.c2009-06-25 15:23:45.0
+0200
+++ zend_builtin_functions_new.c2009-06-25 15:23:45.0
+0200
@@ -1756,4 +1756,7 @@ ZEND_FUNCTION(create_function)
RETURN_STRINGL(function_name, function_name_length, 0);
} else {
+if (zend_hash_find(EG(function_table),
LAMBDA_TEMP_FUNCNAME, sizeof(LAMBDA_TEMP_FUNCNAME), (void **)
func)!=FAILURE) {
+   zend_hash_del(EG(function_table),
LAMBDA_TEMP_FUNCNAME, sizeof(LAMBDA_TEMP_FUNCNAME));
+   }
RETURN_FALSE;
}

Reproduce code:
---
?php
$borked = create_function ('', 'return 1; } else {}'); // unexpected else
{}
$foo= create_function ('', 'return 1;');

echo $foo ();
?

Expected result:

1

Actual result:
--
Fatal error: Cannot redeclare __lambda_func() (previously declared in
/home/peter/test.php(2) : runtime-created function:

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

#48693 [Com]: Double declaration of __lambda_func when lambda wrongly formatted

2009-06-25 Thread peter at lvp-media dot com
 ID:   48693
 Comment by:   peter at lvp-media dot com
 Reported By:  peter at lvp-media dot com
 Status:   Open
 Bug Type: Scripting Engine problem
 Operating System: n/a
 PHP Version:  5.3CVS-2009-06-25 (snap)
 New Comment:

The reproduce code got cut off, the else{} should be in the comment
right behind the $borked-assignment.

?php
$borked = create_function ('', 'return 1; } else {}'); // parse error
$foo= create_function ('', 'return 1;');

echo $foo ();
?


Previous Comments:


[2009-06-25 13:46:51] peter at lvp-media dot com

Description:

When creating a new lambda function using create_function, any code
behind an extra right curly brace (which closes the function) gets
executed. This is known and expected behaviour of eval, so no problem so
far. However, when the function itself does not contain parsing errors,
while the code after it does, the function gets created (and becomes
available) while zend_eval_stringl() returns false. Therefore the
function's name, defaulting to LAMBDA_TEMP_FUNCNAME, will not be changed
and any future calls to create_functions will fail using a fatal error
(Cannot redeclare __lambda_func()). Reproduce code is included.

The echo should output 1, however, the fatal error gets thrown
instead. While this absolutely isn't a problem that (should) occur very
often, fixing it seemed fairly easy so I created two patches.

The first patch checks whether any function named LAMBDA_TEMP_FUNCNAME
exists if zend_eval_stringl() fails, and if it does, renames it to
lambda_%d as would be done if the eval succeeded. After all, the
function itself was fine, so the function name can be returned as well.
zend_eval_stringl() outputs the parse error automatically so the
script-owner gets informed of the problem as well. The second patch is
easier, it simply removes any function called LAMBDA_TEMP_FUNCNAME if it
exists.

PATCH 1:

--- zend_builtin_functions.c2009-06-25 15:23:45.0 +0200
+++ zend_builtin_functions_new.c2009-06-25 15:40:34.0
+0200
@@ -1737,8 +1737,8 @@ ZEND_FUNCTION(create_function)
efree(eval_name);

-   if (retval==SUCCESS) {
+   if (retval==SUCCESS || zend_hash_find(EG(function_table),
LAMBDA_TEMP_FUNCNAME, sizeof(LAMBDA_TEMP_FUNCNAME), (void **)
func)!=FAILURE) {
zend_function new_function, *func;

-   if (zend_hash_find(EG(function_table),
LAMBDA_TEMP_FUNCNAME, sizeof(LAMBDA_TEMP_FUNCNAME), (void **)
func)==FAILURE) {
+   if (retval==SUCCESS 
zend_hash_find(EG(function_table), LAMBDA_TEMP_FUNCNAME,
sizeof(LAMBDA_TEMP_FUNCNAME), (void **) func)==FAILURE) {
zend_error(E_ERROR, Unexpected inconsistency
in create_function());
RETURN_FALSE;

PATCH 2:

--- zend_builtin_functions.c2009-06-25 15:23:45.0
+0200
+++ zend_builtin_functions_new.c2009-06-25 15:23:45.0
+0200
@@ -1756,4 +1756,7 @@ ZEND_FUNCTION(create_function)
RETURN_STRINGL(function_name, function_name_length,
0);
} else {
+if (zend_hash_find(EG(function_table),
LAMBDA_TEMP_FUNCNAME, sizeof(LAMBDA_TEMP_FUNCNAME), (void **)
func)!=FAILURE) {
+   zend_hash_del(EG(function_table),
LAMBDA_TEMP_FUNCNAME, sizeof(LAMBDA_TEMP_FUNCNAME));
+   }
RETURN_FALSE;
}

Reproduce code:
---
?php
$borked = create_function ('', 'return 1; } else {}'); // unexpected
else {}
$foo= create_function ('', 'return 1;');

echo $foo ();
?

Expected result:

1

Actual result:
--
Fatal error: Cannot redeclare __lambda_func() (previously declared in
/home/peter/test.php(2) : runtime-created function:





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



#47689 [Com]: crash with certain regular expression

2009-06-18 Thread peter dot swietoslawski at me dot com
 ID:   47689
 Comment by:   peter dot swietoslawski at me dot com
 Reported By:  vr...@php.net
 Status:   Assigned
 Bug Type: PCRE related
 Operating System: win32 only
 PHP Version:  5.*, 6CVS (2009-03-17)
 Assigned To:  pajoye
 New Comment:

I'm experiencing similar crash on PHP 5.2.9-2, Apache 2.2.11, Vista 
SP2 
if I run simple code like:

?php

  $content = '
  !-- Book Navigation Start --
  div
  ul class=menuli class=collapsed firstWeb Services/li
  li class=collapsedIntegration Tools/li
  li class=leafDeveloper Group/li
  li class=leaf lastDeveloper Forum/li
  /ul
div class=page-links clear-block
a href=test/wws class=page-next title=Go to next page 
Web Services /a
/div
  /div
  !-- Book Navigation End --
  ';

  $pattern = '/!-- Book Navigation Start --((.|\s)+)!-- Book 
Navigation End --/i';

  preg_match($pattern, $content, $book_nav);
?

However this works fine in PHP 5.2.8 and in CLI for 5.2.9-2.


Previous Comments:


[2009-05-21 20:25:47] paj...@php.net

Only wondering which impact has this change, have to test first before
to increase the stack.



[2009-04-25 17:37:45] j...@php.net

Pierre, Nuno already gave the solution..? :)



[2009-04-14 13:56:46] vr...@php.net

Same result also with the code pasted here under Apache 2.2.



[2009-04-14 13:52:16] paj...@php.net


 Same result with VC9 TS and 500 lines under CLI.

500 lines? Not using the code you pasted here?



[2009-04-14 13:42:20] vr...@php.net

Same result with VC9 TS and 500 lines under CLI.



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

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



#48365 [Fbk-Opn]: glob() function returns empty array

2009-06-10 Thread peter dot chen at itg dot com
 ID:   48365
 User updated by:  peter dot chen at itg dot com
 Reported By:  peter dot chen at itg dot com
-Status:   Feedback
+Status:   Open
 Bug Type: Filesystem function related
 Operating System: sparc-sol2.10
 PHP Version:  5.2.9
 New Comment:

It returned: 

/home/apache/htdocs/testkt/authtest/
/home/apache/htdocs/testkt/globtest.php
/home/apache/htdocs/testkt/globtest.php.LCK
/home/apache/htdocs/testkt/globtest2.php
/home/apache/htdocs/testkt/home.php.LCK

which is all the contents within testkt/


Previous Comments:


[2009-06-10 13:01:51] j...@php.net

And what did the compiled program output?



[2009-06-04 01:25:14] peter dot chen at itg dot com

The .c code worked. 

gcc version 4.2.4



[2009-06-02 08:25:42] j...@php.net

Try compile and run this small C program:



#include glob.h
#include stdio.h

int main()
{
  glob_t globbuf;
  int i;

  globbuf.gl_offs = 15;

  glob(/home/apache/htdocs/testkt/*, GLOB_MARK, NULL, globbuf);

  for(i = 0; i  globbuf.gl_pathc; i++)
printf(%s\n,globbuf.gl_pathv[i]);

  globfree(globbuf);
  return(0);
}



See also bug #22641 




[2009-06-01 22:04:01] peter dot chen at itg dot com

Actually, now that you mention it, the path is on an NFS.



[2009-06-01 17:09:07] peter dot chen at itg dot com

My mistake. Upon closer inspection, I realized that the path I
specified was incorrect. 

This is the result after I corrected the path: 
array(0) {
}



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

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



#48365 [Fbk-Opn]: glob() function returns empty array

2009-06-03 Thread peter dot chen at itg dot com
 ID:   48365
 User updated by:  peter dot chen at itg dot com
 Reported By:  peter dot chen at itg dot com
-Status:   Feedback
+Status:   Open
 Bug Type: Filesystem function related
 Operating System: sparc-sol2.10
 PHP Version:  5.2.9
 New Comment:

The .c code worked. 

gcc version 4.2.4


Previous Comments:


[2009-06-02 08:25:42] j...@php.net

Try compile and run this small C program:



#include glob.h
#include stdio.h

int main()
{
  glob_t globbuf;
  int i;

  globbuf.gl_offs = 15;

  glob(/home/apache/htdocs/testkt/*, GLOB_MARK, NULL, globbuf);

  for(i = 0; i  globbuf.gl_pathc; i++)
printf(%s\n,globbuf.gl_pathv[i]);

  globfree(globbuf);
  return(0);
}



See also bug #22641 




[2009-06-01 22:04:01] peter dot chen at itg dot com

Actually, now that you mention it, the path is on an NFS.



[2009-06-01 17:09:07] peter dot chen at itg dot com

My mistake. Upon closer inspection, I realized that the path I
specified was incorrect. 

This is the result after I corrected the path: 
array(0) {
}



[2009-05-31 15:48:51] j...@php.net

And all that path is on local filesystem and not on some e.g. NFS
share?



[2009-05-29 14:55:38] peter dot chen at itg dot com

Yes, that path's permissions are 755 and every file in that directory
can be read by all.

I've run it as root also, same return value.



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

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



#48365 [Fbk-Opn]: glob() function returns empty array

2009-06-01 Thread peter dot chen at itg dot com
 ID:   48365
 User updated by:  peter dot chen at itg dot com
 Reported By:  peter dot chen at itg dot com
-Status:   Feedback
+Status:   Open
 Bug Type: Filesystem function related
 Operating System: sparc-sol2.10
 PHP Version:  5.2.9
 New Comment:

My mistake. Upon closer inspection, I realized that the path I
specified was incorrect. 

This is the result after I corrected the path: 
array(0) {
}


Previous Comments:


[2009-05-31 15:48:51] j...@php.net

And all that path is on local filesystem and not on some e.g. NFS
share?



[2009-05-29 14:55:38] peter dot chen at itg dot com

Yes, that path's permissions are 755 and every file in that directory
can be read by all.

I've run it as root also, same return value.



[2009-05-29 12:05:09] j...@php.net

Is all dirs in that path readable by the user you run it with? (try as
root..?) glob() returns false if there's some error..



[2009-05-28 18:49:08] peter dot chen at itg dot com

Oh yeah, and the command returns:

bool(false)



[2009-05-28 18:42:33] peter dot chen at itg dot com

I'm using sparc-solaris2.10. 

Was there a flag I needed to include for my php install to enable
glob() to work?



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

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



#48365 [Opn]: glob() function returns empty array

2009-06-01 Thread peter dot chen at itg dot com
 ID:   48365
 User updated by:  peter dot chen at itg dot com
 Reported By:  peter dot chen at itg dot com
 Status:   Open
 Bug Type: Filesystem function related
 Operating System: sparc-sol2.10
 PHP Version:  5.2.9
 New Comment:

Actually, now that you mention it, the path is on an NFS.


Previous Comments:


[2009-06-01 17:09:07] peter dot chen at itg dot com

My mistake. Upon closer inspection, I realized that the path I
specified was incorrect. 

This is the result after I corrected the path: 
array(0) {
}



[2009-05-31 15:48:51] j...@php.net

And all that path is on local filesystem and not on some e.g. NFS
share?



[2009-05-29 14:55:38] peter dot chen at itg dot com

Yes, that path's permissions are 755 and every file in that directory
can be read by all.

I've run it as root also, same return value.



[2009-05-29 12:05:09] j...@php.net

Is all dirs in that path readable by the user you run it with? (try as
root..?) glob() returns false if there's some error..



[2009-05-28 18:49:08] peter dot chen at itg dot com

Oh yeah, and the command returns:

bool(false)



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

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



#48365 [Fbk-Opn]: glob() function returns empty array

2009-05-29 Thread peter dot chen at itg dot com
 ID:   48365
 User updated by:  peter dot chen at itg dot com
 Reported By:  peter dot chen at itg dot com
-Status:   Feedback
+Status:   Open
 Bug Type: Filesystem function related
 Operating System: sparc-sol2.10
 PHP Version:  5.2.9
 New Comment:

Yes, that path's permissions are 755 and every file in that directory
can be read by all.

I've run it as root also, same return value.


Previous Comments:


[2009-05-29 12:05:09] j...@php.net

Is all dirs in that path readable by the user you run it with? (try as
root..?) glob() returns false if there's some error..



[2009-05-28 18:49:08] peter dot chen at itg dot com

Oh yeah, and the command returns:

bool(false)



[2009-05-28 18:42:33] peter dot chen at itg dot com

I'm using sparc-solaris2.10. 

Was there a flag I needed to include for my php install to enable
glob() to work?



[2009-05-28 16:50:31] j...@php.net

Try this on command line:

# php -r 'var_dump(glob(/home/apache/htdocs/testkt/*));'




[2009-05-28 16:49:23] j...@php.net

Exactly what Solaris version are you on?
Try this on command line:

# php -r 'var_dump(glob(/home/apache/htdocs/testkt/));'




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

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



#48365 [Fbk-Opn]: glob() function returns empty array

2009-05-28 Thread peter dot chen at itg dot com
 ID:   48365
 User updated by:  peter dot chen at itg dot com
 Reported By:  peter dot chen at itg dot com
-Status:   Feedback
+Status:   Open
 Bug Type: Apache2 related
 Operating System: sparc-sol2.10
 PHP Version:  5.2.9
 New Comment:

I'm using sparc-solaris2.10. 

Was there a flag I needed to include for my php install to enable
glob() to work?


Previous Comments:


[2009-05-28 16:50:31] j...@php.net

Try this on command line:

# php -r 'var_dump(glob(/home/apache/htdocs/testkt/*));'




[2009-05-28 16:49:23] j...@php.net

Exactly what Solaris version are you on?
Try this on command line:

# php -r 'var_dump(glob(/home/apache/htdocs/testkt/));'




[2009-05-27 23:05:14] peter dot chen at itg dot com

My apologies, I did not read all the instructions. 

Is there a flag I needed to enable when building php?

As for the code, I mistakenly left the ';' that caused the parse error.
The code should be as follows: 

!DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Transitional//EN
http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd;
html xmlns=http://www.w3.org/1999/xhtml;
head
meta http-equiv=Content-Type content=text/html; charset=utf-8 /
titleglob test/title
/head
body
?
   $path = /home/apache/htdocs/testkt/;
 
print(bglob:/bbrbr);
print_r(glob($path . '*.*'));

print(brbr***brbr);

print(bscandir:/bbrbr);
print_r(scandir($path));
?
/body
/html



[2009-05-23 17:03:08] j...@php.net

You obviously didn't follow the url provided in the email. Please, do 
not Add Comment to your own report, use the Edit Submission (where

the link in the email points too. 

And now, please provide the code that actually causes the problem. That

code works fine everywhere.



[2009-05-23 10:35:41] carsten_sttgt at gmx dot de

 print_r(glob($path . '*.*';));

This line give you a parse error. Must be:
| print_r(glob($path . '*.*'));

Apart from this, the code is working for me (Win,BSD).

BTW:
 [0] = .
 [1] = ..
 [2] = authtest

With your code, this can't be part of the result from glob().

Regards,
Carsten



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

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



#48365 [Opn]: glob() function returns empty array

2009-05-28 Thread peter dot chen at itg dot com
 ID:   48365
 User updated by:  peter dot chen at itg dot com
 Reported By:  peter dot chen at itg dot com
 Status:   Open
 Bug Type: Apache2 related
 Operating System: sparc-sol2.10
 PHP Version:  5.2.9
 New Comment:

Oh yeah, and the command returns:

bool(false)


Previous Comments:


[2009-05-28 18:42:33] peter dot chen at itg dot com

I'm using sparc-solaris2.10. 

Was there a flag I needed to include for my php install to enable
glob() to work?



[2009-05-28 16:50:31] j...@php.net

Try this on command line:

# php -r 'var_dump(glob(/home/apache/htdocs/testkt/*));'




[2009-05-28 16:49:23] j...@php.net

Exactly what Solaris version are you on?
Try this on command line:

# php -r 'var_dump(glob(/home/apache/htdocs/testkt/));'




[2009-05-27 23:05:14] peter dot chen at itg dot com

My apologies, I did not read all the instructions. 

Is there a flag I needed to enable when building php?

As for the code, I mistakenly left the ';' that caused the parse error.
The code should be as follows: 

!DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Transitional//EN
http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd;
html xmlns=http://www.w3.org/1999/xhtml;
head
meta http-equiv=Content-Type content=text/html; charset=utf-8 /
titleglob test/title
/head
body
?
   $path = /home/apache/htdocs/testkt/;
 
print(bglob:/bbrbr);
print_r(glob($path . '*.*'));

print(brbr***brbr);

print(bscandir:/bbrbr);
print_r(scandir($path));
?
/body
/html



[2009-05-23 17:03:08] j...@php.net

You obviously didn't follow the url provided in the email. Please, do 
not Add Comment to your own report, use the Edit Submission (where

the link in the email points too. 

And now, please provide the code that actually causes the problem. That

code works fine everywhere.



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

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



#48365 [Fbk-Opn]: glob() function returns empty array

2009-05-27 Thread peter dot chen at itg dot com
 ID:   48365
 User updated by:  peter dot chen at itg dot com
 Reported By:  peter dot chen at itg dot com
-Status:   Feedback
+Status:   Open
 Bug Type: Apache2 related
 Operating System: sparc-sol2.10
 PHP Version:  5.2.9
 New Comment:

My apologies, I did not read all the instructions. 

Is there a flag I needed to enable when building php?

As for the code, I mistakenly left the ';' that caused the parse error.
The code should be as follows: 

!DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Transitional//EN
http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd;
html xmlns=http://www.w3.org/1999/xhtml;
head
meta http-equiv=Content-Type content=text/html; charset=utf-8 /
titleglob test/title
/head
body
?
   $path = /home/apache/htdocs/testkt/;
 
print(bglob:/bbrbr);
print_r(glob($path . '*.*'));

print(brbr***brbr);

print(bscandir:/bbrbr);
print_r(scandir($path));
?
/body
/html


Previous Comments:


[2009-05-23 17:03:08] j...@php.net

You obviously didn't follow the url provided in the email. Please, do 
not Add Comment to your own report, use the Edit Submission (where

the link in the email points too. 

And now, please provide the code that actually causes the problem. That

code works fine everywhere.



[2009-05-23 10:35:41] carsten_sttgt at gmx dot de

 print_r(glob($path . '*.*';));

This line give you a parse error. Must be:
| print_r(glob($path . '*.*'));

Apart from this, the code is working for me (Win,BSD).

BTW:
 [0] = .
 [1] = ..
 [2] = authtest

With your code, this can't be part of the result from glob().

Regards,
Carsten



[2009-05-22 21:09:23] peter dot chen at itg dot com

!DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Transitional//EN
http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd;
html xmlns=http://www.w3.org/1999/xhtml;
head
meta http-equiv=Content-Type content=text/html; charset=utf-8 /
titleglob test/title
/head
body
?
   $path = /home/apache/htdocs/testkt/;
 
print(bglob:/bbrbr);
print_r(glob($path . '*.*';));

print(brbr***brbr);

print(bscandir:/bbrbr);
print_r(scandir($path));
?
/body
/html



[2009-05-22 19:43:37] j...@php.net

Please provide proper example script.



[2009-05-22 19:38:20] peter dot chen at itg dot com

Description:

I am trying to use glob() to display the contents of a directory
I store the path in a variable ($path). 

When I give $path as an argument to glob($path), it returns an empty
array.

When I give it to scandir($path), it returns all the files in that
path. 

Reproduce code:
---
---
From manual page: function.glob
---


Expected result:

Array ( [0] = . [1] = .. [2] = authtest [3] = globtest.php [4] =
globtest.php.LCK [5] = globtest2.php [6] = home.php.LCK ) 

Actual result:
--
Array ( ) 






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



#48365 [NEW]: glob() function returns empty array

2009-05-22 Thread peter dot chen at itg dot com
From: peter dot chen at itg dot com
Operating system: sparc-sol2.10
PHP version:  5.2.9
PHP Bug Type: Apache2 related
Bug description:  glob() function returns empty array

Description:

I am trying to use glob() to display the contents of a directory
I store the path in a variable ($path). 

When I give $path as an argument to glob($path), it returns an empty
array.

When I give it to scandir($path), it returns all the files in that path. 

Reproduce code:
---
---
From manual page: function.glob
---


Expected result:

Array ( [0] = . [1] = .. [2] = authtest [3] = globtest.php [4] =
globtest.php.LCK [5] = globtest2.php [6] = home.php.LCK ) 

Actual result:
--
Array ( ) 


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



#48365 [Com]: glob() function returns empty array

2009-05-22 Thread peter dot chen at itg dot com
 ID:   48365
 Comment by:   peter dot chen at itg dot com
 Reported By:  peter dot chen at itg dot com
 Status:   Feedback
 Bug Type: Apache2 related
 Operating System: sparc-sol2.10
 PHP Version:  5.2.9
 New Comment:

!DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Transitional//EN
http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd;
html xmlns=http://www.w3.org/1999/xhtml;
head
meta http-equiv=Content-Type content=text/html; charset=utf-8 /
titleglob test/title
/head
body
?
   $path = /home/apache/htdocs/testkt/;
 
print(bglob:/bbrbr);
print_r(glob($path . '*.*';));

print(brbr***brbr);

print(bscandir:/bbrbr);
print_r(scandir($path));
?
/body
/html


Previous Comments:


[2009-05-22 19:43:37] j...@php.net

Please provide proper example script.



[2009-05-22 19:38:20] peter dot chen at itg dot com

Description:

I am trying to use glob() to display the contents of a directory
I store the path in a variable ($path). 

When I give $path as an argument to glob($path), it returns an empty
array.

When I give it to scandir($path), it returns all the files in that
path. 

Reproduce code:
---
---
From manual page: function.glob
---


Expected result:

Array ( [0] = . [1] = .. [2] = authtest [3] = globtest.php [4] =
globtest.php.LCK [5] = globtest2.php [6] = home.php.LCK ) 

Actual result:
--
Array ( ) 






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



#47724 [Com]: Reproducable segmenation fault using symfony and doctrine

2009-03-31 Thread peter at f-is dot eu
 ID:   47724
 Comment by:   peter at f-is dot eu
 Reported By:  scott at danielfamily dot com
 Status:   No Feedback
 Bug Type: Reproducible crash
 Operating System: Centos 5.2
 PHP Version:  5.2.9
 New Comment:

Scott, thanks for your work at the VMWARE image, and Scott MacVicar for
looking into it.

I really hope this annoying bug finally get's fixed.

I've been playing with Duma, Valgrind and GDB for a few days, but my
knowledge about these tools, c programming, or the internals of PHP seem
insufficient.

From what i can tell, this is a reference counting problem. Some object
has 3 references, and than some time later the some memory location
contains a String, with 1 reference, which gets dereferenced and
de-allocated. During php shutdown, the original object is being read,
and because the memory is 'gone' it segfaults.

The String that seems to overwrite the object is being provided by the
__toString function of the original object. So i guess something goes
wrong there.

I can't stress enough that my experience with C is extremely limited,
so the above may be completely wrong :P. There is also no way for me to
be sure that this is the same bug that Scott has, but the symptoms are
the same.

This is the information valgrind spits out about the crash is the
following. Note that this only happens in crashing pages, or pages that
sometimes crash, depending on input:
==29860== Invalid read of size 4
==29860==at 0x63EBB7: _zval_ptr_dtor (zend_execute_API.c:410)
==29860==by 0x64F079: _zval_ptr_dtor_wrapper
(zend_variables.c:177)
==29860==by 0x65F9C8: zend_hash_destroy (zend_hash.c:526)
==29860==by 0x64EC8A: _zval_dtor_func (zend_variables.c:45)
==29860==by 0x63E978: _zval_dtor (zend_variables.h:35)
==29860==by 0x63EC31: _zval_ptr_dtor (zend_execute_API.c:414)
==29860==by 0x64F079: _zval_ptr_dtor_wrapper
(zend_variables.c:177)
==29860==by 0x65F9C8: zend_hash_destroy (zend_hash.c:526)
==29860==by 0x675161: zend_object_std_dtor (zend_objects.c:45)
==29860==by 0x675600: zend_objects_free_object_storage
(zend_objects.c:122)
==29860==by 0x679E67: zend_objects_store_del_ref_by_handle
(zend_objects_API.c:211)
==29860==by 0x679C45: zend_objects_store_del_ref
(zend_objects_API.c:169)
==29860==  Address 0xBF348B8 is 16 bytes inside a block of size 24
free'd
==29860==at 0x4A0541E: free (vg_replace_malloc.c:233)
==29860==by 0x62E4EB: _efree (zend_alloc.c:2303)
==29860==by 0x63ECD9: safe_free_zval_ptr_rel (zend_execute.h:70)
==29860==by 0x63EC51: _zval_ptr_dtor (zend_execute_API.c:415)
==29860==by 0x67D57C: zend_ptr_stack_clear_multiple
(zend_execute.h:155)
==29860==by 0x67CE1E: zend_do_fcall_common_helper_SPEC
(zend_vm_execute.h:307)
==29860==by 0x683160: ZEND_DO_FCALL_SPEC_CONST_HANDLER
(zend_vm_execute.h:1729)
==29860==by 0x67C11B: execute (zend_vm_execute.h:92)
==29860==by 0x6951FA: ZEND_INCLUDE_OR_EVAL_SPEC_VAR_HANDLER
(zend_vm_execute.h:7811)
==29860==by 0x67C11B: execute (zend_vm_execute.h:92)
==29860==by 0x6517CC: zend_execute_scripts (zend.c:1134)
==29860==by 0x5F108F: php_execute_script (main.c:2023)

This is the output of php that I got by enabling debugging options.
They concern the same memory region as the above:
Reducing refcount for bf348a8 (feff5738) type 5:  16-15
Reducing refcount for bf348a8 (feff5ba8) type 5:  15-14
Reducing refcount for bf348a8 (feff5cf0) type 5:  14-13
Reducing refcount for bf348a8 (bf45c08) type 5:  13-12
Reducing refcount for bf348a8 (bf45cc0) type 5:  12-11
Reducing refcount for bf348a8 (bf351a8) type 5:  11-10
Reducing refcount for bf348a8 (a0a518) type 5:  10-9
Reducing refcount for bf348a8 (feff84a8) type 5:  10-9
Reducing refcount for bf348a8 (bf350a8) type 5:  9-8
Reducing refcount for bf348a8 (a0a518) type 5:  8-7
Reducing refcount for bf348a8 (feff8d28) type 5:  7-6
Reducing refcount for bf348a8 (bf34b70) type 5:  6-5
Reducing refcount for bf348a8 (a0a518) type 5:  5-4
Reducing refcount for bf348a8 (a0a518) type 5:  4-3
Reducing refcount for bf348a8 (feffa048) type 6:  1-0
Destroying bf348a8 of type 6
Reducing refcount for bf348a8 (bf44e38) type 6:  0--1
Reducing refcount for bf348a8 (bf35f70) type 6:  -1--2


Previous Comments:


[2009-03-31 03:21:39] scott at danielfamily dot com

Scott MacVicar from the PHP team send me a note saying he would look at
the bug. I uploaded the VMWARE appliance and send him the information,
but have not heard back after some days. Still hoping for some love.



[2009-03-31 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

#47752 [Com]: FILTER_VALIDATE_INT doesn't allow +0 and -0

2009-03-24 Thread peter at lvp-media dot com
 ID:   47752
 Comment by:   peter at lvp-media dot com
 Reported By:  for-bugs at hnw dot jp
 Status:   Feedback
 Bug Type: Filter related
 Operating System: *
 PHP Version:  5.2.9
 Assigned To:  pajoye
 New Comment:

Hereby a simple bug47752.phpt file. Tested it on a patched- an an
unpatched installation, results as expected. Strictly speaking +0 and -0
are valid integers, even though neither of them is positive or
negative.

Peter Beverloo

--TEST--
Bug #47752 (FILTER_VALIDATE_INT doesn't allow +0 and -0)
--FILE--
?php
$positive = filter_var ('+0', FILTER_VALIDATE_INT);
$negative = filter_var ('-0', FILTER_VALIDATE_INT);
$zero = filter_var ('0',  FILTER_VALIDATE_INT);
$octal= filter_var ('-0123', FILTER_VALIDATE_INT);

var_dump ($positive);
var_dump ($negative);
var_dump ($zero);
var_dump ($octal);

?
--EXPECT--
int(0)
int(0)
int(0)
bool(false)


Previous Comments:


[2009-03-24 12:44:19] paj...@php.net

As far as I remember it is on purpose. 0 cannot be negative or
positive.

But if we agree on allowing them again, no problem here.

Can you please provide tests as well (phpt)?



[2009-03-24 11:50:38] php at lvp-media dot com

False, this only allows +0 and -0 by checking the lenght of the string,
it verifies that the null is the only character in it.



[2009-03-24 11:49:06] der...@php.net

Right, so this patch is not correct as it would allow octal numbers.



[2009-03-24 11:46:57] php at lvp-media dot com

Probably the easiest fix for this would be to change line 88 of
logical_filters.c to allow the character 0 as well, seeing values like
-0012 and 0012 get returned as false now as well. Con of this is quite
obvious as well however, as numbers prefixed by 0 often get interpreted
as octal numbers.

A better fix would be to add a check for it;

--- logical_filters.bak  2009-03-24 12:43:23.0 +0100
+++ logical_filters.c2009-03-24 12:45:09.0 +0100
@@ -84,6 +84,12 @@
break;
}

+   /* allow +0 and -0 */
+   if ((str + 1) == end  *str == '0') {
+   *ret = 0;
+   return 1;
+   }
+
/* must start with 1..9*/
if (str  end  *str = '1'  *str = '9') {
ctx_value = ((*(str++)) - '0');



[2009-03-23 05:40:58] for-bugs at hnw dot jp

Description:

FILTER_VALIDATE_INT doesn't allow +0 and -0,
while 0, +1, and -1 is valid.

Reproduce code:
---
?php

var_dump(intval(+0));
var_dump(filter_var(+0, FILTER_VALIDATE_INT));
var_dump(intval(-0));
var_dump(filter_var(-0, FILTER_VALIDATE_INT));

Expected result:

int(0)
int(0)
int(0)
int(0)

Actual result:
--
int(0)
bool(false)
int(0)
bool(false)





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



#40579 [Com]: $_SERVER['SERVER_PORT'] is invalid during apache redirect

2009-03-18 Thread peter at lvp-media dot com
 ID:   40579
 Comment by:   peter at lvp-media dot com
 Reported By:  ruslan dot kyrychuk at gmail dot com
 Status:   No Feedback
 Bug Type: *Web Server problem
 Operating System: Windows 2003
 PHP Version:  5.2.1
 New Comment:

This isn't a PHP-specific bug, it seems to be a problem within
mod_rewrite or Apache itself. I ran into this problem as well, but was
able to reproduce it with Perl and C scripts. For completeness, I'm
running PHP 5.3-dev on Linux with Apache 2.2.


Previous Comments:


[2009-01-26 15:06:38] tim at timloram dot me dot uk

I am experiencing this issue with exact same symptoms. Having used
mod_rewrite to redirect incoming requests to central gateway script,
$_SERVER['SERVER_PORT'] is always reading '80' even if my inital URL was
http://abc.com:86

Any ideas?



[2007-03-31 01:00:00] php-bugs at lists dot php dot net

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



[2007-03-23 11:10:51] tony2...@php.net

Works just fine here.

[SERVER_PORT]= string(4) 8887
[SCRIPT_NAME]= string(11) /index.html 



[2007-03-23 10:58:01] ruslan dot kyrychuk at gmail dot com

Reproduce code:
---
1. Configure Apache to use port 8080
2. Create .htaccess file:
Options +FollowSymLinks -Indexes
RewriteEngine on 

RewriteCond %{REQUEST_FILENAME}  (.+)\.html
RewriteRule ^(.+)$ test.php [QSA,L]
3. Create test.php file
?php
echo $_SERVER['SERVER_PORT'];
?
Run http://localhost:8080/test.html
Output: 80
Run http://localhost:8080/test.php
Output: 8080



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

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



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

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




#40479 [Com]: zend_mm_heap corrupted

2008-12-12 Thread peter at f-is dot eu
 ID:   40479
 Comment by:   peter at f-is dot eu
 Reported By:  rrossi at maggioli dot it
 Status:   No Feedback
 Bug Type: Reproducible crash
 Operating System: Suse Linux 9.0
 PHP Version:  5.2.1
 New Comment:

I have run into this problem too. I have not been able to make a short
example script to demonstrate the problem since removing seemingly
unrelated parts of code makes the problem disappear.

The error is generated after the PHP script has completed. The actual
problem seems to stem from calling a some static method from a class
that has not yet been included. The class is included by an __autoload
function. Manually including the class first seems to fix the problem,
but doing random stuff in general seems to do that :)

The problem occurs when returning from the function, since throwing an
exception or die()-ing at that point does not show the problem.

When building php with --enable-debug, the problem goes away. The
problem also goes away when not using --enable-debug, but adding
-DZEND_MM_HEAP_PROTECTION.

Since the problem goes away when using --enable-debug, I generated the
following backtraces with a modified zend_mm_panic(...) in zend_alloc.c
to remove the #if ZEND_DEBUG macro.

#0  0x7f9b736d45a7 in kill () from /lib/libc.so.6
#1  0x00596440 in zend_mm_panic (message=value optimized out)
at /usr/local/src/php-5.2.8/Zend/zend_alloc.c:94
#2  0x00596a45 in _zend_mm_free_int (heap=0x96f300, p=0xb) at
/usr/local/src/php-5.2.8/Zend/zend_alloc.c:833
#3  0x005bc298 in zend_hash_destroy (ht=0xd71040) at
/usr/local/src/php-5.2.8/Zend/zend_hash.c:526
#4  0x005cbb49 in zend_object_std_dtor (object=0xd6c570) at
/usr/local/src/php-5.2.8/Zend/zend_objects.c:45
#5  0x005cbb69 in zend_objects_free_object_storage
(object=0x25e3) at /usr/local/src/php-5.2.8/Zend/zend_objects.c:122
#6  0x005cf1ae in zend_objects_store_del_ref_by_handle
(handle=63) at /usr/local/src/php-5.2.8/Zend/zend_objects_API.c:206
#7  0x005cf1de in zend_objects_store_del_ref (zobject=0xd6ffe8)
at /usr/local/src/php-5.2.8/Zend/zend_objects_API.c:168
#8  0x005a4d16 in _zval_ptr_dtor (zval_ptr=0xd79d38) at
/usr/local/src/php-5.2.8/Zend/zend_variables.h:35
#9  0x005bc298 in zend_hash_destroy (ht=0xcf42f8) at
/usr/local/src/php-5.2.8/Zend/zend_hash.c:526
#10 0x005b12bf in _zval_dtor_func (zvalue=0xd77118) at
/usr/local/src/php-5.2.8/Zend/zend_variables.c:43
#11 0x005a4d16 in _zval_ptr_dtor (zval_ptr=0xb74de0) at
/usr/local/src/php-5.2.8/Zend/zend_variables.h:35
#12 0x005bc298 in zend_hash_destroy (ht=0xd01938) at
/usr/local/src/php-5.2.8/Zend/zend_hash.c:526
#13 0x005cbb49 in zend_object_std_dtor (object=0xd6cc88) at
/usr/local/src/php-5.2.8/Zend/zend_objects.c:45
#14 0x005cbb69 in zend_objects_free_object_storage
(object=0x25e3) at /usr/local/src/php-5.2.8/Zend/zend_objects.c:122
#15 0x005cf1ae in zend_objects_store_del_ref_by_handle
(handle=62) at /usr/local/src/php-5.2.8/Zend/zend_objects_API.c:206
#16 0x005cf1de in zend_objects_store_del_ref (zobject=0xd6e378)
at /usr/local/src/php-5.2.8/Zend/zend_objects_API.c:168
#17 0x005a4d16 in _zval_ptr_dtor (zval_ptr=0xd79e70) at
/usr/local/src/php-5.2.8/Zend/zend_variables.h:35
#18 0x005bc298 in zend_hash_destroy (ht=0xd7a3d8) at
/usr/local/src/php-5.2.8/Zend/zend_hash.c:526
#19 0x005b12bf in _zval_dtor_func (zvalue=0xd7a3b0) at
/usr/local/src/php-5.2.8/Zend/zend_variables.c:43
#20 0x005a4d16 in _zval_ptr_dtor (zval_ptr=0xb6e258) at
/usr/local/src/php-5.2.8/Zend/zend_variables.h:35
#21 0x005bc298 in zend_hash_destroy (ht=0xd71800) at
/usr/local/src/php-5.2.8/Zend/zend_hash.c:526
#22 0x005cbb49 in zend_object_std_dtor (object=0xd6e150) at
/usr/local/src/php-5.2.8/Zend/zend_objects.c:45
#23 0x005cbb69 in zend_objects_free_object_storage
(object=0x25e3) at /usr/local/src/php-5.2.8/Zend/zend_objects.c:122
#24 0x005cf1ae in zend_objects_store_del_ref_by_handle
(handle=61) at /usr/local/src/php-5.2.8/Zend/zend_objects_API.c:206
#25 0x005cf1de in zend_objects_store_del_ref (zobject=0xd6df98)
at /usr/local/src/php-5.2.8/Zend/zend_objects_API.c:168
#26 0x005a4d16 in _zval_ptr_dtor (zval_ptr=0xcf5db8) at
/usr/local/src/php-5.2.8/Zend/zend_variables.h:35
#27 0x005bc298 in zend_hash_destroy (ht=0xcf5bc8) at
/usr/local/src/php-5.2.8/Zend/zend_hash.c:526
#28 0x005b12bf in _zval_dtor_func (zvalue=0xcf5ba0) at
/usr/local/src/php-5.2.8/Zend/zend_variables.c:43
#29 0x005a4d16 in _zval_ptr_dtor (zval_ptr=0xce8400) at
/usr/local/src/php-5.2.8/Zend/zend_variables.h:35
#30 0x005bc298 in zend_hash_destroy (ht=0xc96598) at
/usr/local/src/php-5.2.8/Zend/zend_hash.c:526
#31 0x005cbb49 in zend_object_std_dtor (object=0xccafd0) at
/usr/local/src/php-5.2.8/Zend/zend_objects.c:45
#32 0x005cbb69 in zend_objects_free_object_storage

#43468 [NoF-Opn]: Curl doesn't handle php://memory stream

2008-12-09 Thread peter at petersmit dot eu
 ID:   43468
 User updated by:  peter at petersmit dot eu
 Reported By:  peter at petersmit dot eu
-Status:   No Feedback
+Status:   Open
 Bug Type: cURL related
 Operating System: Ubuntu Linux Gutsy Gibbon
 PHP Version:  5.2.5
 New Comment:

Confirmed solved


Previous Comments:


[2008-12-10 01:55:55] dan dot hitt at gmail dot com

I can reproduce the bug.

I downloaded the link provided on the bug by jani (php 5.2 snapshot).

I built php (and had to also download and build libcurl).

My exact configuration line for the php was:
./configure --prefix=/home/danh/staging/php/2008_09_12_c
--with-curl=/home/danh/staging/curl/2008_09_12
where the funky directory name is where i installed the curl i built. 
(For the curl i used no options in the configuration except where to
install it.)

My system is ubuntu 7.10.

It would be terrific to fix the bug because curl is so useful and
having arbitrary streams is so useful: at least streams to memory.

Thanks everybody for your efforts on refining php.



[2008-11-04 01:00:01] php-bugs at lists dot php dot net

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



[2008-10-27 12:57:39] [EMAIL PROTECTED]

Please try using this CVS snapshot:

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

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

If it still does not work, please provide the full configure line you
have used.



[2008-02-13 22:16:29] quickshiftin at gmail dot com

i have discovered that this does work, partially, for some urls.
im not sure what is preventing this from working on all urls, but even
for ones where it does work, the entire result is not placed in the
buffer.
here is a modification of peters code, which illustrates 2 urls that
work partially, one is the google translate 'api', the other is
php.net.

?php
#$c = curl_init(http://example.com;);
#$c =
curl_init(http://google.com/translate_t?langpair=en%7Cfrtext=newspaper;);
$c = curl_init(http://php.net;);
$st = fopen('php://memory', 'r');

curl_setopt($c, CURLOPT_FILE, $st);
curl_setopt($c, CURLOPT_USERAGENT, 'Mozilla/5.0 (X11; U; Linux i686;
en-US; rv:1.8.1.11) Gecko/20080115 Firefox/2.0.0.11');

if(!curl_exec($c)) die (error: .curl_error($c));
curl_close($c);


rewind($st);
/*
$str =  fgets($st);
var_dump($str);
*/
echo stream_get_contents($st);
#echo
Content|.htmlspecialchars(stream_get_contents($st)).|/Content;
fclose($st);
?



[2007-12-01 10:00:25] peter at petersmit dot eu

Description:

If you use a php://memory stream in combination with curl, nothing is
written to the stream.

A filestream works fine.

Reproduce code:
---
?php

$c = curl_init(http://example.com;);
$st = fopen(php://memory, r+);

curl_setopt($c, CURLOPT_FILE, $st);

if(!curl_exec($c)) die (error: .curl_error($c));

rewind($st);
echo
Content|.htmlspecialchars(stream_get_contents($st)).|/Content;
fclose($st);

?

Expected result:

Content|The content of example.org|/Content

Actual result:
--
Content||/Content





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



#43468 [Opn]: Curl doesn't handle php://memory stream

2008-12-09 Thread peter at petersmit dot eu
 ID:   43468
 User updated by:  peter at petersmit dot eu
 Reported By:  peter at petersmit dot eu
 Status:   Open
 Bug Type: cURL related
 Operating System: Ubuntu Linux Gutsy Gibbon
-PHP Version:  5.2.5
+PHP Version:  5.2.latest
 New Comment:

Sorry, not confirmed

I was checking it whit my own website address in the example code and
everything looked fine. However with example.org or google.com it's not
working!


Previous Comments:


[2008-12-10 06:53:24] peter at petersmit dot eu

Confirmed solved



[2008-12-10 01:55:55] dan dot hitt at gmail dot com

I can reproduce the bug.

I downloaded the link provided on the bug by jani (php 5.2 snapshot).

I built php (and had to also download and build libcurl).

My exact configuration line for the php was:
./configure --prefix=/home/danh/staging/php/2008_09_12_c
--with-curl=/home/danh/staging/curl/2008_09_12
where the funky directory name is where i installed the curl i built. 
(For the curl i used no options in the configuration except where to
install it.)

My system is ubuntu 7.10.

It would be terrific to fix the bug because curl is so useful and
having arbitrary streams is so useful: at least streams to memory.

Thanks everybody for your efforts on refining php.



[2008-11-04 01:00:01] php-bugs at lists dot php dot net

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



[2008-10-27 12:57:39] [EMAIL PROTECTED]

Please try using this CVS snapshot:

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

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

If it still does not work, please provide the full configure line you
have used.



[2008-02-13 22:16:29] quickshiftin at gmail dot com

i have discovered that this does work, partially, for some urls.
im not sure what is preventing this from working on all urls, but even
for ones where it does work, the entire result is not placed in the
buffer.
here is a modification of peters code, which illustrates 2 urls that
work partially, one is the google translate 'api', the other is
php.net.

?php
#$c = curl_init(http://example.com;);
#$c =
curl_init(http://google.com/translate_t?langpair=en%7Cfrtext=newspaper;);
$c = curl_init(http://php.net;);
$st = fopen('php://memory', 'r');

curl_setopt($c, CURLOPT_FILE, $st);
curl_setopt($c, CURLOPT_USERAGENT, 'Mozilla/5.0 (X11; U; Linux i686;
en-US; rv:1.8.1.11) Gecko/20080115 Firefox/2.0.0.11');

if(!curl_exec($c)) die (error: .curl_error($c));
curl_close($c);


rewind($st);
/*
$str =  fgets($st);
var_dump($str);
*/
echo stream_get_contents($st);
#echo
Content|.htmlspecialchars(stream_get_contents($st)).|/Content;
fclose($st);
?



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

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



#45038 [Com]: Crash when using DateTimeZone object returned by Date::getTimezone

2008-07-01 Thread peter dot bex at solide-ict dot nl
 ID:   45038
 Comment by:   peter dot bex at solide-ict dot nl
 Reported By:  astax dot t at gmail dot com
 Status:   Assigned
 Bug Type: Date/time related
 Operating System: Linux
 PHP Version:  5.2.6
 Assigned To:  derick
 New Comment:

I can verify that it crashes on PHP 5.2.6 under NetBSD/amd64 (-current
from April), so most likely it's architecture-specific if it works on
i386.


Previous Comments:


[2008-07-01 03:27:46] levi at alliancesoftware dot com dot au

About as simple as you can get:

? $dt = new DateTime(); $dt-setTimezone($dt-getTimezone()); ?


Segfaults on FC9 x86_64 CLI compiled from source.
(However, silently succeeds on FC8 x86 compiled from source).



[2008-05-31 10:54:36] [EMAIL PROTECTED]

Another reproduce script:

?php
  $date= date_create();
  var_dump($date);

  $origtz= date_timezone_get($date);
  var_dump($origtz);

  date_timezone_set($date, timezone_open('GMT'));
  var_dump($date);

  $formatted= date_format($date, 'r');
  var_dump($formatted);

  date_timezone_set($date, $origtz);
  var_dump($date);

  echo $formatted;
?

== Output ==
  object(DateTime)#1 (0) {
  }
  object(DateTimeZone)#2 (0) {
  }
  object(DateTime)#1 (0) {
  }
  string(31) Sat, 31 May 2008 10:49:27 +
  Segmentation fault
== /Output ==

PHP 5.2.6 (cgi) (built: May 19 2008 09:18:35)
Copyright (c) 1997-2008 The PHP Group
Zend Engine v2.2.0, Copyright (c) 1998-2008 Zend Technologies




[2008-05-27 10:46:51] [EMAIL PROTECTED]

Wait and rely. :)

Assigned to maintainer.



[2008-05-27 08:23:31] astax dot t at gmail dot com

Any chance for this to be fixed?



[2008-05-19 10:13:43] astax dot t at gmail dot com

Description:

Crash when using DateTimeZone object, previously returned by
DateTime::getTimezone()


This worked fine in PHP 5.2.5
Probably this is related to how DateTimeZone object is returned:

This code returns different results in 5.2.5 and 5.2.6

$old_tz = $d-getTimezone();
$d-setTimezone(new DateTimeZone('UTC'));
echo $old_tz-getName();

5.2.6 returns 'UTC', while 5.2.5 returns 'Asia/Novosibirsk' (my current
timezone). Having in mind how objects in PHP5 are returned, I can accept
this, but this must be documented properly and shouldn't cause crash.

Reproduce code:
---
$d = new DateTime();
$old_tz = $d-getTimezone();
$d-setTimezone(new DateTimeZone('UTC'));
// setDate() and setTime() may go here - just for this example to make
some sense
$d-setTimezone($old_tz);
echo Success;

Expected result:

Success

Actual result:
--
PHP interpreter crashes





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



#16106 [Com]: LDAP + IMAP = PROBLEM

2008-07-01 Thread peter at hotmail dot com
 ID:   16106
 Comment by:   peter at hotmail dot com
 Reported By:  ronie at smartech dot com dot br
 Status:   No Feedback
 Bug Type: LDAP related
 Operating System: Conectiva 7.0
 PHP Version:  4.1.1
 New Comment:

Hello


Previous Comments:


[2002-04-17 00:00:05] php-bugs at lists dot php dot net

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



[2002-03-16 04:57:54] [EMAIL PROTECTED]

I guess you're using packages from your linux-distribution?



[2002-03-15 16:10:18] ronie at smartech dot com dot br

My softwares

imap-2000c-6cl
php4-4.1.1-1U70_4cl
php4-ldap-4.1.1-1U70_4cl
mod_php4-4.1.1-1U70_4cl
php4-imap-4.1.1-1U70_4cl
php4-ldap-4.1.1-1U70_4cl
openldap-client-2.0.21-1U70_2cl
openldap-server-2.0.21-1U70_2cl
openldap-2.0.21-1U70_2cl


My php.ini (LDAP connections working)
extension_dir = /usr/lib/php4
extension=mysql.so
extension=pgsql.so
extension=ldap.so
;extension=imap.so
extension=odbc.so

My php.ini (IMAP connections working)
extension_dir = /usr/lib/php4
extension=mysql.so
extension=pgsql.so
;extension=ldap.so
extension=imap.so
extension=odbc.so

My php.ini (Apache not working withou any log, just not start)
extension_dir = /usr/lib/php4
extension=mysql.so
extension=pgsql.so
extension=ldap.so
extension=imap.so
extension=odbc.so



[2002-03-15 16:03:10] [EMAIL PROTECTED]

What's your configure line?
Which version of c-client/wu-imapd and ldap are you using?
Can you provide a backtrace of the core-dump (see
http://bugs.php.net/bugs-generating-backtrace.php)?
Does it work if you compile imap and ldap statically?



[2002-03-15 15:36:11] ronie at smartech dot com dot br

Dear,

If I use extension=ldap.so alone it's work fine, if I use
extension=imap.so alone it's work fine, but if I use extension=imap.so
and extension=ldap.so the Apache Core dumped and if I use
extension=ldap.so extension=imap.so the Apache don't start.


Please Help Me


RONIE LIMA




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



#42291 [Com]: Uploaded file permissions vary depending on file system configuration

2008-06-10 Thread mail at peter-thomassen dot de
 ID:   42291
 Comment by:   mail at peter-thomassen dot de
 Reported By:  rob-phpbugs at tigertech dot com
 Status:   No Feedback
 Bug Type: Filesystem function related
 Operating System: Linux
 PHP Version:  5.2.4
 New Comment:

I just checked this with today's snapshot (5.2.7 devel), and
move_uploaded_file() now respects the umask setting.

For the temporary file (before the move_uploaded_file() call, usually
in /tmp/), the umask setting is respected only for the owner's bits.
Group and world permission are set to 0 (as if umask was 0x77, with x
being the owner's umask). As I already said, everything is set right
when moving the file away. It seems that this bug is fixed.

In production, I still have to use PHP 5.2.0 with some patches. Does
anybody know in which version this bug was fixed?


Previous Comments:


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

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



[2007-11-18 23:47:28] [EMAIL PROTECTED]

Please try using this CVS snapshot:

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

For Windows (installer):

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





[2007-11-05 23:28:25] rob-phpbugs at tigertech dot com

I fear this bug could be ignored because I tagged it as happening on 
PHP 4. Just to make sure it's clear, I'm retagging it as happening 
in PHP 5.2.4 -- it affects all versions.



[2007-11-04 17:16:19] marcel dot wiechmann at gmail dot com

Same problem here. But not only under php 4.4.7 also under php 5.2.4



[2007-11-04 15:51:26] chh at innov8 dot ch

I can confirm this behaviour.
If upload_tmp_dir is on the same filesystem as the destination folder
(normally the webspace of the customer(s) then the file permissions are
set to 0600 - otherwise 0644 (umask at 0022), when using
move_uploaded_file().

The temp file - before calling move_uploaded_file() - also has 0600
permissions.

This leads to a problem when using suphp (suexec, fastcgi or whatever)
and upload-functions in php applications which do not set the
permissions after using move_uploaded_file() [Joomla seems to be such a
candidate - Typo3 does it right..].

If you upload a static file which should be readable by the webserver
but isn't because only PHP (and other user running applications) can
access the file.

All Upload functions should use a chmod() after move_uploded_file()...



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

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



#45167 [NEW]: timezones returned by datetime objects are not accepted by other functions

2008-06-04 Thread peter dot bex at solide-ict dot nl
From: peter dot bex at solide-ict dot nl
Operating system: NetBSD/amd64
PHP version:  5.2.6
PHP Bug Type: Date/time related
Bug description:  timezones returned by datetime objects are not accepted by 
other functions

Description:

When creating a datetime object from a string that includes timezone
offset information (like 10:00:00+02:00), the timezone object's name can
not be used for creating new timezone objects or setting the default
timezone. In effect, it's an impossible object: there's no way to
recreate an object like that yourself.

This also means you would get unexpected results when using, for example,
strftime(). If you use date_default_timezone_set to change the timezone to
the object's timezone and print the date info, it will give you the wrong
output.

Reproduce code:
---
?php
date_default_timezone_set('UTC');
echo Before: .date_default_timezone_get().\n;
$foo = new datetime('10:00:00+02:00');
$name = $foo-getTimeZone()-getName();
echo Setting timezone: $name\n;
date_default_timezone_set($name);
echo After: .date_default_timezone_get().\n;
echo strftime: .strftime('%H:%M:%S', $foo-format('U')).\n;

$bar = new datetimezone($name);
echo datetimezone object name: .$bar-getName();
?

Expected result:

Before: UTC
Setting timezone: GMT+02
After: GMT+02
strftime: 10:00:00
datetimezone object name: GMT+02

(not sure if GMT+02 is the correct timezone name. In any case, it should
be some timezone name that's accepted by other timezone-related
functions/classes)

Actual result:
--
Before: UTC
Setting timezone: +02:00
After: UTC
strftime: 08:00:00

PHP Fatal error:  Uncaught exception 'Exception' with message
'DateTimeZone::__construct(): Unknown or bad timezone (+02:00)' in
/path/to/index.php:10


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



#45167 [Asn]: timezones returned by datetime objects are not accepted by other functions

2008-06-04 Thread peter dot bex at solide-ict dot nl
 ID:   45167
 User updated by:  peter dot bex at solide-ict dot nl
 Reported By:  peter dot bex at solide-ict dot nl
 Status:   Assigned
 Bug Type: Date/time related
 Operating System: NetBSD/amd64
 PHP Version:  5.2.6
 Assigned To:  derick
 New Comment:

Can you elaborate a bit more? Why wasn't this intended to work and what
on earth are objects of type 3? The (identifiers) note doesn't help,
since identifiers are to me names for things in a programming language
(like variable names or class name and such).

Also, shouldn't date_default_timezone_set() throw an exception in the
way that the timezone class does when you pass it an invalid timezone?
Silently ignoring the timezone and doing nothing is what caused me a lot
of frustration and confusion in tracking what was going wrong in my
script. It took me a while before I found out that this was not working
(again, it is *very* unintuitive, and IMHO it qualifies as a bug).


Previous Comments:


[2008-06-04 10:27:21] [EMAIL PROTECTED]

Not really a bug, as it wasn't meant to do this for anything else than
timezone objects of type 3 (identifiers) - but that doesn't mean we
can't add it.



[2008-06-04 10:13:19] peter dot bex at solide-ict dot nl

Description:

When creating a datetime object from a string that includes timezone
offset information (like 10:00:00+02:00), the timezone object's name
can not be used for creating new timezone objects or setting the default
timezone. In effect, it's an impossible object: there's no way to
recreate an object like that yourself.

This also means you would get unexpected results when using, for
example, strftime(). If you use date_default_timezone_set to change the
timezone to the object's timezone and print the date info, it will give
you the wrong output.

Reproduce code:
---
?php
date_default_timezone_set('UTC');
echo Before: .date_default_timezone_get().\n;
$foo = new datetime('10:00:00+02:00');
$name = $foo-getTimeZone()-getName();
echo Setting timezone: $name\n;
date_default_timezone_set($name);
echo After: .date_default_timezone_get().\n;
echo strftime: .strftime('%H:%M:%S', $foo-format('U')).\n;

$bar = new datetimezone($name);
echo datetimezone object name: .$bar-getName();
?

Expected result:

Before: UTC
Setting timezone: GMT+02
After: GMT+02
strftime: 10:00:00
datetimezone object name: GMT+02

(not sure if GMT+02 is the correct timezone name. In any case, it
should be some timezone name that's accepted by other timezone-related
functions/classes)

Actual result:
--
Before: UTC
Setting timezone: +02:00
After: UTC
strftime: 08:00:00

PHP Fatal error:  Uncaught exception 'Exception' with message
'DateTimeZone::__construct(): Unknown or bad timezone (+02:00)' in
/path/to/index.php:10






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



#45167 [Asn]: timezones returned by datetime objects are not accepted by other functions

2008-06-04 Thread peter dot bex at solide-ict dot nl
 ID:   45167
 User updated by:  peter dot bex at solide-ict dot nl
 Reported By:  peter dot bex at solide-ict dot nl
 Status:   Assigned
 Bug Type: Date/time related
 Operating System: NetBSD/amd64
 PHP Version:  5.2.6
 Assigned To:  derick
 New Comment:

So what's type 3 then? (and what are types 1 and 2?)


Previous Comments:


[2008-06-04 11:54:31] [EMAIL PROTECTED]

date_default_timezone_set() doesn't throw an exception because it's a
procedural function. Instead, it returns false in case the
$timezone_identifier is invalid.

The identifier that I meant, is one of the Timezone Identifiers that
are documented here: http://no2.php.net/timezones



[2008-06-04 11:47:13] peter dot bex at solide-ict dot nl

Can you elaborate a bit more? Why wasn't this intended to work and what
on earth are objects of type 3? The (identifiers) note doesn't help,
since identifiers are to me names for things in a programming language
(like variable names or class name and such).

Also, shouldn't date_default_timezone_set() throw an exception in the
way that the timezone class does when you pass it an invalid timezone?
Silently ignoring the timezone and doing nothing is what caused me a lot
of frustration and confusion in tracking what was going wrong in my
script. It took me a while before I found out that this was not working
(again, it is *very* unintuitive, and IMHO it qualifies as a bug).



[2008-06-04 10:27:21] [EMAIL PROTECTED]

Not really a bug, as it wasn't meant to do this for anything else than
timezone objects of type 3 (identifiers) - but that doesn't mean we
can't add it.



[2008-06-04 10:13:19] peter dot bex at solide-ict dot nl

Description:

When creating a datetime object from a string that includes timezone
offset information (like 10:00:00+02:00), the timezone object's name
can not be used for creating new timezone objects or setting the default
timezone. In effect, it's an impossible object: there's no way to
recreate an object like that yourself.

This also means you would get unexpected results when using, for
example, strftime(). If you use date_default_timezone_set to change the
timezone to the object's timezone and print the date info, it will give
you the wrong output.

Reproduce code:
---
?php
date_default_timezone_set('UTC');
echo Before: .date_default_timezone_get().\n;
$foo = new datetime('10:00:00+02:00');
$name = $foo-getTimeZone()-getName();
echo Setting timezone: $name\n;
date_default_timezone_set($name);
echo After: .date_default_timezone_get().\n;
echo strftime: .strftime('%H:%M:%S', $foo-format('U')).\n;

$bar = new datetimezone($name);
echo datetimezone object name: .$bar-getName();
?

Expected result:

Before: UTC
Setting timezone: GMT+02
After: GMT+02
strftime: 10:00:00
datetimezone object name: GMT+02

(not sure if GMT+02 is the correct timezone name. In any case, it
should be some timezone name that's accepted by other timezone-related
functions/classes)

Actual result:
--
Before: UTC
Setting timezone: +02:00
After: UTC
strftime: 08:00:00

PHP Fatal error:  Uncaught exception 'Exception' with message
'DateTimeZone::__construct(): Unknown or bad timezone (+02:00)' in
/path/to/index.php:10






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



#45173 [NEW]: strftime formatting on datetime objects

2008-06-04 Thread peter dot bex at solide-ict dot nl
From: peter dot bex at solide-ict dot nl
Operating system: N/A
PHP version:  5.2.6
PHP Bug Type: Feature/Change Request
Bug description:  strftime formatting on datetime objects

Description:

1) The regular 'format' method on datetime objects only accepts date()
syntax, which is severely limited in what you can do with it. The strftime
syntax is more powerful.

2) As discussed in bug 45167, there's no way to call strftime using
datetime object values reliably, because there are ways to create datetime
objects with bogus timezone objects (objects which can not be recreated nor
can their names be passed to date_default_timezone_set).

Because of 1) and 2), there is a need to get strftime integrated in the
datetime class.

Reproduce code:
---
N/A

Expected result:

N/A

Actual result:
--
N/A

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



#45167 [Asn]: timezones returned by datetime objects are not accepted by other functions

2008-06-04 Thread peter dot bex at solide-ict dot nl
 ID:   45167
 User updated by:  peter dot bex at solide-ict dot nl
 Reported By:  peter dot bex at solide-ict dot nl
 Status:   Assigned
 Bug Type: Date/time related
 Operating System: NetBSD/amd64
 PHP Version:  5.2.6
 Assigned To:  derick
 New Comment:

What this means is that there is absolutely no reliable way to use
strftime on a datetime object with a timezone like that. I've created a
feature request (45173) for a strftime method on the datetime class.


Previous Comments:


[2008-06-04 12:07:35] [EMAIL PROTECTED]

Type 1 = UTC offset (+02:00)
Type 2 = Timezone Abbreviation (CEST, PDT)
Type 3 = Timezone Identifier (Europe/Oslo)

You can see this back in the output of date_parse() for example.



[2008-06-04 12:01:46] peter dot bex at solide-ict dot nl

So what's type 3 then? (and what are types 1 and 2?)



[2008-06-04 11:54:31] [EMAIL PROTECTED]

date_default_timezone_set() doesn't throw an exception because it's a
procedural function. Instead, it returns false in case the
$timezone_identifier is invalid.

The identifier that I meant, is one of the Timezone Identifiers that
are documented here: http://no2.php.net/timezones



[2008-06-04 11:47:13] peter dot bex at solide-ict dot nl

Can you elaborate a bit more? Why wasn't this intended to work and what
on earth are objects of type 3? The (identifiers) note doesn't help,
since identifiers are to me names for things in a programming language
(like variable names or class name and such).

Also, shouldn't date_default_timezone_set() throw an exception in the
way that the timezone class does when you pass it an invalid timezone?
Silently ignoring the timezone and doing nothing is what caused me a lot
of frustration and confusion in tracking what was going wrong in my
script. It took me a while before I found out that this was not working
(again, it is *very* unintuitive, and IMHO it qualifies as a bug).



[2008-06-04 10:27:21] [EMAIL PROTECTED]

Not really a bug, as it wasn't meant to do this for anything else than
timezone objects of type 3 (identifiers) - but that doesn't mean we
can't add it.



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

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



#43565 [NEW]: the alternative IF syntax doesnt work with echo

2007-12-11 Thread peter at 3p1 dot net
From: peter at 3p1 dot net
Operating system: linux
PHP version:  5.2.5
PHP Bug Type: Compile Failure
Bug description:  the alternative IF syntax doesnt work with echo

Description:

// Try this
$meta = array();
$meta['foo'] = 'bar';
$meta['foo2'] = 'bar2';

//-- THIS DOES NOT WORK -- 
($meta['foo']) ? print $meta['foo']  : echo ($meta['foo2']);

//-- THIS DOES WORKS -- 
($meta['foo']) ? print $meta['foo']  : print ($meta['foo2']);

Reproduce code:
---
// Try this
$meta = array();
$meta['foo'] = 'bar';
$meta['foo2'] = 'bar2';

//-- THIS DOES NOT WORK -- 
($meta['foo']) ? print $meta['foo']  : echo ($meta['foo2']);

//-- THIS DOES WORKS -- 
($meta['foo']) ? print $meta['foo']  : print ($meta['foo2']);


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


#43468 [NEW]: Curl doesn't handle php://memory stream

2007-12-01 Thread peter at petersmit dot eu
From: peter at petersmit dot eu
Operating system: Ubuntu Linux Gutsy Gibbon
PHP version:  5.2.5
PHP Bug Type: cURL related
Bug description:  Curl doesn't handle php://memory stream

Description:

If you use a php://memory stream in combination with curl, nothing is
written to the stream.

A filestream works fine.

Reproduce code:
---
?php

$c = curl_init(http://example.com;);
$st = fopen(php://memory, r+);

curl_setopt($c, CURLOPT_FILE, $st);

if(!curl_exec($c)) die (error: .curl_error($c));

rewind($st);
echo Content|.htmlspecialchars(stream_get_contents($st)).|/Content;
fclose($st);

?

Expected result:

Content|The content of example.org|/Content

Actual result:
--
Content||/Content

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


#31193 [Com]: iconv.c:254 undefined reference to 'libiconv'

2007-11-02 Thread w dot peter dot howell at meccahosting dot com
 ID:   31193
 Comment by:   w dot peter dot howell at meccahosting dot com
 Reported By:  david at cubbieco dot com
 Status:   No Feedback
 Bug Type: Compile Failure
 Operating System: linux gcc-3.2
 PHP Version:  5.0.3
 New Comment:

This problem still occurs in v5.2.4.  It's been 3 years now.  Does
someone plan to fix this?


Previous Comments:


[2007-07-24 09:09:29] janarbek at icu dot ac dot kr

I tried to install Php5.2.3  on Fedora 4 with Apache 2

if you add -liconv to EXTRA_LIBS then make works fine.



[2007-05-15 09:16:11] weber at lviv dot farlep dot net

Latest PHP 5.2.2.
Faced the same problem on RHES4.

My options:
./configure --with-apxs2=/usr/local/apache2/bin/apxs
--with-mysql=shared,/usr --with-xml --with-dom --enable-sockets
--enable-ftp

Even I compiled clean libiconv the problem persists. 
Solution was the same as described in the first post.



[2006-04-11 16:05:46] gaikwad_s at rediffmail dot com

I am trying to install php 5 on fedora linux 5 
it has generating error like
I searched on net but did got any clue regarding this 
usr/local/src/php-5.1.2/ext/iconv/iconv.c:772: undefined reference to
`libiconv'
:/usr/local/src/php-5.1.2/ext/iconv/iconv.c:890: undefined reference to
`libiconv_close'
ext/iconv/.libs/iconv.o: In function
`_php_iconv_appendl':/usr/local/src/php-5.1.2/ext/iconv/iconv.c:254:
undefined reference to `libiconv'
:/usr/local/src/php-5.1.2/ext/iconv/iconv.c:291: undefined reference to
`libiconv'
ext/iconv/.libs/iconv.o: In function
`_php_iconv_mime_decode':/usr/local/src/php-5.1.2/ext/iconv/iconv.c:1251:
undefined reference to `libiconv_open'
:/usr/local/src/php-5.1.2/ext/iconv/iconv.c:1362: undefined reference
to `libiconv_close'
:/usr/local/src/php-5.1.2/ext/iconv/iconv.c:1365: undefined reference
to `libiconv_open'
:/usr/local/src/php-5.1.2/ext/iconv/iconv.c:1718: undefined reference
to `libiconv_close'
:/usr/local/src/php-5.1.2/ext/iconv/iconv.c:1721: undefined reference
to `libiconv_close'
ext/iconv/.libs/iconv.o: In function
`php_iconv_stream_filter_dtor':/usr/local/src/php-5.1.2/ext/iconv/iconv.c:2309:
undefined reference to `libiconv_close'
ext/iconv/.libs/iconv.o: In function
`php_iconv_stream_filter_append_bucket':/usr/local/src/php-5.1.2/ext/iconv/iconv.c:2459:
undefined reference to `libiconv'
:/usr/local/src/php-5.1.2/ext/iconv/iconv.c:2381: undefined reference
to `libiconv'
ext/iconv/.libs/iconv.o: In function
`php_iconv_stream_filter_ctor':/usr/local/src/php-5.1.2/ext/iconv/iconv.c:2335:
undefined reference to `libiconv_open'
ext/iconv/.libs/iconv.o: In function
`_php_iconv_substr':/usr/local/src/php-5.1.2/ext/iconv/iconv.c:618:
undefined reference to `libiconv_open'
:/usr/local/src/php-5.1.2/ext/iconv/iconv.c:641: undefined reference to
`libiconv'
:/usr/local/src/php-5.1.2/ext/iconv/iconv.c:698: undefined reference to
`libiconv_close'
:/usr/local/src/php-5.1.2/ext/iconv/iconv.c:702: undefined reference to
`libiconv_close'
:/usr/local/src/php-5.1.2/ext/iconv/iconv.c:649: undefined reference to
`libiconv_open'
ext/iconv/.libs/iconv.o: In function
`_php_iconv_mime_encode':/usr/local/src/php-5.1.2/ext/iconv/iconv.c:940:
undefined reference to `libiconv_open'
:/usr/local/src/php-5.1.2/ext/iconv/iconv.c:954: undefined reference to
`libiconv_open'
:/usr/local/src/php-5.1.2/ext/iconv/iconv.c:1213: undefined reference
to `libiconv_close'
:/usr/local/src/php-5.1.2/ext/iconv/iconv.c:1216: undefined reference
to `libiconv_close'
:/usr/local/src/php-5.1.2/ext/iconv/iconv.c:1216: undefined reference
to `libiconv_close'
:/usr/local/src/php-5.1.2/ext/iconv/iconv.c:1073: undefined reference
to `libiconv'
:/usr/local/src/php-5.1.2/ext/iconv/iconv.c:1025: undefined reference
to `libiconv'
:/usr/local/src/php-5.1.2/ext/iconv/iconv.c:1057: undefined reference
to `libiconv'
:/usr/local/src/php-5.1.2/ext/iconv/iconv.c:1125: undefined reference
to `libiconv'
:/usr/local/src/php-5.1.2/ext/iconv/iconv.c:1156: undefined reference
to `libiconv'
ext/iconv/.libs/iconv.o:/usr/local/src/php-5.1.2/ext/iconv/iconv.c:1200:
more undefined references to `libiconv' follow
collect2: ld returned 1 exit status
make: *** [sapi/cli/php] Error 1



[2005-01-31 22:29:05] [EMAIL PROTECTED]

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





[2005-01-11 06:53:09] [EMAIL PROTECTED]

Where (and why) did you install libiconv ? It wouldn't 
be needed because glibc

#40479 [Com]: zend_mm_heap corrupted

2007-09-28 Thread peter at ibuildings dot nl
 ID:   40479
 Comment by:   peter at ibuildings dot nl
 Reported By:  rrossi at maggioli dot it
 Status:   No Feedback
 Bug Type: Reproducible crash
 Operating System: Suse Linux 9.0
 PHP Version:  5.2.1
 New Comment:

Same problem here on OS X 10.4.10, ZendCore 2.0.1, PHP 5.2.3.


Previous Comments:


[2007-09-08 02:03:44] danny at dannysplace dot net

I have the same problem when trying to run a fresh version of Horde
with Kronolith module.

Php v5.2.3 on FreeBSD 6.2 nad apache 2.0.59.



[2007-08-16 08:03:54] rz at lightwerk dot com

I have the same error message in my apache logs with PHP 5.2.3
zend_mm_heap corupted. I tried to track it down to a specific code but
it seems to be a problem with included files (classes) which exceeds a
specific size. No matter which lines I delete in my script as long as
they don´t excess about 700 lines they work. As soon as the overall
lines exceed about 700 lines the error occurs again. Hope this will help
you to fix the problem.



[2007-07-03 23:32:55] giampaolo at tomassoni dot biz

I'm experiencing the very same problem reported by rocker_pr.

It seems to me that this problem is triggered by using PHP5 classes,
but I can't provide a small testcase: no small code seems affected.



[2007-04-26 14:11:47] christian dot kaps at imaxx21 dot com

Hi
 
I get the same message in my logs. I can reproduce the error in our
system, but it is impossible to locate it. Sometimes I can reproduce the
error by editing a comment. I add a character and the error occurs. I
remove the character and the script runs perfectly. Each time I try to
isolate the error I can reproduce it with an other action.

That what i could isolate is:
-load xml file with simplexml
-add a node
-clone the object
-process xpath query
-print the object with print_r
-serialize the object
-include a file (the error occurs)

When I edit the included file. E.g. remove methods or properties the
script runs without errors. That is funny(o;

Version: 5.2.1
Os: ubuntu



[2007-04-17 14:04:58] [EMAIL PROTECTED]

We still don't have zero info on how to reproduce it.



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

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


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

2007-08-22 Thread peter at 3p1 dot net
 ID:   16263
 Comment by:   peter at 3p1 dot net
 Reported By:  kur at natur dot cuni dot cz
 Status:   No Feedback
 Bug Type: Session related
 Operating System: ANY
 PHP Version:  4.3.0-dev
 New Comment:

hELLo i use php 5.1 and still experience this bug


Previous Comments:


[2007-08-03 13:17:26] shivam dot honey at gmail dot com

Hi Every one.
My name is shivam.
Thanks for the suggestion i tried it and now its not giving me any
error just simply printing mail sent successfully

But i m NOT getting the mail delivered to the recipient account

my new php.ini mail setting are

[mail function]
SMTP = smtp.cc.iitk.ac.in
sendmail_from = [EMAIL PROTECTED]

; For Unix only.  You may supply arguments as well (default: 'sendmail
-t -i').
sendmail_path = /usr/local/sbin/sendmail -t -i

and my code is

?php 
if(mail('[EMAIL PROTECTED]', 'xxx', 'yyy')) {
 echo('pMail sent successfully./p'); 
} else {
 echo('pMail could not be sent./p');
}
?


Now i m just wondering if
1. my mail settings are not correct or 
2. my smtp server is not forwarding the mail or
3. the reciepient server is not excepting the mail

can anyone HELP me!!!
Please do mention ur name would b easy to address.
Thanks in advance



[2007-08-01 16:58:52] breda at unisolution dot de

I had the same problem with IIS (version? from XP Pro) and PHP 5.2.3. I
changed the session.save_path to a simple path without weird windows
short form (like PROGRA~1 and so on) and reinstalled php with the
windows php installer and it works now.



[2007-07-24 06:39:48] shivam dot honey at gmail dot com

Windows XP Professional Service Pack 2, v.2096 (build 2600)
Internet Explorer 6
Php triad
   Php 4.1.1
   Apache 1.3.23

I have changed the php.ini file in my default folder C:\apache\php
 i.e., SMTP = smtp.cc.iitk.ac.in(my mail server in iitk,india) 
   sendmail_from = [EMAIL PROTECTED] (my e-mail id)

The code i am using is simple

?php
  mail('shivam.honey','Hi','Hello');
?

Everything seems to be fine but i am getting an error --

Warning: Server Error in c:\apache\htdocs\experiment\e-mail.php on
line
2

where, as i am able to send mails from my outlook account using the
same
mail server.


Please someone listen i got some serious problem,i gotta show it to
someone!!!
Please reply me at [EMAIL PROTECTED]



[2007-07-22 15:59:07] shivam dot honey at gmail dot com

Windows XP Professional Service Pack 2, v.2096 (build 2600)
Internet Explorer 6
Php triad
   Php 4.1.1
   Apache 1.3.23

I have changed the php.ini file in my default folder C:\apache\php
 i.e., SMTP = smtp.cc.iitk.ac.in(my mail server in iitk,india) 
   sendmail_from = [EMAIL PROTECTED] (my e-mail id)

The code i am using is simple

?php
  mail('shivam.honey','Hi','Hello');
?


Everything seems to be fine but i am getting an error --

Warning: Server Error in c:\apache\htdocs\experiment\e-mail.php on line
2


where, as i am able to send mails from my outlook account using the
same mail server.

Please Help!!! me out.
Please!



[2007-07-10 14:48:23] ponas dot termas at gmail dot com

Win XP
IE 7
PHP 5.2.3
Apache 2.2

Suggested sollutions not helped. When I am using site as
http://localhost/site it works well, session resumed.
When I am using site using computer name (externally)
http://computer_name/site, session is not resumed and separate files are
created for it.



The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
http://bugs.php.net/16263

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


#42239 [Bgs]: class member is broken after retrieving from a session

2007-08-08 Thread peter dot evertz at snafu dot de
 ID:   42239
 User updated by:  peter dot evertz at snafu dot de
 Reported By:  peter dot evertz at snafu dot de
 Status:   Bogus
 Bug Type: Session related
 Operating System: Linux 2.6.18
 PHP Version:  5.2.4RC1
 New Comment:

Sorry for writing a Bug-report. And thank you for your hint for a
work-around.

 
Are there plans to remove this limitation ?


Previous Comments:


[2007-08-08 12:14:42] [EMAIL PROTECTED]

Objects of internal classes can't be serialized and therefore can't be
stored in a session. You might use __sleep/__wakeup magic methods to
store the timestamp in the session and then restore it.



[2007-08-08 00:02:23] peter dot evertz at snafu dot de

Description:

I found this while using propel. It uses DateTime class for storing.
After retrieving the class from a Session the member is broken.

The code creates a session variabel v with the given class if not
found.On the second call to the script the class is retrievies from
session. The member x is broken.


Reproduce code:
---
?php
  class c {
protected $v;

function print_type() {
  if ( $this-v instanceof DateTime ) {
print x is DateTime\n;
  }
}
function get_v() {
  return $this-v;
}
function set_v($i) {
  $this-v=$i;
}
  }

session_start();

if ( !isset($_SESSION[x] )) {
  $x = new c();
  $x-set_v( new DateTime());
  $_SESSION[x]=$x;
  print New object created\n;
}

$_SESSION[x]-print_type();
print $_SESSION[x]-get_v()-format(d.m.Y);
?


Expected result:

First call:
New object created x is DateTime 08.08.2007

Second call:
x is DateTime 08.08.2007

Actual result:
--
First call:
New object created x is DateTime 08.08.2007

Second call:
x is DateTime Warning: DateTime::format(): The DateTime object has not
been correctly initialized by its constructor in
/home/peter/workspace/Kurse/html/t1.php on line 28





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


#42239 [NEW]: class member is broken after retrieving vom Session

2007-08-07 Thread peter dot evertz at snafu dot de
From: peter dot evertz at snafu dot de
Operating system: Linux 2.6.18
PHP version:  5.2.4RC1
PHP Bug Type: Session related
Bug description:  class member is broken after retrieving vom Session

Description:

I found this while using propel. It uses DateTime class for storing.
After retrieving the class from a Session the member is broken.

The code creates a session variabel v with the given class if not
found.On the second call to the script the class is retrievies from
session. The member x is broken.


Reproduce code:
---
?php
  class c {
protected $v;

function print_type() {
  if ( $this-v instanceof DateTime ) {
print x is DateTime\n;
  }
}
function get_v() {
  return $this-v;
}
function set_v($i) {
  $this-v=$i;
}
  }

session_start();

if ( !isset($_SESSION[x] )) {
  $x = new c();
  $x-set_v( new DateTime());
  $_SESSION[x]=$x;
  print New object created\n;
}

$_SESSION[x]-print_type();
print $_SESSION[x]-get_v()-format(d.m.Y);
?


Expected result:

First call:
New object created x is DateTime 08.08.2007

Second call:
x is DateTime 08.08.2007

Actual result:
--
First call:
New object created x is DateTime 08.08.2007

Second call:
x is DateTime Warning: DateTime::format(): The DateTime object has not
been correctly initialized by its constructor in
/home/peter/workspace/Kurse/html/t1.php on line 28

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


#41387 [NEW]: Magic methods __set/__get broken

2007-05-14 Thread peter at ibuildings dot nl
From: peter at ibuildings dot nl
Operating system: Windows XP Professional
PHP version:  5.2.2
PHP Bug Type: Class/Object related
Bug description:  Magic methods __set/__get broken

Description:

I've created a small class that implements the magic __set, __get and
__isset methods. Using PHP 5.1.6 I can assign an array to a fake instance
variable and then add elements to it. Doing the same using PHP 5.2.1 or
5.2.2 doesn't change the contents of the array. 

I've tried returning a reference from the __get method (e.g. changes the
function definition to function __get($key, $value) ..., but this
doesn't work either (although PHP doesn't complain about it).

If this wasn't supposed to work with PHP 5.1.6 how should I then implement
this to get the desired behaviour? If this isn't possible at all then that
means __set/__get are far less usable then before.

Reproduce code:
---
class Data
{
  private $m_data = array();

  function __set($key, $value) { $this-m_data[$key] = $value; }
  function __get($key) { return $this-m_data[$key]; }
  function __isset($key) { return isset($this-m_data[$key]); }

  function dump() { var_dump($this-m_data); }
}

$obj = new Data();
$obj-a = a;
$obj-b = array();
$obj-b[] = '1';
$obj-b[] = '2';
$obj-b[] = '3';
$obj-dump();

Expected result:

array(2) {
  [a]=
  string(1) a
  [b]=
  array(3) {
[0]=
string(1) 1
[1]=
string(1) 2
[2]=
string(1) 3
  }
}

Actual result:
--
array(2) {
  [a]=
  string(1) a
  [b]=
  array(0) {
  }
}

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


#41387 [Opn]: Magic methods __set/__get broken

2007-05-14 Thread peter at ibuildings dot nl
 ID:   41387
 User updated by:  peter at ibuildings dot nl
 Reported By:  peter at ibuildings dot nl
 Status:   Open
 Bug Type: Class/Object related
 Operating System: Windows XP Professional
 PHP Version:  5.2.2
 New Comment:

Ok, but this did work using PHP 5.1.6 so you can call this a
regression. If I understand this correctly the only way to work-around
this is using some code like the following:

$b = array();
$b[] = '1';
$b[] = '2';
$b[] = '3';
$obj-b = $b; 

Or in a more realistic case where other methods assign something to the
object:

$b = $obj-b;
$b[] = '3';
$obj-b = $b;

Seems not very intuitive to me.


Previous Comments:


[2007-05-14 08:27:42] judas dot iscariote at gmail dot com

turn on error reporting and you will find the cause.

PHP Notice:  Indirect modification of overloaded property Data::$b has
no effect.



[2007-05-14 08:21:25] peter at ibuildings dot nl

Description:

I've created a small class that implements the magic __set, __get and
__isset methods. Using PHP 5.1.6 I can assign an array to a fake
instance variable and then add elements to it. Doing the same using PHP
5.2.1 or 5.2.2 doesn't change the contents of the array. 

I've tried returning a reference from the __get method (e.g. changes
the function definition to function __get($key, $value) ..., but this
doesn't work either (although PHP doesn't complain about it).

If this wasn't supposed to work with PHP 5.1.6 how should I then
implement this to get the desired behaviour? If this isn't possible at
all then that means __set/__get are far less usable then before.

Reproduce code:
---
class Data
{
  private $m_data = array();

  function __set($key, $value) { $this-m_data[$key] = $value; }
  function __get($key) { return $this-m_data[$key]; }
  function __isset($key) { return isset($this-m_data[$key]); }

  function dump() { var_dump($this-m_data); }
}

$obj = new Data();
$obj-a = a;
$obj-b = array();
$obj-b[] = '1';
$obj-b[] = '2';
$obj-b[] = '3';
$obj-dump();

Expected result:

array(2) {
  [a]=
  string(1) a
  [b]=
  array(3) {
[0]=
string(1) 1
[1]=
string(1) 2
[2]=
string(1) 3
  }
}

Actual result:
--
array(2) {
  [a]=
  string(1) a
  [b]=
  array(0) {
  }
}





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


#38982 [Com]: No SSL-socket functions in CLI

2007-04-05 Thread peter dot arien at cc dot kuleuven dot be
 ID:   38982
 Comment by:   peter dot arien at cc dot kuleuven dot be
 Reported By:  admin at denic-294 dot de
 Status:   No Feedback
 Bug Type: OpenSSL related
 Operating System: Debian different releases
 PHP Version:  4.4.4
 New Comment:

Same problem with PHP 4.4.6

config:
./configure \
  --with-config-file-path=/usr/local/etc \
  --disable-safe-mode \
  --enable-track-vars \
  --enable-ftp \
  --disable-debug \
  --with-mysql=/usr/local/mysql50 \
  --with-dom \
  --with-gdbm \
  --with-zlib \
  --with-iconv=/usr/local \
  --with-snmp \
  --with-gd \
  --with-curl \
  --with-openssl \
  --enable-xslt \
  --with-xslt-sablot \
  --with-freetype-dir=/usr \
  --with-mcrypt \
  --with-oracle=/oracle/product/8.1.7 \
  --with-ldap

# ldd /usr/local/bin/php|grep ssl
  libssl.so.0.9.7 = /usr/lib/i686/cmov/libssl.so.0.9.7 (0x4d34e000)

# php -i|grep -i ssl
Configure Command =  './configure'
'--with-config-file-path=/usr/local/etc' '--disable-safe-mode'
'--enable-track-vars' '--enable-ftp' '--disable-debug'
'--with-mysql=/usr/local/mysql50' '--with-gdbm'
'--with-iconv=/usr/local' '--with-dom' '--with-zlib' '--with-snmp'
'--with-gd' '--with-curl' '--enable-xslt' '--with-xslt-sablot'
'--with-openssl' '--with-freetype-dir=/usr' '--with-mcrypt'
'--with-oracle=/oracle/product/8.1.7' '--with-ldap'
CURL Information = libcurl/7.13.2 OpenSSL/0.9.7e zlib/1.2.3
libidn/0.5.13
openssl
OpenSSL support = enabled
OpenSSL Version = OpenSSL 0.9.7e 25 Oct 2004

Testscript: test.php

?php
$fp = fsockopen(ssl://www.entropy.ch, 443, $errno, $errstr, 10);
if (!$fp) {
echo $errstr ($errno)br /\n;
} else {
$out = GET /home/ HTTP/1.1\r\n;
$out .= Host: www.entropy.ch\r\n;
$out .= Connection: Close\r\n\r\n;
fwrite($fp, $out);
while (!feof($fp)) {
echo fgets($fp, 128);
}
fclose($fp);
}
?

Result:

# php test.php

Warning: fsockopen(): no SSL support in this build in /tmp/test.php on
line 3
Warning: fsockopen(): unable to connect to www.entropy.ch:443 in
/tmp/test.php on line 3
Success (0)br /

This test-script does work with the apache-module version of PHP on the
same server with the same (except for the specific CLI config entries)
config.


Previous Comments:


[2007-02-23 15:29:02] xawiers at gmail dot com

System = FreeBSD 6.1-RELEASE-p12
Build Date = Feb 23 2007 17:11:29
Configure Command =  './configure' '--enable-versioning'
'--enable-memory-limit' '--with-layout=GNU'
'--with-config-file-scan-dir=/usr/local/etc/php' '--disa
ble-all' '--program-prefix=' '--enable-force-cgi-redirect'
'--enable-discard-path' '--enable-fastcgi' '--with-regex=php'
'--with-openssl=/usr/local' '--with-o
penssl-dir=/usr/local' '--with-zlib=/usr' '--enable-zend-multibyte'
'--disable-ipv6' '--prefix=/usr/local'
Server API = Command Line Interface

Registered PHP Streams = php, http, ftp, https, ftps, compress.zlib

[PHP Modules]
openssl
standard
zlib

WHERE IS SSL TLS stream ???



[2007-02-15 04:00:27] mi7892 at hotmail dot com

I got the same problem too, i compile php-4.4.4 with following
command:

./configure --prefix=/usr/local/php4
--with-config-file-path=/usr/local/php4 --with-mysql=/usr/local/mysql
--with-openssl=/usr/local/ssl --with-apxs2=/usr/local/apache2/bin/apxs
--disable-all

and run the following php in cli.

?php
$a = file_get_contents('https://www.interwetten.com');
?

I got the following result:

[EMAIL PROTECTED] bin]# ./php ~/a.php

Warning: file_get_contents(): php_stream_sock_ssl_activate_with_method:
failed to create an SSL context in /root/a.php on line 3

Warning: file_get_contents(https://www.interwetten.com): failed to open
stream: Unable to activate SSL mode in /root/a.php on line 3


here is the result from php -m

[EMAIL PROTECTED] bin]# ./php -m
[PHP Modules]
mysql
openssl
standard

[Zend Modules]



[2006-10-06 01:00:01] php-bugs at lists dot php dot net

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



[2006-09-28 15:28:02] [EMAIL PROTECTED]

Please try to configure it with just ./configure --disable-all
--with-openssl.



[2006-09-28 15:10:04] [EMAIL PROTECTED]

Does php -m show the ssl extension as being loaded?



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

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


#40673 [NEW]: Downloads

2007-02-28 Thread peter at advancedwebdb dot com
From: peter at advancedwebdb dot com
Operating system: Server 2003
PHP version:  5.2.1
PHP Bug Type: Unknown/Other Function
Bug description:  Downloads

Description:

The download speed from the slected site is terrible . it is
3.33 kbs/sec 

I have an OS4 connection ...

Is this speed normal 


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


#39449 [Com]: Overloaded array properties do not work correctly

2006-12-06 Thread mail at peter-thomassen dot de
 ID:   39449
 Comment by:   mail at peter-thomassen dot de
 Reported By:  pstradomski at gmail dot com
 Status:   Assigned
 Bug Type: Scripting Engine problem
 Operating System: Linux
 PHP Version:  5.2.0
 Assigned To:  dmitry
 New Comment:

I do agree with Denis in the sense that one should disable 
the notice for read access (using foreach, p.ex.), until a 
global solution including write access is found (or not). 
This doesn't harm anyone and would save me some lines of 
error_reporting() changes. Thanks!


Previous Comments:


[2006-12-06 11:08:10] brjann at gmail dot com

// This should not raise notice
foreach( $a-overloaded_property as $val )
echo $val.br /\n;

// This should raise notice
$a-overloaded_property[] = 6;

I do not agree with that. Neither of the examples should raise a
notice. There is no reason for

$a-overloadedprop = $bar

to work, but not

$a-overloadedprop[$foo] = $bar 

or

foreach($a-overloadedprop){}

Either properties can be overloaded and therefore read, assigned and
iterated over, or not. Overloaded properties should behave the same way
as ordinary properties, or else the object's behaviour is
unpredictable.

Perhaps the solution of using __get() to return a reference is
unsatisfactory in some way, but the behaviour should still be there.

/Brjánn



[2006-12-04 08:55:15] denis at edistar dot com

I think the warning should be raised only when someone is 
trying to write the overloaded property.

Foreach and other loop constructs are readonly constructs 
except when they are using references of the overloaded 
properties.

For example:
?php

class A{

private $test = array(1,2,3,4,5);

public function __get($v){
return $this-test;
}

}

$a = new A;

// This should not raise notice
foreach( $a-overloaded_property as $val )
echo $val.br /\n;

// This should raise notice
$a-overloaded_property[] = 6;

?

Thank you,
Denis



[2006-11-19 11:53:11] v dot anagnostos at mail dot bg

Reproduce code:
---

?php

class A{

private $test = array(1,2,3,4,5);

public function __get($v){
return $this-test;
}

}

$a = new A;

foreach( $a-overloaded_property as $val )
echo $val.br /\n;

?

Expected result:


1
2
3
4
5

Actual result:
--

Notice: Indirect modification of overloaded property
A::$overloaded_property has no effect in
C:\Apache\htdocs\dancho\index.php on line 15
1
2
3
4
5



[2006-11-14 20:31:16] cboden at gmail dot com

In the above example:
  $a-arr[]='d';
produced the expected results in PHP-5.1 but now gives the following
error in PHP-5.2
Notice: Indirect modification of overloaded property



[2006-11-09 14:05:23] pstradomski at gmail dot com

Reopening.

This should never be expected behaviour. This way encapsulation got
severly broken - __get was introduced to allow dynamic creation of
properties - and therefore implementation of record-like classes. Such
properties were meant to be indistinguishable from standard properties
- but aren't. Neither passing by reference works, nor array elements
do.

Developer can expect to be able to modify object properties for example
in such a way:

$x-arr = array('a');
array_push($x-arr, 'b');

Now it is impossible - although it should be. I understand previous
behaviour could be considered improper, bu now developers don't even
get a chance to choose between passing by value and passing by
reference.



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

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


#39683 [NEW]: SSH does not disconnect gracefully

2006-11-29 Thread peter dot wilton-jones at eads dot com
From: peter dot wilton-jones at eads dot com
Operating system: Windows 2003
PHP version:  5.2.0
PHP Bug Type: *Network Functions
Bug description:  SSH does not disconnect gracefully

Description:

I have a page that refreshes every minute. In that page, I open an ssh
session and obtain data. There is no way to close the ssh connection. On
reload, php opens a new connection but does not terminate the last one or
reuse the existing one.
Running a NETSTAT command reveals numerous connections in the CLOSE_WAIT
status after several minutes.
Can a close SSH option be included?

Reproduce code:
---
?php
$connection = ssh2_connect('myserver',22);
ssh2_auth_password($connection,'username','password');
$stream = ss2_exec($connection,'df -k',FALSE);
stream_set_blocking($stream, TRUE);
$output = fread($stream,4096);
fclose($stream);
echo $output;
?

Expected result:

Connection should show nothing

Actual result:
--
netstat -a shows


TCP myweb:  myserver:22 CLOSE_WAIT
TCP myweb:  myserver:22 CLOSE_WAIT
TCP myweb:  myserver:22 CLOSE_WAIT
TCP myweb:  myserver:22 CLOSE_WAIT
TCP myweb:  myserver:22 CLOSE_WAIT
TCP myweb:  myserver:22 CLOSE_WAIT
TCP myweb:  myserver:22 CLOSE_WAIT
TCP myweb:  myserver:22 CLOSE_WAIT
TCP myweb:  myserver:22 CLOSE_WAIT
TCP myweb:  myserver:22 CLOSE_WAIT
---

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


#39096 [Bgs]: OCI8 fails to load fully

2006-10-10 Thread peter dot wilton-jones at eads dot com
 ID:   39096
 User updated by:  peter dot wilton-jones at eads dot com
 Reported By:  peter dot wilton-jones at eads dot com
 Status:   Bogus
 Bug Type: OCI8 related
 Operating System: Windows 2003 Server
 PHP Version:  5.1.6
 New Comment:

Attempted that and now it had loaded the libraries into PHPINFO but
produces another error ORA-12705. This instantly points at the
environment but this does not appear to be the reason.

I have removed all references to ORACLE and then placed the following
Enviromnents
PATH=c:\ociClient;c:\php;.
LD_LIBRARY_PATH=c:\ociClient
TNS_ADMIN=c:\ociClient

All files from the Client Libraries are in c:\ociClient

I have attempted to use the onld TNSNAMES.ora file as previously
working but this failed and I have also attempted to write the SID
manually but all fail.

This now appears to be another problm from the origional but still does
not appear to work fully.


Previous Comments:


[2006-10-09 16:39:11] [EMAIL PROTECTED]

You must install Oracle Instant Client in order to use newer versions
of OCI8 on Windows.



[2006-10-09 15:05:26] peter dot wilton-jones at eads dot com

Description:

When upgrading from 5.0.5 to 5.1.6 I am unable to get php_oci8.dll to
load correctly.

I am using all of the same parameters that I used in 5.0.5 and have
even tried the same php,ini file but it fails to load.

I do NOT get an error saying that php_oci8.dll cannot be found and it
is definately UN-commented in php.ini.

When I then attempt an oci_connect or oci_pconnect, I get an error
saying 
Fatal error: Call to undefined function oci_connect() in 

Examining phpinfo, no entry for oci8 exists however the location of
php.ini is correct.

Both 5.0.5 and 5.1.6 are set up in the same way and oci.dll is in the
same location therefore is cannot be Oracle Library errors.

I have tried both the php_oci8.dll that came with the distribution and
from http://pecl4win.php.net/ext.php/php_oci8.dll (5.1.2) but both
produced the same error.

Reproduce code:
---
$ora_handler = oci_connect (myusername, mypassword, mydatabase);

Actual result:
--
No output was given apart from error Fatal error: Call to undefined
function oci_connect() in 






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


#39096 [Bgs]: OCI8 fails to load fully

2006-10-10 Thread peter dot wilton-jones at eads dot com
 ID:   39096
 User updated by:  peter dot wilton-jones at eads dot com
 Reported By:  peter dot wilton-jones at eads dot com
 Status:   Bogus
 Bug Type: OCI8 related
 Operating System: Windows 2003 Server
 PHP Version:  5.1.6
 New Comment:

Problem Resolved.

This was not a PHP issue, sorry for raising the bug report for a non
bug. Please close this case.

For your information. The resolution was to edit the registry
HKLM/Software/Oracle by renaming NLS_LANG to xLNS_LANG.
This is not an issue if you have never installed the Full Oracle
Client.


Previous Comments:


[2006-10-10 08:53:05] peter dot wilton-jones at eads dot com

Attempted that and now it had loaded the libraries into PHPINFO but
produces another error ORA-12705. This instantly points at the
environment but this does not appear to be the reason.

I have removed all references to ORACLE and then placed the following
Enviromnents
PATH=c:\ociClient;c:\php;.
LD_LIBRARY_PATH=c:\ociClient
TNS_ADMIN=c:\ociClient

All files from the Client Libraries are in c:\ociClient

I have attempted to use the onld TNSNAMES.ora file as previously
working but this failed and I have also attempted to write the SID
manually but all fail.

This now appears to be another problm from the origional but still does
not appear to work fully.



[2006-10-09 16:39:11] [EMAIL PROTECTED]

You must install Oracle Instant Client in order to use newer versions
of OCI8 on Windows.



[2006-10-09 15:05:26] peter dot wilton-jones at eads dot com

Description:

When upgrading from 5.0.5 to 5.1.6 I am unable to get php_oci8.dll to
load correctly.

I am using all of the same parameters that I used in 5.0.5 and have
even tried the same php,ini file but it fails to load.

I do NOT get an error saying that php_oci8.dll cannot be found and it
is definately UN-commented in php.ini.

When I then attempt an oci_connect or oci_pconnect, I get an error
saying 
Fatal error: Call to undefined function oci_connect() in 

Examining phpinfo, no entry for oci8 exists however the location of
php.ini is correct.

Both 5.0.5 and 5.1.6 are set up in the same way and oci.dll is in the
same location therefore is cannot be Oracle Library errors.

I have tried both the php_oci8.dll that came with the distribution and
from http://pecl4win.php.net/ext.php/php_oci8.dll (5.1.2) but both
produced the same error.

Reproduce code:
---
$ora_handler = oci_connect (myusername, mypassword, mydatabase);

Actual result:
--
No output was given apart from error Fatal error: Call to undefined
function oci_connect() in 






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


#39096 [NEW]: OCI8 fails to load fully

2006-10-09 Thread peter dot wilton-jones at eads dot com
From: peter dot wilton-jones at eads dot com
Operating system: Windows 2003 Server
PHP version:  5.1.6
PHP Bug Type: OCI8 related
Bug description:  OCI8 fails to load fully

Description:

When upgrading from 5.0.5 to 5.1.6 I am unable to get php_oci8.dll to load
correctly.

I am using all of the same parameters that I used in 5.0.5 and have even
tried the same php,ini file but it fails to load.

I do NOT get an error saying that php_oci8.dll cannot be found and it is
definately UN-commented in php.ini.

When I then attempt an oci_connect or oci_pconnect, I get an error saying

Fatal error: Call to undefined function oci_connect() in 

Examining phpinfo, no entry for oci8 exists however the location of
php.ini is correct.

Both 5.0.5 and 5.1.6 are set up in the same way and oci.dll is in the same
location therefore is cannot be Oracle Library errors.

I have tried both the php_oci8.dll that came with the distribution and
from http://pecl4win.php.net/ext.php/php_oci8.dll (5.1.2) but both
produced the same error.

Reproduce code:
---
$ora_handler = oci_connect (myusername, mypassword, mydatabase);

Actual result:
--
No output was given apart from error Fatal error: Call to undefined
function oci_connect() in 


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


#38503 [Com]: Can't load UTF-8 CLOBS

2006-09-29 Thread peter dot oulman at uponor-usa dot com
 ID:   38503
 Comment by:   peter dot oulman at uponor-usa dot com
 Reported By:  thomas dot adams at interone dot de
 Status:   No Feedback
 Bug Type: OCI8 related
 Operating System: Ubuntu 4.0.3-1
 PHP Version:  5.1.5
 New Comment:

We are experiencing the same issue with PHP v. 5.1.6 on the Linux
platform. We also confirmed that downgrading to v. 5.1.2 resolved the
problem.


Previous Comments:


[2006-08-26 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.



[2006-08-18 20:35:13] [EMAIL PROTECTED]

Please try using this CVS snapshot:

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





[2006-08-18 16:26:33] thomas dot adams at interone dot de

Description:

Versions of PHP newer than 5.1.2
(5.1.3/4/5) failed at loading a CLOB in a UTF-8 Oracle
Database (tested with Oracle 10.2).

There are neither exceptions thrown nor
any other error messages are shown. 

The statement  echo $row[0]-load(); returns simply no
output. Downgrading to version 5.1.2 resolves this, so this might be
bug.   

Kind regards
Thomas Adams




Reproduce code:
---
$sql='select ID, TEXT from TEST_CLOB'; // where Text is CLOB
$stmt = oci_parse($connection, $sql);
oci_execute($stmt)
or die (Unable to execute query\n);
$i=0;
while ( $row = oci_fetch_array($stmt,OCI_NUM) ) {
echo ($i+1) .. $row[0] . : ;
print $row[1]-load();
print  ... this is  . (is_object($row[1])? an object : not an
object );
print  ... object is  . (is_a($row[1],'OCI-Lob')?a OCI-Lob
:not a OCI-Lob );
print  ... class name of object is  . get_class($row[1]);
print  ... vardump is ;
var_dump($row);
print 'br /';
$i++;
}

Expected result:

The print $row[1]-load(); line should return
the actual values from the select statement.

Actual result:
--
row[1]-load() returns nothing.





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


#38512 [Fbk-Opn]: PCRE 6.6 crashing PHP with specific calls to preg_match()

2006-08-22 Thread peter dot mescalchin at gmail dot com
 ID:   38512
 User updated by:  peter dot mescalchin at gmail dot com
 Reported By:  peter dot mescalchin at gmail dot com
-Status:   Feedback
+Status:   Open
 Bug Type: PCRE related
 Operating System: Windows XP
 PHP Version:  5.1.5
 New Comment:

The 5.2 build fixes the issue. This bug can be closed I guess.

Thanks.


Previous Comments:


[2006-08-21 08:29:22] [EMAIL PROTECTED]

Please try using this CVS snapshot:

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





[2006-08-19 13:51:38] peter dot mescalchin at gmail dot com

Description:

Passing large strings to PCRE functions in PHP versions 5.1.3 or
greater and Apache 2.0.59 with the regexp /(\r|\n|.)*/ crashes
PHP/Apache request.

Referring to the source code, a string length greater than 376
character crashes the request.

Rolling back to PHP 5.1.2, using PCRE 6.2 works correctly without
crashing for string lengths greater than 376 characters.

The bug is very similar to the following PHP bug report:

http://bugs.php.net/bug.php?id=24460

Reproduce code:
---
?PHP

$test = str_repeat('a',377);

// preg_match() will crash the request
preg_match('/(\r|\n|.)*/',$test);

?

Expected result:

The script to end gracefully.

Actual result:
--
Crashing of the PHP request.





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


#38512 [NEW]: PCRE 6.6 crashing PHP with specific calls to preg_match()

2006-08-19 Thread peter dot mescalchin at gmail dot com
From: peter dot mescalchin at gmail dot com
Operating system: Windows XP
PHP version:  5.1.5
PHP Bug Type: PCRE related
Bug description:  PCRE 6.6 crashing PHP with specific calls to preg_match()

Description:

Passing large strings to PCRE functions in PHP versions 5.1.3 or greater
and Apache 2.0.59 with the regexp /(\r|\n|.)*/ crashes PHP/Apache
request.

Referring to the source code, a string length greater than 376 character
crashes the request.

Rolling back to PHP 5.1.2, using PCRE 6.2 works correctly without crashing
for string lengths greater than 376 characters.

The bug is very similar to the following PHP bug report:

http://bugs.php.net/bug.php?id=24460

Reproduce code:
---
?PHP

$test = str_repeat('a',377);

// preg_match() will crash the request
preg_match('/(\r|\n|.)*/',$test);

?

Expected result:

The script to end gracefully.

Actual result:
--
Crashing of the PHP request.

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


#38319 [NEW]: PDO persistent connectrions still produce E_WARNING

2006-08-03 Thread peter at finalarena dot com
From: peter at finalarena dot com
Operating system: RHEL3
PHP version:  5.1.4
PHP Bug Type: PDO related
Bug description:  PDO persistent connectrions still produce E_WARNING

Description:

When creating a PDO connection with the Mysql driver, and setting a
persistent default fetch mode, PHP will generate an E_WARNING message.

The PDO, Mysql driver is version 5.0.19 as reported by phpinfo.

The source has the comment: TODO: CRITICAL for final release 

1816  20 :  if (stmt-dbh-is_persistent) {
1817 :  /* TODO: CRITICAL for final release */
1818   0 :  php_error_docref(NULL TSRMLS_CC, E_WARNING, PHP might
crash if you don't call $stmt-setFetchMode() to reset to defaults on this
persistent statement.  This will be fixed in a later release);
1819 :  }

Reproduce code:
---
$dbh = new PDO('mysql:host=localhost;dbname=test', $user, $pass, array(
  PDO::ATTR_PERSISTENT = true
));

Expected result:

 PDOStatement::setFetchMode() to run without an E_WARNING.

Actual result:
--
Warning: PDOStatement::setFetchMode() [function.setFetchMode]: PHP might
crash if you don't call $stmt-setFetchMode() to reset to defaults on this
persistent statement. This will be fixed in a later release in ...

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


#29234 [Com]: empty($object-property) incorrect when property has access overloaded (__get)

2006-07-16 Thread info at peter-thomassen dot de
 ID:   29234
 Comment by:   info at peter-thomassen dot de
 Reported By:  chrissy at codegoat dot com
 Status:   No Feedback
 Bug Type: Scripting Engine problem
 Operating System: Windows XP
 PHP Version:  5.0.0
 New Comment:

The problem still exists with 5.1.4.


Previous Comments:


[2005-03-14 01:00:14] 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.



[2005-03-06 20:49:52] [EMAIL PROTECTED]

Please try using this CVS snapshot:

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





[2004-07-20 19:34:48] benjcarson at digitaljunkies dot ca

This may be related to bug #28176.



[2004-07-18 01:14:15] chrissy at codegoat dot com

Description:

The code below has a class with two properties.  One which is a regular
public class property and the other which is accessed through the __get
function.  Both are set to Not Empty.  However, when you call empty()
on the one accessed through __get, the empty() function returns TRUE
which is incorrect.  The problem can be remedied by first assigning the
value of the property to a variable and then calling the empty function
on that variable.

Reproduce code:
---
?php
class EmptyTest {
public $emptyTest1 = Not Empty;
protected $properties = array ('emptyTest2' = Not Empty);
function __get($key) {
if (array_key_exists($key, $this-properties)) return
$this-properties[$key];
}
}
$emptyTest = new EmptyTest();
echo The value of Test 1 is: \ . $emptyTest-emptyTest1 .
\br/The value of Test 2 is: \ . $emptyTest-emptyTest2 .
\br/---br/br/;
if (empty($emptyTest-emptyTest1)) echo Test 1 was empty br/;
else echo Test 1 was not empty br/;
if (empty($emptyTest-emptyTest2))echo Test 2 was empty br/;
else echo Test 2 was not empty br/;
$test = $emptyTest-emptyTest2;
if (empty($test))echo Test 2 was empty this timebr/;
else echo Test 2 was not empty this timebr/;
?

Expected result:

Both emptyTest1 and emptyTest2, when passed to the empty function, the
function should return true.

It could be that calling empty with a property that has had its access
overloaded by the __get function is invalid. If this is the case, I
would assume empty should at least throw a Warning.

Actual result:
--
The output of the above program is...

The value of Test 1 is: Not Empty
The value of Test 2 is: Not Empty
---

Test 1 was not empty
Test 2 was empty
Test 2 was not empty this time





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


#37964 [Asn]: Reflection shows private methods of parent class

2006-07-04 Thread lavin dot peter at gmail dot com
 ID:   37964
 User updated by:  lavin dot peter at gmail dot com
 Reported By:  lavin dot peter at gmail dot com
 Status:   Assigned
 Bug Type: Scripting Engine problem
 Operating System: Windows XP
 PHP Version:  5.1.4
 Assigned To:  tony2001
 New Comment:

The getMethods method of ReflectionClass also returns the private
methods of the parent class.


Previous Comments:


[2006-06-29 20:06:15] lavin dot peter at gmail dot com

Description:

When using the export method of ReflectionClass the private methods of
of a parent class are displayed.

Reproduce code:
---
class Base{
  private $basevar;
  private function baseFunction(){}
}
class Derived extends Base{}
$d = new Derived;
Reflection::export(new ReflectionClass($d));



Expected result:

Since properties and methods defined as private are not inherited, the
exported Base class should have no properties or methods but in fact
the private method of the Parent class shows up.

Actual result:
--
Class [ class Derived extends Base ] { @@ C:\Program Files\Apache
Group\Apache2\htdocs\newstuff\captcha\refbug.php 6-6 - Constants [0] {
} - Static properties [0] { } - Static methods [0] { } - Properties [0]
{ } - Methods [1] { Method [ private method baseFunction ] { @@
C:\Program Files\Apache
Group\Apache2\htdocs\newstuff\captcha\refbug.php 4 - 4 } } } 





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


#37964 [NEW]: Reflection shows private methods of parent class

2006-06-29 Thread lavin dot peter at gmail dot com
From: lavin dot peter at gmail dot com
Operating system: Windows XP
PHP version:  5.1.4
PHP Bug Type: PHP options/info functions
Bug description:  Reflection shows private methods of parent class

Description:

When using the export method of ReflectionClass the private methods of of
a parent class are displayed.

Reproduce code:
---
class Base{
  private $basevar;
  private function baseFunction(){}
}
class Derived extends Base{}
$d = new Derived;
Reflection::export(new ReflectionClass($d));



Expected result:

Since properties and methods defined as private are not inherited, the
exported Base class should have no properties or methods but in fact the
private method of the Parent class shows up.

Actual result:
--
Class [ class Derived extends Base ] { @@ C:\Program Files\Apache
Group\Apache2\htdocs\newstuff\captcha\refbug.php 6-6 - Constants [0] { } -
Static properties [0] { } - Static methods [0] { } - Properties [0] { } -
Methods [1] { Method [ private method baseFunction ] { @@ C:\Program
Files\Apache Group\Apache2\htdocs\newstuff\captcha\refbug.php 4 - 4 } } } 

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


#37859 [NEW]: Duplicated server requests caused by session_start

2006-06-20 Thread peter at evident dot si
From: peter at evident dot si
Operating system: Win XP
PHP version:  5.1.4
PHP Bug Type: Session related
Bug description:  Duplicated server requests caused by session_start

Description:

I noticed that someone already reported this as a bug in May but it was
not investigated and closed as bogus.

As this definately is some strange issue between IE7 and PHP I am opening
this again.

It all comes down to the session: session_start().
Using simple example bellow and IE7 beta as client you will notice that
apache server logs two client requests (original one and 5 sec duplicated
one).

Can't image what the relation is but this is the case.
OS is Win XP running Apache 2 and PHP 5.1.2.2
No other browser client including IE6 or older causes this.

Please look into this since it can cause serious problems.



Reproduce code:
---
I worked the problem down to the session_start() which is causing this.

Please try this simple example:

?php session_start(); ?
html
body
h1Hello World!/h1
/body
/html

Using IE7 beta and PHP5.1.2.2 (Windows XP, Apache 2) makes a duplicated
call 5 sec later (see apache logs).

Removing session_start() makes no duplicates.
Using any other browser including IE6 or previous makes no duplicates as
well.

Please look into this. There must be some strange connection between ie7
and php (5 or maybe others - didn't try) that makes session behave
strangely.

If you need any additional info I will gladly help.


Expected result:

No fantom calls using IE7 / PHP.

Actual result:
--
With session_start() duplicated fantom calls are loged in apache logs.
Without session_start() and any other browser then IE7 no duplicates.

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


#37859 [Fbk-Opn]: Duplicated server requests caused by session_start

2006-06-20 Thread peter at evident dot si
 ID:   37859
 User updated by:  peter at evident dot si
 Reported By:  peter at evident dot si
-Status:   Feedback
+Status:   Open
 Bug Type: Session related
 Operating System: Win XP
-PHP Version:  5.1.4
+PHP Version:  5.1.2.2
 New Comment:

Not to my knowledge.
I tried Mozzila/FireFox, IE6, IE5.5 and it was ok.
I heard someone that it works ok with IE7 beta/IIS/PHP 5.1.4 custom
build, but I can't say for sure.

I will try to upgrade to the latest version 5.1.4 my self and will
report as soon as I get some results.

I also posted this at MS IE7 feedback site, but didn't get any response
yet.


Previous Comments:


[2006-06-20 11:32:54] [EMAIL PROTECTED]

Does it happen with some more reliable browser than IE7 beta?



[2006-06-20 10:46:21] peter at evident dot si

Description:

I noticed that someone already reported this as a bug in May but it was
not investigated and closed as bogus.

As this definately is some strange issue between IE7 and PHP I am
opening this again.

It all comes down to the session: session_start().
Using simple example bellow and IE7 beta as client you will notice that
apache server logs two client requests (original one and 5 sec
duplicated one).

Can't image what the relation is but this is the case.
OS is Win XP running Apache 2 and PHP 5.1.2.2
No other browser client including IE6 or older causes this.

Please look into this since it can cause serious problems.



Reproduce code:
---
I worked the problem down to the session_start() which is causing
this.

Please try this simple example:

?php session_start(); ?
html
body
h1Hello World!/h1
/body
/html

Using IE7 beta and PHP5.1.2.2 (Windows XP, Apache 2) makes a duplicated
call 5 sec later (see apache logs).

Removing session_start() makes no duplicates.
Using any other browser including IE6 or previous makes no duplicates
as well.

Please look into this. There must be some strange connection between
ie7 and php (5 or maybe others - didn't try) that makes session behave
strangely.

If you need any additional info I will gladly help.


Expected result:

No fantom calls using IE7 / PHP.

Actual result:
--
With session_start() duplicated fantom calls are loged in apache logs.
Without session_start() and any other browser then IE7 no duplicates.





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


#37859 [Bgs]: Duplicated server requests caused by session_start

2006-06-20 Thread peter at evident dot si
 ID:   37859
 User updated by:  peter at evident dot si
 Reported By:  peter at evident dot si
 Status:   Bogus
 Bug Type: Session related
 Operating System: Win XP
 PHP Version:  5.1.2.2
 New Comment:

I will, I am, but what makes a confusion is that it works it any other
way except when using sessions (session_start()). Where is connection
here?

I am sorry, I am not expert for this but there must be some connection
between PHP session methods and IE7 behaving badly.
How can PHP session_start() cause this?


Previous Comments:


[2006-06-20 12:01:02] [EMAIL PROTECTED]

I tried Mozzila/FireFox, IE6, IE5.5 and it was ok.
Then I can hardly believe it is PHP problem, please report it to M$.



[2006-06-20 11:57:58] peter at evident dot si

Not to my knowledge.
I tried Mozzila/FireFox, IE6, IE5.5 and it was ok.
I heard someone that it works ok with IE7 beta/IIS/PHP 5.1.4 custom
build, but I can't say for sure.

I will try to upgrade to the latest version 5.1.4 my self and will
report as soon as I get some results.

I also posted this at MS IE7 feedback site, but didn't get any response
yet.



[2006-06-20 11:32:54] [EMAIL PROTECTED]

Does it happen with some more reliable browser than IE7 beta?



[2006-06-20 10:46:21] peter at evident dot si

Description:

I noticed that someone already reported this as a bug in May but it was
not investigated and closed as bogus.

As this definately is some strange issue between IE7 and PHP I am
opening this again.

It all comes down to the session: session_start().
Using simple example bellow and IE7 beta as client you will notice that
apache server logs two client requests (original one and 5 sec
duplicated one).

Can't image what the relation is but this is the case.
OS is Win XP running Apache 2 and PHP 5.1.2.2
No other browser client including IE6 or older causes this.

Please look into this since it can cause serious problems.



Reproduce code:
---
I worked the problem down to the session_start() which is causing
this.

Please try this simple example:

?php session_start(); ?
html
body
h1Hello World!/h1
/body
/html

Using IE7 beta and PHP5.1.2.2 (Windows XP, Apache 2) makes a duplicated
call 5 sec later (see apache logs).

Removing session_start() makes no duplicates.
Using any other browser including IE6 or previous makes no duplicates
as well.

Please look into this. There must be some strange connection between
ie7 and php (5 or maybe others - didn't try) that makes session behave
strangely.

If you need any additional info I will gladly help.


Expected result:

No fantom calls using IE7 / PHP.

Actual result:
--
With session_start() duplicated fantom calls are loged in apache logs.
Without session_start() and any other browser then IE7 no duplicates.





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


#37767 [NEW]: ldap_bind fails with Out of memory error over apache

2006-06-09 Thread peter dot buki at vodafone dot hu
From: peter dot buki at vodafone dot hu
Operating system: Solaris 10
PHP version:  5.1.4
PHP Bug Type: LDAP related
Bug description:  ldap_bind fails with Out of memory error over apache

Description:

Using php-5.1.4 with mysql-5.0.22 (libs only), apache-2.2.2 (tried 2.0.55
also) and openldap-2.3.24 (tried 2.3.21 also).

When invoking the script with command line, it runs fine, but when using
the mod_php (with a browser over apache) it fails with Out of memory
error number -10.

Reproduce code:
---
?php
ini_set(memory_limit,256M) or die(Could not set memory_limit) ;

echo h3LDAP query test/h3;
echo Connecting ...;
$ds=ldap_connect(172.16.2.8) or die('Could not connect.') ;;  // must be
a valid LDAP server!

if ($ds) {
   echo Binding ...;
   $r=ldap_bind($ds,'DC=whatever,DC=hu','')
   or die(ldap_errno($ds) .  :  . ldap_error($ds)) ;

   echo Bind result is  . $r . br /;

}
?


Expected result:

Over browser something like:
h3LDAP query test/h3Connecting ...Binding ...Bind result is 1br /

Over command line:
h3LDAP query test/h3Connecting ...Binding ...Bind result is 1br /

Actual result:
--
Over browser:
h3LDAP query test/h3Connecting ...Binding ...br /
bWarning/b:  ldap_bind() [a
href='function.ldap-bind'function.ldap-bind/a]: Unable to bind to
server: Out of memory in b/var/www/test/index.php/b on line
b11/bbr /
-10 : Out of memory

Over command line:
h3LDAP query test/h3Connecting ...Binding ...Bind result is 1br /

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


#27777 [Com]: basic authentication broken

2006-05-19 Thread peter at adkins dot nl
 ID:   2
 Comment by:   peter at adkins dot nl
 Reported By:  mikx at mikx dot de
 Status:   No Feedback
 Bug Type: SOAP related
 Operating System: Windows XP Pro
 PHP Version:  5.0.0RC1
 New Comment:

This is still a problem with 5.1.1.


Previous Comments:


[2005-04-12 14:33:55] lobbin at localhost dot nu

This is still a problem. The soap-extension is not able to get a
password-protected wsdl even though the credentials are provided and
used when posting the real soap-request.



[2004-08-05 15:32:21] technique at kaiman dot fr

I've the same probleme here with 5.0.0 on freebsd 4.3

the SOAP client doesn't authenticate himself with login and pass of
options array when retrieving the wsdl file but do it correctly on SOAP
request.

So I can't instanciate a SOAP client with a protected wsdl file.

I've a network capture of this, contact me if you need it.

regards



[2004-04-12 17:55:47] [EMAIL PROTECTED]

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





[2004-04-07 04:48:43] [EMAIL PROTECTED]

So what's the bug then if it works? 




[2004-04-02 04:57:13] mikx at mikx dot de

At the momenten i have no non-wsdl demo case available, but it seems
soap requests are working fine. 

If i remove the login/password from the options array i can only call
__getFunctions() but none of the functions reported by it. I think that
means i have got the wsdl file through uri authentication but the soap
calls fail.

After adding the login/password also to the options array i can call
both __getFuntions() and testFunction() - a hello world testcase.
Therefore adding login/password in the array seems to work like
expected.



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

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


#37334 [NEW]: php_pdflib.dll can't be loaded

2006-05-05 Thread hadadi dot peter at workpress dot hu
From: hadadi dot peter at workpress dot hu
Operating system: Windows XP SP2
PHP version:  5.1.4
PHP Bug Type: PDF related
Bug description:  php_pdflib.dll can't be loaded

Description:

I got this message while I wanted to load php_pdflib.dll:

PHP Warning:  PHP Startup: Invalid library (maybe not a PHP library)
'php_pdflib.dll'  in Unknown on line 0

I saw on the pecl4win.php.net site that the latest version of the dll is
5.1.2. Should I step back to this php version or You suggest to wait?

Thanks,

Peter


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


#36473 [Com]: Foreign Images w/getimagesize() crash Apache2

2006-02-24 Thread Peter at ibforen dot de
 ID:   36473
 Comment by:   Peter at ibforen dot de
 Reported By:  punkpuke at terraimpetus dot com
 Status:   Feedback
 Bug Type: Apache2 related
 Operating System: Windows XP Pro
 PHP Version:  4.4.2
 New Comment:

I have had a similar problem with IIS and php.exe:

With external urls getimagesize causes an indefinite loop in that
function.

Using the isapi module php4isapi.dll solves the problem.


Previous Comments:


[2006-02-21 23:10:44] [EMAIL PROTECTED]

Please try using this CVS snapshot:

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





[2006-02-21 20:04:02] punkpuke at terraimpetus dot com

I would love to help, however those instructions aren't detailed enough
for me to do anything.  I need to know the exact files I need and where
to put them.  I'm sorry, I'm not that smart. :(



[2006-02-21 13:52:32] [EMAIL PROTECTED]

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.

Works fine here.



[2006-02-21 10:50:07] punkpuke at terraimpetus dot com

Description:

When accessing foreign URLs with getimagesize(), apache server crashes
with:

szAppName : Apache.exe szAppVer : 2.0.55.0 szModName :
php4ts.dll 
szModVer : 4.4.2.2 offset : 000c5fca

-
The only changes made to the PHP.ini file were the enabling/removing
the comment in front of the GD2 and the ZIP, DLL extensions.

Server is running as a test environment on localhost.

Reproduce code:
---
?php
getimagesize('images/example.gif');  //Works Fine (Local)
getimagesize('example.jpg'); //Works Fine
//The following crash the Entire Apache server, no matter where they're
used
getimagesize('http://example.com/example/example.jpg');//Crashes 
getimagesize('http://example.com/example.jpg'); //Crashes 
getimagesize('http://example.com/example.gif'); //Crashes
@getimagesize('http://example.com/example.gif'); //Crashes
?

Expected result:

Apache 2 Servers lags for a slight moment, then crashes 100% of the
time that a page using a foreign URL call to getimagesize() is run.






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


#36393 [NEW]: OCI8 Fails to allow PHP to Load

2006-02-14 Thread peter dot wilton-jones at eads dot com
From: peter dot wilton-jones at eads dot com
Operating system: Win 2003 Server Enterprise
PHP version:  5.1.2
PHP Bug Type: OCI8 related
Bug description:  OCI8 Fails to allow PHP to Load

Description:

When I enable php_oci8.dll under win 2003+IIS6+Oracle Client 9i, PHP fails
to load with no error message or Event logs.
I tried this with PHP 5.0.4 and 5.1.2 and both fail.
All websites with ISAPI module included fail to start but all other work.
It then takes for ever to stop IIS.
Commenting out php_oci8.dll prevents this and all websites work (without
oracle links).
Oracle Client works, i.e. TNSPing and SQL+

Reproduce code:
---
N/A

Expected result:

N/A

Actual result:
--
N/A

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


#36393 [Bgs]: OCI8 Fails to allow PHP to Load

2006-02-14 Thread peter dot wilton-jones at eads dot com
 ID:   36393
 User updated by:  peter dot wilton-jones at eads dot com
 Reported By:  peter dot wilton-jones at eads dot com
 Status:   Bogus
 Bug Type: OCI8 related
 Operating System: Win 2003 Server Enterprise
 PHP Version:  5.1.2
 New Comment:

This was my first thought but I am relatively confident that this is
already true as I installed the Admin option (500+MB) of the client
tools so the libraries should be installed and Oracle tools work so the
env variables should be correct.

I have used the exact same setup before on Apache (on another server)
and this works correctly.

I was wondering if it may be IIS6 with PHP.


Previous Comments:


[2006-02-14 20:04:26] [EMAIL PROTECTED]

Most likely you forgot to install OCI libraries or to set required
environment variables.
In both cases this is not PHP problem.



[2006-02-14 19:57:34] peter dot wilton-jones at eads dot com

Description:

When I enable php_oci8.dll under win 2003+IIS6+Oracle Client 9i, PHP
fails to load with no error message or Event logs.
I tried this with PHP 5.0.4 and 5.1.2 and both fail.
All websites with ISAPI module included fail to start but all other
work.
It then takes for ever to stop IIS.
Commenting out php_oci8.dll prevents this and all websites work
(without oracle links).
Oracle Client works, i.e. TNSPing and SQL+

Reproduce code:
---
N/A

Expected result:

N/A

Actual result:
--
N/A





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


#34575 [NEW]: Commandline-Option '-c' does not work

2005-09-21 Thread Peter-Ulrich at Web dot de
From: Peter-Ulrich at Web dot de
Operating system: Linux
PHP version:  5.0.5
PHP Bug Type: CGI related
Bug description:  Commandline-Option '-c' does not work

Description:

The Commandline-Option '-c' does not work with 
PHP Version 5.0.5 together with a CLI-Programm
where it is called in the Script like

#!/usr/bin/php -c path/to/inifile

When i change the Option to '--php-ini', then
the Script runs with the korrekt ini-file.

Best regards

P. Ulrich


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


#34509 [Fbk-Opn]: APACHE_VERSION variable in configure is nonsense

2005-09-16 Thread peter dot buki at vodafone dot hu
 ID:   34509
 User updated by:  peter dot buki at vodafone dot hu
 Reported By:  peter dot buki at vodafone dot hu
-Status:   Feedback
+Status:   Open
 Bug Type: Compile Failure
 Operating System: SunOS 5.9 Generic_112233-01
 PHP Version:  5.1.0RC1
 New Comment:

Hope it helps:
APXS=/usr/apache/bin/apxs
EDITOR=vi
HOME=/export/home/vodafone
HOSTNAME=mis
HOSTTYPE=sparc
HTTPD=/usr/apache/bin/httpd
IFS=- /.

LOGNAME=vodafone
MACHTYPE=sparc-sun-solaris2.9
MAILCHECK=600
OLDPWD=/export/home/vodafone
OPTIND=1
OSTYPE=solaris2.9
PATH=/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/ccs/bin
[EMAIL PROTECTED] \W]\$ 
PWD=/export/home/vodafone/src
SHELL=/bin/bash
SHLVL=2
SSH_TTY=/dev/pts/4
STY=11381.pts-4.mis
TERM=xterm
TERMCAP=SC|xterm|VT 100/ANSI X3.64 virtual terminal:\
:DO=\E[%dB:LE=\E[%dD:RI=\E[%dC:UP=\E[%dA:bs:bt=\E[Z:\
:cd=\E[J:ce=\E[K:cl=\E[H\E[J:cm=\E[%i%d;%dH:ct=\E[3g:\
:do=^J:nd=\E[C:pt:rc=\E8:rs=\Ec:sc=\E7:st=\EH:up=\EM:\
:le=^H:bl=^G:cr=^M:it#8:ho=\E[H:nw=\EE:ta=^I:is=\E)0:\
:li#53:co#138:am:xn:xv:LP:sr=\EM:al=\E[L:AL=\E[%dL:\
:cs=\E[%i%d;%dr:dl=\E[M:DL=\E[%dM:dc=\E[P:DC=\E[%dP:\
:im=\E[4h:ei=\E[4l:mi:IC=\E[%d@:ks=\E[?1h\E=:\
:ke=\E[?1l\E:vi=\E[?25l:ve=\E[34h\E[?25h:vs=\E[34l:\
:ti=\E[?1049h:te=\E[?1049l:us=\E[4m:ue=\E[24m:so=\E[3m:\
:se=\E[23m:md=\E[1m:mr=\E[7m:me=\E[m:ms:\
:Co#8:pa#64:AF=\E[3%dm:AB=\E[4%dm:op=\E[39;49m:AX:G0:\
:as=\E(0:ae=\E(B:\

:ac=\140\140aaffggjjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~..--++,,hhII00:\
:k0=\E[10~:k1=\EOP:k2=\EOQ:k3=\EOR:k4=\EOS:k5=\E[15~:\
:k6=\E[17~:k7=\E[18~:k8=\E[19~:k9=\E[20~:k;=\E[21~:\
:F1=\E[23~:F2=\E[24~:F3=\E[25~:F4=\E[26~:F5=\E[28~:\
:F6=\E[29~:F7=\E[31~:F8=\E[32~:F9=\E[33~:FA=\E[34~:\
:kb=^H:kh=\E[1~:@1=\E[1~:kH=\E[4~:@7=\E[4~:kN=\E[6~:\
:kP=\E[5~:kI=\E[2~:kD=\E[3~:ku=\EOA:kd=\EOB:kr=\EOC:\
:kl=\EOD:km:
TZ=Europe/Budapest
USER=vodafone
WINDOW=3
_=./apache.sh
ac_IFS= 

ac_output=

expr: syntax error


Previous Comments:


[2005-09-15 20:40:34] [EMAIL PROTECTED]

Please download this script:

  http://www.php.net/~jani/patches/apache.sh

Make it executable and run it and paste the output here.




[2005-09-15 14:33:43] peter dot buki at vodafone dot hu

Sorry for leaving out the possibility to filter out the most simple
cause. Apache/2.0.54 compiled on Aug 22 2005 16:34:58.

[EMAIL PROTECTED] php-5.1.0RC1]# /usr/local/apache2/bin/httpd -v
Server version: Apache/2.0.54
Server built:   Aug 22 2005 16:34:58



[2005-09-15 14:30:47] [EMAIL PROTECTED]

So what apache version do you have? What is the output of 
httpd -v ?



[2005-09-15 11:09:14] peter dot buki at vodafone dot hu

Description:

Variable APACHE_VERSION is calculated in a wrong way, because configure
halts, event if the apache has the required and set with --with-apxs2
version

configure returns with syntax error:
expr: syntax error
configure: error: You have enabled Apache 2 support while your server
is Apache 1.3.  Please use the appropiate switch --with-apxs (without
the 2)

Please see possibly related bugs:
Bug #20457: APACHE_VERSION variable in configure is nonsense
Bug #23416: configure not knowing apache version

Reproduce code:
---
./config.nice:
CC='gcc -m64 -mcpu=v9' \
'./configure' \
'--with-apxs2=/usr/apache/bin/apxs' \
'--libexecdir=/usr/apache/libexec' \
'--enable-sysvmsg' \
'--enable-sysvsem' \
'--enable-sysvshm' \
'--enable-mbstring=all' \
'--enable-sigchild' \
'--enable-sockets' \
'--enable-mbstring' \
'--with-postgresql=/usr/local/pgsql/' \
'--disable-shared' \
'--with-libxml-dir=/usr/local' \
$@


Expected result:

Configure going on with no errors.

Actual result:
--
configure returns with syntax error:
expr: syntax error
configure: error: You have enabled Apache 2 support while your server
is Apache 1.3.  Please use the appropiate switch --with-apxs (without
the 2)

Added this line to configure (line 4226, 5534, 6366):
  echo APACHE_VERSION \($APACHE_VERSION\) is calculated: $4 \* 100 
+ $5 \* 1000 + $6
which prints this:
APACHE_VERSION () is calculated: * 100 + * 1000 +







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


#34509 [NEW]: APACHE_VERSION variable in configure is nonsense

2005-09-15 Thread peter dot buki at vodafone dot hu
From: peter dot buki at vodafone dot hu
Operating system: SunOS 5.9 Generic_112233-01
PHP version:  5.1.0RC1
PHP Bug Type: Compile Failure
Bug description:  APACHE_VERSION variable in configure is nonsense

Description:

Variable APACHE_VERSION is calculated in a wrong way, because configure
halts, event if the apache has the required and set with --with-apxs2
version

configure returns with syntax error:
expr: syntax error
configure: error: You have enabled Apache 2 support while your server is
Apache 1.3.  Please use the appropiate switch --with-apxs (without the 2)

Please see possibly related bugs:
Bug #20457: APACHE_VERSION variable in configure is nonsense
Bug #23416: configure not knowing apache version

Reproduce code:
---
./config.nice:
CC='gcc -m64 -mcpu=v9' \
'./configure' \
'--with-apxs2=/usr/apache/bin/apxs' \
'--libexecdir=/usr/apache/libexec' \
'--enable-sysvmsg' \
'--enable-sysvsem' \
'--enable-sysvshm' \
'--enable-mbstring=all' \
'--enable-sigchild' \
'--enable-sockets' \
'--enable-mbstring' \
'--with-postgresql=/usr/local/pgsql/' \
'--disable-shared' \
'--with-libxml-dir=/usr/local' \
$@


Expected result:

Configure going on with no errors.

Actual result:
--
configure returns with syntax error:
expr: syntax error
configure: error: You have enabled Apache 2 support while your server is
Apache 1.3.  Please use the appropiate switch --with-apxs (without the 2)

Added this line to configure (line 4226, 5534, 6366):
  echo APACHE_VERSION \($APACHE_VERSION\) is calculated: $4 \* 100  +
$5 \* 1000 + $6
which prints this:
APACHE_VERSION () is calculated: * 100 + * 1000 +



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


#34509 [Fbk-Opn]: APACHE_VERSION variable in configure is nonsense

2005-09-15 Thread peter dot buki at vodafone dot hu
 ID:   34509
 User updated by:  peter dot buki at vodafone dot hu
 Reported By:  peter dot buki at vodafone dot hu
-Status:   Feedback
+Status:   Open
 Bug Type: Compile Failure
 Operating System: SunOS 5.9 Generic_112233-01
 PHP Version:  5.1.0RC1
 New Comment:

Sorry for leaving out the possibility to filter out the most simple
cause. Apache/2.0.54 compiled on Aug 22 2005 16:34:58.

[EMAIL PROTECTED] php-5.1.0RC1]# /usr/local/apache2/bin/httpd -v
Server version: Apache/2.0.54
Server built:   Aug 22 2005 16:34:58


Previous Comments:


[2005-09-15 14:30:47] [EMAIL PROTECTED]

So what apache version do you have? What is the output of 
httpd -v ?



[2005-09-15 11:09:14] peter dot buki at vodafone dot hu

Description:

Variable APACHE_VERSION is calculated in a wrong way, because configure
halts, event if the apache has the required and set with --with-apxs2
version

configure returns with syntax error:
expr: syntax error
configure: error: You have enabled Apache 2 support while your server
is Apache 1.3.  Please use the appropiate switch --with-apxs (without
the 2)

Please see possibly related bugs:
Bug #20457: APACHE_VERSION variable in configure is nonsense
Bug #23416: configure not knowing apache version

Reproduce code:
---
./config.nice:
CC='gcc -m64 -mcpu=v9' \
'./configure' \
'--with-apxs2=/usr/apache/bin/apxs' \
'--libexecdir=/usr/apache/libexec' \
'--enable-sysvmsg' \
'--enable-sysvsem' \
'--enable-sysvshm' \
'--enable-mbstring=all' \
'--enable-sigchild' \
'--enable-sockets' \
'--enable-mbstring' \
'--with-postgresql=/usr/local/pgsql/' \
'--disable-shared' \
'--with-libxml-dir=/usr/local' \
$@


Expected result:

Configure going on with no errors.

Actual result:
--
configure returns with syntax error:
expr: syntax error
configure: error: You have enabled Apache 2 support while your server
is Apache 1.3.  Please use the appropiate switch --with-apxs (without
the 2)

Added this line to configure (line 4226, 5534, 6366):
  echo APACHE_VERSION \($APACHE_VERSION\) is calculated: $4 \* 100 
+ $5 \* 1000 + $6
which prints this:
APACHE_VERSION () is calculated: * 100 + * 1000 +







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


#34201 [NEW]: runkit_method_copy() causes seg fault

2005-08-20 Thread Peter dot Albertsson at spray dot se
From: Peter dot Albertsson at spray dot se
Operating system: SuSE 9
PHP version:  5.0.4
PHP Bug Type: Unknown/Other Function
Bug description:  runkit_method_copy() causes seg fault

Description:

Running the example provided at
http://www.php.net/manual/en/function.runkit-method-copy.php causes a
segmentation fault.

The segmentation fault appears to occur after the script has been
executed.

Taking the advice to turn off any Zend extensions helps. When I turn off
Zend Optimizer 2.5.8 the error does not occur.

Reproduce code:
---
?php
class Foo {
   function example() {
   return foo!\n;
   }
}

class Bar {
   // initially, no methods
}

// copy the example() method from the Foo class to the Bar class, as
baz()
runkit_method_copy('Bar', 'baz', 'Foo', 'example');

// output copied function
echo Bar::baz();
? 

Expected result:

foo!


Actual result:
--
foo!
Segmentation fault

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


#33557 [Com]: fsocketopen does not open connections

2005-08-14 Thread peter dot westwood at ftwr dot co dot uk
 ID:   33557
 Comment by:   peter dot westwood at ftwr dot co dot uk
 Reported By:  dominic at authorsoftware dot com
 Status:   No Feedback
 Bug Type: Network related
 Operating System: Windows Server 2003
 PHP Version:  5.0.4
 New Comment:

Hi.

I was seing this problem on WindowsXP using XAMPP 1.4.13 with bundled
PHP5 (v5.0.4) using PHP with apache2 updating to the referred CVS
snapshot doesn't fix this issue.

Looking at the Ethernet Comms with Ethereal with both v5.0.4 and the
CVS snapshot the SYN for the connection is sent and the SYN-ACK
recieved from the remote host together with the ACK to the SYN-ACK
being sent before PHP gives up and returns the following error:

Warning: fsockopen() [function.fsockopen]: unable to connect to
sandbox.ftwr.co.uk:80 (A connection attempt failed because the
connected party did not properly respond after a period of time, or
established connection failed because connected host has failed to
respond. ) in
C:\apachefriends\xampp\htdocs\wordpress\wp-includes\class-IXR.php on
line 514

Cheers
-- 
Peter


Previous Comments:


[2005-07-11 01:00:04] 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.



[2005-07-03 21:18:49] [EMAIL PROTECTED]

Please try using this CVS snapshot:

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





[2005-07-03 21:00:40] dominic at authorsoftware dot com

This is applicable to TCP connections havn't tested UDP.



[2005-07-03 20:59:12] dominic at authorsoftware dot com

Description:

Using fsockopen on Windows Server 2003 from the CLI, appears not to
work at all, php returns with a unable to connect.

using either local loopback, IP address or hostnames



Expected result:

It should at least try and connect, however it returns immediately
saying it can't connect, it doesn't appear to even try.

I went back to PHP 4.3.11 on the server at it all works fine with that
version.







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


#31895 [Fbk-Opn]: PREG_SPLIT_DELIM_CAPTURE returns delimiter twice

2005-06-28 Thread peter dot bauwens at b-rail dot be
 ID:   31895
 User updated by:  peter dot bauwens at b-rail dot be
 Reported By:  peter dot bauwens at b-rail dot be
-Status:   Feedback
+Status:   Open
 Bug Type: PCRE related
 Operating System: *
 PHP Version:  5CVS, 4CVS (2005-05-30)
 New Comment:

I tried the Win32 snapshot, but the bug still exists.
The recognicion is good, but I get to much return-values...


Previous Comments:


[2005-06-27 01:22:30] [EMAIL PROTECTED]

Please try using this CVS snapshot:

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

PCRE was upgraded to version 5.0.



[2005-02-11 05:52:35] [EMAIL PROTECTED]

Verified.




[2005-02-10 15:16:09] peter dot bauwens at b-rail dot be

I just found out something new (I hope it helps)
If I try these 2 lines:

$String = test 12 test 123 test 123 test;
print_r(preg_split(/( 12(3){0,1} )/, $String, -1,
PREG_SPLIT_DELIM_CAPTURE));

I get this as result: 
Array
(
[0] = test
[1] =  12 
[2] = test
[3] =  123 
[4] = 3
[5] = test
[6] =  123 
[7] = 3
[8] = test
)



[2005-02-10 15:10:01] peter dot bauwens at b-rail dot be

I used a totally different directory for the PHP snapshot, 
copied the php.ini in the Windows-dir, 
I changed my path in the httpd.conf of my Apache2 server, and restarted
the server.
In phpinfo() I got the 'version 4.3.11-dev'...



[2005-02-10 15:00:44] [EMAIL PROTECTED]

Are you absolutely sure you've installed the new PHP version correctly
?? Make sure you remove _all_ previous dlls related to PHP before you
install the new ones from the snapshot.




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

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


  1   2   >