#35795 [Bgs-Opn]: MySQL driver quotes strings incorrectly with ANSI SQL mode

2005-12-25 Thread spaze-bugs at exploited dot cz
 ID:  35795
 User updated by: spaze-bugs at exploited dot cz
 Reported By: spaze-bugs at exploited dot cz
-Status:  Bogus
+Status:  Open
 Bug Type:PDO related
 PHP Version: 5.1.1
 New Comment:

According to MySQL manual

  A string is a sequence of characters, surrounded by either single
quote (‘'’) or double quote (‘’) characters. [...] If the server SQL
mode has ANSI_QUOTES enabled, string literals can be quoted only with
single quotes.

So the quoter should use single quotes with emulated prepared
statements (instead of double quotes) to be compatible with both SQL
modes.

Thus, reopening.


Previous Comments:


[2005-12-24 21:54:09] spaze-bugs at exploited dot cz

PDO has no way to know, what I've done, you're right. But I don't have
a way to tell PDO that the environment got changed and that it should
quote a little different. I don't mean that it should do runtime checks
(like SELECT @@sql_mode), but some specific attibute, as I've already
written.

Thanks for pointing me to the native prepared statements, but as I've
read the source a little, I see that whether to use native prepared
statements or not, is a compile-time option and it's not exposed by ie.
phpinfo(). So some kind of end-user has no way to know, if native
prepared statements are used or not, especially if he's using some
precompiled binary ie. Windows distribution. Am I right?

Well, it seems to me that a solution to my problem with quoting in ANSI
mode is turning off the ANSI mode (and quote column names with backtick)
more than native prepare statements.



[2005-12-24 19:04:31] [EMAIL PROTECTED]

When you issue queries that change the database session environment
like that, PDO has no way to know what you've done without performing
all kinds of checks on each query.
There's no reason to slow down the common case for everyone else.

All your problems are solved by using real prepared statements, where
explicit quoting is not required.




[2005-12-24 18:58:36] spaze-bugs at exploited dot cz

Description:

I'm running MySQL in ANSI SQL mode [1], which includes the ANSI_QUOTES
mode. That means

  /Treat ‘’ as an identifier quote character (like the ‘`’ quote
character) and not as a string quote character./

When I use ie. prepared statements I get these queries in the general
query log

  INSERT INTO t_images (hash, width, height, imageformat_id)
VALUES (ff2204530628d3c589843ef0b37d344a, 500, 500, NULL)

Which is bad, the strings (the hash) in the VALUES (...) section should
be quoted by the ' character. Don't know what would be the best
solution, but I think some documented MySQL specific PDO attribute
would be Ok.

Thanks for reviewing this issue.

[1] http://dev.mysql.com/doc/refman/4.1/en/server-sql-mode.html

Reproduce code:
---
$dbh = new PDO('mysql:host=mysql41;dbname=test', 'root', '');
$dbh-exec(SET SESSION sql_mode='ANSI');
echo $dbh-quote('foo');


Expected result:

'foo'

Actual result:
--
foo





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


#35795 [NEW]: MySQL driver quotes strings incorrectly with ANSI SQL mode

2005-12-24 Thread spaze-bugs at exploited dot cz
From: spaze-bugs at exploited dot cz
Operating system: 
PHP version:  5.1.1
PHP Bug Type: PDO related
Bug description:  MySQL driver quotes strings incorrectly with ANSI SQL mode

Description:

I'm running MySQL in ANSI SQL mode [1], which includes the ANSI_QUOTES
mode. That means

  /Treat ‘’ as an identifier quote character (like the ‘`’ quote
character) and not as a string quote character./

When I use ie. prepared statements I get these queries in the general
query log

  INSERT INTO t_images (hash, width, height, imageformat_id)
VALUES (ff2204530628d3c589843ef0b37d344a, 500, 500, NULL)

Which is bad, the strings (the hash) in the VALUES (...) section should be
quoted by the ' character. Don't know what would be the best solution, but
I think some documented MySQL specific PDO attribute would be Ok.

Thanks for reviewing this issue.

[1] http://dev.mysql.com/doc/refman/4.1/en/server-sql-mode.html

Reproduce code:
---
$dbh = new PDO('mysql:host=mysql41;dbname=test', 'root', '');
$dbh-exec(SET SESSION sql_mode='ANSI');
echo $dbh-quote('foo');


Expected result:

'foo'

Actual result:
--
foo

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


#35795 [Bgs]: MySQL driver quotes strings incorrectly with ANSI SQL mode

2005-12-24 Thread spaze-bugs at exploited dot cz
 ID:  35795
 User updated by: spaze-bugs at exploited dot cz
 Reported By: spaze-bugs at exploited dot cz
 Status:  Bogus
 Bug Type:PDO related
 PHP Version: 5.1.1
 New Comment:

PDO has no way to know, what I've done, you're right. But I don't have
a way to tell PDO that the environment got changed and that it should
quote a little different. I don't mean that it should do runtime checks
(like SELECT @@sql_mode), but some specific attibute, as I've already
written.

Thanks for pointing me to the native prepared statements, but as I've
read the source a little, I see that whether to use native prepared
statements or not, is a compile-time option and it's not exposed by ie.
phpinfo(). So some kind of end-user has no way to know, if native
prepared statements are used or not, especially if he's using some
precompiled binary ie. Windows distribution. Am I right?

Well, it seems to me that a solution to my problem with quoting in ANSI
mode is turning off the ANSI mode (and quote column names with backtick)
more than native prepare statements.


Previous Comments:


[2005-12-24 19:04:31] [EMAIL PROTECTED]

When you issue queries that change the database session environment
like that, PDO has no way to know what you've done without performing
all kinds of checks on each query.
There's no reason to slow down the common case for everyone else.

All your problems are solved by using real prepared statements, where
explicit quoting is not required.




[2005-12-24 18:58:36] spaze-bugs at exploited dot cz

Description:

I'm running MySQL in ANSI SQL mode [1], which includes the ANSI_QUOTES
mode. That means

  /Treat ‘’ as an identifier quote character (like the ‘`’ quote
character) and not as a string quote character./

When I use ie. prepared statements I get these queries in the general
query log

  INSERT INTO t_images (hash, width, height, imageformat_id)
VALUES (ff2204530628d3c589843ef0b37d344a, 500, 500, NULL)

Which is bad, the strings (the hash) in the VALUES (...) section should
be quoted by the ' character. Don't know what would be the best
solution, but I think some documented MySQL specific PDO attribute
would be Ok.

Thanks for reviewing this issue.

[1] http://dev.mysql.com/doc/refman/4.1/en/server-sql-mode.html

Reproduce code:
---
$dbh = new PDO('mysql:host=mysql41;dbname=test', 'root', '');
$dbh-exec(SET SESSION sql_mode='ANSI');
echo $dbh-quote('foo');


Expected result:

'foo'

Actual result:
--
foo





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


#35647 [NEW]: tidy does not produce vald utf8 when the encoding is specified in the config

2005-12-12 Thread bugs at nikmakepeace dot com
From: bugs at nikmakepeace dot com
Operating system: FC3
PHP version:  5.1.1
PHP Bug Type: Unknown/Other Function
Bug description:  tidy does not produce vald utf8 when the encoding is 
specified in the config

Description:

If you specify utf8 encoding using the config options 'char-encoding',
'input-encoding' and 'output-encoding' with tidy it converts HTML entities
into their latin1, single-byte equivalents rather than the correct,
multi-byte utf-8 encodings (or just leaving them as entities) 

The result is that nbsp; is converted into 0xA0, eacute; is converted
into 0xE9 and so on. This is not valid UTF-8 and so well-behaving XML
parsers, including PHP's DOM, fail.

Specifying 'utf8' as the third parameter works correctly.

Reproduce code:
---
?php
$dirty='a
href=http://fr.yahoo.com/r/n/fd/7/*http://fr.news.yahoo.com/12122005/202/beatrice-dalle-temoigne-au-proces-de-son-mari-accuse-de.html;Beacute;atrice
Dalle teacute;moigne au procegrave;s de son mari accuseacute; de
viol/abr/
smallnobra
href=http://rd.yahoo.co.jp/toppage/topinfo/rikunabi/051213/?http://katsuyou.rikunabi-shinsotsu.yahoo.co.jp/2007/;人と差がつく就職活動をしよう/a/nobr
- nobra
href=http://rd.yahoo.co.jp/toppage/topinfo/event_xmas/051125/?http://xmas.yahoo.co.jp/;ポイント5倍のクリスマスギフトは12時まで!/a/nobr/small';

$config['char-encoding']='utf8';
$config['input-encoding']='utf8';
$config['output-encoding']='utf8';
$config['output-xhtml']=true;

echo tidy_repair_string($dirty, $config);
?


Expected result:

Note well the correct unicode e-acute and e-grave in the French text.

?xml version=1.0?
html xmlns=http://www.w3.org/1999/xhtml;
head
title/title
/head
body
a href=
http://fr.yahoo.com/r/n/fd/7/*http://fr.news.yahoo.com/12122005/202/beatrice-dalle-temoigne-au-proces-de-son-mari-accuse-de.html;
Béatrice Dalle témoigne au procès de son mari accusé de
viol/abr /
smallnobra href=
http://rd.yahoo.co.jp/toppage/topinfo/rikunabi/051213/?http://katsuyou.rikunabi-shinsotsu.yahoo.co.jp/2007/;
人と差がつく就職活動をしよう/a/nobr - nobra href=
http://rd.yahoo.co.jp/toppage/topinfo/event_xmas/051125/?http://xmas.yahoo.co.jp/;
ポイント5倍のクリスマスギフトは12時まで!/a/nobr/small
/body
/html


Actual result:
--
Note how the e-acute and e-grave has been replaced with a non-unicode
character.

?xml version=1.0?
html xmlns=http://www.w3.org/1999/xhtml;
head
title/title
/head
body
a href=
http://fr.yahoo.com/r/n/fd/7/*http://fr.news.yahoo.com/12122005/202/beatrice-dalle-temoigne-au-proces-de-son-mari-accuse-de.html;
B�atrice Dalle t�moigne au proc�s de son mari accus� de
viol/abr /
smallnobra href=
http://rd.yahoo.co.jp/toppage/topinfo/rikunabi/051213/?http://katsuyou.rikunabi-shinsotsu.yahoo.co.jp/2007/;
人と差がつく就職活動をしよう/a/nobr -
nobra href=
http://rd.yahoo.co.jp/toppage/topinfo/event_xmas/051125/?http://xmas.yahoo.co.jp/;
ポイント5倍のクリスマスギフトは12時まで!/a/nobr/small
/body
/html


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


#35435 [NEW]: PDO::query is not returning a PDOStatement object

2005-11-27 Thread bugs at jth dot net
From: bugs at jth dot net
Operating system: Linux Fedora 3
PHP version:  5.1.0
PHP Bug Type: Reproducible crash
Bug description:  PDO::query is not returning a PDOStatement object

Description:

PDO::query is not returning a PDOStatement object.
and segmentation fault using array(PDO::ATTR_PERSISTENT = true)


mysqld  Ver 5.0.15-standard for pc-linux-gnu on i686 
Server version: Apache/2.0.54
Architecture:   32-bit



Reproduce code:
---
try {
$dbh = new PDO('mysql:host=localhost;dbname=d', x, xxx);
$query = SELECT COUNT(*) FROM ordrer;
$stmt = $dbh-query($query); 
//$stmt = $dbh-prepare($query);  $result = $stmt-execute();
print $stmt-columnCount();
} catch (PDOException $e) {
   print Error  !:  . $e-getMessage() . br/;
   die();
}


Actual result:
--
$stmt = $dbh-query($query);

Call to a member function columnCount() on a non-object
when executing code print $stmt-columnCount() but not after

$stmt = $dbh-prepare($query);  $result = $stmt-execute();

However, 
Apache2 child pid 22634 exit signal Segmentation fault (11)
in any case when using array(PDO::ATTR_PERSISTENT = true) 



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


#35271 [Opn]: xml_parse_into_struct silently drops defined entities

2005-11-24 Thread bugs dot php dot net at nanonanonano dot net
 ID:   35271
 User updated by:  bugs dot php dot net at nanonanonano dot net
 Reported By:  bugs dot php dot net at nanonanonano dot net
 Status:   Open
-Bug Type: Feature/Change Request
+Bug Type: *XML functions
 Operating System: Linux
 PHP Version:  4CVS-2005-11-18 (CVS)
 New Comment:

This has been triaged to Feature request but it's a straight bug in
the implementation: the docs claim that xml_parse_into_struct parses
XML into a pair of arrays but the function doesn't do that.

(at the very least, a warning should be in the documentation for
xml_parse_into_struct that it will fubar your data if you have entities
in it, but I'd obviously prefer that the function just worked properly)


Previous Comments:


[2005-11-18 07:17:00] bugs dot php dot net at nanonanonano dot net

Description:

When called on an XML document that contains defined entities,
xml_parse_into_struct silently drops the entities from the parsed
output.

(If the entity is undefined, it returns an error)

Reproduce code:
---
?php
  $data = implode (, file('entityexample.xml'));
  $parser = xml_parser_create();
  xml_parser_set_option ($parser,XML_OPTION_CASE_FOLDING,0);
  xml_parser_set_option ($parser,XML_OPTION_SKIP_WHITE,1);
  xml_parse_into_struct ($parser,$data,$values,$tags);
  xml_parser_free ($parser);
  #echo VALS\n; print_r($values);
  #echo TAGS\n; print_r($tags); 
  echo $values[2]['value'].\n;
?
-- entityexample.xml --
?xml version='1.0'?
!DOCTYPE test [
  !ENTITY times   FOO BAR
]
test
  item
nameOne times; two/name
  /item
/test


Expected result:

The entity should either be not replaced:

One times; two

or it should be correctly replaced:

One FOO BAR two


Actual result:
--
The entity is silently dropped from the XML stream:

One  two






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


#35326 [NEW]: Concurrency issue with recursive mkdir

2005-11-22 Thread bugs dot php dot net at chsc dot dk
From: bugs dot php dot net at chsc dot dk
Operating system: Linux
PHP version:  5.0.5
PHP Bug Type: Directory function related
Bug description:  Concurrency issue with recursive mkdir

Description:

There appears to be a concurrency issue when mkdir is called on two
separate threads with the following parameters:

Thread 1:
mkdir('/tmp/foo/bar/1', 0777, true);

Thread 2:
mkdir('/tmp/foo/bar/2', 0777, true);

Sometimes one of the threads (e.g. thread 2) two fails with Warning:
mkdir(): File exists and the directory /tmp/foo/bar/2 does not exist
afterwards.

What I think is happening in thread 2 is is this:
PHP looks for /tmp/foo/bar/2 and sees that it does not exist. Neither does
/tmp/foo/bar and /tmp/foo. So it tries to create /tmp/foo, but that
directory was just created a millisecond second ago by another thread, so
mkdir gives instead of just moving on to create /tmp/foo/bar and
/tmp/foo/bar/2.

Reproduce code:
---
This code reproduces the problem in about every second attempt. It
consists of two files, index.php and iframe.php.


index.php:

?php
$fire = time() + 2;
?
h1Nr. 1/h1
iframe src=iframe.php?fire=?= $fire ?amp;no=1/iframe
h1Nr. 2/h1
iframe src=iframe.php?fire=?= $fire ?amp;no=2/iframe


iframe.php:

?php
$fire = $_GET['fire'];
$no = $_GET['no'];
// synchronize the two threads
while ($fire  time());
$dir = '/tmp/' . $fire . '/foo/bar/foo/bar/' . $no;
//sleep($no);
var_dump(is_dir($dir));
echo Making $dir ;
mkdir($dir, 0777, true);
var_dump(is_dir($dir));
?


Expected result:

Thread 2 should output this:
bool(false) Making /tmp/1132653651/foo/bar/foo/bar/2 bool(true)


Actual result:
--
Thread 2 sometimes outputs this:
bool(false) Making /tmp/1132655181/foo/bar/foo/bar/2 Warning: mkdir():
File exists in /home/chsc/public_html/mkdir/iframe.php on line 10
bool(false) 

Notice that the directory does not exist afterwards.

If I uncomment the sleep() call above, there are no problems.


A workaround:
$ok = mkdir($dir, 0777, true);
if (!$ok  !is_dir($dir)) {
sleep(1);
mkdir($dir, 0777, true);
}


In other words, it works if I try again. I hope that mkdir() can be
changed so that it only returns false if the directory cannot be created
at all (e.g. because of lack of permissions or because it already
exists).


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


#35326 [Fbk-Opn]: Concurrency issue with recursive mkdir

2005-11-22 Thread bugs dot php dot net at chsc dot dk
 ID:   35326
 User updated by:  bugs dot php dot net at chsc dot dk
 Reported By:  bugs dot php dot net at chsc dot dk
-Status:   Feedback
+Status:   Open
 Bug Type: Directory function related
 Operating System: Linux
 PHP Version:  5.0.5
 New Comment:

Yes, it also occurs with the CVS snapshot (this time I tried with the
CGI version).

AFAICS the problem is in php_plain_files_mkdir in
main/streams/plain_wrapper.c. If php_mkdir() or VCWD_MKDIR() returns
false, the method gives up instead of checking whether directory exists
anyway, i.e. if it was created by another thread.


Previous Comments:


[2005-11-22 12:13:10] [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-11-22 11:32:49] bugs dot php dot net at chsc dot dk

Description:

There appears to be a concurrency issue when mkdir is called on two
separate threads with the following parameters:

Thread 1:
mkdir('/tmp/foo/bar/1', 0777, true);

Thread 2:
mkdir('/tmp/foo/bar/2', 0777, true);

Sometimes one of the threads (e.g. thread 2) two fails with Warning:
mkdir(): File exists and the directory /tmp/foo/bar/2 does not exist
afterwards.

What I think is happening in thread 2 is is this:
PHP looks for /tmp/foo/bar/2 and sees that it does not exist. Neither
does /tmp/foo/bar and /tmp/foo. So it tries to create /tmp/foo, but
that directory was just created a millisecond second ago by another
thread, so mkdir gives instead of just moving on to create /tmp/foo/bar
and /tmp/foo/bar/2.

Reproduce code:
---
This code reproduces the problem in about every second attempt. It
consists of two files, index.php and iframe.php.


index.php:

?php
$fire = time() + 2;
?
h1Nr. 1/h1
iframe src=iframe.php?fire=?= $fire ?amp;no=1/iframe
h1Nr. 2/h1
iframe src=iframe.php?fire=?= $fire ?amp;no=2/iframe


iframe.php:

?php
$fire = $_GET['fire'];
$no = $_GET['no'];
// synchronize the two threads
while ($fire  time());
$dir = '/tmp/' . $fire . '/foo/bar/foo/bar/' . $no;
//sleep($no);
var_dump(is_dir($dir));
echo Making $dir ;
mkdir($dir, 0777, true);
var_dump(is_dir($dir));
?


Expected result:

Thread 2 should output this:
bool(false) Making /tmp/1132653651/foo/bar/foo/bar/2 bool(true)


Actual result:
--
Thread 2 sometimes outputs this:
bool(false) Making /tmp/1132655181/foo/bar/foo/bar/2 Warning: mkdir():
File exists in /home/chsc/public_html/mkdir/iframe.php on line 10
bool(false) 

Notice that the directory does not exist afterwards.

If I uncomment the sleep() call above, there are no problems.


A workaround:
$ok = mkdir($dir, 0777, true);
if (!$ok  !is_dir($dir)) {
sleep(1);
mkdir($dir, 0777, true);
}


In other words, it works if I try again. I hope that mkdir() can be
changed so that it only returns false if the directory cannot be
created at all (e.g. because of lack of permissions or because it
already exists).






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


#35271 [NEW]: xml_parse_into_struct silently drops defined entities

2005-11-17 Thread bugs dot php dot net at nanonanonano dot net
From: bugs dot php dot net at nanonanonano dot net
Operating system: Linux
PHP version:  4CVS-2005-11-18 (CVS)
PHP Bug Type: XML related
Bug description:  xml_parse_into_struct silently drops defined entities

Description:

When called on an XML document that contains defined entities,
xml_parse_into_struct silently drops the entities from the parsed output.

(If the entity is undefined, it returns an error)

Reproduce code:
---
?php
  $data = implode (, file('entityexample.xml'));
  $parser = xml_parser_create();
  xml_parser_set_option ($parser,XML_OPTION_CASE_FOLDING,0);
  xml_parser_set_option ($parser,XML_OPTION_SKIP_WHITE,1);
  xml_parse_into_struct ($parser,$data,$values,$tags);
  xml_parser_free ($parser);
  #echo VALS\n; print_r($values);
  #echo TAGS\n; print_r($tags); 
  echo $values[2]['value'].\n;
?
-- entityexample.xml --
?xml version='1.0'?
!DOCTYPE test [
  !ENTITY times   FOO BAR
]
test
  item
nameOne times; two/name
  /item
/test


Expected result:

The entity should either be not replaced:

One times; two

or it should be correctly replaced:

One FOO BAR two


Actual result:
--
The entity is silently dropped from the XML stream:

One  two


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


#34664 [Bgs]: DOMDocument::saveXML() result cannot be loaded using loadXML()

2005-09-29 Thread bugs dot php dot net at webdevelopers dot cz
 ID:   34664
 User updated by:  bugs dot php dot net at webdevelopers dot cz
 Reported By:  bugs dot php dot net at webdevelopers dot cz
 Status:   Bogus
 Bug Type: DOM XML related
 Operating System: Linux version 2.6.6
 PHP Version:  5.0.5
 New Comment:

The bug is that I have a DOM document that was imported from HTML
(actually I'm having the object that handles the DOM and I may not be
aware of the way how it was created...).

When I have valid DOM document then I expect (or I thought that I can
expect) that I'll produce valid XML using the method $d-saveXML() and
the result can be loaded again without problem with loadXML()... This
is not the true.

Following function may fail under certain circumstances when the
DOMDocument was created using loadHTML():

function test(DOMDocument $d) {
  echo DOMDocument::loadXML($d-saveXML());
}

I'm not usre if it is not confusing if the programmer cannot be sure
that the saveXML() is not compatible with loadXML()...

---

Yesterday when I was playing with loadHTML() and then using the
saveXML() it even resulted in XML like this
html xmlns=someNS xmlns=someNS.../html
- it has duplicite attribute @xmlns which is not a XML so saveXML() is
more saveSometimesXML(). Obviosly when importing the HTML then the
@xmlns is treated as common attribute and on saving there is added
namespace declaration alongside @xmlns with existing @xmlns attribute.

It looks like saveXML() is not producing XML despite the name of the
function. I think it is a bug. Don't you think? Or is it meant
functionality and just the function's name is confusing me?


Previous Comments:


[2005-09-28 23:02:32] [EMAIL PROTECTED]

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

HTML is not XML (hence the different I/O methods) so you cant expect
things to always be fixed when trying to do a conversion like that.



[2005-09-28 05:28:03] [EMAIL PROTECTED]

What exactly is the bug here?  You can't have -- in an HTML/XML comment
and the warning message is telling you exactly that.  Remove the a-- and
it works just fine.



[2005-09-27 22:02:17] [EMAIL PROTECTED]

Please try using this CVS snapshot:

  http://snaps.php.net/php5-STABLE-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php5.0-win32-latest.zip





[2005-09-27 21:43:21] bugs dot php dot net at webdevelopers dot cz

Sorry for the incorrect bug's name:
invalid feof() results due to Zend's caching of user stream wrappers

My browser's autocompletion prefilled it and I didn't noticed it... ;-)



[2005-09-27 21:38:32] bugs dot php dot net at webdevelopers dot cz

Description:

HTML imported using DOMDocument::loadHTML() is not saved as valid XML
using DOMDocument::saveXML()

Reproduce code:
---
header('Content-Type: text/plain; charset=UTF-8');

$d=new DOMDocument('1.0', 'UTF-8');
if ($d-loadHTML('htmlbodyscript!-- var a=1; a--;
--/script/body/html')) {
  echo loadHTML: OK\n;
  echo $d-loadXML($d-saveXML());
}

Expected result:

loadHTML: OK
1


Actual result:
--
loadHTML: OK
br /
bWarning/b:  DOMDocument::loadXML() [a
href='function.loadXML'function.loadXML/a]: Comment not terminated 
lt;!-- var a=1; a in Entity, line: 3 in btest.php/b on line
b9/bbr /





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


#34663 [NEW]: Patch to get around apache not expanding %0 when passed open_basedir in vhost

2005-09-27 Thread php-bugs at antispam dot nerds dot org dot uk
From: php-bugs at antispam dot nerds dot org dot uk
Operating system: FreeBSD
PHP version:  5.0.5
PHP Bug Type: Apache2 related
Bug description:  Patch to get around apache not expanding %0 when passed 
open_basedir in vhost

Description:

There are often cases where apache users with php5 installed will want to
use dynamic vhosts (not least because it's in the apache docs), which
leads to something like this:

VirtualHost 82.70.196.65:80
VirtualDocumentRoot /data/www/%0
ServerName %0
php_admin_value open_basedir %0
/VirtualHost

Unfortunately apache is naughty and doesn't expand the %0 on the
php_admin_value line, which means that restricting the directories that
php has access to is a pain!

This I know is an apache problem, rather than a php one, however I found a
patch on a forum
(http://www.phpbuilder.com/lists/php-developer-list/2000101/0994.php) that
gets around this nicely, and I just tweaked it to work in php5 (I'm not
trying to claim any credit away from the original author, I just like the
feature!).  I figured this was posted a long time ago, if he was going to
submit it - he would have by now.

Basically it just adds a keyword of VIRTUAL_DOCUMENT_ROOT, which has
essentially the same end result, as it causes the fopen wrapper to expand
it to the VirtualDocumentRoot.

Patch included at the Reproduce Code

Reproduce code:
---
--- main/fopen_wrappers.c.orig  Sun Sep 25 22:25:20 2005
+++ main/fopen_wrappers.c   Sun Sep 25 22:28:40 2005
@@ -95,8 +95,18 @@
char resolved_name[MAXPATHLEN];
char resolved_basedir[MAXPATHLEN];
char local_open_basedir[MAXPATHLEN];
+   char *local_open_basedir_sub; /* Substring pointer for strstr */
int resolved_basedir_len;
int resolved_name_len;
+
+   if ((strcmp(PG(open_basedir), VIRTUAL_DOCUMENT_ROOT) == 0) 
+   SG(request_info).path_translated 
*SG(request_info).path_translated  ) {
+
+   strlcpy(local_open_basedir,
SG(request_info).path_translated, sizeof(local_open_basedir));
+  
local_open_basedir_sub=strstr(local_open_basedir,SG(request_info).request_uri);
+   /* Now insert null to break apart the string */
+   if (local_open_basedir_sub) *local_open_basedir_sub =
'\0';
+   } else

/* Special case basedir==.: Use script-directory */
if (strcmp(basedir, .) || !VCWD_GETCWD(local_open_basedir,
MAXPATHLEN)) {


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


#34664 [NEW]: invalid feof() results due to Zend's caching of user stream wrappers

2005-09-27 Thread bugs dot php dot net at webdevelopers dot cz
From: bugs dot php dot net at webdevelopers dot cz
Operating system: Linux version 2.6.6 
PHP version:  5.0.5
PHP Bug Type: DOM XML related
Bug description:  invalid feof() results due to Zend's caching of user stream 
wrappers

Description:

HTML imported using DOMDocument::loadHTML() is not saved as valid XML
using DOMDocument::saveXML()

Reproduce code:
---
header('Content-Type: text/plain; charset=UTF-8');

$d=new DOMDocument('1.0', 'UTF-8');
if ($d-loadHTML('htmlbodyscript!-- var a=1; a--;
--/script/body/html')) {
  echo loadHTML: OK\n;
  echo $d-loadXML($d-saveXML());
}

Expected result:

loadHTML: OK
1


Actual result:
--
loadHTML: OK
br /
bWarning/b:  DOMDocument::loadXML() [a
href='function.loadXML'function.loadXML/a]: Comment not terminated 
lt;!-- var a=1; a in Entity, line: 3 in btest.php/b on line
b9/bbr /

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


#34664 [Opn]: DOMDocument::saveXML() result cannot be loaded using loadXML()

2005-09-27 Thread bugs dot php dot net at webdevelopers dot cz
 ID:   34664
 User updated by:  bugs dot php dot net at webdevelopers dot cz
-Summary:  invalid feof() results due to Zend's caching of user
   stream wrappers
 Reported By:  bugs dot php dot net at webdevelopers dot cz
 Status:   Open
 Bug Type: DOM XML related
 Operating System: Linux version 2.6.6
 PHP Version:  5.0.5
 New Comment:

Sorry for the incorrect bug's name:
invalid feof() results due to Zend's caching of user stream wrappers

My browser's autocompletion prefilled it and I didn't noticed it... ;-)


Previous Comments:


[2005-09-27 21:38:32] bugs dot php dot net at webdevelopers dot cz

Description:

HTML imported using DOMDocument::loadHTML() is not saved as valid XML
using DOMDocument::saveXML()

Reproduce code:
---
header('Content-Type: text/plain; charset=UTF-8');

$d=new DOMDocument('1.0', 'UTF-8');
if ($d-loadHTML('htmlbodyscript!-- var a=1; a--;
--/script/body/html')) {
  echo loadHTML: OK\n;
  echo $d-loadXML($d-saveXML());
}

Expected result:

loadHTML: OK
1


Actual result:
--
loadHTML: OK
br /
bWarning/b:  DOMDocument::loadXML() [a
href='function.loadXML'function.loadXML/a]: Comment not terminated 
lt;!-- var a=1; a in Entity, line: 3 in btest.php/b on line
b9/bbr /





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


#24485 [NoF-Opn]: $a = $b; become $a=$b; when I use a function

2005-08-31 Thread bugs dot php dot net at public dot salagir dot com
 ID:   24485
 User updated by:  bugs dot php dot net at public dot salagir dot com
 Reported By:  bugs dot php dot net at public dot salagir dot com
-Status:   No Feedback
+Status:   Open
 Bug Type: Scripting Engine problem
 Operating System: *
 PHP Version:  5CVS, 4CVS (2005-06-07)
 Assigned To:  derick
 New Comment:

No feedback [from the original poster] was provided for this bug for
over a week
I guess that's a good thing the original poster who did that bug report
*more than 2 years ago*, still read his old e-mail, is still alive or
even still interested in php ;p
(I'm juste beging mean. This debate take place here
http://bugs.php.net/bug.php?id=34313)


Previous Comments:


[2005-08-31 02:33:16] php dot net at nanonanonano dot net

Precisely how is this bug No feedback?



[2005-08-30 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-08-23 09:39:56] php dot net at nanonanonano dot net

To start with, this bug is not fixed in php4-STABLE-200508230645.

This bug has already been marked as fixed in PHP5, so asking us to run
a test case against the PHP5 CVS snapshot isn't really that sensible,
is it?

BTW making a new does it work in the latest snapshot comment each
time we say no it's not fixed yet, makes it look like you are hoping
to fix this bug by accident rather than deliberately set out to fix it.
I find it hard to believe you would be actually doing that, but it's
certainly what it looks like from this end when you are obviously not
even running the really simple test case provided by the original
submitter.

Can we most politely ask you to use the really simple test case that
provided here to test your fixes? And when you think you've actually
solved it, then ask if we think you've solved it too. Most of us lack
either the time or ability to keep testing CVS snapshots to see if you
have fixed it yet; it would be so much easier for everyone if you guys
tested it yourselves when you already have the latest installed on your
machines and the test case is this simple.



[2005-08-22 01:09:17] [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-03-24 21:48:33] [EMAIL PROTECTED]

For Derick, see also bug #32261 (same issue?)






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

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


#34282 [NEW]: Bundle SQLite 3.2.3, which has important fixes

2005-08-27 Thread bugs at ilibi dot com
From: bugs at ilibi dot com
Operating system: linux
PHP version:  5.1.0RC1
PHP Bug Type: SQLite related
Bug description:  Bundle SQLite 3.2.3, which has important fixes

Description:

Please be advised that there has since been an 
importance update to SQLite. Ilia upgraded the bundled 
SQLite to 3.2.2 for beta 3. Please update to 3.2.4. 

2005 August 21 (3.2.3)
Added support for the CAST operator
Tcl interface allows BLOB values to be transferred to user-
defined functions
Added the transaction method to the Tcl interface
Allow the DEFAULT value of a column to call functions that 
have constant operands
Added the ANALYZE command for gathering statistics on 
indices and using those statistics when picking an index in 
the optimizer
Remove the limit (formerly 100) on the number of terms in 
the WHERE clause
The right-hand side of the IN operator can now be a list of 
expressions instead of just a list of constants
Rework the optimizer so that it is able to make better use 
of indices
The order of tables in a join is adjusted automatically to 
make better use of indices
The IN operator is now a candidate for optimization even if 
the left-hand side is not the left-most term of the index. 
Multiple IN operators can be used with the same index.
WHERE clause expressions using BETWEEN and OR are now 
candidates for optimization
Added the case_sensitive_like pragma and the 
SQLITE_CASE_SENSITIVE_LIKE compile-time option to set its 
default value to on.
Use indices to help with GLOB expressions and LIKE 
expressions too when the case_sensitive_like pragma is 
enabled
Added support for grave-accent quoting for compatibility 
with MySQL
Improved test coverage
Dozens of minor bug fixes


2005 August 24 (3.2.4)
Fix a bug introduced in the previous release that can cause 
a segfault while generating code for complex WHERE clauses.
Allow floating point literals to begin or end with a decimal 
point.



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


#24485 [NoF-Opn]: $a = $b; become $a=$b; when I use a function

2005-08-19 Thread bugs dot php dot net at public dot salagir dot com
 ID:   24485
 User updated by:  bugs dot php dot net at public dot salagir dot com
-Reported By:  gomez at efrei dot fr
+Reported By:  bugs dot php dot net at public dot salagir dot com
-Status:   No Feedback
+Status:   Open
 Bug Type: Scripting Engine problem
 Operating System: *
 PHP Version:  5CVS, 4CVS (2005-06-07)
 Assigned To:  derick
 New Comment:

So considering the previous comment, the bug is still open.


Previous Comments:


[2005-08-09 05:48:01] php dot net at nanonanonano dot net

This bug is still present in PHP 4.4.0 (Debian package 4.4.0-1). Thanks
for trying, guys, but your latest references fixes don't fix this
problem (nor are any of the E_NOTICE messages that are threatened for
interesting use of references emitted).

The simple test case included by the original submitter still fails.

This one's still open...



[2005-06-15 01:00:05] 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-06-07 15:51:56] [EMAIL PROTECTED]

Please try using this CVS snapshot:

  http://snaps.php.net/php4-STABLE-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php4-win32-STABLE-latest.zip





[2005-03-24 21:48:33] [EMAIL PROTECTED]

For Derick, see also bug #32261 (same issue?)






[2005-02-03 23:18:38] ericvanblokland at gmail dot com

Where do you live? If it's anywhere near here I'll buy you a beer (or
two)!! 

I'm working on a huge project, with extremely large and complex object
constructions, and I have been fighting against segmentation faults for
weeks now which is a mayor setback as the deadline is comming closer.
I'm still trying to narrow down the cause of these problems but it
seems that some construction of circular references (That might exist
as a result of this bug) causes memory leaks and crashes php on simple
variable assignments. To make me more desperate, after installing the
latest rpm in debug-mode memory leaks were reported once and never
after and de segmentation faults disappeared. Using that same rpm
without debug mode resulted in the same segaults.

I've posted this before http://bugs.php.net/bug.php?id=31624 but that
bug-report got broken and I've been investigating the cause more before
reposting. (I reproduced my problem there with the latest CVS of that
time) 

However, as this bug might be causing the exceptional conditions that
causes my segfaults (Copying, a complex, reference-rich object to
another location in a session, resulting in another reference), I will
wait looking into that any further for now. I can only pray it fixes
it.

Sorry for the long story, but as it might be related I feld the need to
post it here.

Once more, thanks a lot!



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

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


#33468 [Com]: preg_match on long strings fails

2005-08-10 Thread bugs dot php dot net at chsc dot dk
 ID:   33468
 Comment by:   bugs dot php dot net at chsc dot dk
 Reported By:  mjsherman at chartermi dot net
 Status:   Assigned
 Bug Type: PCRE related
 Operating System: *
 PHP Version:  5CVS, 4CVS (2005-08-09)
 Assigned To:  andrei
 New Comment:

An even simpler testcase:

$data = str_repeat('a', );
preg_match('/(?:[a])*/', $data, $reg);

Notice that the parenthesis is non-capturing, i.e. we don't even put a
lot of elements in the $reg array.


Previous Comments:


[2005-08-09 10:36:28] [EMAIL PROTECTED]

Happens also with the new PCRE 6.2 lib which was bundled in PHP CVS
today.



[2005-06-24 19:30:06] [EMAIL PROTECTED]

Andrei, could you check it plz.
As far as I understand, this is something not related to PHP, but just
another PCRE limitation.



[2005-06-24 19:21:22] mjsherman at chartermi dot net

Just tested with 5.1.0beta2
Same problem.



[2005-06-24 18:28:01] [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-06-24 18:24:34] mjsherman at chartermi dot net

Description:

preg_match, if passed a long subject string, fails unexpectedly.

I have read through the PCRE limitations, and can't see that this is
one of them.  I have tried increasing memory limit (to increase the
stack) with the same results.

Cutoff and examples are below:

Reproduce code:
---
$subject = str_repeat('a',100);
$subject .= str_repeat('b', 4370);
$subject .= str_repeat('a', 100);
if (preg_match('/(.*).*?\1/',$subject)) {
  echo OK\n;
}

Expected result:

OK to be printed after matching 100 as.
If 4370 is changed to 4369, then OK is printed.

Actual result:
--
With 4370 'b's, nothing is printed (failed preg_match)
With 4369 'b's, OK is printed (worked).





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


#34046 [NEW]: $this accessible in static mehods called by an object not instance of this clas

2005-08-09 Thread bugs dot php dot net at sebastianmendel dot de
From: bugs dot php dot net at sebastianmendel dot de
Operating system: Irrelevant
PHP version:  4CVS-2005-08-09 (stable)
PHP Bug Type: Scripting Engine problem
Bug description:  $this accessible in static mehods called by an object not 
instance of this clas

Description:

$this is available inside a statically called mehod when it is called from
inside an object not an instance of this class

Reproduce code:
---
?php
class Foo {
function foo() {
if ( isset( $this ) ) {
return '$this available';
} else {
return '$this NOT available';
}
}
}
class Bar {
function callFoo() {
echo 'Foo::foo(): ' . Foo::foo() . \n;
}
}

$foo = new Bar();
$foo-callFoo();
?

Expected result:

Foo::foo(): $this NOT available

Actual result:
--
Foo::foo(): $this available

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


#34046 [Opn]: $this accessible in static mehods called by an object not instance of this clas

2005-08-09 Thread bugs dot php dot net at sebastianmendel dot de
 ID:   34046
 User updated by:  bugs dot php dot net at sebastianmendel dot de
 Reported By:  bugs dot php dot net at sebastianmendel dot de
 Status:   Open
 Bug Type: Scripting Engine problem
 Operating System: Irrelevant
 PHP Version:  4CVS-2005-08-09 (stable)
 New Comment:

see also answer to bug #9005

http://bugs.php.net/bug.php?id=9005


Previous Comments:


[2005-08-09 08:47:14] bugs dot php dot net at sebastianmendel dot de

Description:

$this is available inside a statically called mehod when it is called
from inside an object not an instance of this class

Reproduce code:
---
?php
class Foo {
function foo() {
if ( isset( $this ) ) {
return '$this available';
} else {
return '$this NOT available';
}
}
}
class Bar {
function callFoo() {
echo 'Foo::foo(): ' . Foo::foo() . \n;
}
}

$foo = new Bar();
$foo-callFoo();
?

Expected result:

Foo::foo(): $this NOT available

Actual result:
--
Foo::foo(): $this available





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


#34046 [Fbk-Opn]: $this accessible in static mehods called by an object not instance of this clas

2005-08-09 Thread bugs dot php dot net at sebastianmendel dot de
 ID:   34046
 User updated by:  bugs dot php dot net at sebastianmendel dot de
 Reported By:  bugs dot php dot net at sebastianmendel dot de
-Status:   Feedback
+Status:   Open
 Bug Type: Scripting Engine problem
 Operating System: Irrelevant
 PHP Version:  4CVS-2005-08-09 (stable)
 New Comment:

$this should not be available inside a method called with the
scope-resolution-operator if the call comes from an object not beeing
an instance of the same class as the called method


Previous Comments:


[2005-08-09 08:49:57] [EMAIL PROTECTED]

Not enough information was provided for us to be able
to handle this bug. Please re-read the instructions at
http://bugs.php.net/how-to-report.php

If you can provide more information, feel free to add it
to this bug and change the status back to Open.

Thank you for your interest in PHP.




[2005-08-09 08:49:49] bugs dot php dot net at sebastianmendel dot de

see also answer to bug #9005

http://bugs.php.net/bug.php?id=9005



[2005-08-09 08:47:14] bugs dot php dot net at sebastianmendel dot de

Description:

$this is available inside a statically called mehod when it is called
from inside an object not an instance of this class

Reproduce code:
---
?php
class Foo {
function foo() {
if ( isset( $this ) ) {
return '$this available';
} else {
return '$this NOT available';
}
}
}
class Bar {
function callFoo() {
echo 'Foo::foo(): ' . Foo::foo() . \n;
}
}

$foo = new Bar();
$foo-callFoo();
?

Expected result:

Foo::foo(): $this NOT available

Actual result:
--
Foo::foo(): $this available





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


#34046 [Bgs]: $this accessible in static mehods called by an object not instance of this clas

2005-08-09 Thread bugs dot php dot net at sebastianmendel dot de
 ID:   34046
 User updated by:  bugs dot php dot net at sebastianmendel dot de
 Reported By:  bugs dot php dot net at sebastianmendel dot de
 Status:   Bogus
 Bug Type: Scripting Engine problem
 Operating System: Irrelevant
 PHP Version:  4CVS-2005-08-09 (stable)
 New Comment:

i read both. and the doc more than once

the scope resolution operator is to call methods from a parent class,
and there should $this available.

but why is $this available when the method is not of a parent class?

btw. doesnt it pollutes the lokal namespace?


Previous Comments:


[2005-08-09 09:06:54] [EMAIL PROTECTED]

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

.



[2005-08-09 08:56:07] bugs dot php dot net at sebastianmendel dot de

$this should not be available inside a method called with the
scope-resolution-operator if the call comes from an object not beeing
an instance of the same class as the called method



[2005-08-09 08:49:57] [EMAIL PROTECTED]

Not enough information was provided for us to be able
to handle this bug. Please re-read the instructions at
http://bugs.php.net/how-to-report.php

If you can provide more information, feel free to add it
to this bug and change the status back to Open.

Thank you for your interest in PHP.




[2005-08-09 08:49:49] bugs dot php dot net at sebastianmendel dot de

see also answer to bug #9005

http://bugs.php.net/bug.php?id=9005



[2005-08-09 08:47:14] bugs dot php dot net at sebastianmendel dot de

Description:

$this is available inside a statically called mehod when it is called
from inside an object not an instance of this class

Reproduce code:
---
?php
class Foo {
function foo() {
if ( isset( $this ) ) {
return '$this available';
} else {
return '$this NOT available';
}
}
}
class Bar {
function callFoo() {
echo 'Foo::foo(): ' . Foo::foo() . \n;
}
}

$foo = new Bar();
$foo-callFoo();
?

Expected result:

Foo::foo(): $this NOT available

Actual result:
--
Foo::foo(): $this available





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


#33959 [NEW]: Failure when compiling pdo_sqlite

2005-08-01 Thread bugs at bmuskalla dot de
From: bugs at bmuskalla dot de
Operating system: Gentoo (2.6)
PHP version:  5CVS-2005-08-02 (dev)
PHP Bug Type: Compile Failure
Bug description:  Failure when compiling pdo_sqlite

Description:

compile failes while compiling sqlite pdo extension

Reproduce code:
---
./configure --with-apxs2=/usr/sbin/apxs2 --with-config-file-path=/etc
--with-zlib --enable-bcmath --with-bz2 --with-curl --enable-ftp --with-gd
--enable-gd-native-ttf --enable-mbstring --with-mysql --with-mysqli
--with-ncurses --with-pdo-mysql--enable-soap --enable-sockets
--enable-sqlite-utf8 --with-tidy --enable-wddx --with-pear=/web/pear

make
error

Expected result:

a new php5 ;)

Actual result:
--
compile failure when compiling php 5.1-cvs

/bin/sh /usr/src/php-cvs/libtool --silent --preserve-dup-deps
--mode=compile gcc -Iext/pdo_sqlite/sqlite/src -DPDO_SQLITE_BUNDLED=1
-DSQLITE_OMIT_CURSOR -I/usr/src/php-cvs/ext -Iext/pdo_sqlite/
-I/usr/src/php-cvs/ext/pdo_sqlite/ -DPHP_ATOM_INC
-I/usr/src/php-cvs/include -I/usr/src/php-cvs/main -I/usr/src/php-cvs
-I/usr/include/libxml2 -I/usr/src/php-cvs/ext/mbstring/oniguruma
-I/usr/src/php-cvs/ext/mbstring/libmbfl
-I/usr/src/php-cvs/ext/mbstring/libmbfl/mbfl -I/usr/include/mysql
-I/usr/src/php-cvs/TSRM -I/usr/src/php-cvs/Zend-g -O2  -prefer-non-pic
-c /usr/src/php-cvs/ext/pdo_sqlite/pdo_sqlite.c -o
ext/pdo_sqlite/pdo_sqlite.lo
In file included from /usr/src/php-cvs/ext/pdo_sqlite/pdo_sqlite.c:31:
/usr/src/php-cvs/ext/pdo_sqlite/php_pdo_sqlite_int.h:24:21: sqlite3.h: No
such file or directory
In file included from /usr/src/php-cvs/ext/pdo_sqlite/pdo_sqlite.c:31:
/usr/src/php-cvs/ext/pdo_sqlite/php_pdo_sqlite_int.h:50: error: syntax
error before sqlite3
/usr/src/php-cvs/ext/pdo_sqlite/php_pdo_sqlite_int.h:50: warning: no
semicolon at end of struct or union
/usr/src/php-cvs/ext/pdo_sqlite/php_pdo_sqlite_int.h:53: error: syntax
error before '}' token
/usr/src/php-cvs/ext/pdo_sqlite/php_pdo_sqlite_int.h:53: warning: data
definition has no type or storage class
/usr/src/php-cvs/ext/pdo_sqlite/php_pdo_sqlite_int.h:56: error: syntax
error before pdo_sqlite_db_handle
/usr/src/php-cvs/ext/pdo_sqlite/php_pdo_sqlite_int.h:56: warning: no
semicolon at end of struct or union
/usr/src/php-cvs/ext/pdo_sqlite/php_pdo_sqlite_int.h:57: warning: data
definition has no type or storage class
/usr/src/php-cvs/ext/pdo_sqlite/php_pdo_sqlite_int.h:58: error: syntax
error before ':' token
/usr/src/php-cvs/ext/pdo_sqlite/php_pdo_sqlite_int.h:59: error: syntax
error before ':' token
/usr/src/php-cvs/ext/pdo_sqlite/php_pdo_sqlite_int.h:60: warning: data
definition has no type or storage class
make: *** [ext/pdo_sqlite/pdo_sqlite.lo] Error 1


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


#33884 [NEW]: Only variable references should be returned by reference if I return nothing

2005-07-27 Thread php-bugs-2005 at ryandesign dot com
From: php-bugs-2005 at ryandesign dot com
Operating system: N/A
PHP version:  4.4.0
PHP Bug Type: Unknown/Other Function
Bug description:  Only variable references should be returned by reference if 
I return nothing

Description:

Hi. After upgrading from PHP 4.3.11 to 4.4.0 I get the 
famous Only variable references should be returned by 
reference notice in one of my projects. The function in 
question returns by reference, but only needs to do this 
sometimes. Other times, it returns nothing at all, because 
the caller does not need a return value. In these latter 
cases, PHP produces the notice as of 4.4.0.

This surprised me because it's perfectly fine to have a 
normal return-by-copy function that does not return 
anything. So why not a return-by-reference function?

I couldn't find any documentation that if your function 
returns by reference, then you must always return something.

In my particular case I can rewrite the function so that it 
always returns something, even when the caller has no use 
for it. I just wasn't sure if the notice in this case was 
intended, and if so, why.

If the behavior is intended, then the documentation should 
reflect this.

Reproduce code:
---
error_reporting(E_ALL);

function foo_by_reference_with_return() {
echo __FUNCTION__ . br /\n;
return $GLOBALS['bar'];
}
function foo_by_reference_without_return() {
echo __FUNCTION__ . br /\n;
} // line 11
function foo_by_copy_with_return() {
echo __FUNCTION__ . br /\n;
return $GLOBALS['bar'];
}
function foo_by_copy_without_return() {
echo __FUNCTION__ . br /\n;
}

foo_by_reference_with_return();
foo_by_reference_without_return(); // causes notice in 4.4.0
foo_by_copy_with_return();
foo_by_copy_without_return();

Expected result:

foo_by_reference_with_return
foo_by_reference_without_return
foo_by_copy_with_return
foo_by_copy_without_return

Actual result:
--
foo_by_reference_with_return
foo_by_reference_without_return
Notice: Only variable references should be returned by 
reference in references.php on line 11
foo_by_copy_with_return
foo_by_copy_without_return

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


#33500 [Com]: imap_open() fails when the server advertises GSSAPI

2005-07-12 Thread php-bugs at osborne dot jeamland dot org
 ID:   33500
 Comment by:   php-bugs at osborne dot jeamland dot org
 Reported By:  ed2019 at columbia dot edu
 Status:   Open
 Bug Type: IMAP related
 Operating System: RHEL 4
 PHP Version:  4.3.10
 New Comment:

Same problem on FC2 using stock RPMs


Previous Comments:


[2005-07-06 15:44:46] frank dot ruchter at hrz dot tu-chemnitz dot de

I detected the same behavior. As my httpd has no Kerberos ticket at
all, the error is a bit different:
Array
(
[0] = No credentials cache found (try running kinit) for
mailbox.hrz.tu-chemnitz.de
[1] = Can not authenticate to IMAP server: Client canceled
authentication
)

So no authentication downgrade to PLAIN occurs.
If it would be possible to disable Kerberos/GSS authentication via a
flag ...

Thanks,
Frank



[2005-06-29 15:04:31] ed2019 at columbia dot edu

I have also filed this bug with RedHat, see bug # 161826:
https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=161826 , as well
as to Mark Crispin ( author of the c-client imap library ), that
discussion is archived here:
http://mailman1.u.washington.edu/pipermail/imap-uw/2005-June/91.html



[2005-06-28 19:06:58] ed2019 at columbia dot edu

I am the system administrator.  I appreciate your trying to screen out
non-bugs, but this is not a non-bug, but I am quite sure that this is a
real bug.

An IMAP server supports multiple methods of remote client
authentication.  Among them, GSSAPI and plain.  When a client connects,
the server advertises these auth methods and other options it supports,
for example, GSSAPI, PLAIN, etc.

The client then selects which AUTH method to use.  php's imap extension
is choosing to use the GSSAPI method, but I would like it to make a
different choice.  Or, after GSSAPI fails, I would like it to try the
PLAIN auth method.

There is, however, no way (to my knowledge, or in the documentation) to
get it to make that choice.  The underlying c-client library that php
uses to talk to imap servers supports making the choice, and the imap
servers themselves support it, but PHP does not.  I think that puts it
into the category of a 'bug' that belongs in PHP's bug system.



[2005-06-28 18:52:22] [EMAIL PROTECTED]

Try to contact your system admintrator.
Questions related to IMAP server administration obviously do not belong
to the PHP bug system. 



[2005-06-28 18:36:34] ed2019 at columbia dot edu

What if I don't want to use GSSAPI?  I'm providing a username and
password that should be sufficient for the PLAIN auth method.



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

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


#33190 [Bgs]: Union of external documents causes timeout

2005-05-30 Thread php dot bugs at jamie-thompson dot co dot uk
 ID:   33190
 User updated by:  php dot bugs at jamie-thompson dot co dot uk
 Reported By:  php dot bugs at jamie-thompson dot co dot uk
 Status:   Bogus
 Bug Type: XSLT related
 Operating System: Debian Sarge
 PHP Version:  4.3.10
 New Comment:

...and whilst I remember, I left off the sample PHP code I used as it's
irrelevant to the problem, but irrespective of that it's also about as
trivial as you can get:

?php

set_time_limit ( 10 );

$xh = xslt_create();

xslt_set_log($xh, true);
xslt_set_log($xh, getcwd() . '/myfile.log');

$result = xslt_process($xh, 'bug.xsl', 'bug.xsl');
echo $result;

xslt_free($xh);

?


Previous Comments:


[2005-05-31 00:08:57] php dot bugs at jamie-thompson dot co dot uk

Ok, fair enough. The configure line thing is probably due to Debian
shipping extentions as modules. I was under the impression that php
extention bugs go here, but fair enough, I'll let the sablotron people
know. 

Thanks for your time.



[2005-05-30 23:06:03] [EMAIL PROTECTED]

And you're sure it's not bug in Sablotron?
I'm having a bit hard time believing this is anything genuine since
your configure line won't produce a PHP with xslt support..and the lack
of the example PHP script makes it also pretty hard to reproduce. Report
to the sablotron people, they maintain the extension too.. (which, btw.
will not exist in PHP 5)




[2005-05-30 20:25:28] php dot bugs at jamie-thompson dot co dot uk

Description:

I'm using external xml files to populate a select control. As XSLT 1.0
doesn't allow arbitray node-sets, I load these from external documents
using the document() function. One file contains the actual data, the
other contains a wildcard entry. I want to union these nodesets and use
the result to populate the control.

This works fine with Firefox's Transformiix engine, but Sablotron seems
to dislike the union operator immensely when used on external data, E.g.
merging a local nodeset with an external one causes a lockup, as does
merging two identical exterbal nodesets (though only from different
sources).

Info:
-
I am using Debian Sarge, with fully updated packages as of 30/05/05,
currently that's PHP 4.3.10-15 and Apache 2.0.54-4.

Here's the configure line from phpinfo():
'../configure' '--prefix=/usr' '--with-apxs2=/usr/bin/apxs2'
'--with-config-file-path=/etc/php4/apache2' '--enable-memory-limit'
'--disable-debug' '--with-regex=php' '--disable-rpath'
'--disable-static' '--with-pic' '--with-layout=GNU'
'--with-pear=/usr/share/php' '--enable-calendar' '--enable-sysvsem'
'--enable-sysvshm' '--enable-sysvmsg' '--enable-track-vars'
'--enable-trans-sid' '--enable-bcmath' '--with-bz2' '--enable-ctype'
'--with-db4' '--with-iconv' '--enable-exif' '--enable-filepro'
'--enable-ftp' '--with-gettext' '--enable-mbstring'
'--with-pcre-regex=/usr' '--enable-shmop' '--enable-sockets'
'--enable-wddx' '--disable-xml' '--with-expat-dir=/usr' '--with-xmlrpc'
'--enable-yp' '--with-zlib' '--without-pgsql' '--with-kerberos=/usr'
'--with-openssl=/usr' '--with-zip=/usr' '--enable-dbx'
'--with-mime-magic=/usr/share/misc/file/magic.mime'
'--with-exec-dir=/usr/lib/php4/libexec' '--without-mm'
'--without-mysql' '--without-sybase-ct'



Reproduce code:
---
I have attempted to cobble together some testcases, these can be found
at:

http://random.jamie-thompson.co.uk/sablotron/bug.xsl
http://random.jamie-thompson.co.uk/sablotron/bug1.xml
http://random.jamie-thompson.co.uk/sablotron/bug2.xml
http://random.jamie-thompson.co.uk/sablotron/bug1clone.xml

The xsl file is single-source file, (a stylesheet wrapped in an xml
wrapper so as to be able to include arbitray local nodesets for
testing), which loads the xml files using the document function.

In the xsl file's main template you will find a number of tests, with
those that cause lock-ups commented out. These scenarios are:

* performing a union of two external nodesets. This seems to work,
sometimes. It started working in my testcase at some indeterminate
point, however it still causes lockups in my actual code.
* performing a union of an external xml file with a local node set.
This causes Sablotron to lock up
* performing a union of an external xml file with another containing
the same node set. This also causes Sablotron to lock up

Expected result:

I expect to get the union of the two node sets without a lockup
occurring.

Firefox's output with all of the tests enabled is:
one:
equipment
list
item
equipment
id
0
name
Any Equipment

two:
equipment
list
item
equipment
id
1
name
More Equipment

local:
random
hi
random
woo

remote 1:
equipment
list
item
equipment
id
0
name
Any Equipment

remote 2:
equipment
list
item
equipment
id
1
name
More Equipment

dual remote:
list
item
equipment

#33190 [Bgs]: Union of external documents causes timeout

2005-05-30 Thread php dot bugs at jamie-thompson dot co dot uk
 ID:   33190
 User updated by:  php dot bugs at jamie-thompson dot co dot uk
 Reported By:  php dot bugs at jamie-thompson dot co dot uk
 Status:   Bogus
 Bug Type: XSLT related
 Operating System: Debian Sarge
 PHP Version:  4.3.10
 New Comment:

Ok, fair enough. The configure line thing is probably due to Debian
shipping extentions as modules. I was under the impression that php
extention bugs go here, but fair enough, I'll let the sablotron people
know. 

Thanks for your time.


Previous Comments:


[2005-05-30 23:06:03] [EMAIL PROTECTED]

And you're sure it's not bug in Sablotron?
I'm having a bit hard time believing this is anything genuine since
your configure line won't produce a PHP with xslt support..and the lack
of the example PHP script makes it also pretty hard to reproduce. Report
to the sablotron people, they maintain the extension too.. (which, btw.
will not exist in PHP 5)




[2005-05-30 20:25:28] php dot bugs at jamie-thompson dot co dot uk

Description:

I'm using external xml files to populate a select control. As XSLT 1.0
doesn't allow arbitray node-sets, I load these from external documents
using the document() function. One file contains the actual data, the
other contains a wildcard entry. I want to union these nodesets and use
the result to populate the control.

This works fine with Firefox's Transformiix engine, but Sablotron seems
to dislike the union operator immensely when used on external data, E.g.
merging a local nodeset with an external one causes a lockup, as does
merging two identical exterbal nodesets (though only from different
sources).

Info:
-
I am using Debian Sarge, with fully updated packages as of 30/05/05,
currently that's PHP 4.3.10-15 and Apache 2.0.54-4.

Here's the configure line from phpinfo():
'../configure' '--prefix=/usr' '--with-apxs2=/usr/bin/apxs2'
'--with-config-file-path=/etc/php4/apache2' '--enable-memory-limit'
'--disable-debug' '--with-regex=php' '--disable-rpath'
'--disable-static' '--with-pic' '--with-layout=GNU'
'--with-pear=/usr/share/php' '--enable-calendar' '--enable-sysvsem'
'--enable-sysvshm' '--enable-sysvmsg' '--enable-track-vars'
'--enable-trans-sid' '--enable-bcmath' '--with-bz2' '--enable-ctype'
'--with-db4' '--with-iconv' '--enable-exif' '--enable-filepro'
'--enable-ftp' '--with-gettext' '--enable-mbstring'
'--with-pcre-regex=/usr' '--enable-shmop' '--enable-sockets'
'--enable-wddx' '--disable-xml' '--with-expat-dir=/usr' '--with-xmlrpc'
'--enable-yp' '--with-zlib' '--without-pgsql' '--with-kerberos=/usr'
'--with-openssl=/usr' '--with-zip=/usr' '--enable-dbx'
'--with-mime-magic=/usr/share/misc/file/magic.mime'
'--with-exec-dir=/usr/lib/php4/libexec' '--without-mm'
'--without-mysql' '--without-sybase-ct'



Reproduce code:
---
I have attempted to cobble together some testcases, these can be found
at:

http://random.jamie-thompson.co.uk/sablotron/bug.xsl
http://random.jamie-thompson.co.uk/sablotron/bug1.xml
http://random.jamie-thompson.co.uk/sablotron/bug2.xml
http://random.jamie-thompson.co.uk/sablotron/bug1clone.xml

The xsl file is single-source file, (a stylesheet wrapped in an xml
wrapper so as to be able to include arbitray local nodesets for
testing), which loads the xml files using the document function.

In the xsl file's main template you will find a number of tests, with
those that cause lock-ups commented out. These scenarios are:

* performing a union of two external nodesets. This seems to work,
sometimes. It started working in my testcase at some indeterminate
point, however it still causes lockups in my actual code.
* performing a union of an external xml file with a local node set.
This causes Sablotron to lock up
* performing a union of an external xml file with another containing
the same node set. This also causes Sablotron to lock up

Expected result:

I expect to get the union of the two node sets without a lockup
occurring.

Firefox's output with all of the tests enabled is:
one:
equipment
list
item
equipment
id
0
name
Any Equipment

two:
equipment
list
item
equipment
id
1
name
More Equipment

local:
random
hi
random
woo

remote 1:
equipment
list
item
equipment
id
0
name
Any Equipment

remote 2:
equipment
list
item
equipment
id
1
name
More Equipment

dual remote:
list
item
equipment
id
1
name
More Equipment
list
item
equipment
id
0
name
Any Equipment

single remote and local:
random
hi
equipment
list
item
equipment
id
0
name
Any Equipment

clone remote:
equipment
list
item
equipment
id
0
name
Any Equipment
equipment
list
item
equipment
id
0
name
Any Equipment



Actual result:
--
With logging turned on, I get this:
Sablotron Message on line none, level log: Parsing
'file:///var/www/random/sablotron/bug.xsl'...
Sablotron Message on line none, level log: Parse done in 0.042 seconds

#33102 [NEW]: Can't run programs in safe_mode_exec_dir

2005-05-22 Thread php-bugs at jensthebrain dot de
From: php-bugs at jensthebrain dot de
Operating system: Windows 2003
PHP version:  4.3.11
PHP Bug Type: Safe Mode/open_basedir
Bug description:  Can't run programs in safe_mode_exec_dir

Description:

I can't execute binaries which are in safe_mode_exec_dir 
(safe_mode=on)   

Reproduce code:
---
?php 
error_reporting(E_ALL); 
exec('d:\wwwroot\safe_bin\identify.exe', $ret, $error); 
print_r($ret); 
echo $error; 
?

Expected result:

The output of identify.exe 

Actual result:
--
d:\programme\php\php -d safe_mode=on -d 
safe_mode_exec_dir=d:/wwwroot/safe_bin/ d:
\wwwroot\www-test.xy.de\htdocs\test.php  
Der Befehl d:/wwwroot/safe_bin/ ist entweder falsch 
geschrieben oder konnte nicht gefunden werden.  
Content-type: text/html  
Array  
(  
)  
1 
 
 
 
With \ instead of /  
d:\programme\php\php -d safe_mode=on -d 
safe_mode_exec_dir=d:\wwwroot\safe_bin\ d:
\wwwroot\www-test.xy.de\htdocs\test.php  
Content-type: text/html  
Array  
(  
)  
0 

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


#33102 [Fbk-Opn]: Can't run programs in safe_mode_exec_dir

2005-05-22 Thread php-bugs at jensthebrain dot de
 ID:   33102
 User updated by:  php-bugs at jensthebrain dot de
 Reported By:  php-bugs at jensthebrain dot de
-Status:   Feedback
+Status:   Open
 Bug Type: Safe Mode/open_basedir
 Operating System: Windows 2003
 PHP Version:  4.3.11
 New Comment:

The same:

?php 
error_reporting(E_ALL);


exec('d:/wwwroot/safe_bin/identify.exe', $ret, $error);
print_r($ret);
echo $error;
?


d:\Programme\php\php -n -d safe_mode=on -d
safe_mode_exec_dir=d:\wwwroot\safe_bin\
d:\wwwroot\www-test.xy.de\htdocs\test.php
Content-type: text/html
X-Powered-By: PHP/4.3.11

Array
(
)
0


Previous Comments:


[2005-05-22 15:28:22] [EMAIL PROTECTED]

And what if you execute d:/wwwroot/safe_bin/identify.exe instead of
d:\wwwroot\safe_bin\identify.exe ?



[2005-05-22 14:43:41] php-bugs at jensthebrain dot de

Description:

I can't execute binaries which are in safe_mode_exec_dir 
(safe_mode=on)   

Reproduce code:
---
?php 
error_reporting(E_ALL); 
exec('d:\wwwroot\safe_bin\identify.exe', $ret, $error); 
print_r($ret); 
echo $error; 
?

Expected result:

The output of identify.exe 

Actual result:
--
d:\programme\php\php -d safe_mode=on -d 
safe_mode_exec_dir=d:/wwwroot/safe_bin/ d:
\wwwroot\www-test.xy.de\htdocs\test.php  
Der Befehl d:/wwwroot/safe_bin/ ist entweder falsch 
geschrieben oder konnte nicht gefunden werden.  
Content-type: text/html  
Array  
(  
)  
1 
 
 
 
With \ instead of /  
d:\programme\php\php -d safe_mode=on -d 
safe_mode_exec_dir=d:\wwwroot\safe_bin\ d:
\wwwroot\www-test.xy.de\htdocs\test.php  
Content-type: text/html  
Array  
(  
)  
0 





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


#33102 [Fbk-Opn]: Can't run programs in safe_mode_exec_dir

2005-05-22 Thread php-bugs at jensthebrain dot de
 ID:   33102
 User updated by:  php-bugs at jensthebrain dot de
 Reported By:  php-bugs at jensthebrain dot de
-Status:   Feedback
+Status:   Open
 Bug Type: Safe Mode/open_basedir
 Operating System: Windows 2003
 PHP Version:  4.3.11
 New Comment:

Both with /

?php 
error_reporting(E_ALL);


exec('d:/wwwroot/safe_bin/identify.exe', $ret, $error);
print_r($ret);
echo $error;
?

d:\Programme\php\php -n -d safe_mode=on -d
safe_mode_exec_dir=d:/wwwroot/safe_bin/
d:\wwwroot\www-test.xy.de\htdocs\test.php
Die Syntax für den Dateinamen, Verzeichnisnamen oder die
Datenträgerbezeichnung ist falsch.
Content-type: text/html
X-Powered-By: PHP/4.3.11

Array
(
)
1


It seems that safe_mode_exec_dir with / causes problems: Die Syntax für
den Dateinamen, Verzeichnisnamen oder die Datenträgerbezeichnung ist
falsch.
- Syntax for filename, directoryname or partitionname is wrong


Previous Comments:


[2005-05-22 16:28:29] [EMAIL PROTECTED]

No. Try when slashes in both safe_mode_exec_dir and the command are the
same.



[2005-05-22 16:23:44] php-bugs at jensthebrain dot de

The same:

?php 
error_reporting(E_ALL);


exec('d:/wwwroot/safe_bin/identify.exe', $ret, $error);
print_r($ret);
echo $error;
?


d:\Programme\php\php -n -d safe_mode=on -d
safe_mode_exec_dir=d:\wwwroot\safe_bin\
d:\wwwroot\www-test.xy.de\htdocs\test.php
Content-type: text/html
X-Powered-By: PHP/4.3.11

Array
(
)
0



[2005-05-22 15:28:22] [EMAIL PROTECTED]

And what if you execute d:/wwwroot/safe_bin/identify.exe instead of
d:\wwwroot\safe_bin\identify.exe ?



[2005-05-22 14:43:41] php-bugs at jensthebrain dot de

Description:

I can't execute binaries which are in safe_mode_exec_dir 
(safe_mode=on)   

Reproduce code:
---
?php 
error_reporting(E_ALL); 
exec('d:\wwwroot\safe_bin\identify.exe', $ret, $error); 
print_r($ret); 
echo $error; 
?

Expected result:

The output of identify.exe 

Actual result:
--
d:\programme\php\php -d safe_mode=on -d 
safe_mode_exec_dir=d:/wwwroot/safe_bin/ d:
\wwwroot\www-test.xy.de\htdocs\test.php  
Der Befehl d:/wwwroot/safe_bin/ ist entweder falsch 
geschrieben oder konnte nicht gefunden werden.  
Content-type: text/html  
Array  
(  
)  
1 
 
 
 
With \ instead of /  
d:\programme\php\php -d safe_mode=on -d 
safe_mode_exec_dir=d:\wwwroot\safe_bin\ d:
\wwwroot\www-test.xy.de\htdocs\test.php  
Content-type: text/html  
Array  
(  
)  
0 





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


#32910 [Opn]: session unset inside foreach breaks session write handler

2005-05-03 Thread bugs dot php dot net at enca dot cz
 ID:   32910
 User updated by:  bugs dot php dot net at enca dot cz
 Reported By:  bugs dot php dot net at enca dot cz
 Status:   Open
 Bug Type: Session related
 Operating System: MS Windows Server 2003
 PHP Version:  5.0.4
 New Comment:

thx, this workaround is working for me


Previous Comments:


[2005-05-03 11:46:35] stocker at vision-e dot ch

Workaround for the reported problem foreach-iterating $_SESSION with
unset() inside the loop:

$unset_collection = array();
// 1. Collect the Session-Variable to unset,
// because unset inside the foreach-loop will not work.
foreach ($_SESSION as $sessvar = $sessval)
{
  if ($sessvar != A)
  {
array_push($unset_collection,$sessvar);
  }
}
// 2. Unset the session variables outside the foreach
foreach ($unset_collection as $sessvar)
{
  unset($_SESSION[$sessvar]);
}

Comment:
Changing a loop control variable inside of a loop is not good
programming style. Just this happens, if adding or removing a $_SESSION
variable inside of a foreach for $_SESSION. The solution is extracting
the the processes of unseting or adding outside of that loop.



[2005-05-02 14:09:35] bugs dot php dot net at enca dot cz

It doesn't work for me :-(
I tried this code in 
PHP Version 5.0.5-dev
Build Date Apr 26 2005 02:18:08
but the result is the same as in 5.0.4
I'm using php.ini-recomended without modifications



[2005-05-02 13:40:12] [EMAIL PROTECTED]

Please try using this CVS snapshot:

  http://snaps.php.net/php5-STABLE-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php5.0-win32-latest.zip

Works fine for me..




[2005-05-02 11:14:48] bugs dot php dot net at enca dot cz

Description:

In this testcase the write function is not called. If you remove line
with unset, the write function is called properly. If you delete whole
foreach cycle and use 
unset($_SESSION['A']); instead, the write function si also called -
as expected. This bug appear only when you call unset inside foreach
cycle.

My environment: 
MS Windows Server 2003 SE (Windows NT 5.2 build 3790)
Apache/2.0.53 (Win32) PHP/5.0.4

Smilar (but not exactly same) bug is described as #32564, but it is in
the No feedback status and there is no way (for me) to change this
status. I hope that this reproduce code is much better then codes
from #32564

I can provide more information if you ask for them.


Reproduce code:
---
?php
function foo(){return(true);}
function read($id){
  return 'A|s:1:a;B|s:1:b;';
}
function write($id, $sess_data){
  print I'm writing this data: $sess_data\n;
  return true;
}
header('Content-Type: text/plain');
session_set_save_handler(foo, foo, read, write, foo, foo);
session_start();
print_r($_SESSION);
foreach($_SESSION as $lsKey = $lsVal){
  if($lsKey != 'A'){
unset($_SESSION[$lsKey]);  // if you comment this line, the
write function is called properly
  }
}
print_r($_SESSION);
?

Expected result:

Array
(
[A] = a
[B] = b
)
Array
(
[A] = a
)
I'm writing this data: A|s:1:a;


Actual result:
--
Array
(
[A] = a
[B] = b
)
Array
(
[A] = a
)





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


#32910 [NEW]: session unset inside foreach breaks session write handler

2005-05-02 Thread bugs dot php dot net at enca dot cz
From: bugs dot php dot net at enca dot cz
Operating system: MS Windows Server 2003
PHP version:  5.0.4
PHP Bug Type: Session related
Bug description:  session unset inside foreach breaks session write handler

Description:

In this testcase the write function is not called. If you remove line
with unset, the write function is called properly. If you delete whole
foreach cycle and use 
unset($_SESSION['A']); instead, the write function si also called - as
expected. This bug appear only when you call unset inside foreach cycle.

My environment: 
MS Windows Server 2003 SE (Windows NT 5.2 build 3790)
Apache/2.0.53 (Win32) PHP/5.0.4

Smilar (but not exactly same) bug is described as #32564, but it is in the
No feedback status and there is no way (for me) to change this status. I
hope that this reproduce code is much better then codes from #32564

I can provide more information if you ask for them.


Reproduce code:
---
?php
function foo(){return(true);}
function read($id){
  return 'A|s:1:a;B|s:1:b;';
}
function write($id, $sess_data){
  print I'm writing this data: $sess_data\n;
  return true;
}
header('Content-Type: text/plain');
session_set_save_handler(foo, foo, read, write, foo, foo);
session_start();
print_r($_SESSION);
foreach($_SESSION as $lsKey = $lsVal){
  if($lsKey != 'A'){
unset($_SESSION[$lsKey]);  // if you comment this line, the
write function is called properly
  }
}
print_r($_SESSION);
?

Expected result:

Array
(
[A] = a
[B] = b
)
Array
(
[A] = a
)
I'm writing this data: A|s:1:a;


Actual result:
--
Array
(
[A] = a
[B] = b
)
Array
(
[A] = a
)

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


#32910 [Fbk-Opn]: session unset inside foreach breaks session write handler

2005-05-02 Thread bugs dot php dot net at enca dot cz
 ID:   32910
 User updated by:  bugs dot php dot net at enca dot cz
 Reported By:  bugs dot php dot net at enca dot cz
-Status:   Feedback
+Status:   Open
 Bug Type: Session related
 Operating System: MS Windows Server 2003
 PHP Version:  5.0.4
 New Comment:

It doesn't work for me :-(
I tried this code in 
PHP Version 5.0.5-dev
Build Date Apr 26 2005 02:18:08
but the result is the same as in 5.0.4
I'm using php.ini-recomended without modifications


Previous Comments:


[2005-05-02 13:40:12] [EMAIL PROTECTED]

Please try using this CVS snapshot:

  http://snaps.php.net/php5-STABLE-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php5.0-win32-latest.zip

Works fine for me..




[2005-05-02 11:14:48] bugs dot php dot net at enca dot cz

Description:

In this testcase the write function is not called. If you remove line
with unset, the write function is called properly. If you delete whole
foreach cycle and use 
unset($_SESSION['A']); instead, the write function si also called -
as expected. This bug appear only when you call unset inside foreach
cycle.

My environment: 
MS Windows Server 2003 SE (Windows NT 5.2 build 3790)
Apache/2.0.53 (Win32) PHP/5.0.4

Smilar (but not exactly same) bug is described as #32564, but it is in
the No feedback status and there is no way (for me) to change this
status. I hope that this reproduce code is much better then codes
from #32564

I can provide more information if you ask for them.


Reproduce code:
---
?php
function foo(){return(true);}
function read($id){
  return 'A|s:1:a;B|s:1:b;';
}
function write($id, $sess_data){
  print I'm writing this data: $sess_data\n;
  return true;
}
header('Content-Type: text/plain');
session_set_save_handler(foo, foo, read, write, foo, foo);
session_start();
print_r($_SESSION);
foreach($_SESSION as $lsKey = $lsVal){
  if($lsKey != 'A'){
unset($_SESSION[$lsKey]);  // if you comment this line, the
write function is called properly
  }
}
print_r($_SESSION);
?

Expected result:

Array
(
[A] = a
[B] = b
)
Array
(
[A] = a
)
I'm writing this data: A|s:1:a;


Actual result:
--
Array
(
[A] = a
[B] = b
)
Array
(
[A] = a
)





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


#32564 [Com]: unset session in foreach

2005-04-27 Thread bugs dot php dot net at enca dot cz
 ID:   32564
 Comment by:   bugs dot php dot net at enca dot cz
 Reported By:  echenavaz at mengine dot fr
 Status:   No Feedback
 Bug Type: Session related
 Operating System: debian 2.6.9
 PHP Version:  5.0.4
 New Comment:

In this testcase the write function is not called. If you comment
line with unset, the write function is called properly. If you delete
whole foreach cycle and use 
unset($_SESSION['A']); instead, the write function si also called -
as expected. This bug appear only when you call unset inside foreach
cycle.

My environment: 
MS Windows Server 2003 SE (Windows NT 5.2 build 3790)
Apache/2.0.53 (Win32) PHP/5.0.4
I can provide more information if you ask for them.

?php
function foo(){
  return(true);
}
function read($id){
  return 'A|s:1:a;B|s:1:b;';
}
function write($id, $sess_data){
  print I'm writing this data: \n;
  print_r($sess_data);
  return true;
}

header('Content-Type: text/plain');
session_set_save_handler(foo, foo, read, write, foo, foo);
session_start();
print_r($_SESSION);
foreach($_SESSION as $lsKey = $lsVal){
  if($lsKey != 'A'){
unset($_SESSION[$lsKey]);  // if you comment this line, the
write function is called properly
  }
}
print_r($_SESSION);
print(finished\n);

?


Previous Comments:


[2005-04-12 01:00:05] 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-04-05 17:07:33] derek dot ethier at humber dot ca

More information:
This problem does not exist with 5.0.2 on Windows 2003 (IIS6).

duh at dowebwedo dot com's method does work within the execution of
that one script, but the unset variables are not persistent.  The
$_SESSION variables are restored on each subsequent page load even
after they have been unset which leads to problems with session
fixation and the inability to clean-up session values that are no
longer needed.



[2005-04-04 18:56:56] derek dot ethier at humber dot ca

I can confirm this problem with Windows Server 2003, PHP 5.0.4.  Sample
code:

?php
function unsetSessionVariables($session_name) {
foreach ($_SESSION as $session_key = $session_variable) {
if (strstr($session_key, $session_name)) {
// Neither of these work as intended.
unset($GLOBALS[_SESSION][$session_key]);
unset($_SESSION[$session_key]);
}
}
}

unsetSessionVariables(session_name);
?

I have verified that the same problem exists in the latest 5.1 snap
(php5-win32-200504041430) on the same platform.



[2005-04-04 12:43:10] duh at dowebwedo dot com

I did not experience any problems with Apache/1.3.29 (Unix) PHP/5.0.4
on Debian stable.
Code:
?php
  $_SESSION['one'] = 1;
  $_SESSION['two'] = 2;
  $_SESSION['three'] = 3;

  print_r($_SESSION);

  foreach ($_SESSION as $key_session = $session)
unset($_SESSION[$key_session]);

  print_r($_SESSION);
?

Result is as expected:
Array ( [DF_debug] = 1 [one] = 1 [two] = 2 [three] = 3 ) Array ( )



[2005-04-04 10:23:51] [EMAIL PROTECTED]

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

A proper reproducing script starts with ?php and ends with ?,
is max. 10-20 lines long and does not require any external 
resources such as databases, etc.

If possible, make the script source available online and provide
an URL to it here. Try to avoid embedding huge scripts into the report.





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

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


#30934 [Com]: Special keyword 'self' inherited in child classes

2005-04-25 Thread php-bugs at foomatic dot net
 ID:   30934
 Comment by:   php-bugs at foomatic dot net
 Reported By:  jbs at fromru dot com
 Status:   Assigned
 Bug Type: Feature/Change Request
 Operating System: *
 PHP Version:  5.*
 Assigned To:  andi
 New Comment:

 First 'self' is bound at compile time (that's the way OOP works).

Thats how Java works. Not All OO Languages do. PHP is a dynamic
language, and shouldn't really suffer a significant performance hit by
binding at run time (Especially considering it's still compiled, thus
bound, for every single request anyway). 

 what you want is something like 'called_class'

As long as it's bound at runtime, I don't particuarly care what it's
called. :-).


Previous Comments:


[2005-04-25 07:49:05] [EMAIL PROTECTED]

First 'self' is bound at compile time (that's the way OOP works).

Second what you want is something like 'called_class'. Assume you have
a static private member in your base class and a static function and
your derived class does not overload that function. If now your static
function is called with the derived class and 'self' would be changed
to the requested behavior php won't be able to access the property.
Thus you want an additional info maybe called 'used_class'.

Third to allow what you need a major change is needed that would slow
down php - every part of php code execution. And that will take a
while.



[2005-04-25 06:24:04] php-bugs at foomatic dot net

Does anyone whats happening with this bug? Is it going to be fixed or
are the PHP devs just ignoring it?

Unless this is fixed (or a suitable workaround is added) I cannot put
common code that refers to static variables or methods in a base class,
resulting in significant code duplication. This is a huge issue, and is
a perfect example  of why PHP is regarded with contempt in many
circles.

My choices at the moment are to either continue hacking around it and
clean up once it's been fixed, or rewrite a significant amount of
legacy code in a real language. Given the rating of this bug, it looks
like I'm not the only one.



[2005-04-12 13:28:53] [EMAIL PROTECTED]

I think this really needs to be addressed. For example the php manual
features a sample singleton implementation:
http://www.php.net/manual/en/language.oop5.patterns.php

Now how would one go about making it possible to extend the Example
class without having to cut and paste the singleton() method to this
extended class (one would probably also need to the instance property
to hold an array of instances keyed be the class name)? Not exactly in
the spirit of OOP imho.

It seems to me the best solution to retain this speed optimization of
resolving these things at compile time is to copy the implementations of
static items over to classes that extend that class before this
evaluation is done. Just a thought from an outside perspective, dunno
if this is feasible however in the ZE2 implementation.



[2005-04-11 23:14:42] aknaub at 3st dot de

Sorry, but this quote is nonsense. Every real OOP 
language (Ruby, ObjC etc.) resolves static methods at 
runtime.



[2005-04-11 13:50:15] jbs at fromru dot com

I've noticed some similar reports. For example, the one at
http://bugs.php.net/bug.php?id=30235.

Here is a quote:

 Sorry, you have a complete wrong idea og OO programming.

 Static methods are bound/resolved at compile time.
 That is the compiler can replace self with the current
 class.


So, it appears as it is a limitation of the compiler and the entire
object model.

I think such behavior makes inheritance of static methods useless
because even if a static method is inherited, it still functions as in
the class where it was declared. Moreover, inherited static methods are
using the static properties which were declared in the parent class but
not the inherited one.

So, in my opinion self keyword should be replaced with the name of
the inherited class during compiling. Or at least a new magic keyword
should be added and named like this, for example.



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

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


#30934 [Com]: Special keyword 'self' inherited in child classes

2005-04-24 Thread php-bugs at foomatic dot net
 ID:   30934
 Comment by:   php-bugs at foomatic dot net
 Reported By:  jbs at fromru dot com
 Status:   Assigned
 Bug Type: Class/Object related
 Operating System: *
 PHP Version:  5.0.3
 Assigned To:  andi
 New Comment:

Does anyone whats happening with this bug? Is it going to be fixed or
are the PHP devs just ignoring it?

Unless this is fixed (or a suitable workaround is added) I cannot put
common code that refers to static variables or methods in a base class,
resulting in significant code duplication. This is a huge issue, and is
a perfect example  of why PHP is regarded with contempt in many
circles.

My choices at the moment are to either continue hacking around it and
clean up once it's been fixed, or rewrite a significant amount of
legacy code in a real language. Given the rating of this bug, it looks
like I'm not the only one.


Previous Comments:


[2005-04-12 13:28:53] [EMAIL PROTECTED]

I think this really needs to be addressed. For example the php manual
features a sample singleton implementation:
http://www.php.net/manual/en/language.oop5.patterns.php

Now how would one go about making it possible to extend the Example
class without having to cut and paste the singleton() method to this
extended class (one would probably also need to the instance property
to hold an array of instances keyed be the class name)? Not exactly in
the spirit of OOP imho.

It seems to me the best solution to retain this speed optimization of
resolving these things at compile time is to copy the implementations of
static items over to classes that extend that class before this
evaluation is done. Just a thought from an outside perspective, dunno
if this is feasible however in the ZE2 implementation.



[2005-04-11 23:14:42] aknaub at 3st dot de

Sorry, but this quote is nonsense. Every real OOP 
language (Ruby, ObjC etc.) resolves static methods at 
runtime.



[2005-04-11 13:50:15] jbs at fromru dot com

I've noticed some similar reports. For example, the one at
http://bugs.php.net/bug.php?id=30235.

Here is a quote:

 Sorry, you have a complete wrong idea og OO programming.

 Static methods are bound/resolved at compile time.
 That is the compiler can replace self with the current
 class.


So, it appears as it is a limitation of the compiler and the entire
object model.

I think such behavior makes inheritance of static methods useless
because even if a static method is inherited, it still functions as in
the class where it was declared. Moreover, inherited static methods are
using the static properties which were declared in the parent class but
not the inherited one.

So, in my opinion self keyword should be replaced with the name of
the inherited class during compiling. Or at least a new magic keyword
should be added and named like this, for example.



[2005-03-30 23:47:28] [EMAIL PROTECTED]

Andi, is this a bug or not?




[2005-03-29 09:10:20] aknaub at 3st dot de

I reproduced the bug with snapshot php5-200503282030, 
compiled as cli on Mac OS X 10.3.8.



The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
http://bugs.php.net/30934

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


#32283 [Fbk-NoF]: zlib.output_compression = 1 but no headers sent

2005-04-19 Thread php-bugs
 ID:   32283
 Updated by:   php-bugs@lists.php.net
 Reported By:  plasmahh at gmx dot net
-Status:   Feedback
+Status:   No Feedback
 Bug Type: Output Control
 Operating System: Linux
 PHP Version:  5CVS-2005-03-14
 New Comment:

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.


Previous Comments:


[2005-04-12 08:44:22] [EMAIL PROTECTED]

Is ext/zlib compiled as shared by any chance in your system?
What was the configure line you've used?




[2005-03-25 15:13:30] plasmahh at gmx dot net

This is an example when I do it with mozilla, but its always the same
whenever an accept encoding of gzip or deflate is present...

GET / HTTP/1.1

Host: localhost

User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.6)
Gecko/20050321

Accept:
text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5

Accept-Language: en-us,en;q=0.5

Accept-Encoding: gzip,deflate

Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7

Keep-Alive: 300

Connection: keep-alive



[2005-03-17 18:02:21] [EMAIL PROTECTED]

What headers are being sent by the browser making the request?



[2005-03-14 19:45:02] plasmahh at gmx dot net

Does not work too with the snapshot... I have changed parts of the
php_enable_output_compression as followed, which works around my
problem...

if (php_memnstr(Z_STRVAL_PP(a_encoding), gzip, 4,
Z_STRVAL_PP(a_encoding) + Z_STRLEN_PP(a_encoding))) {
ZLIBG(compression_coding) = CODING_GZIP;
sapi_add_header(Content-Encoding: gzip,
sizeof(Content-Encoding: gzip) - 1, 1);
} else if (php_memnstr(Z_STRVAL_PP(a_encoding), deflate, 7,
Z_STRVAL_PP(a_encoding) + Z_STRLEN_PP(a_encoding))) {
ZLIBG(compression_coding) = CODING_DEFLATE;
sapi_add_header(Content-Encoding: deflate,
sizeof(Content-Encoding: deflate) - 1, 1);
} else {
return FAILURE;
}



[2005-03-12 14:42:12] [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





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

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


#32622 [Fbk-NoF]: IMAP toolkit crash

2005-04-19 Thread php-bugs
 ID:   32622
 Updated by:   php-bugs@lists.php.net
 Reported By:  lst_hoe01 at kwsoft dot de
-Status:   Feedback
+Status:   No Feedback
 Bug Type: IMAP related
 Operating System: Linux Kernel 2.4.21
 PHP Version:  4.3.11
 New Comment:

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.


Previous Comments:


[2005-04-12 02:51:18] [EMAIL PROTECTED]

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

A proper reproducing script starts with ?php and ends with ?,
is max. 10-20 lines long and does not require any external 
resources such as databases, etc.

If possible, make the script source available online and provide
an URL to it here. Try to avoid embedding huge scripts into the report.





[2005-04-07 12:32:14] lst_hoe01 at kwsoft dot de

Description:

With HORDE/IMP in some situations (long delay connect) the error IMAP
toolkit crash: Lock when already locked is logged by PHP. According to
the maintainer of the IMAP toolkit this is a invalid use of the toolkit
(Quoting) :

 The Lock when already locked error message indicates a 
 software bug which is supposedly impossible in UW imapd. It
 has nothing to do with file locking; instead, it indicates a
 forbidden recursive call into the c-client library from a 
 c-client callback in the application. 

Thanxs for any help

Andreas

Reproduce code:
---
IMP-Application...
(Sorry, not really a PHP-Coder)

Expected result:

Sending Mail

Actual result:
--
Application stall





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


#32596 [Opn]: Segfault/Memory Leak by getClass (etc) in __destruct

2005-04-18 Thread mailfrom-bugs dot php dot net at kopka dot net
 ID:   32596
 User updated by:  mailfrom-bugs dot php dot net at kopka dot net
 Reported By:  mailfrom-bugs dot php dot net at kopka dot net
 Status:   Open
 Bug Type: Reproducible crash
 Operating System: Linux (Gentoo)
 PHP Version:  5CVS-2005-04-05 (dev)
 New Comment:

PHP-5.1.0-dev (build Apr 10 2005) is free of this problem.


Previous Comments:


[2005-04-05 20:09:19] mailfrom-bugs dot php dot net at kopka dot net

Description:

getClass($this) and others segfault or leak memory (when
--enable-debug) on 
PHP 5.0.3
PHP 5.0.4
PHP 5.0.5-dev (cli) (2005-04-05 11:42:27)
build on gentoo linux (default install flags).

I ran into this using the following construct:

if (database::query($string)-error) {}

where database::query() returns an object wrapping a result set (or
providing info on success of the request).

PHP 5.0.3 (and i am quite sure this applies to other versions as well
as i experience this for quite a time) segfaults under the following
cumulating circumstances:
- If the object is only used once and not referenced to a variable
- If a property is read/set (if a function is called all is OK)
- If __destruct references the class name by some means (others are
OK)

When you try the demo uncomment one of the lines which cause a segfault
(and are noted as a memory leak with --enable-debug):

//  $c=get_class($this);unset ($c);
//  echo get_class($this);
//  if(defined('DEBUG_'.__CLASS__)){}

The following lines don't raise a segfault:

  $c=__CLASS__;unset($c);
  if(__CLASS__ == BUG) {};
  get_class($this);
  echo __CLASS__;

The following line don't raise a segfault but is noted as a memory leak
(--enable-debug):

  $c=get_class($this);

Naturally the hidden beast came up a long time after i wrote the line -
spending a good month of free time trying to locate it i am happy to
finally nail it to the ground for someone who knows what he is doing to
slay it (it cost me a keyboard and brought quite a few white hairs into
existence).

Since the original bug report vanished from the bug list (and can only
be found by number for reasons that escape me) i opened  it again (and
closed the other).

Good hunting.

Configure Command =  './configure' '--prefix=/usr'
'--host=i686-pc-linux-gnu' '--mandir=/usr/share/man'
'--infodir=/usr/share/info' '--datadir=/usr/share' '--sysconfdir=/etc'
'--localstatedir=/var/lib' '--disable-cgi' '--enable-cli'
'--enable-embed' '--with-config-file-path=/etc/php/cli-php5'
'--disable-bcmath' '--without-bz2' '--disable-calendar'
'--without-cpdflib' '--disable-ctype' '--without-curl'
'--without-curlwrappers' '--disable-dbase' '--disable-dio'
'--disable-dom' '--disable-exif' '--without-fam' '--without-fbsql'
'--without-fdftk' '--disable-filepro' '--disable-ftp'
'--without-gettext' '--without-gmp' '--without-hwapi' '--without-iconv'
'--without-informix' '--without-ingres' '--without-interbase'
'--without-kerberos' '--disable-libxml' '--disable-mbstring'
'--without-mcrypt' '--without-mcve' '--disable-memory-limit'
'--without-mhash' '--without-mime-magic' '--without-ming'
'--without-mnogosearch' '--without-msql' '--without-mssql'
'--without-ncurses' '--without-oci8' '--without-oracle'
'--without-openssl' '--without-openssl-dir' '--without-ovrimos'
'--disable-pcntl' '--without-pcre-regx' '--without-pfpro'
'--without-pgsql' '--disable-posix' '--without-pspell'
'--without-recode' '--disable-simplexml' '--disable-shmop'
'--without-snmp' '--disable-soap' '--disable-sockets' '--disable-spl'
'--without-sybase' '--without-sybase-ct' '--disable-sysvmsg'
'--disable-sysvsem' '--disable-sysvshm' '--without-tidy'
'--disable-tokenizer' '--disable-wddx' '--without-xsl'
'--without-xmlrpc' '--disable-yp' '--without-zlib' '--disable-debug'
'--without-jpeg-dir' '--without-freetype-dir' '--without-t1lib'
'--without-ttf' '--disable-gd-jis-conf' '--disable-gd-native-ttf'
'--without-png-dir' '--without-tiff-dir' '--without-xpm-dir'
'--without-gd' '--disable-session' '--without-sqlite' '--disable-dba'
'--without-readline' '--without-libedit'


Reproduce code:
---
?php

class BUG {
  var $error = please fix this thing, it wasted a nice part of my
life!\n;
  static function instance() {return new BUG();}  

  function __destruct()
  {
  $c=get_class($this);unset ($c);
//  echo get_class($this);
//  if(defined('DEBUG_'.__CLASS__)){}
//  $c=get_class($this); //memory leak only
echo $this-error;
  }
}

BUG::instance()-error;
echo this is still executed\n;

?

Expected result:

Expected result:

# php -n bug.php(cr)
please fix this thing, it wasted a nice part of my life!
this is still executed
# (cursor)

Actual result:
--
Sorry that i can not provide a core dump according to the requested
standards (vith --enable-debug) because if i compile like this there
is
no segfault (just a memory leak), so i hope a standard one will help

#32663 [Fbk-NoF]: odbc_fetch_row fails to get single selected MySQL text column

2005-04-18 Thread php-bugs
 ID:   32663
 Updated by:   php-bugs@lists.php.net
 Reported By:  mizmerize at yahoo dot com
-Status:   Feedback
+Status:   No Feedback
 Bug Type: ODBC related
 Operating System: Windows 2000 Advanced Server SP3
 PHP Version:  5.0.4
 New Comment:

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.


Previous Comments:


[2005-04-11 17:57:36] [EMAIL PROTECTED]

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

A proper reproducing script starts with ?php and ends with ?,
is max. 10-20 lines long and does not require any external 
resources such as databases, etc.

If possible, make the script source available online and provide
an URL to it here. Try to avoid embedding huge scripts into the report.





[2005-04-11 03:27:52] mizmerize at yahoo dot com

Description:

I used ODBC Unified using a MyODBC driver version 3.51.11 and connected
to a table with a varchar and a TEXT  column. Then I created a query
like this:

$sql=SELECT Title FROM tbllibrarymaterials

.. the odbc_exec function does good. It provides a non-false result.
but if I have to get the rows by using odbc_fetch_row,  this function
returns false and I could not get a record.

But...

If I defined another column along with the query:

$sql=SELECT Title, Call_Number FROM tbllibrarymaterials

...I get the expected results.

[PHP.INI]
odbc.longreadlen=65535 
odbc.binmode=1

I set this because it may be the problem with long columns. But this
settings did not change anything.

Reproduce code:
---
To reproduce the bug, you must create a table called tbllibmaterials
(or any name) in MySQL with a varchar(50) for the Call_Number and TEXT
column for the Title, and use odbc_fetch_row running the query:

$sql=SELECT Title FROM tbllibrarymaterials

Expected result:

No records can be retrieved.

Actual result:
--
No records can be retrieved.





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


#32678 [Fbk-NoF]: An extra Line Feed ( 0x0A) is added when downloading Files

2005-04-18 Thread php-bugs
 ID:   32678
 Updated by:   php-bugs@lists.php.net
 Reported By:  kosuri dot s dot raju at chase dot com
-Status:   Feedback
+Status:   No Feedback
 Bug Type: iPlanet related
 Operating System: Win 2000 (build 2195), SP4
 PHP Version:  4.3.10
 New Comment:

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.


Previous Comments:


[2005-04-12 00:02:17] [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-04-11 21:46:37] kosuri dot s dot raju at chase dot com

Description:

Environment:
 Windows 2000, V5.0.2195 SP 4
 Sun one Webserver 6.1  SP2
 PHP 4.3.10 (cgi-fcgi) (built: Dec 14 2004 17:47:59)

 Using NSAPI
 MySQL
 Browser: IE6.0
 
When dowloading a file ( both text and Binary files ), an extra LF
Character (0x0A) is always prepende to the output.  This is only
happening in the above environment.   The data is stored properly on
the MySql Server.  Works OK on Windows XP , SP2 ( environment)  


Reproduce code:
---
Sample Code:

$inData = // Read Data from mySQL
$ctype = text/plain ; // or like appilcation/msword
header(Pragma: public);
header(Expires: 0);
header(Cache-Control: must-revalidate, post-check=0, pre-check=0);
header(Cache-Control: public);
header(Content-type: $ctype);
header( Content-Disposition: attachment; filename=.$filenam );
header(Content-Transfer-Encoding: binary);
header(Content-Length: .$filesize);
echo($inData);
exit;


Expected result:

The output should not contain additional LineFeed character at the
start of output

Actual result:
--
LF  --- This is Extra Linefeed ( 0x0A)
B





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


#32659 [Fbk-NoF]: PCRE makes apache 1.3.33 crash

2005-04-17 Thread php-bugs
 ID:   32659
 Updated by:   php-bugs@lists.php.net
 Reported By:  appaquet at gmail dot com
-Status:   Feedback
+Status:   No Feedback
 Bug Type: PCRE related
 Operating System: FreeBSD 5.2.1
 PHP Version:  4.3.11
 New Comment:

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.


Previous Comments:


[2005-04-10 20:30:15] [EMAIL PROTECTED]

Not enough information was provided for us to be able
to handle this bug. Please re-read the instructions at
http://bugs.php.net/how-to-report.php

If you can provide more information, feel free to add it
to this bug and change the status back to Open.

Thank you for your interest in PHP.






[2005-04-10 19:08:05] appaquet at gmail dot com

Description:

When I start apache with PHP enabled, it crashes without any error
(only a segfault in the /var/log/messages). I disabled all extensions
one by one to see what was the problem and discovered that PCRE is
making apache crash. Pcre in CLI mode is working fine. It also work
fine if I load it with the dl() command.

I tried to run apache with gdb. It says that apache has exited
normally.






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


#31994 [Fbk-NoF]: output conversion failed due to conv error

2005-04-16 Thread php-bugs
 ID:   31994
 Updated by:   php-bugs@lists.php.net
 Reported By:  misnet at hotmail dot com
-Status:   Feedback
+Status:   No Feedback
 Bug Type: XSLT related
 Operating System: windows 2003 server
 PHP Version:  5CVS-2005-02-25
 New Comment:

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.


Previous Comments:


[2005-04-09 17:34:52] [EMAIL PROTECTED]

You're probably using a character which can not be represented in
iso-8859-1... but I don't know for sure as I don't have the data. Come
up with a *self-contained* script that does not rely on a database...



[2005-04-09 08:27:21] cbdbs at yahoo dot com

$doc = new DOMDocument('1.0','ISO-8859-1');
// we want a nice output
$doc-formatOutput = true;


$familias = $doc-appendChild(new DOMElement('familias'));

 while ($fam_datos = mysql_fetch_array($data)){

$familia = $familias-appendChild(new DOMElement('familia'));
$familia-appendChild(new DOMElement('Apellidos',
$fam_datos['Familia']));
$familia-appendChild(new DOMElement('Representante',
$fam_datos['Apellidos']));
$familia-appendChild(new DOMElement('Nombre',
$fam_datos['Nombres']));
$familia-appendChild(new DOMElement('Edad', 
$fam_datos['Edad']));
$familia-appendChild(new DOMElement('Salud', 'Sano'));

 }

header('Content-Type: text/xml');
$documento = $doc-saveXML();
echo $documento;

OUTPUT
bWarning/b:  output conversion failed due to conv error in
bc:\home\prueba\www\grid\xml.php/b...



[2005-04-07 11:43:19] emil at wayers dot com

This error/problem resolves around your used encoding type. when using
encoding=GB2312 in php5.0.4/cvs-current the engine will issue a
warning at the exact point a charcter has been found which isn't
suitable for this encoding context.

My script, which is similar to the given script, issued the exact same
warning on a character (ë) when using the standard iso encoding. After
I changed my encoding to UTF-8 all reported problems where gone.

I'm sure this isn't a real engine f*ck up but just a misguided error
message ;) But if this workaround doesn't work for you try changing
your Article-ComeFrom  Article-Contents  Article-AddTime content
into htmlentities.

good luck!



[2005-03-28 04:43:12] misnet at hotmail dot com

What about the bug? Can it not be resolved?



[2005-02-26 06:41:17] misnet at hotmail dot com

Not be resolved! The same result.



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

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


#32278 [Fbk-NoF]: Remote linked server not accessibile

2005-04-15 Thread php-bugs
 ID:   32278
 Updated by:   php-bugs@lists.php.net
 Reported By:  raulionescu at gmail dot com
-Status:   Feedback
+Status:   No Feedback
 Bug Type: MSSQL related
 Operating System: WinXP Pro
 PHP Version:  5.0.4
 New Comment:

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.


Previous Comments:


[2005-04-08 21:26:43] [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-04-05 16:44:56] raulionescu at gmail dot com

I've tried with PHP 5.0.4 and the problem it's the same



[2005-03-14 08:34:33] raulionescu at gmail dot com

OK, but I need also the complete PECL package and I don't think it's
gonna work by overiding only PHP's mssql files.
Am I right?



[2005-03-12 14:43:54] [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-03-11 15:24:45] raulionescu at gmail dot com

Description:

I have created a stored procedure wich is accessing an remote linked
MSSQL 2000 server and works perfectly from Querry Analyzer. The problem
occurs when I try to execute the stored procedure from php (by using
mssql_bind or mssql_query); I've got no error but no result either. It
seems that php doesn't allows to access remote linked servers!






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


#31222 [Fbk-NoF]: ocicommit not working

2005-04-13 Thread php-bugs
 ID:   31222
 Updated by:   php-bugs@lists.php.net
 Reported By:  amonw at hotmail dot com
-Status:   Feedback
+Status:   No Feedback
 Bug Type: OCI8 related
 Operating System: *
 PHP Version:  4CVS-2005-04-04
 Assigned To:  tony2001
 New Comment:

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.


Previous Comments:


[2005-04-05 17:55:52] [EMAIL PROTECTED]

Works just perfectly for all of oci8 users except you.
Try to simplify the code and to look for the problem there.



[2005-04-05 01:25:39] [EMAIL PROTECTED]

Back to Antony




[2005-04-04 09:27:40] amonw at hotmail dot com

I tried the http://snaps.php.net/php4-STABLE-latest.tar.gz,which
extracted to be php4-STABLE-200504040230,but the code produced the same
result.



[2005-03-30 23:06:56] [EMAIL PROTECTED]

Please try using this CVS snapshot:

  http://snaps.php.net/php4-STABLE-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php4-win32-STABLE-latest.zip





[2004-12-24 03:08:50] amonw at hotmail dot com

Thank you for your help.
But can you explain why the 4 methods I listed in the first comment can
change the result? 
And why can't I add ocilogoff($c) before the second ocilogon to
change the result?



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

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


#32694 [NEW]: fsockopen timeout - solution for debian lost

2005-04-13 Thread bugs-php-net at airport1 dot de
From: bugs-php-net at airport1 dot de
Operating system: Debian 2.4 - Apache/2.0.52
PHP version:  4.3.10
PHP Bug Type: Network related
Bug description:  fsockopen timeout - solution for debian lost

Description:

As stated in several bug reports there CAN be a problem with fsockopen not
considering the given timeout. Especially if the connected side is down or
hangs.

There seems to be a solution (having been online for a long time ago in
the archived mailing lists?) for DEBIAN by recompiling PHP with special
parameters OR/AND modifying (before?) a file something having to do with
fcntl...

Unfortunately I have seached for the solution several hours now, but did
not find it. Would be nice if someone could point me to the solution (just
drop an URL?). 

Think further: This would also minimize the number of always the same
bug report ;-)


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


#32594 [Fbk-NoF]: missing php4activescript.dll in download

2005-04-13 Thread php-bugs
 ID:   32594
 Updated by:   php-bugs@lists.php.net
 Reported By:  mazdaf at yahoo dot com
-Status:   Feedback
+Status:   No Feedback
 Bug Type: Other web server
 Operating System: win 2003
 PHP Version:  4.3.11
 New Comment:

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.


Previous Comments:


[2005-04-06 18:22:36] [EMAIL PROTECTED]

Please try using this CVS snapshot:

  http://snaps.php.net/php4-STABLE-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php4-win32-STABLE-latest.zip





[2005-04-05 19:55:46] [EMAIL PROTECTED]

Typo: Of course it's php4activescript.dll in PHP = 4.3.9 ZIP's



[2005-04-05 19:51:47] [EMAIL PROTECTED]

I believe as of PHP 4.3.10 this is a real problem:

Places it's not:
- PHP 4 PECL snaps
- PHP 4.3.1x ZIP's

Places it's (php5activescript.dll) in:
- PHP 5 PECL download package
- PHP 5 PECL snaps
- PHP = 4.3.9 ZIP's



[2005-04-05 19:24:16] [EMAIL PROTECTED]

This bug has been fixed in CVS.

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



[2005-04-05 19:13:59] [EMAIL PROTECTED]

Not a docproblem.



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

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


#29975 [Fbk-NoF]: memory leaks

2005-04-13 Thread php-bugs
 ID:   29975
 Updated by:   php-bugs@lists.php.net
 Reported By:  guth at fiifo dot u-psud dot fr
-Status:   Feedback
+Status:   No Feedback
 Bug Type: Zend Engine 2 problem
 Operating System: *
 PHP Version:  5CVS-2005-03-07
 New Comment:

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.


Previous Comments:


[2005-04-06 08:44:57] [EMAIL PROTECTED]

Please try using this CVS snapshot:

  http://snaps.php.net/php5-STABLE-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php5.0-win32-latest.zip





[2005-02-10 13:36:04] guth at fiifo dot u-psud dot fr

Still here (lines have changed) :

/usr/src/php5-STABLE-200502101130/Zend/zend_builtin_functions.c(1089) :
 Freeing 0x084CACBC (16 bytes), script=leaks.php
Last leak repeated  times
/usr/src/php5-STABLE-200502101130/Zend/zend_builtin_functions.c(1099) :
 Freeing 0x084CABEC (23 bytes), script=leaks.php
/usr/src/php5-STABLE-200502101130/Zend/zend_variables.c(137) : Actual
location (location was relayed)
Last leak repeated  times
=== Total 2 memory leaks detected ===



[2005-02-09 01:51:57] [EMAIL PROTECTED]

Please try using this CVS snapshot:

  http://snaps.php.net/php5-STABLE-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php5.0-win32-latest.zip

I can't reproduce it with latest snapshot.



[2005-01-07 20:51:38] [EMAIL PROTECTED]

/Zend/zend_builtin_functions.c(1097) :  Freeing 0x08965664 (16 bytes),
script=t.php
Last leak repeated  times
/Zend/zend_variables.h(45) :  Freeing 0x08965594 (23 bytes),
script=t.php
/Zend/zend_variables.c(120) : Actual location (location was relayed)
Last leak repeated  times
=== Total 2 memory leaks detected ===




[2004-10-12 10:36:00] guth at fiifo dot u-psud dot fr

I use a SimpleTest to do unit tests and it seems that it is this
library which causes the memory leaks.

?php
function simpleTestErrorHandler($severity, $message, $filename, $line)
{
restore_error_handler();
TRUE; // Some PHP code
set_error_handler('simpleTestErrorHandler');
}

class plip {

public function run() {
set_error_handler('simpleTestErrorHandler');
trigger_error(plop, E_USER_NOTICE);
restore_error_handler();
}

}

$a = new plip;
for($i = 0; $i  1; $i++)
$a-run();
?

/usr/src/php5-200410111030/Zend/zend_builtin_functions.c(1058) : 
Freeing 0x082D0C54 (16 bytes), script=/www/test2.php
Last leak repeated  times
/usr/src/php5-200410111030/Zend/zend_variables.h(45) :  Freeing
0x082D0B84 (23 bytes), script=/www/test2.php
/usr/src/php5-200410111030/Zend/zend_variables.c(120) : Actual location
(location was relayed)
Last leak repeated  times



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

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


#32598 [Fbk-NoF]: pspell, custom dictionary isn't being passed as mod_php, fine on CLI

2005-04-13 Thread php-bugs
 ID:   32598
 Updated by:   php-bugs@lists.php.net
 Reported By:  drew at iws dot co dot nz
-Status:   Feedback
+Status:   No Feedback
 Bug Type: Pspell related
 Operating System: Debian Woody
 PHP Version:  4.3.11
 New Comment:

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.


Previous Comments:


[2005-04-07 00:28:51] [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

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.





[2005-04-05 23:48:26] drew at iws dot co dot nz

Description:

pspell is not passing the custom dictionary or it is being munched up
and gobbled through the API call.

I have tested it via a script with CLI php, which works fine , but via
apahce it disregards the custom dictionary variable

YES, I have checked permissions, but the filename for the custom
dictionary isn't being passed, so permissions aren't even the issue in
this case.


Reproduce code:
---
http://webhost2.inspire.net.nz/~drew/testpspell.phps

Expected result:

I expected the custom dictionary to be created and filled with custom
entries.



Actual result:
--
Errors in error_log:
-
[Wed Apr  6 09:35:36 2005] [notice] child pid 3051 exit signal
Segmentation fault (11)
Can't create
Can't create
[Wed Apr  6 09:35:44 2005] [notice] child pid 3031 exit signal
Segmentation fault (11)
[Wed Apr  6 09:36:21 2005] [notice] child pid 2987 exit signal
Segmentation fault (11)
Can't create
Can't create
[Wed Apr  6 09:36:26 2005] [notice] child pid 30088 exit signal
Segmentation fault (11)
[Wed Apr  6 09:37:01 2005] [notice] child pid 3083 exit signal
Segmentation fault (11)
Can't create
Can't create
[Wed Apr  6 09:37:05 2005] [notice] child pid 3082 exit signal
Segmentation fault (11)
[Wed Apr  6 09:40:10 2005] [notice] child pid 30115 exit signal
Segmentation fault (11)
Can't create
Can't create
[Wed Apr  6 09:40:14 2005] [notice] child pid 3078 exit signal
Segmentation fault (11)
-


Error should be:
Can't create /home/drew/dictionary/custom







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


#32624 [NEW]: Rephrase: Please allow this report to be send to the PHP QA team.

2005-04-12 Thread php-bugs-2005 at ryandesign dot com
From: php-bugs-2005 at ryandesign dot com
Operating system: N/A
PHP version:  5.0.4
PHP Bug Type: Compile Warning
Bug description:  Rephrase: Please allow this report to be send to the PHP QA 
team.

Description:

In ./run-tests.php and ./server-tests.php the following 
message can be displayed:

 Please allow this report to be send to the PHP QA
 team. This will give us a better understanding in how
 PHP's test cases are doing.

There are a number of problems with this message. For 
one thing, it should be sent and not send, and I 
think understanding of how is better than 
understanding in how.

The fundamental problem though is made obvious by the 
prompt that follows it:

 (choose s to just save the results to a file)?
 [Yns]:

See, there's a question mark, and it expects a yes or 
no (or save) answer. I would therefore reformulate 
it as a question.

The message also seems to appear without any 
explanation to the user. It could be made friendlier. 
Suggestion below.

This problem is presumably also present in PHP4.

Reproduce code:
---
N/A

Expected result:

You may have found a problem in PHP's test cases.
We'd like to automatically send this report to the
PHP QA team, to give us a better understanding of how
the test cases are doing. If you don't want to send it
immediately, you can choose s to save the report to
a file that you can send us later.

May we send this report now? [Yns]:

Actual result:
--
Please allow this report to be send to the PHP QA
team. This will give us a better understanding in how
PHP's test cases are doing.

(choose s to just save the results to a file)? [Yns]:

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


#32579 [NEW]: Segfault (Memory Leak on debug build) caused in __destruct

2005-04-12 Thread mailfrom-bugs dot php dot net at kopka dot net
From: mailfrom-bugs dot php dot net at kopka dot net
Operating system: Linux
PHP version:  5.0.3
PHP Bug Type: Reproducible crash
Bug description:  Segfault (Memory Leak on debug build) caused in __destruct

Description:

I ran into this using the following construct:

if (database::query($string)-error) {}

where database::query() returns an object wrapping a result set (or
providing info on success of the request).

PHP 5.0.3 (and i am quite sure this applies to other versions as well as i
experience this for quite a time) segfaults under the following cumulating
circumstances:
- If the object is only used once and not referenced to a variable
- If a property is read/set (if a function is called all is OK)
- If __destruct references the class name by some means (others are OK)

When you try the demo uncomment one of the lines which cause a segfault
(and are noted as a memory leak with --enable-debug):

//  $c=get_class($this);unset ($c);
//  echo get_class($this);
//  if(defined('DEBUG_'.__CLASS__)){}


The following lines don't raise a segfault:

  $c=__CLASS__;unset($c);
  if(__CLASS__ == BUG) {};
  get_class($this);
  echo __CLASS__;

The following line don't raise a segfault but is noted as a memory leak
(--enable-debug):

  $c=get_class($this);  // -- this is reported as a memory leak 

Naturally the hidden beast came up a long time after i wrote the line -
spending a good month of free time trying to locate it i am happy to
finally nail it to the ground for someone who knows what he is doing to
slay it (it cost me a keyboard and brought quite a few white hairs into
existence).
Good hunting.


Configure Command =  './configure' '--prefix=/usr'
'--host=i686-pc-linux-gnu' '--mandir=/usr/share/man'
'--infodir=/usr/share/info' '--datadir=/usr/share' '--sysconfdir=/etc'
'--localstatedir=/var/lib' '--disable-cgi' '--enable-cli' '--enable-embed'
'--with-config-file-path=/etc/php/cli-php5' '--disable-bcmath'
'--without-bz2' '--disable-calendar' '--without-cpdflib' '--disable-ctype'
'--without-curl' '--without-curlwrappers' '--disable-dbase' '--disable-dio'
'--disable-dom' '--disable-exif' '--without-fam' '--without-fbsql'
'--without-fdftk' '--disable-filepro' '--disable-ftp' '--without-gettext'
'--without-gmp' '--without-hwapi' '--without-iconv' '--without-informix'
'--without-ingres' '--without-interbase' '--without-kerberos'
'--disable-libxml' '--disable-mbstring' '--without-mcrypt'
'--without-mcve' '--disable-memory-limit' '--without-mhash'
'--without-mime-magic' '--without-ming' '--without-mnogosearch'
'--without-msql' '--without-mssql' '--without-ncurses' '--without-oci8'
'--without-oracle' '--without-openssl' '--without-openssl-dir'
'--without-ovrimos' '--disable-pcntl' '--without-pcre-regx'
'--without-pfpro' '--without-pgsql' '--disable-posix' '--without-pspell'
'--without-recode' '--disable-simplexml' '--disable-shmop'
'--without-snmp' '--disable-soap' '--disable-sockets' '--disable-spl'
'--without-sybase' '--without-sybase-ct' '--disable-sysvmsg'
'--disable-sysvsem' '--disable-sysvshm' '--without-tidy'
'--disable-tokenizer' '--disable-wddx' '--without-xsl' '--without-xmlrpc'
'--disable-yp' '--without-zlib' '--disable-debug' '--without-jpeg-dir'
'--without-freetype-dir' '--without-t1lib' '--without-ttf'
'--disable-gd-jis-conf' '--disable-gd-native-ttf' '--without-png-dir'
'--without-tiff-dir' '--without-xpm-dir' '--without-gd'
'--disable-session' '--without-sqlite' '--disable-dba'
'--without-readline' '--without-libedit'


Reproduce code:
---
?php

class BUG {
  var $error = please fix this thing, it wasted a nice part of my
life!\n;
  static function instance() {return new BUG();}  

  function __destruct()
  {
  $c=get_class($this);unset ($c);
//  echo get_class($this);
//  if(defined('DEBUG_'.__CLASS__)){}
//  $c=get_class($this); //memory leak only
echo $this-error;
  }
}

BUG::instance()-error;
echo this is still executed\n;

?


Expected result:

# php -n bug.php(cr)
please fix this thing, it wasted a nice part of my life!
this is still executed
# (cursor)

Actual result:
--
Sorry that i can not provide a core dump according to the requested
standards (vith --enable-debug) because if i compile like this there is no
segfault (just a memory leak), so i hope a standard one will help:
--
(with --disable-debug)
# php -n bug.php (cr)
please fix this thing, it wasted a nice part of my life!
this is still executed
Segmentation fault (core dumped)
# gdb php core
GNU gdb 6.0
Copyright 2003 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you
are
welcome to change it and/or distribute copies of it under certain
conditions.
Type show copying to see the conditions.
There is absolutely no warranty for GDB.  Type show warranty for
details.
This GDB was configured as i686-pc-linux-gnu...(no debugging symbols
found)...Using

#32596 [NEW]: Segfault/Memory Leak by getClass (etc) in __destruct

2005-04-12 Thread mailfrom-bugs dot php dot net at kopka dot net
From: mailfrom-bugs dot php dot net at kopka dot net
Operating system: Linux (Gentoo)
PHP version:  5CVS-2005-04-05 (dev)
PHP Bug Type: Reproducible crash
Bug description:  Segfault/Memory Leak by getClass (etc) in __destruct

Description:

getClass($this) and others segfault or leak memory (when --enable-debug)
on 
PHP 5.0.3
PHP 5.0.4
PHP 5.0.5-dev (cli) (2005-04-05 11:42:27)
build on gentoo linux (default install flags).

I ran into this using the following construct:

if (database::query($string)-error) {}

where database::query() returns an object wrapping a result set (or
providing info on success of the request).

PHP 5.0.3 (and i am quite sure this applies to other versions as well as i
experience this for quite a time) segfaults under the following cumulating
circumstances:
- If the object is only used once and not referenced to a variable
- If a property is read/set (if a function is called all is OK)
- If __destruct references the class name by some means (others are OK)

When you try the demo uncomment one of the lines which cause a segfault
(and are noted as a memory leak with --enable-debug):

//  $c=get_class($this);unset ($c);
//  echo get_class($this);
//  if(defined('DEBUG_'.__CLASS__)){}

The following lines don't raise a segfault:

  $c=__CLASS__;unset($c);
  if(__CLASS__ == BUG) {};
  get_class($this);
  echo __CLASS__;

The following line don't raise a segfault but is noted as a memory leak
(--enable-debug):

  $c=get_class($this);

Naturally the hidden beast came up a long time after i wrote the line -
spending a good month of free time trying to locate it i am happy to
finally nail it to the ground for someone who knows what he is doing to
slay it (it cost me a keyboard and brought quite a few white hairs into
existence).

Since the original bug report vanished from the bug list (and can only be
found by number for reasons that escape me) i opened  it again (and closed
the other).

Good hunting.

Configure Command =  './configure' '--prefix=/usr'
'--host=i686-pc-linux-gnu' '--mandir=/usr/share/man'
'--infodir=/usr/share/info' '--datadir=/usr/share' '--sysconfdir=/etc'
'--localstatedir=/var/lib' '--disable-cgi' '--enable-cli' '--enable-embed'
'--with-config-file-path=/etc/php/cli-php5' '--disable-bcmath'
'--without-bz2' '--disable-calendar'
'--without-cpdflib' '--disable-ctype' '--without-curl'
'--without-curlwrappers' '--disable-dbase' '--disable-dio'
'--disable-dom' '--disable-exif' '--without-fam' '--without-fbsql'
'--without-fdftk' '--disable-filepro' '--disable-ftp' '--without-gettext'
'--without-gmp' '--without-hwapi' '--without-iconv' '--without-informix'
'--without-ingres' '--without-interbase' '--without-kerberos'
'--disable-libxml' '--disable-mbstring'
'--without-mcrypt' '--without-mcve' '--disable-memory-limit'
'--without-mhash' '--without-mime-magic' '--without-ming'
'--without-mnogosearch' '--without-msql' '--without-mssql'
'--without-ncurses' '--without-oci8' '--without-oracle'
'--without-openssl' '--without-openssl-dir' '--without-ovrimos'
'--disable-pcntl' '--without-pcre-regx' '--without-pfpro'
'--without-pgsql' '--disable-posix' '--without-pspell' '--without-recode'
'--disable-simplexml' '--disable-shmop' '--without-snmp' '--disable-soap'
'--disable-sockets' '--disable-spl' '--without-sybase'
'--without-sybase-ct' '--disable-sysvmsg' '--disable-sysvsem'
'--disable-sysvshm' '--without-tidy'
'--disable-tokenizer' '--disable-wddx' '--without-xsl'
'--without-xmlrpc' '--disable-yp' '--without-zlib' '--disable-debug'
'--without-jpeg-dir' '--without-freetype-dir' '--without-t1lib'
'--without-ttf' '--disable-gd-jis-conf' '--disable-gd-native-ttf'
'--without-png-dir' '--without-tiff-dir' '--without-xpm-dir'
'--without-gd' '--disable-session' '--without-sqlite' '--disable-dba'
'--without-readline' '--without-libedit'


Reproduce code:
---
?php

class BUG {
  var $error = please fix this thing, it wasted a nice part of my
life!\n;
  static function instance() {return new BUG();}  

  function __destruct()
  {
  $c=get_class($this);unset ($c);
//  echo get_class($this);
//  if(defined('DEBUG_'.__CLASS__)){}
//  $c=get_class($this); //memory leak only
echo $this-error;
  }
}

BUG::instance()-error;
echo this is still executed\n;

?

Expected result:

Expected result:

# php -n bug.php(cr)
please fix this thing, it wasted a nice part of my life!
this is still executed
# (cursor)

Actual result:
--
Sorry that i can not provide a core dump according to the requested
standards (vith --enable-debug) because if i compile like this there is
no segfault (just a memory leak), so i hope a standard one will help:
--
(with --disable-debug)
# php -n bug.php (cr)
please fix this thing, it wasted a nice part of my life!
this is still executed
Segmentation fault (core dumped)
# gdb php core
GNU gdb 6.0
Copyright 2003 Free Software Foundation

#31363 [Fbk-NoF]: Non-blocking flock() broken

2005-04-12 Thread php-bugs
 ID:   31363
 Updated by:   php-bugs@lists.php.net
 Reported By:  ian at snork dot net
-Status:   Feedback
+Status:   No Feedback
 Bug Type: Filesystem function related
 Operating System: Debian woody (i386)
 PHP Version:  5.0.3
 New Comment:

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.


Previous Comments:


[2005-02-28 21:06:39] [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-12-31 06:41:56] ian at snork dot net

Description:

This code works in PHP 4.3.0, but does not in PHP 5.0.3.

When invoked, it will try to lock /tmp/test1, /tmp/test2  
or /tmp/test3 for exclusive use, whichever is free. If  
none are, it will wait a second before cycling through  
with another attempt.   
   
When running concurrently, the first invocation correctly   
picks up /tmp/test1; the second and subsequent ones just   
cycle forever.   
  
For some reason, the non-blocking flock() only sets $block  
the first time.  

Reproduce code:
---
while (!sleep(1))
  foreach (array(/tmp/test1, /tmp/test2, /tmp/test3) as $path)
if (flock($handle = fopen($path, w), LOCK_EX | LOCK_NB, $block)
and !$block)
{
  echo Got $path\n; 
  sleep(10); 
  echo Releasing $path\n; 
  exit; 
}


Expected result:

$ php5 flock_test.php   
Got /tmp/test1   
$ php5 flock_test.php   
Got /tmp/test2   
$ php5 flock_test.php   
Got /tmp/test3   
$ php5 flock_test.php   
Releasing /tmp/test1  
Got /tmp/test1  
$ 


Actual result:
--
$ php5 flock_test.php  
Got /tmp/test1 
$ php5 flock_test.php  
$ php5 flock_test.php  
$ php5 flock_test.php  
$ 





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


#31915 [Fbk-NoF]: session_start randomly hangs

2005-04-12 Thread php-bugs
 ID:   31915
 Updated by:   php-bugs@lists.php.net
 Reported By:  map at infinitum dot ch
-Status:   Feedback
+Status:   No Feedback
 Bug Type: Session related
 Operating System: FreeBSD 5.3 stable
 PHP Version:  5.0.3
 New Comment:

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.


Previous Comments:


[2005-02-28 20:46:06] [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-02-11 18:20:48] map at infinitum dot ch

I can only reproduce this behaviour in the production site. There are
like 5 different page types that have a different initialization but
basically we do some #includes and assignments and then comes the
following code:

session_cache_limiter('none');
@session_start ();

There are other places where I just use 'session_start' without
'session_cache_limiter'.



[2005-02-10 21:28:34] [EMAIL PROTECTED]

It would be good if you provide a reproduce script or at least some
info on how to reproduce this issue.
Just saying that something is wrong doesn't help much, as you may
guess.

Have you already tried latest CVS snapshot, btw ?



[2005-02-10 15:52:17] map at infinitum dot ch

Description:

On a production site using PHP5 5.0.3 with Apache 1.3.33 we see random
session_start hangs. It does NOT happen always on the same page, with
the same client, the same frequency or unter the same load.
If it happens the process eats up all CPU time util it reaches the
'max_execution_time'. It then leaves a trace in the error log saying:
PHP Fatal error:  Maximum execution time of 15 seconds exceeded in XXX
on line XXX. There are always other pages and lines.
I already tried a lot of stuff to see if there is any influence like
using 'session_destroy'. I do not use any special session parameters.
The actual parameters are:

[Session]
session.save_handler = files
session.save_path = /home/teviaqui/session
session.use_cookies = 1
session.name = PHPSESSID
session.auto_start = 0
session.cookie_lifetime = 0
session.cookie_path = /
session.cookie_domain =
session.serialize_handler = php
session.gc_probability = 1
session.gc_divisor = 1000
session.gc_maxlifetime = 1440
session.bug_compat_42 = 0
session.bug_compat_warn = 1
session.referer_check =
session.entropy_length = 0
session.entropy_file =
;session.entropy_length = 16
;session.entropy_file = /dev/urandom
session.cache_limiter = nocache
session.cache_expire = 180
session.use_trans_sid = 0

I am also a developer and might help to debug the code but I need some
advice where to lock at!

Reproduce code:
---
session_start ();

Expected result:

I would like to see no processes eating up all the CPU time of our
sever.

Actual result:
--
The the moment I have several httpd processes hanging at the same time
eating up all CPU time. There are about 120 users browsing the site.
At the moment it happens like 30 times every hour!





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


#32564 [Fbk-NoF]: unset session in foreach

2005-04-12 Thread php-bugs
 ID:   32564
 Updated by:   php-bugs@lists.php.net
 Reported By:  echenavaz at mengine dot fr
-Status:   Feedback
+Status:   No Feedback
 Bug Type: Session related
 Operating System: debian 2.6.9
 PHP Version:  5.0.4
 New Comment:

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.


Previous Comments:


[2005-04-05 17:07:33] derek dot ethier at humber dot ca

More information:
This problem does not exist with 5.0.2 on Windows 2003 (IIS6).

duh at dowebwedo dot com's method does work within the execution of
that one script, but the unset variables are not persistent.  The
$_SESSION variables are restored on each subsequent page load even
after they have been unset which leads to problems with session
fixation and the inability to clean-up session values that are no
longer needed.



[2005-04-04 18:56:56] derek dot ethier at humber dot ca

I can confirm this problem with Windows Server 2003, PHP 5.0.4.  Sample
code:

?php
function unsetSessionVariables($session_name) {
foreach ($_SESSION as $session_key = $session_variable) {
if (strstr($session_key, $session_name)) {
// Neither of these work as intended.
unset($GLOBALS[_SESSION][$session_key]);
unset($_SESSION[$session_key]);
}
}
}

unsetSessionVariables(session_name);
?

I have verified that the same problem exists in the latest 5.1 snap
(php5-win32-200504041430) on the same platform.



[2005-04-04 12:43:10] duh at dowebwedo dot com

I did not experience any problems with Apache/1.3.29 (Unix) PHP/5.0.4
on Debian stable.
Code:
?php
  $_SESSION['one'] = 1;
  $_SESSION['two'] = 2;
  $_SESSION['three'] = 3;

  print_r($_SESSION);

  foreach ($_SESSION as $key_session = $session)
unset($_SESSION[$key_session]);

  print_r($_SESSION);
?

Result is as expected:
Array ( [DF_debug] = 1 [one] = 1 [two] = 2 [three] = 3 ) Array ( )



[2005-04-04 10:23:51] [EMAIL PROTECTED]

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

A proper reproducing script starts with ?php and ends with ?,
is max. 10-20 lines long and does not require any external 
resources such as databases, etc.

If possible, make the script source available online and provide
an URL to it here. Try to avoid embedding huge scripts into the report.





[2005-04-04 10:17:18] echenavaz at mengine dot fr

Description:

work fine whith 5.0.0
do not work whith 5.0.4

(whith zlib.output_compression = On)

Reproduce code:
---
foreach($_SESSION as $key_session = $session)
{
if(substr($key_session, 0, 17) == session_pm_search)
{
unset($_SESSION[$key_session]);
}
}
$forward_url =
https://.$_SERVER['HTTP_HOST'].$_SERVER['SCRIPT_NAME'];
header(location:$forward_url);
die();



Expected result:

$_SESSION['session_pm_searchX'] are unset

Actual result:
--
$_SESSION['session_pm_searchX'] are not unset





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


#32568 [Fbk-NoF]: session data is not available

2005-04-12 Thread php-bugs
 ID:   32568
 Updated by:   php-bugs@lists.php.net
 Reported By:  duh at dowebwedo dot com
-Status:   Feedback
+Status:   No Feedback
 Bug Type: Session related
 Operating System: Debian stable
 PHP Version:  5.0.4
 New Comment:

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.


Previous Comments:


[2005-04-04 16:59:35] [EMAIL PROTECTED]

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

A proper reproducing script starts with ?php and ends with ?,
is max. 10-20 lines long and does not require any external 
resources such as databases, etc.

If possible, make the script source available online and provide
an URL to it here. Try to avoid embedding huge scripts into the report.





[2005-04-04 15:42:07] duh at dowebwedo dot com

In addition to my bugreport some additional information:

The session file appearantly does not contain the last session
information that is shown through the print_r($_SESSION):
cat sess_9ces9k67hse393stv6dns4t964 
DF_debug|b:1;

At first I wanted to use the class destructor (__destruct(..) ) with my
debugger but appearantly sessions are not available when destructing.
Adding $db-show() to my append.inc instead solved that problem.
Perhaps the behaviour of __destruct and append.inc are now based on the
same rules?



[2005-04-04 15:28:16] duh at dowebwedo dot com

Description:

Session data stored in the session is not available when reloading the
page again. This problem occured after upgrading from php 5.0.3 to
5.0.4; in 5.0.3 we do not experience this problem.

The last (append.inc) session listing in the first page request shows
the session variables added to the session. One would expect these
variables to show in the first (prepend.inc) session listing in the
second page request. However, they do not show?

The same situation using php 5.0.3 returns the expected result, so it
can safely be assumed that modifications made in php 5.0.3 to php 5.0.4
has introduced this session problem. 

Reproduce code:
---
Example source:
---
prepend.inc
?php
  print_r($_SESSION);
  ...
  $db = new debugger();
  ...
?

---application---

append.inc
?php
  $db-show();
  ...
  print_r($_SESSION);
?


Info:
-
The application reads and writes to the session which means the session
in the prepend can contain different values than in the append. Reading
and Writing is done in classes (in this example: class debugger). 


Expected result:

Output first page request:
--
Array ( ) 
...
Array ( [DF_debug] = 1 [DF] = Array ( [debugger] = Array (
[debug_script] = [debug_php] = [debug_debugging] = [debug_queries]
= [debug_get] = [debug_post] = [debug_cookie] = [debug_session] =
) ) ) 

Output second page request:
---
Array ( [DF_debug] = 1 [DF] = Array ( [debugger] = Array (
[debug_script] = [debug_php] = [debug_debugging] = [debug_queries]
= [debug_get] = [debug_post] = [debug_cookie] = [debug_session] =
) ) ) 
...
Array ( [DF_debug] = 1 [DF] = Array ( [debugger] = Array (
[debug_script] = [debug_php] = [debug_debugging] = [debug_queries]
= [debug_get] = [debug_post] = [debug_cookie] = [debug_session] =
) ) ) 



Actual result:
--
Output first page request:
--
Array ( ) 
...
Array ( [DF_debug] = 1 [DF] = Array ( [debugger] = Array (
[debug_script] = [debug_php] = [debug_debugging] = [debug_queries]
= [debug_get] = [debug_post] = [debug_cookie] = [debug_session] =
) ) ) 

Output second page request:
---
Array ( [DF_debug] = 1 ) 
...
Array ( [DF_debug] = 1 [DF] = Array ( [debugger] = Array (
[debug_script] = [debug_php] = [debug_debugging] = [debug_queries]
= [debug_get] = [debug_post] = [debug_cookie] = [debug_session] =
) ) ) 







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


#32329 [Fbk-NoF]: Heredoc breaks before ?

2005-04-12 Thread php-bugs
 ID:   32329
 Updated by:   php-bugs@lists.php.net
 Reported By:  randomdestination at gmail dot com
-Status:   Feedback
+Status:   No Feedback
 Bug Type: Scripting Engine problem
 Operating System: FreeBSD (4.6.2)
 PHP Version:  4.3.9
 New Comment:

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.


Previous Comments:


[2005-03-16 00:00:43] [EMAIL PROTECTED]

Please try using this CVS snapshot:

  http://snaps.php.net/php4-STABLE-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php4-win32-STABLE-latest.zip





[2005-03-15 23:07:05] randomdestination at gmail dot com

Description:

The heredoc string breaks before ?, and And some more text? is
lost (in codesample).

Code executed without errors/warnings on my setup (PHP 4.3.9 / FreeBSD
4.6.2), but gave a syntax error on PHP 4.3.10 / WinXP.

Config-line:
'./configure' '--enable-versioning' '--enable-memory-limit'
'--with-layout=GNU' '--with-config-file-scan-dir=/usr/local/etc/php'
'--disable-all' '--with-regex=php' '--with-apxs=/usr/local/sbin/apxs'
'--prefix=/usr/local' 'i386-portbld-freebsd4.6.2'

PHP-ini:
Not significantly different from php.ini-dist

Reproduce code:
---
?PHP
error_reporting(E_ALL);

$str = TEST
Testing the heredoc syntax
Trying PHP-tags ?
And some more text?
TEST;

echo $str;
?

Expected result:

Testing the heredoc syntax
Trying PHP-tags ?
And some more text?

Actual result:
--
Testing the heredoc syntax
Trying PHP-tags 





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


#31948 [Fbk-NoF]: __soapCall __call producing wrong output

2005-04-12 Thread php-bugs
 ID:   31948
 Updated by:   php-bugs@lists.php.net
 Reported By:  wico at cnh dot nl
-Status:   Feedback
+Status:   No Feedback
 Bug Type: SOAP related
 Operating System: debian (dotdeb php5)
 PHP Version:  5.0.3
 New Comment:

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.


Previous Comments:


[2005-02-21 23:20:36] [EMAIL PROTECTED]

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

A proper reproducing script starts with ?php and ends with ?,
is max. 10-20 lines long and does not require any external 
resources such as databases, etc.

If possible, make the script source available online and provide
an URL to it here. Try to avoid embedding huge scripts into the report.

Please supply *complete* reproduce code and don't forget about expected
 actual results.



[2005-02-13 02:41:32] wico at cnh dot nl

Description:

$data = new soapParam('test1', 'data1');
$data = new soapParam('test2', 'data2');
$data = new soapParam('test3', 'data3');

// works correctly:
$soap-function($data); 

// outputs:
function
test1data/test1
test2data/test2
test3data/test3 
/function


// produces wrong output
$soap-__call('function', $data); 
$soap-__soapCall('function', $data); 

// outputs:
function /
test2data/test2
test3data/test3 

in short it closes the function tag right away but continues with
putting the arguments in the xml (after removing the first argument)







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


#30554 [Fbk-NoF]: sybase-ct compile failure

2005-04-12 Thread php-bugs
 ID:   30554
 Updated by:   php-bugs@lists.php.net
 Reported By:  firewa at mail dot goo dot ne dot jp
-Status:   Feedback
+Status:   No Feedback
 Bug Type: Compile Failure
 Operating System: solaris9
 PHP Version:  5.0.2
 New Comment:

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.


Previous Comments:


[2005-03-07 22:24:23] [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-01-20 04:14:54] ken74159 at ms9 dot hinet dot net

You can try disable CLI . If you don't need it~



[2004-10-25 20:27:32] firewa at mail dot goo dot ne dot jp

Description:

php-5.0.2 with sybase 12.5.2 ct-lib compile fail on solaris9 sparc64

#my php configure is 
./configure --prefix=/usr/local/php-5.0.2 \
--with-apxs2=/usr/local/apache2/bin/apxs \
--enable-sigchild \
--enable-mbstring \
--enable-mbstr-enc-trans \
--enable-mbregex \
--enable-zend-multibyte \
--without-mysql \
--enable-wddx \
--with-gd \
--with-png-dir=/usr/local/lib \
--enable-sockets \
--with-iconv-dir=/usr/local/lib \
--with-openssl \
--with-zlib \
--with-zlib-dir=/usr/local/lib \
--with-bz2=/usr/lib \
--enable-calendar \
--with-sybase-ct=/opt/sybase/OCS-12_5 \
--enable-ftp

#make error message is

sapi/apache2handler/php_functions.lo main/internal_functions.lo
-lsybtcl -lin
tl -lcomn -lct -lcs -lpng -lz -lbz2 -lz -lssl -lcrypto -lresolv -lm
-ldl -lnsl -
lsocket -lgcc -lxml2 -lz -liconv -lm -lsocket -lnsl -lxml2 -lz -liconv
-lm -lsoc
ket -lnsl -lxml2 -lz -liconv -lm -lsocket -lnsl -lxml2 -lz -liconv -lm
-lsocket
-lnsl  -o libphp5.la
ld: fatal: library -lsybtcl: not found
ld: fatal: File processing errors. No output written to
.libs/libphp5.so
make: *** [libphp5.la] Error 1

# I think this error is libsybtcl.so not found

# just I make symbolic link
/opt/sybase/OCS-12_5/lib/libsybtcl.so -
/opt/sybase/OCS-12_5/lib/libtcl.so

# and so make once again

# but dll error message
main/internal_functions_cli.lo -lsybtcl -lintl -lcomn -lct -lcs -lpng
-lz -lbz
2 -lz -lssl -lcrypto -lresolv -lm -ldl -lnsl -lsocket -lgcc -lxml2 -lz
-liconv -
lm -lsocket -lnsl -lxml2 -lz -liconv -lm -lsocket -lnsl -lxml2 -lz
-liconv -lm -
lsocket -lnsl -lxml2 -lz -liconv -lm -lsocket -lnsl  -o sapi/cli/php
Undefined   first referenced
 symbol in file
intl_close 
/opt/sybase/OCS-12_5/lib/libcomn.so
intlgetenv 
/opt/sybase/OCS-12_5/lib/libsybtcl.so
intl_iocsfclose
/opt/sybase/OCS-12_5/lib/libsybtcl.so
intl_iocsfwrite
/opt/sybase/OCS-12_5/lib/libsybtcl.so
comn_free  
/opt/sybase/OCS-12_5/lib/libsybtcl.so
intl_errstr
/opt/sybase/OCS-12_5/lib/libcomn.so
comn_calloc
/opt/sybase/OCS-12_5/lib/libsybtcl.so
comn_malloc
/opt/sybase/OCS-12_5/lib/libsybtcl.so
intl_datetime  
/opt/sybase/OCS-12_5/lib/libcomn.so
intl_nextvalue 
/opt/sybase/OCS-12_5/lib/libcomn.so
intl_nextentry 
/opt/sybase/OCS-12_5/lib/libcomn.so
intl_home  
/opt/sybase/OCS-12_5/lib/libsybtcl.so
intl_open  
/opt/sybase/OCS-12_5/lib/libcomn.so
intl_strbuild  
/opt/sybase/OCS-12_5/lib/libsybtcl.so
intl_nextsection   
/opt/sybase/OCS-12_5/lib/libcomn.so
comn_realloc   
/opt/sybase/OCS-12_5/lib/libsybtcl.so
intl_cstrbuild  /opt/sybase/OCS-12_5/lib/libcs.so
intl_iocsfgets 
/opt/sybase/OCS-12_5/lib/libsybtcl.so
intl_iocsfopen 
/opt/sybase/OCS-12_5/lib/libsybtcl.so
intl_iocsfseek 
/opt/sybase/OCS-12_5/lib/libsybtcl.so
intl_iocsfread 
/opt/sybase/OCS-12_5/lib/libcomn.so
ld: fatal: Symbol referencing errors. No output written to
sapi/cli/php
collect2: ld returned 1 exit status
make: *** [sapi/cli/php] Error 1

# please teach me 






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


#30977 [Fbk-NoF]: Can't connect in specific scenarios.

2005-04-12 Thread php-bugs
 ID:   30977
 Updated by:   php-bugs@lists.php.net
 Reported By:  cross_phil at hotmail dot com
-Status:   Feedback
+Status:   No Feedback
 Bug Type: MSSQL related
 Operating System: win32
 PHP Version:  5.0.2
 New Comment:

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.


Previous Comments:


[2005-02-28 21:20:04] [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-12-03 23:52:17] cross_phil at hotmail dot com

BTW: I have tried this on 4.3.8 (my ISP) and on my laptop which is
5.0.2, so I don't think version matters.



[2004-12-03 18:03:33] cross_phil at hotmail dot com

Description:

I am having trouble connecting to my MS SQL database from an external
network address.  When I am at work connecting locally this code works
fine.  When I am outside the building, it fails with the error
mentioned in Actual Result.  It does not appear to be a IP or a
firewall issue because I can connect with the query analyser and other
MS tools just fine.  Seems like some sort of network transport issue. 
I can work around it using the COM example listed on the MS SQL
documentation/user comments but I have libraries build around the SQL
functions that I would rather use if I can figure this out.  I am
mainly asking to try to determine why this function would act different
in different network scenarios.

Reproduce code:
---
?php
//Note: I am not disclosing my authentication for obvious reasons but
my original code did have real quoted values.
mssql_connect(MY_IP, MY_UNAME, MY_PASS)
 or die('Error connecting');
echo 'success'
?


Expected result:

success

Actual result:
--
Warning: mssql_connect(): Unable to connect to server: 68.111.105.35 in
e:\bigdogdealer.net\bigdogmotorcycles.net\php\dealer\test.php on line
10
Error connecting





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


#30453 [Fbk-NoF]: php parser don't work properly (2)

2005-04-12 Thread php-bugs
 ID:   30453
 Updated by:   php-bugs@lists.php.net
 Reported By:  guth at fiifo dot u-psud dot fr
-Status:   Feedback
+Status:   No Feedback
 Bug Type: Zend Engine 2 problem
 Operating System: Linux
 PHP Version:  5.0.2
 Assigned To:  andi
 New Comment:

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.


Previous Comments:


[2005-03-25 01:34:16] [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-10-16 02:06:37] guth at fiifo dot u-psud dot fr

Description:

Look at the following code...

Note that there is no difference between the first case and the third
case. I just add an include in the first case.

Reproduce code:
---
test3.php :

?php

include test4.php;

class ClassGroupModule extends GroupModule implements GroupInterface {
}

abstract class GroupModule extends Module { }

?


?php

include test4.php;

class ClassGroupModule extends GroupModule implements GroupInterface {
}

abstract class GroupModule { }

?

?php

abstract class Module { }

interface GroupInterface { }

class ClassGroupModule extends GroupModule implements GroupInterface {
}

abstract class GroupModule extends Module { }

?

test4.php

?php
abstract class Module { }

interface GroupInterface { }
?

Expected result:

Case 1 :
- Should work

Case 2 :
- Should work

Case 3 :
- Should work

Actual result:
--
Case 1 :
Fatal error: Class 'GroupModule' not found in /www/test3.php on line 4

Case 2 :
- Works fine

Case 3 :
- Works fine





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


#31327 [Fbk-NoF]: chinese char and word problem

2005-04-12 Thread php-bugs
 ID:   31327
 Updated by:   php-bugs@lists.php.net
 Reported By:  vtsuper1 at mail dot hongkong dot com
-Status:   Feedback
+Status:   No Feedback
 Bug Type: COM related
 Operating System: windowXP
 PHP Version:  5.0.3
 New Comment:

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.


Previous Comments:


[2005-02-28 21:06:01] [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-12-28 20:46:49] vtsuper1 at mail dot hongkong dot com

Description:

I have try this code in 
php 5.0.3 and 4.3
I'm using Chinese winXP and Chinese Office XP
apache 2

both version of php also have the same problem
When I use Chinese character in the string, the output of the word file
will have some meaningless spaces after the words I expected(my expected
string is ok, no problem).  There are no problem if I using English. And
this problem will not occurs in excel.

Reproduce code:
---
?php
// starting word
$word = new COM(word.application) or die(Unable to instantiate
Word);
echo Loaded Word, version {$word-Version}\n;

//bring it to front
$word-Visible = 1;

//open an empty document
$word-Documents-Add();

//do some weird stuff
$word-Selection-TypeText(§A¦n¶Ü);
$word-Documents[1]-SaveAs(Useless test.doc);

//closing word
$word-Quit();

//free the object
$word = null;
? 

Expected result:

§A¦n¶Ü

Actual result:
--
§A¦n¶Ü

(there are some spaces occurs, I use the underline to repersent the
spaces)





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


#28067 [Fbk-NoF]: partially incorrect utf8 to htmlentities mapping

2005-04-12 Thread php-bugs
 ID:   28067
 Updated by:   php-bugs@lists.php.net
 Reported By:  ben at csgb dot de
-Status:   Feedback
+Status:   No Feedback
 Bug Type: Strings related
 Operating System: possibly all
 PHP Version:  4, 5, who knows
 Assigned To:  derick
 New Comment:

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.


Previous Comments:


[2005-02-21 20:21:22] [EMAIL PROTECTED]

Please try using this CVS snapshot:

  http://snaps.php.net/php4-STABLE-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php4-win32-STABLE-latest.zip





[2004-04-20 17:50:06] [EMAIL PROTECTED]

received the patch, but it doesn't look 100% correct so I need to so
some investigations.



[2004-04-20 09:10:06] [EMAIL PROTECTED]

Hello,

can you please mail this patch to me, as the bug system garbled it a
bit.

regards,
Derick



[2004-04-19 20:51:01] ben at csgb dot de

sorry, please be careful when using the diff, have to learn to copy and
paste correctly )-;

the diff ends after the first: 

+   NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
/* 9001 */
lang, rang,
};

without the eck



[2004-04-19 20:46:26] ben at csgb dot de

Description:

During some doublecheck after Bug #28042 was closed, I discovered some
more mistakes in that file. I just checked the UTF-8 tables, don't know
if the other charsets are wrong, too.

In Bug #28042, We forgot two letters of the greek table, 'upsih' and
'piv', which are spelled with an 'i' as in ice instead of '1'.

Also there are some NULLs missing at several points. This causes
htmlentities(,,UTF-8) to convert UTF-8 encoded chars into the wrong
or into no HTML-Entities since the mappings are shifted. For example
U+202F is mapped to permil; which should be U+2030.

Here is my diff of the php5-cvs/ext/standard/html.c, the same
modifications should be made in php-4.3, please double check

--- html.c  2004-04-18 02:30:24.0 +0200
+++ html.c.fixed2004-04-19 18:44:47.949012992 +0200
@@ -114,13 +114,13 @@
/* 354 - 375 */
NULL, NULL, NULL, NULL, NULL, NULL, NULL,
NULL, NULL, NULL, NULL, NULL, NULL, NULL,
-   NULL, NULL, NULL, NULL, NULL, NULL, NULL,
+   NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
/* 376 */
Yuml,
/* 377 - 401 */
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
-   NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
+   NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
/* 402 */
fnof
 };
@@ -130,7 +130,7 @@
circ,
/* 711 - 731 */
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
-   NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
+   NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
NULL,
/* 732 */
tilde,
 };
@@ -147,9 +147,9 @@
sigmaf, sigma, tau, upsilon, phi, chi, psi,
omega,
/* 970 - 976 are not mapped */
NULL, NULL, NULL, NULL, NULL, NULL, NULL,
-   thetasym, ups1h,
+   thetasym, upsih,
NULL, NULL, NULL,
-   p1v
+   piv
 };

 static entity_table_t ent_uni_punct[] = {
@@ -158,7 +158,7 @@
thinsp, NULL, NULL, zwnj, zwj, lrm, rlm,
NULL, NULL, NULL, ndash, mdash, NULL, NULL, NULL,
lsquo, rsquo, sbquo, NULL, ldquo, rdquo, bdquo,
-   dagger, Dagger, bull, NULL, NULL, NULL, hellip,
+   NULL, dagger, Dagger, bull, NULL, NULL, NULL, hellip,
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, permil,
NULL,
prime, Prime, NULL, NULL, NULL, NULL, NULL, lsaquo,
rsaquo,
NULL, NULL, NULL, oline, NULL, NULL, NULL, NULL, NULL,
@@ -191,7 +191,7 @@
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
/* 8624 (0x21b0) */
-   NULL, NULL, NULL, NULL, crarr, NULL, NULL, NULL,
+   NULL, NULL, NULL, NULL, NULL, crarr, NULL, NULL,
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
/* 8640 (0x21c0) */
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
@@ -206,9 +206,9 @@
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
/* 8704 (0x2200) */
forall, comp, part, exist, nexist, empty, NULL,
nabla,
-   isin, notin, epsis, NULL, ni, bepsi, NULL, prod,
+   isin, notin, epsis, ni, NULL, bepsi, NULL, prod,
/* 8720 (0x2210

#30507 [Fbk-NoF]: Content-Encoding header is not set

2005-04-12 Thread php-bugs
 ID:   30507
 Updated by:   php-bugs@lists.php.net
 Reported By:  webmaster at ex-centris dot com
-Status:   Feedback
+Status:   No Feedback
 Bug Type: Zlib Related
 Operating System: RedHat Enterprise Linux 3
 PHP Version:  5.0.2
 New Comment:

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.


Previous Comments:


[2005-03-07 22:22:55] [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-10-21 02:44:24] webmaster at ex-centris dot com

Description:

I enabled automatic gzip compression with the following 
line in php.ini:

   zlib.output_compression = on

The problem is that the Content-Encoding header does not 
get set at all in the response. Therefore, a browser 
that advertises itself as supporting gzip compression 
(Accept-Encoding: gzip,deflate) receives compressed 
content but does not know it is compressed.

If I manually add the following to my script:

   header(Content-Encoding: gzip);

... it then works.


This was tried in the Safari and Firefox clients on Mac 
OS X. Server is RedHat Enterprise Linux 3 running kernel 
2.4.21-20. PHP 5.0.2 running as a module of 
Apache2 2.0.46.

If you need other details do not hesitate to contact me. 
Thank you.

P.S. Even though I compiled PHP with:

  ./configure --with-apxs2 --with-mysql --with-zlib

if I call phpinfo, here what it shows:

   ./configure --with-apxs2 --with-mysql

Reproduce code:
---
?php

print 'Here is some output !!!';

?

Expected result:

Here is some output !!!

Actual result:
--
??H-JU?,V(??MU?/-)(-QPTT???D?M





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


#32184 [Fbk-NoF]: I think it's the socket daemon script 's bug

2005-04-12 Thread php-bugs
 ID:   32184
 Updated by:   php-bugs@lists.php.net
 Reported By:  huoqi29 at 163 dot com
-Status:   Feedback
+Status:   No Feedback
 Bug Type: Sockets related
 Operating System: Linux DevelopWeb 2.6.8-24-smp #1
 PHP Version:  5.0.3
 New Comment:

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.


Previous Comments:


[2005-03-04 11:32:12] [EMAIL PROTECTED]

Not enough information was provided for us to be able
to handle this bug. Please re-read the instructions at
http://bugs.php.net/how-to-report.php

If you can provide more information, feel free to add it
to this bug and change the status back to Open.

Thank you for your interest in PHP.


Can't reproduce.
Please explain more clearly - what do you expect and what do you get.



[2005-03-04 09:09:33] huoqi29 at 163 dot com

Trying 127.0.0.1...
telnet: connect to address 127.0.0.1: Connection refused



[2005-03-04 09:02:30] huoqi29 at 163 dot com

Description:

   If you uncomment the '//echo Bug;' and when you run this script
,you will get the expect result if you don't logout, and when you login
and ps -aux  you can find it.
   But where you telnet 127.0.0.1 9 you can't connect it .

Reproduce code:
---
?php
if(pcntl_fork()){exit;} posix_setsid(); chdir(/); umask(0);
$sock=socket_create(AF_INET,SOCK_STREAM,SOL_TCP);
socket_bind($sock,127.0.0.1,9);
socket_listen($sock); $R=array($sock);
while(1) { $T=$R; if($C=socket_select($T,$W=NULL,$E=NULL,0,0)) {
foreach($T as $sock2) {
if($sock2==$sock) {
$client=socket_accept($sock);
array_push($R,$client);
}
else{ //echo Bug;
//socket_getpeername($sock2,$add,$prot);
$B=socket_recv($sock2,$Buf,1024,0);
if($B==0 || chop($Buf)==quit ||
chop($Buf)==exit) {
$I=array_search($sock2,$R);
unset($R[$I]);
socket_close($sock2);
}else socket_send($sock2,Hello.$Buf,1024,0);
} } } } ?






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


#31005 [Fbk-NoF]: office web compenonts can't work in php5 normally

2005-04-12 Thread php-bugs
 ID:   31005
 Updated by:   php-bugs@lists.php.net
 Reported By:  aylg at 21cn dot com
-Status:   Feedback
+Status:   No Feedback
 Bug Type: COM related
 Operating System: windows2003
 PHP Version:  5.0.2
 New Comment:

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.


Previous Comments:


[2005-02-28 21:18:31] [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-12-07 09:47:10] aylg at 21cn dot com

Description:

these code can work in php4 normally,but in php5,it failed.

Reproduce code:
---
  $this-hSpace=new COM(OWC.Chart);
  if($this-hSpace!=false)
  {
$this-hChart=$this-hSpace-Charts-Add();


Expected result:

these code can executed successfully

Actual result:
--
Fatal error: Uncaught exception 'com_exception' with message 'Error
ÕÒ²»µ½³ÉÔ±¡£ ' in D:\wwwroot\webstat\common\chart.php:23 Stack trace:
#0 D:\wwwroot\webstat\common\showimg.php(6): CHART-init(650, 250) #1
{main} thrown in D:\wwwroot\webstat\common\chart.php on line 23






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


#31417 [Fbk-NoF]: $HTTP_RAW_POST_DATA but $_POST not populated

2005-04-12 Thread php-bugs
 ID:   31417
 Updated by:   php-bugs@lists.php.net
 Reported By:  j-spam at starline dot ee
-Status:   Feedback
+Status:   No Feedback
 Bug Type: CGI related
 Operating System: Linux
 PHP Version:  5.0.3
 New Comment:

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.


Previous Comments:


[2005-03-01 18:18:03] csaba at alum dot mit dot edu

Huge problem.  This just started happening on my Win XP Pro (SP 2)
machine - checked with both the Feb 28 snapshots and March 1 snapshots.
 It was not happening on the Feb 19 snapshots, but I think it might be
going on since Feb 25 because of: http://bugs.php.net/bug.php?id=32109
I am using Apache 2.0.53 and I have php.ini in c:\windows.
Besides that I have the following 4 files in c:\winapps\php.net\latest:
php.exe, php-win.exe, php5ts.dll, and php5apache2.dll, a fairly
minimalistic setup.

Csaba Gabor from Vienna



[2005-02-28 21:07:26] [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-01-05 16:03:50] j-spam at starline dot ee

btw $_GET works.



[2005-01-05 15:58:37] j-spam at starline dot ee

Typo: $HTTP_RAW_POST_DATA not $_HTTP_RAW_POST_DATA on Reproduce
code, line 2.



[2005-01-05 15:55:35] j-spam at starline dot ee

Description:

$_POST is not populated, however $HTTP_RAW_POST_DATA is.

lighttpd 1.3.5 using cgi (not fcgi)
CGI-PHP5 5.0.3
Firefox 1.0

Reproduce code:
---
$_POST: ?php print_r($_POST); ?br
$HTTP_RAW_POST_DATA: ?php print_r($_HTTP_RAW_POST_DATA); ?brbr
form action=?=$_SERVER[PHP_SELF] ? method=post
textarea name=duh?=$_POST[duh];?/textarea
input type=submit /
/form

Actual result:
--
$_POST: Array ( )
$HTTP_RAW_POST_DATA: bla=asdfduh=eeca%0D%0Aasdf%0D%0Aasdf





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


#30454 [Fbk-NoF]: Socket not closed if no read/write

2005-04-12 Thread php-bugs
 ID:   30454
 Updated by:   php-bugs@lists.php.net
 Reported By:  nightcat at poczta dot onet dot pl
-Status:   Feedback
+Status:   No Feedback
 Bug Type: Sockets related
 Operating System: Linux
 PHP Version:  5.0.2
 New Comment:

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.


Previous Comments:


[2005-02-13 15:00:22] [EMAIL PROTECTED]

Please try using this CVS snapshot:

  http://snaps.php.net/php5-STABLE-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php5.0-win32-latest.zip





[2004-10-16 06:09:55] nightcat at poczta dot onet dot pl

Description:

I'm playing with Socket support in PHP 5, and found something weird.

I was writing my own classess for Socket support and done a base:
1) create serversocket
2) create clientsocket on serversocket-accept()
3) close clientsocket
4) close serversocket

but if between point 2 and 3 there was no read/write for socket, next
try to start a program ended an error.

Below here is a part of code for server (from php documentation).
I just removed everything between socket_accept and socket_close() and
added a counter to skip from loop after 3 connections.

Reproduce code:
---
$inc=0;
do {
   if (($msgsock = socket_accept($sock))  0) {
   echo socket_accept() failed: reason:  .
socket_strerror($msgsock) . \n;
   break;
   }

   socket_close($msgsock);
   $inc++;
   
   
} while ($inc3);

Expected result:

Program should close all used sockets and run for the second time
normally.

Actual result:
--
Running example from php documentation with the msgsocket part switched
with provieded example for the second time results in 

Warning: socket_bind(): unable to bind address [98]: Address already in
use in /server/www/data/thot/tests/simple-server.php on line 19





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


#32231 [Fbk-NoF]: zend_objects_clone_obj ( Exception ) = segfault

2005-04-12 Thread php-bugs
 ID:   32231
 Updated by:   php-bugs@lists.php.net
 Reported By:  bugs at niluje dot net
-Status:   Feedback
+Status:   No Feedback
 Bug Type: Reproducible crash
 Operating System: Debian linux x86
 PHP Version:  5.0.3
 New Comment:

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.


Previous Comments:


[2005-03-09 00:40:45] [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

Your example script gives me this output:

Parse error: syntax error, unexpected T_CATCH in Command line code on
line 1




[2005-03-08 12:00:37] bugs at niluje dot net

Description:

var_dump() on an exception crashes php5.


#0  0xb57f0c0e in zend_objects_clone_obj () from
/usr/lib/apache/1.3/libphp5.so
(gdb) bt
#0  0xb57f0c0e in zend_objects_clone_obj () from
/usr/lib/apache/1.3/libphp5.so
#1  0xb577f00d in php_var_dump () from /usr/lib/apache/1.3/libphp5.so
#2  0xb577ee3f in url_adapt () from /usr/lib/apache/1.3/libphp5.so
#3  0xb57e5986 in zend_hash_apply_with_arguments () from
/usr/lib/apache/1.3/libphp5.so
#4  0xb577f0b7 in php_var_dump () from /usr/lib/apache/1.3/libphp5.so
#5  0xb577f1d6 in zif_var_dump () from /usr/lib/apache/1.3/libphp5.so
#6  0xb581b851 in zend_do_fcall_common_helper () from
/usr/lib/apache/1.3/libphp5.so
#7  0xb581bfd0 in zend_do_fcall_handler () from
/usr/lib/apache/1.3/libphp5.so
#8  0xb580024f in execute () from /usr/lib/apache/1.3/libphp5.so
#9  0xb57df043 in zend_execute_scripts () from
/usr/lib/apache/1.3/libphp5.so
#10 0xb57a8c55 in php_execute_script () from
/usr/lib/apache/1.3/libphp5.so
#11 0xb5824755 in apache_php_module_main () from
/usr/lib/apache/1.3/libphp5.so
#12 0xb582537e in apache_php_module_main () from
/usr/lib/apache/1.3/libphp5.so
#13 0xb58253e5 in apache_php_module_main () from
/usr/lib/apache/1.3/libphp5.so
#14 0x080553c3 in ap_invoke_handler ()
#15 0x08068465 in ap_some_auth_required ()
#16 0x08068614 in ap_process_request ()
#17 0x08060bd2 in ap_child_terminate ()
#18 0x08060de7 in ap_child_terminate ()
#19 0x080610c7 in ap_child_terminate ()
#20 0x08061a48 in ap_child_terminate ()
#21 0x08061ff8 in main ()




Reproduce code:
---
catch (Exception $e) {
 var_dump ($e);
}






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


#31577 [Fbk-NoF]: [chm] bug on function.dbase-add-record.html

2005-04-12 Thread php-bugs
 ID:   31577
 Updated by:   php-bugs@lists.php.net
 Reported By:  sand001 at sympatico dot ca
-Status:   Feedback
+Status:   No Feedback
 Bug Type: dBase related
 Operating System: windows XP
 PHP Version:  5.0.2
 New Comment:

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.


Previous Comments:


[2005-02-08 11:03:27] [EMAIL PROTECTED]

Not enough information was provided for us to be able
to handle this bug. Please re-read the instructions at
http://bugs.php.net/how-to-report.php

If you can provide more information, feel free to add it
to this bug and change the status back to Open.

Thank you for your interest in PHP.


Please check if your webserver has all access privileges to the dbf
file.



[2005-01-16 22:34:09] sand001 at sympatico dot ca

Description:

I have found a bug on page function.dbase-add-record.html
[chm date: 2004-12-26]...

I can read from a .dbf file with PHP but I cannot write to it. I have
used PHP to create the .dbf or I have used my normally created .dbf
with the same structure. 

The same HTML input screen collects data so that I can write a .txt
delimited file with it and append it into the .dbf but the prescribed
code from the examples fails when the dbase_open() flag is set to '1'
or '2' as required to write the data. 

All of the echo lines show me that the fields are filled properly. The
dbase_open() command works well when the flag is set to '0' for
reading. I can output the data that I have put into the .dbf by
appending from the .txt file.

Reproduce code:
---
?php
$filename=collect.txt;
$name=$_POST[name];
$street=$_POST[street];
$city=$_POST[city];
$prov=$_POST[prov];
$country=$_POST[country];
$postal=$_POST[postal];
$tel=$_POST[tel];
$mail=$_POST[mail];
$fax=$_POST[fax];
echo strong $name/strongbr;
echo strong $street/strongbr;
echo strong $city/strongstrong, $prov/strongstrong,
$country/strongbr;
echo strong $postal/strongbr;
echo strong $tel/strongbr;
echo strong $mail/strongbr;
echo strong $fax/strongbr;

  $db=dbase_open(collectx.dbf,2) ;
  $def = array (trim($name), trim($street), trim($city), trim($prov),
trim($country), trim($postal), trim($tel), trim($mail), trim($fax));  
  dbase_add_record($db, $def);
  dbase_close($db)  
?

Expected result:

I expect to be able to fill a .dbf file with HTML input as collected in
the fields that echo their contents to me, above. 

Thank you for your assistance.

Actual result:
--
Warning: dbase_open() [function.dbase-open]: unable to open database
collectx.dbf in c:\Inetpub\wwwroot\collect.php on line 23







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


#31175 [Fbk-NoF]: MySQL query returns no results when run via PHP

2005-04-12 Thread php-bugs
 ID:   31175
 Updated by:   php-bugs@lists.php.net
 Reported By:  vortexx at freemail dot hu
-Status:   Feedback
+Status:   No Feedback
 Bug Type: MySQL related
 Operating System: Windows 2000 Server, SP4
 PHP Version:  5.0.3
 New Comment:

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.


Previous Comments:


[2005-02-28 21:14:11] [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-02-02 07:36:36] vortexx at freemail dot hu

a) The table is empty or the where clause didn't match any 
records 
Table was not empty, and there was no WHERE clause. Moreover, the exact
same query prodiced the expected results with PHP versions prior to
5.0.3.

b) an error occured, which should be checked by 
mysql_error() - in your case probably illegal mix of 
collations.
Did test for an error - please see my original bug report: none
occurred, at least mysql_error returned none.
Also please note: same query (on the exact same database, etc.) works
fine with PHP versions prior to 5.0.3 .

I suspected perhaps this had something to do with the new php_mysql.dll
included with the new (5.0.3+) PHP versions?! Since - ceteris paribus -
the anomaly was directly linked to changing PHP versions. Once I
changed back to the older version, it all worked fine again.

If there is any more info whatsoever that you think might be necessary,
please let me know! THANKS!!!



[2005-02-02 06:48:46] [EMAIL PROTECTED]

If mysql_query doesn't return a resultset for a select 
statement this has 2 reasons: 
a) The table is empty or the where clause didn't match any 
records 
b) an error occured, which should be checked by 
mysql_error() - in your case probably illegal mix of 
collations. 
 
Can't reproduce your error (tested with PHP 4 + 5, MySQL 
4.1.10 and 5.0.3 and different character sets on server 
and client side). 



[2005-02-02 03:58:43] vortexx at freemail dot hu

Sorry, but what do you mean can't reporduce? 

That you:
- need more info to be able to do so?
If so, please fire away, let me know what else you need, I would be
glad to provide any info necessary
- tried to reprodice but given the same circumstances the same code
worked fine for you?

Since this is MySQL related obviously I cannot copy and paste the
MySQL tables themselves here. I can only give info as to the nature of
tables involved.

To reporoduce just try ANY MySQL query in PHP 5.0.3+ with a CONCAT of a
field from a table plus a string:
SELECT CONCAT('this is a string',field_from_table) as test FROM
whatever_table

The point is that whenever a SELECT with a CONCAT of a string and a
table field is involved, the query returns nothing. If it's just a
CONCAT of 2 or more fields from a table, then it's fine. If it's a
CONCAT of 2 or more strings, no problem. As soon as it is a string plus
a field, no results are returned. BEFORE 5.0.3 the same queries all
worked just fine.

Is this any help? If not, please let me know what info I should send!



[2005-01-29 21:10:35] [EMAIL PROTECTED]

Can't reproduce.
Check your code and provide more info if you're still experiencing this
problem.



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

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


#30791 [Fbk-NoF]: overload and serialize produce unexpected behaviour

2005-04-12 Thread php-bugs
 ID:   30791
 Updated by:   php-bugs@lists.php.net
 Reported By:  alan at akbkhome dot com
-Status:   Feedback
+Status:   No Feedback
 Bug Type: Zend Engine 2 problem
 Operating System: *
 PHP Version:  5CVS-2004-11-15 (dev)
 New Comment:

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.


Previous Comments:


[2005-03-07 21:55:43] [EMAIL PROTECTED]

This is what I get with latest CVS HEAD:

# php5 t.php 
Notice: serialize(): __sleep should return an array only containing the
names of instance-variables to serialize. in /home/jani/t.php on line
10





[2005-01-13 02:13:41] [EMAIL PROTECTED]

Changing to verified - although it's not critical (as overload was
experimental in 4.x) it is a BC break - and is a relatively unexpected
behaviour..



[2005-01-13 02:10:25] alan at akbkhome dot com

Marcus already confirmed this needs fixing - the serialize code should
not end up calling __call() on overloaded objects.



[2005-01-13 00:02:03] [EMAIL PROTECTED]

If an object is overloaded (with __call()), then serializ'ing the
object will fail unless __sleep() is defined.
.. or unless __call() returns Array of instance names.

I'd say there is no bug, 'cos your overloaded __sleep() method indeed
returns wrong data.



[2004-11-15 09:57:51] alan at akbkhome dot com

Description:

If an object is overloaded (with __call()), then serializ'ing the
object will fail unless __sleep() is defined.

It would be far clearer to either
a) - force __sleep to defined on overloaded objects (E_WARN?)
b) - dont call __call() with the __sleep() request.



Reproduce code:
---
class a {
   public $a = 4;
   function __call($a,$b) {
   return unknown method;
   }
}
$b = new a;
echo serialize($b);


Expected result:

Warning: __sleep is not defined on an overloaded object with __call()

Actual result:
--
Warning about unexpected return value to __sleep() and an empty string
output from serialize()





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


#32324 [Fbk-NoF]: socket_recvfrom stops reading at null char

2005-04-12 Thread php-bugs
 ID:   32324
 Updated by:   php-bugs@lists.php.net
 Reported By:  admin at freeworldonline dot com
-Status:   Feedback
+Status:   No Feedback
 Bug Type: Sockets related
 Operating System: Linux stripples.devel.redhat.com
 PHP Version:  4.3.10
 New Comment:

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.


Previous Comments:


[2005-03-16 00:19:11] [EMAIL PROTECTED]

Please try using this CVS snapshot:

  http://snaps.php.net/php4-STABLE-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php4-win32-STABLE-latest.zip

I can not reproduce this. I get only Message from 127.0.0.1:52345
(363/363 bytes)... 




[2005-03-15 20:19:07] admin at freeworldonline dot com

Description:

I am trying to recieve data via a UDP socket using the socket_recvfrom
function. It works fine unless there is a null char anywhere in the
packet.

If there is the buffer returned only contains data up to that point,
although the value returned by the function shows there is actually
more data.

Reproduce code:
---
if (!$sock=socket_create(AF_INET,SOCK_DGRAM,SOL_UDP)) {
echo bError:/b Failed to create socket,
.socket_strerror(socket_last_error($sock)).br\n;
} elseif (!socket_bind($sock,0.0.0.0,41330)) {
echo bError:/b Failed to bind socket,
.socket_strerror(socket_last_error($sock)).br\n;
socket_close($sock);
} else {
echo bReady, please send a message to port 41330 using
UDP/bbrbr\n;

$size=socket_recvfrom($sock,$buf,65535,0,$clientIP,$clientPort);
if ($buf===FALSE) {
echo bError:/b Returned false,
.socket_strerror(socket_last_error($sock)).br\n;
} else {
echo Message from .$clientIP.:.$clientPort.
(.strlen($buf)./.$size. bytes)...br\n;
}

socket_close($sock);
}

Expected result:

All data to be placed into the buffer regardless of any null characters
in the packet.

Actual result:
--
If you send a datagram to port 41330 while this is running with a null
character mid way into the packet, any data from there onwards will not
be placed into $buf.





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


#31233 [Fbk-NoF]: Autoload Interceptor causing unexplained instability

2005-04-12 Thread php-bugs
 ID:   31233
 Updated by:   php-bugs@lists.php.net
 Reported By:  smclean at gmail dot com
-Status:   Feedback
+Status:   No Feedback
 Bug Type: Zend Engine 2 problem
 Operating System: Linux
 PHP Version:  5.0.3
 New Comment:

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.


Previous Comments:


[2005-02-28 21:04:18] [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-12-21 22:59:17] smclean at gmail dot com

Description:

Under special circumstances the autoload interceptor seems to cause
instability. 

All instances of this crash I have been able to reproduce involve
triggering the autoload interceptor by unserializing objects of
undefined classes, with custom error handling configured.  By either
disabling the error handling, the autoload interceptor, or not
unserializing the object, the crash is prevented.  I titles this bug
'Autoload interceptor causing ...' because the crash always occurs
within the autoload interceptor itself or soon after.

In the given example, the actual crash occurs when attempting to simply
cast a GET variable to a bool and print it, but if you change the
parameters of the test, the crash can occur in a multitude of other
places, including within the autoload interceptor itself (this is the
location of the crash when I originally discovered it, but the
reproducing scripts I created caused it to crash elsewhere).  

I attempted to generate a gdb backtrace, but unfortunately
--enable-debug seemed to prevent the crash from occuring.  I was able
to duplicate this bug on three different Linux machines, each running
php 5.0.3 on Slackware 10. 


Reproduce code:
---
Download the following tarball:

http://pio.longstair.com/misc/crash.tgz

Execute: 

tar zxvf crash.tgz
cd crash-2.0
php runme2.php

Explanation: 

runme2.php loads custom error handling and an autoload interceptor
include.  It then attempts to unserialize a serialized undefined
object, and print it out.  This succeeds, but the environment becomes
unstable, and a simple boolean cast segfaults it.

runme1.php simply generates the serialized object string used in
runme2.php


Expected result:

Normal program termination

Actual result:
--
Segmentation Violation

GDB:

Program received signal SIGSEGV, Segmentation fault.
zend_error (type=2056, format=0x21fd3500 Address 0x21fd3500 out of
bounds)
at /home/sean/instball/php-5.0.3/Zend/zend.c:985
985 if (Z_TYPE_P(retval) ==
IS_BOOL  Z_LVAL_P(retval) == 0) {






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


#31946 [Fbk-NoF]: Character set used in query not the same as result.

2005-04-12 Thread php-bugs
 ID:   31946
 Updated by:   php-bugs@lists.php.net
 Reported By:  royberkeveld at gmail dot com
-Status:   Feedback
+Status:   No Feedback
 Bug Type: MySQL related
 Operating System: Windows XP Pro
 PHP Version:  5.0.3
 New Comment:

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.


Previous Comments:


[2005-02-28 21:16:28] RoyBerkeveld at gmail dot com

I tested using the snapshot for Windows.

Latest snapshot doesn't fix anything. I suspect it might have something
to do with the mysql client libraries, they changed with the upgrade
from 5.0.2 to 5.0.3 (size increase from 200kb to 1mb).

I'm not sure weather this 'bug' was intended or not, since there is
probably an a lot more elegant way to force mysql queries to be in a
different encoding than to set the script's internal character set. I'm
just stating that this method no longer works and the changelog doesn't
mention anything about it. Neither do I know a better method, but that
is, I believe, not of much concern to a bug report.



[2005-02-28 20:43:01] [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-02-12 15:08:52] royberkeveld at gmail dot com

Description:

When a script's internal character encoding is set to UTF-8, and a
MySQL Query is formed, the result did not contain UTF-8 encoded data.

This changed when upgrading from PHP 5.0.2 to 5.0.3 - it worked fine in
5.0.2. It does not appear MySQL-related since nothing was changed to the
databases. All databases are UTF-8 encoded and the standard character
set is also UTF-8. I am using MySQL 4.1.9 on Apache 2

Reproduce code:
---
mb_http_output(UTF-8);
mb_internal_encoding(UTF-8);

// just an example, can be any query
$result = mysql_query(select * from someplace);
$row = mysql_fetch_row($result);

echo $row[0];

Expected result:

UTF-8 encoded data with all characters intact

Actual result:
--
Missing characters due to conversion of UTF-8 database data to Latin-1





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


#28204 [Fbk-NoF]: Problem with BIT field type with MSSQL (freetds 0.62.3)

2005-04-12 Thread php-bugs
 ID:   28204
 Updated by:   php-bugs@lists.php.net
 Reported By:  johann at infomaniak dot ch
-Status:   Feedback
+Status:   No Feedback
 Bug Type: Sybase (dblib) related
 Operating System: Linux
 PHP Version:  4.3.6
 Assigned To:  fmk
 New Comment:

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.


Previous Comments:


[2005-03-25 01:43:42] [EMAIL PROTECTED]

Please try using this CVS snapshot:

  http://snaps.php.net/php4-STABLE-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php4-win32-STABLE-latest.zip





[2004-07-27 23:11:40] fred at tc dot df dot gov dot br

this patch doesn't resolve the problem 100%.
this line:

if ($row[Relationship]==1) 

returns false on php=4.3.4, true on others.

the field Relationship on mssql 6.5 is tinynit



[2004-04-28 14:01:12] johann at infomaniak dot ch

Description:

The return value is the real value + a lot of space 
character (it is converted to a string with a constant 
length) 
 
maybe the problem come from freetds dbconvert. I have this 
problem since php 4.3.4 and in php 4.3.4 I applyed the 
following patch. 
 
diff -ruP php-4.3.4/ext/sybase/php_sybase_db.c 
php-4.3.4.patched/ext/sybase/php_sybase_db.c 
--- php-4.3.4/ext/sybase/php_sybase_db.c  2003-10-16 
06:24:04.0 +0200 
+++ php-4.3.4.patched/ext/sybase/php_sybase_db.c   
2004-01-29 11:51:41.0 +0100 
@@ -680,6 +680,7 @@ 
 
   switch (column_type) 
   { 
+ case SYBBIT: 
  case SYBINT2: 
  case SYBINT4: { 
 Z_LVAL_P(result) = (long) anyintcol(offset); 
@@ -893,6 +894,7 @@ 
 case SYBINT4: 
 case SYBFLT8: 
 case SYBREAL: 
+case SYBBIT: 
result-fields[i].numeric = 1; 
break; 
 case SYBCHAR: 
 

Expected result:

an integer 
for example 0 

Actual result:
--
a string with constant length 
for example 
0   





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


#32572 [Fbk-NoF]: After a make install /usr/local/bin/pear is not created

2005-04-12 Thread php-bugs
 ID:   32572
 Updated by:   php-bugs@lists.php.net
 Reported By:  mbneto at gmail dot com
-Status:   Feedback
+Status:   No Feedback
 Bug Type: *General Issues
 Operating System: Linux
 PHP Version:  5.0.4
 New Comment:

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.


Previous Comments:


[2005-04-05 10:45:49] marcel dot bariou at brasnah dot com

php-5.0.4.tar.gz: 8edf259bcfab4cfc890a4bb4e7c3649f
md5sum is correct
8edf259bcfab4cfc890a4bb4e7c3649f  php-5.0.4.tar.gz

./configure  --with-pear ...

Make install supplies =

Installing PHP SAPI module:   apache2handler
/usr/lib/httpd/build/instdso.sh SH_LIBTOOL='/usr/bin/libtool'
libphp5.la /usr/lib/httpd/modules
/usr/bin/libtool --mode=install cp libphp5.la /usr/lib/httpd/modules/
cp .libs/libphp5.so /usr/lib/httpd/modules/libphp5.so
cp .libs/libphp5.lai /usr/lib/httpd/modules/libphp5.la
libtool: install: warning: remember to run `libtool --finish
/usr/local/xtra_targz/php-5.0.4/libs'
chmod 755 /usr/lib/httpd/modules/libphp5.so
[activating module `php5' in /etc/httpd/conf/httpd.conf]
Installing PHP CLI binary:/etc/httpd/bin/
Installing PHP CLI man page:  /etc/httpd/man/man1/
Installing PEAR environment:  /etc/httpd/lib/php/
[PEAR] Archive_Tar- already installed: 1.1
[PEAR] Console_Getopt - already installed: 1.2
[PEAR] PEAR   - installed: 1.3.5
Wrote PEAR system config file at: /etc/httpd/etc/pear.conf
You may want to add: /etc/httpd/lib/php to your php.ini include_path
[PEAR] HTML_Template_IT- already installed: 1.1
[PEAR] Net_UserAgent_Detect- already installed: 2.0.1
[PEAR] XML_RPC- already installed: 1.2.2
Installing build environment: /etc/httpd/lib/php/build/
Installing header files:  /etc/httpd/include/php/
Installing helper programs:   /etc/httpd/bin/
  program: phpize
  program: php-config
  program: phpextdist



[2005-04-05 10:20:19] marcel dot bariou at braasnah dot com

I confirm the pear binary of the package manager is not created



[2005-04-04 19:45:03] [EMAIL PROTECTED]

Get the package again and make sure it's md5sum is one of these:

php-5.0.4.tar.bz2: fb1aac107870f897d26563a9cc5053c0
php-5.0.4.tar.gz: 8edf259bcfab4cfc890a4bb4e7c3649f





[2005-04-04 19:03:27] mbneto at gmail dot com

Description:

Hi,

I've downloaded the 5.0.4 targz and installed on a new server using
the same ./configure settings I use in a nother server that runs php
5.0.3.

I did a make/make install and everything runs fine excepth the fact
that I can no longer pear install  because there is no pear in
/usr/local/bin.

'./configure' '--with-kerberos' '--with-gd' '--with-apxs2'
'--with-xml' '--with-ftp' '--enable-session' '--enable-trans-sid'
'--with-zlib' '--enable-inline-optimization'
'--with-mcrypt=/usr/local' '--enable-sigchild' '--with-gettext'
'--with-freetype' '--with-ttf' '--with-ftp' '--enable-ftp'
'--with-jpeg-dir=/usr' '--with-mysql=/usr/include/mysql'
'--enable-soap' '--with-pear'

PHP itself works fine.






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


#30992 [Fbk-NoF]: Severe misbehavior of script-based class destructors

2005-04-12 Thread php-bugs
 ID:   30992
 Updated by:   php-bugs@lists.php.net
 Reported By:  anthony at ectrolinux dot com
-Status:   Feedback
+Status:   No Feedback
 Bug Type: Zend Engine 2 problem
 Operating System: Gentoo Linux
 PHP Version:  5.0.2
 New Comment:

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.


Previous Comments:


[2005-02-28 21:18:42] [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-12-06 06:11:06] anthony at ectrolinux dot com

Description:

Some of the effects of this bug are outlined in the two bugs that are
referenced at the end of this bug report. As neither of those bugs
outline the actual, underlying cause of the problem, this bug shall do
so.

When working with script-based classes or derivations of built-in PHP
classes, PHP prematurely executes the procedures that would be expected
during script termination, before script termination actually occurs. As
a result of this, before the destructors are called, output buffering is
explicitly terminated, sessions are closed and other pieces of
functionality that are integral to proper script execution are not
available to properly shutdown the script.

Script developers may work-around the bug by explicitly unsetting the
class objects before they would normally go out of scope at the end of
the script, however this method can easily be haphazardly implemented
if there are lingering object references in other sections of the code.

Reproduce code:
---
See bugs:
- #29032
- #30578






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


#30461 [Fbk-NoF]: Failed to Instantiate .Net Object error (again)

2005-04-12 Thread php-bugs
 ID:   30461
 Updated by:   php-bugs@lists.php.net
 Reported By:  dave dot fazio at annulet dot com
-Status:   Feedback
+Status:   No Feedback
 Bug Type: COM related
 Operating System: Server 2003 Standard
 PHP Version:  5CVS-2004-10-16 (dev)
 Assigned To:  wez
 New Comment:

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.


Previous Comments:


[2005-02-13 14:50:51] [EMAIL PROTECTED]

Please try using this CVS snapshot:

  http://snaps.php.net/php5-STABLE-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php5.0-win32-latest.zip





[2004-10-16 22:11:44] dave dot fazio at annulet dot com

Description:

Same error as previsouly described in closed Bug #29490 plus others,
PHP returns error when creating .NET (dotnet) object. 
PHP is installed as ISAPI module.

Reproduceable on all snapshots post 5.2. Confirmed .NET 1.1 framework
installed, arrows-up in iis. Even rebuilt server from scratch - same
error.

Interestingly, refreshing this failed page always produces the more
general PHP has encountered an Access Violation in XX, and this
is repeated with any subsequest COM or DOTNET until IIS is restart.


Reproduce code:
---
?php
  $stack = new DOTNET(mscorlib, System.Collections.Stack);
  $stack-Push(.Net);
  $stack-Push(Hello );
  echo $stack-Pop() . $stack-Pop();
?


Expected result:

Hello .Net

Actual result:
--
First time executed:


Fatal error: Uncaught exception 'com_exception' with message 'Failed
to instantiate .Net object [CreateInstance] [0x80070057] The parameter
is incorrect. ' in C:\webtest\test-3.php:16 Stack trace: #0 {main}
thrown in C:\webtest\test-3.php on line 16

All subsequent attempts until IIS restart:
--

PHP has encountered an Access Violation at 01106AED





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


#31626 [Fbk-NoF]: calling ereg_replace before pspell_new crashes pspell

2005-04-12 Thread php-bugs
 ID:   31626
 Updated by:   php-bugs@lists.php.net
 Reported By:  bram dot dejong at gmail dot com
-Status:   Feedback
+Status:   No Feedback
 Bug Type: Pspell related
 Operating System: Windows XP
 PHP Version:  5.0.3
 New Comment:

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.


Previous Comments:


[2005-02-28 20:59:34] [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-01-24 11:55:07] bram dot dejong at gmail dot com

Hi tony,

no idea how those two syntax errors got there, however, the bug is
still there:

This works (same output as before):

pre
?
  $pspell_link = pspell_new(en);

  $string = ereg_replace(squeek,squaak,squobble);

  $pspell_result = pspell_suggest($pspell_link, help);

  print_r($pspell_result);
?
/pre

This doesn't:

pre
?
  $string = ereg_replace(squeek,squaak,squobble);

  $pspell_link = pspell_new(en);

  $pspell_result = pspell_suggest($pspell_link, help);

  print_r($pspell_result);
?
/pre

For the most basic version:

  $string = ereg_replace(squeek,squaak,squobble);
  $pspell_link = pspell_new(en);

DOESN'T work, while

  $pspell_link = pspell_new(en);
  $string = ereg_replace(squeek,squaak,squobble);

DOES work.

For the exact error messages, see my first post.

I tried exactly the same on another installation of PHP/pspell (5.0.3
as well) I have on a different computer and there it DOESN'T crash. If
there are any additional tests I can run, let me know.



[2005-01-21 00:02:45] [EMAIL PROTECTED]

Pay attention to double $ here:
print_r(pspell_suggest($$pspell_link, $string1));
And try again.



[2005-01-20 17:25:47] bram dot dejong at gmail dot com

Description:

Calling ereg_replace before pspell_new crashes pspell.

pspell_new *only* fails when calling ereg_replace before it (i.e. I
haven't witnessed any other crashes yet...)

Pspell is installed following this guide (and all is working):
http://www.oblius.com/?.blogs.184

Changes in php.ini file:
extension=php_pspell.dll

Reproduce code:
---
?
  $string1 = heeelp;
  $string2 = ereg_replace(squeek,squaak,$string1);
  $pspell_link = pspell_new(en, , , , PSPELL_FAST);
  print_r(pspell_suggest($$pspell_link, $string1)
?

Expected result:

when I comment this line:
// $string2 = ereg_replace(squeek,squaak,$string1);

the result is:

Array
(
[0] = help
[1] = Heep
[2] = heel
[3] = heeler
[4] = heeled
[5] = heels
[6] = whelp
[7] = helps
[8] = helper
[9] = harelip
[10] = hep
[11] = Helen
[12] = hello
[13] = heel's
)

Actual result:
--
Warning:  pspell_new() [function.pspell-new]: PSPELL couldn't open the
dictionary. reason: No word lists can be found for the language en. 
in c:\Apache\htdocs\Work\bug.php on line 5


Warning:  pspell_suggest() [function.pspell-suggest]: 0 is not a PSPELL
result index in c:\Apache\htdocs\Work\bug.php on line 6





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


#30841 [Fbk-NoF]: get_headers failing incorrectly, and not working as expected.

2005-04-12 Thread php-bugs
 ID:   30841
 Updated by:   php-bugs@lists.php.net
 Reported By:  ewhite at stsci dot edu
-Status:   Feedback
+Status:   No Feedback
 Bug Type: HTTP related
 Operating System: Solaris 8
 PHP Version:  5.0.2
 New Comment:

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.


Previous Comments:


[2005-03-06 19:12:14] [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-01-25 15:48:14] 1 at 1 dot mcmichaelps1 dot at dot hotmail dot
dot dot com

I have encountered a very similar bug in php 5.0.1 on Windows 2000
running IIS 5.0 - using the pre-compiled binaries and php configured
through ISAPI.



[2004-11-19 19:14:01] ewhite at stsci dot edu

Just realized I forgot to mention.

This was being run via command-line php of course.  triggered from the
cron job.



[2004-11-19 19:12:51] ewhite at stsci dot edu

Description:

I recently wrote a script to check my webservers every 4 minutes (run
via cron) to see if they were still alive.

I opted to use get_headers to do this for simplicity.

The program looped through a config of 20+ some servers, calling
get_headers on their root index page, checking for errors to come from
that, and reporting if the server did not respond.

get_headers then proceeded to show problems with this.  Unfortunately
these problems were not consistant, nor directly repeatable, yet did in
fact happen every hour or so at random intervals when the script ran.

The problems that surfaced were:

A) At times, get_headers would exit, failed, and $php_errormsg would
contain: Connection still in progress.  This should only occur on a
non-blocking request, and get_headers should be blocking.

B) Also at times, it would fail, and errormsg would be: HTTP request
failed! ... Yet looking at the server logs, the request was handled
and finished correctly.

C) Similarly, on one particular website that had a redirect on it's
homepage, instead of completely successfully with a 301 response, it
again failed, and errormsg was: HTTP request failed! HTTP/1.1 301
Moved Permanently

All of these errors would not happen every time the script ran, but
just 'sometimes'.  Yet regularly enough to fill my mailbox with false
website errors.

Recoding my script later to use Net_HTTP_Client, which I would have
used in the first place if not for the handy existance of get_headers,
now works perfectly fine.

While I'm reporting this, I would like to add another problem, and a
'using it' problem:

P1) It's get_headers, yet it is making a full GET / request instead of
a HEAD / request.  Not expected functionality, and overkill there.

P2) Just for the using of the function, it would be nice if it had an
easier way of returning some of the error codes.  Since get_headers()
actually FAILS in there is a 403, or 401.  I would prefer myself that
it still exited normally, with the headers that were in fact sent back,
and I can parse the 401/403 info from the array.  The request didn't
really fail, it just returned a 401, that may have been (and was in
this case) what I wanted.   Therefore, I had to write in the code that
if there was an error (false was returned), that I then had to scan the
$php_errormsg to see if a 401 or 403 was returned, in which case it
actually did work.
   IMO, if the server returns properly, get_headers should return the
headers that were given.  Not fail and flag it in errormsg.

Reproduce code:
---
$out = @get_headers(http://web.site.com:80/;);

However, as stated, run this in a script on 20+ servers in a row, and
run it every 4 minutes.

Expected result:

I expect it to properly contact the server, and return the headers. 
Not error when it was actually a completed request.






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


#29138 [Fbk-NoF]: Need recompilation to make SSL work for FTP in Windows.

2005-04-12 Thread php-bugs
 ID:   29138
 Updated by:   php-bugs@lists.php.net
 Reported By:  danielakesson at hotmail dot com
-Status:   Feedback
+Status:   No Feedback
 Bug Type: FTP related
 Operating System: Windows XP
 PHP Version:  5.0.0
 New Comment:

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.


Previous Comments:


[2005-03-06 20:41:28] [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-14 10:55:21] danielakesson at hotmail dot com

Forgot to mention that yes, I copied the libeay32.dll and the
ssleay32.dll to system32 folder. Didnt make any difference!



[2004-07-14 10:30:58] danielakesson at hotmail dot com

Description:

Hey,

This have apparently been up before, but I was hoping for an easier
fix. Now, I have OpenSSL and ftpfunctions working.

Both:
ftp_connect(localhost, 21);
$privkey = openssl_pkey_new();

Works without any complaints.

However! To make SSL work with ftp on Windows one have to recompile the
binary with SSL support!
If I got it right, according to the docs on php.net, it states that the
ftp_ssl_connect(...) function should be there if OpenSSL is enabled
aswell as the FTP functions. Well, I have them enabled but php says:
Fatal error: Call to undefined function ftp_ssl_connect()


http://bugs.php.net/bug.php?id=23995

The fixed .zip just includes the recompiled php4ts.dll (which makes the
ftp_ssl_connect() availble). (Also, the fixed .dll file I've tested
forced me to disable the OpenSSL extension, because else I had
Duplicate name error)

Im not sure how you have implemented this, but it would be nice if the
ftp_ssl_connect function actually was there, when both of those
extensions were enabled (OpenSSL and FTP - although ftp is build in in
Windows)

Or, if that .dll file is included aswell (or, why not have it enabled
by default for windows?) As I can see if, its just one function... I
mean, why all the trouble for a Windows user just to make this funtion
work?

Thank you,
Daniel






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


#30333 [Fbk-NoF]: fscanf() and() not working correctly with other then English language

2005-04-12 Thread php-bugs
 ID:   30333
 Updated by:   php-bugs@lists.php.net
 Reported By:  altuhov at nm dot ru
-Status:   Feedback
+Status:   No Feedback
 Bug Type: Filesystem function related
 Operating System: WinXP SP2
 PHP Version:  5CVS
 New Comment:

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.


Previous Comments:


[2005-03-07 22:05:14] [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-11-28 19:35:50] altuhov at nm dot ru

YES!
Todays PHP-5.1-dev build



[2004-11-28 13:43:18] [EMAIL PROTECTED]

Do you still expirience this problem?



[2004-10-12 19:47:32] altuhov at nm dot ru

Yes. Windows-1251.
Reproduce code was writed and saved in the Notepad.



[2004-10-12 19:40:43] [EMAIL PROTECTED]

Is the russian locale used by winxp the same locale as the one used by
the document?



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

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


#30650 [Fbk-NoF]: windows based clients do not receive full output from shell_exec

2005-04-12 Thread php-bugs
 ID:   30650
 Updated by:   php-bugs@lists.php.net
 Reported By:  eslick dot 1 at osu dot edu
-Status:   Feedback
+Status:   No Feedback
 Bug Type: Program Execution
 Operating System: win32 only
 PHP Version:  4.3.9
 New Comment:

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.


Previous Comments:


[2005-02-03 04:45:54] [EMAIL PROTECTED]

Please try using this CVS snapshot:

  http://snaps.php.net/php4-STABLE-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php4-win32-STABLE-latest.zip





[2004-11-01 14:02:01] eslick dot 1 at osu dot edu

Description:

Running php4.3.9 on IIS 6 Win2k3.  Same issue reproducable on Linux
Apache set.  Any *nix based client is able to correctly run a
shell_exec script and receive full output.  Any windows based client,
regardless of browser, fails with only a partial set of the data
returned.

Reproduce code:
---
$t_cmd = netsh dhcp server 10.1.1.1 dump;




$output = shell_exec($t_cmd) or die (could not get dhcp);



$output = explode(\n,$output);



print_r($output);

Expected result:

Array of entire dhcp dump.  Does work from *nix based clients.

Actual result:
--
Only first 3-4 parts of array are returned on Windows based clients 





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


#32170 [Fbk-NoF]: com_event_sink does not take default event interface

2005-04-12 Thread php-bugs
 ID:   32170
 Updated by:   php-bugs@lists.php.net
 Reported By:  jeanpierre dot vincent at gmail dot com
-Status:   Feedback
+Status:   No Feedback
 Bug Type: COM related
 Operating System: windows 2000, xp
 PHP Version:  5.0.1
 New Comment:

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.


Previous Comments:


[2005-03-09 21:40:33] [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-03-09 11:48:01] jeanpierre dot vincent at gmail dot com

with this version we have a big regression,it does not solve the bug
and a simple example of catching DocumentComplete event of WebBrowser
does not work as before : it's not even called.



[2005-03-04 10:00:12] [EMAIL PROTECTED]

Please try using this CVS snapshot:

  http://snaps.php.net/php5-STABLE-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php5.0-win32-latest.zip



[2005-03-03 12:14:01] jeanpierre dot vincent at gmail dot com

Description:

the function com_event_sink is documented like this:
bool com_event_sink ( variant comobject, object sinkobject [, mixed
sinkinterface] ).
but the sinkinterface  does not take value of the default com object
event interface so optional is useless because the developper must know
all default object event sink interface.
 

Reproduce code:
---
?php
class IEEventSinker {
  var $terminated = false;

// when all objects of page are loaded
function DocumentComplete($dom, $url) {
GLOBAL $ie;
$GLOBALS['elem']=$ie-document-getElementById('test');
if ($GLOBALS['elem']!=null)
{
com_event_sink($GLOBALS['elem'],$this 
/*,'HTMLAnchorEvents'*/);

}


}
// when closing browser
function OnQuit() {
echo Quit!\n;
$this-terminated = true;
}
// when clicking in url
function onclick() {
echo click!\n;

}

}
$ie = new COM(InternetExplorer.Application);
// note that you don't need the  for PHP 5!
$sink = new IEEventSinker();
com_event_sink($ie, $sink, DWebBrowserEvents2);
$ie-Visible = true;

$ie-Navigate('c:\test.html');
while(!$sink-terminated) {
  com_message_pump(4000);
}
$ie = null;
?
/
c:\test.html

html
body 
A id='test' href='#'test/A
/body
/html





Expected result:

browser is launching, navigate on test.html file.
when we click to url test the message is to be written in the console
:
 
Click!

Actual result:
--
no message written.





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


#29698 [Fbk-NoF]: include suite does not traverse include_path subdirectories

2005-04-12 Thread php-bugs
 ID:   29698
 Updated by:   php-bugs@lists.php.net
 Reported By:  mills at sinetechnologies dot com
-Status:   Feedback
+Status:   No Feedback
 Bug Type: Zend Engine 2 problem
 Operating System: Win XP
 PHP Version:  5.0.1
 New Comment:

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.


Previous Comments:


[2005-03-07 20:25:39] [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

And copy the provided php.ini-dist over your php.ini..




[2004-08-19 04:51:42] mills at sinetechnologies dot com

Changing the '.' to './' had no success on the problem. 

Also, I cannot directly call C:\Program Files\Apache
Group\Apache\php\include\phrame\util\HashMap.php (it is two directories
below the include directory). 

But I can directly call C:\Program Files\Apache
Group\Apache\php\include\include.php

Permissions on the files are the same.



[2004-08-18 12:25:46] scooter at butterball dot demon dot co dot uk

Hi,

We have resolved this bug on our Solaris box.

The php.ini file was still the old php4 version, we installed the php5
version of the php.ini file and now recursive includes work fine on the
Solaris box.  

They always worked on the Fedora box, but it had the php5 .ini file
installed from the start.

Not sure if this is a solution to the apparent bug on Win XP, but it
worked for us.

One last point the include_path on the php.ini file was the only
element changed from the default, the '.' was changed to './' - this
may also be important.

Scooter



[2004-08-16 08:33:57] mills at sinetechnologies dot com

Description:

This is new for PHP5. PHP4 works as expected. 

Using require_once as the test, and having a properly set up include
path, require_once does not travel farther down the include_path to
locate files to include. 

Same behavior in cgi and module implementations. 

For example, take the following include path: 
include_path = .;C:\Program Files\Apache Group\Apache\php\include

In the include directory is another directory called 'phrame'

The phrame directory contains files and folders. The file 'include.php'
contains other include calls such as include( 'util/Object.php'); (the
location of which is C:\Program Files\Apache
Group\Apache\php\include\phrame\util\Object.php) This should use . and
then find the util/Object.php. It does in PHP4, but not in PHP5. 

It looks like the parser is only going one directory deep when
searching for files, and not allowing recursive calls. For PHP4, it
works as expected, and all files are included, but PHP5 only goes one
directory deep, and fails for subdirectories. 

This makes implementing projects built with PHP4 and extending them
with PHP5 a nightmare for both server administrators and developers.

Directory Structure Summary:  

/include
/phrame
include.php
/util
/Object.php



Reproduce code:
---
//load include page which loads other needed pages
require_once 'phrame/include.php'; 

//directly load a needed page for test purposes. 
require_once 'phrame/util/Object.php';

Expected result:

//in PHP4
//include loaded and all other pages loaded
require_once 'phrame/include.php';
 
//a direct call to this page gets loaded. 
require_once 'phrame/util/Object.php';

Actual result:
--
//in PHP5
//partial works, include.php is included if blank,
//but because of other include calls, the require_once
//causes this page to fail to load.
require_once 'phrame/include.php'; 

//does not work! page fails to load 
require_once 'phrame/util/Object.php';





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


#31693 [Fbk-NoF]: ORA-01001: invalid cursor after invoking oci-fetch-all function

2005-04-12 Thread php-bugs
 ID:   31693
 Updated by:   php-bugs@lists.php.net
 Reported By:  Tomasz dot Fryc at bph dot pl
-Status:   Feedback
+Status:   No Feedback
 Bug Type: OCI8 related
 Operating System: Windows 2003 Server
 PHP Version:  5.0.3
 New Comment:

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.


Previous Comments:


[2005-02-28 20:57:51] [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-02-17 11:16:39] Tomasz dot Fryc at bph dot pl

Here is procedure, which described PHP code invokes (in this case $sql
variable looks as follows: begin
MOA.MOA_EVENT_PKG.GetEventList('param1','param2',...); end;):

PROCEDURE GetEventsList
(
  P_UGP_ID IN NUMBER,
  P_HST_ID IN NUMBER,
  P_HST_GRP_ID IN NUMBER,
  P_DAYS IN NUMBER,
  P_CURSOR OUT c_event,
  P_ERR_CODE OUT NUMBER,
  P_ERR_DESC OUT VARCHAR2
)
IS
BEGIN
   IF P_HST_ID = 0 AND P_HST_GRP_ID = 0 THEN
  OPEN P_CURSOR FOR
  SELECT EVT_ID, EVT_ETD_ID, EVT_HST_ID, HST_NAME, SYS_ID, SYS_NAME,
EVT_TYPE, EVT_SMS,
 EVT_CLASS, EVT_BEEPS, EVT_LEVEL, 
TO_CHAR(EVT_DATE,'.MM.DD
HH24:MI:SS') EVT_DATE, EVT_STATE, EVT_MESSAGE
  FROM
  (
 SELECT EVT_ID, EVT_ETD_ID, EVT_HST_ID, HST_NAME, 
SYS_ID,
SYS_NAME, EVT_TYPE, EVT_SMS,
EVT_CLASS, EVT_BEEPS, EVT_LEVEL, EVT_DATE, 
EVT_STATE,
EVT_MESSAGE
 FROM MOA_EVENTS, MOA_HOST, MOA_SYSTEM, MOA_EVENT_USERS
 WHERE EVT_HST_ID = HST_ID
   AND HST_SYS_ID = SYS_ID
   AND EVT_ETD_ID = EUS_ETD_ID
   AND EUS_UGP_ID = P_UGP_ID
   AND HST_VISIBLE = 1
   AND SYS_ACTIVE = 1
   AND SYS_VISIBLE = 1
--   AND EVT_DATE  sysdate - P_DAYS
 ORDER BY EVT_ID DESC
  )
  WHERE ROWNUM = 100;

  RETURN ;
   END IF;

   IF P_HST_ID = 0 AND P_HST_GRP_ID  0 THEN
  OPEN P_CURSOR FOR
  SELECT EVT_ID, EVT_ETD_ID, EVT_HST_ID, HST_NAME, SYS_ID, SYS_NAME,
EVT_TYPE, EVT_SMS,
 EVT_CLASS, EVT_BEEPS, EVT_LEVEL, 
TO_CHAR(EVT_DATE,'.MM.DD
HH24:MI:SS') EVT_DATE, EVT_STATE, EVT_MESSAGE
  FROM
  (
 SELECT EVT_ID, EVT_ETD_ID, EVT_HST_ID, HST_NAME, 
SYS_ID,
SYS_NAME, EVT_TYPE, EVT_SMS,
EVT_CLASS, EVT_BEEPS, EVT_LEVEL, EVT_DATE, 
EVT_STATE,
EVT_MESSAGE
 FROM MOA_EVENTS, MOA_HOST, MOA_SYSTEM, MOA_EVENT_USERS
 WHERE EVT_HST_ID = HST_ID
   AND HST_SYS_ID = SYS_ID
   AND HST_GROUP = P_HST_GRP_ID
   AND EVT_ETD_ID = EUS_ETD_ID
   AND EUS_UGP_ID = P_UGP_ID
   AND HST_VISIBLE = 1
   AND EVT_DATE  SYSDATE - P_DAYS
   AND SYS_ACTIVE = 1
   AND SYS_VISIBLE = 1
 ORDER BY EVT_ID DESC
  )
  WHERE ROWNUM = 100;

  RETURN ;
   END IF;

   IF P_HST_ID  0 AND P_HST_GRP_ID = 0 THEN
  OPEN P_CURSOR FOR
  SELECT EVT_ID, EVT_ETD_ID, EVT_HST_ID, HST_NAME, SYS_ID, SYS_NAME,
EVT_TYPE, EVT_SMS,
 EVT_CLASS, EVT_BEEPS, EVT_LEVEL, 
TO_CHAR(EVT_DATE,'.MM.DD
HH24:MI:SS') EVT_DATE, EVT_STATE, EVT_MESSAGE
  FROM MOA_EVENTS, MOA_HOST, MOA_SYSTEM, MOA_EVENT_USERS
  WHERE EVT_HST_ID = HST_ID
AND HST_SYS_ID = SYS_ID
AND HST_ID = P_HST_ID
AND EVT_ETD_ID = EUS_ETD_ID
AND EUS_UGP_ID = P_UGP_ID
AND EVT_DATE  SYSDATE - P_DAYS
AND HST_VISIBLE = 1
AND SYS_ACTIVE = 1
AND SYS_VISIBLE = 1
  ORDER BY EVT_ID DESC;

  RETURN ;
   END IF;

   IF P_HST_ID  0 AND P_HST_GRP_ID  0 THEN
  OPEN P_CURSOR FOR
  SELECT EVT_ID, EVT_ETD_ID, EVT_HST_ID, HST_NAME, SYS_ID, SYS_NAME,
EVT_TYPE, EVT_SMS,
 EVT_CLASS, EVT_BEEPS, EVT_LEVEL, 
TO_CHAR(EVT_DATE,'.MM.DD
HH24:MI:SS') EVT_DATE, EVT_STATE, EVT_MESSAGE
  FROM MOA_EVENTS, MOA_HOST, MOA_SYSTEM, MOA_EVENT_USERS
  WHERE EVT_HST_ID = HST_ID
AND HST_SYS_ID = SYS_ID
AND HST_GROUP = P_HST_GRP_ID
AND EVT_HST_ID = P_HST_ID
AND EVT_ETD_ID = EUS_ETD_ID
AND EUS_UGP_ID = P_UGP_ID
AND EVT_DATE  SYSDATE - P_DAYS

#31085 [Fbk-NoF]: invalid feof() results due to Zend's caching of user stream wrappers

2005-04-12 Thread php-bugs
 ID:   31085
 Updated by:   php-bugs@lists.php.net
 Reported By:  php at webdevelopers dot cz
-Status:   Feedback
+Status:   No Feedback
 Bug Type: Filesystem function related
 Operating System: Linux 2.6.6 (gcc 3.3.4)
 PHP Version:  5.0.2
 Assigned To:  wez
 New Comment:

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.


Previous Comments:


[2005-02-28 21:16:33] [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-01-24 02:26:58] [EMAIL PROTECTED]

Returning !feof() in stream_eof() seems to 'fix' this.

 looks like the LIVENESS test in main/streams/userspace.c:838 uses
reverse logic?



[2004-12-14 11:41:28] php at webdevelopers dot cz

Description:

PHP caches the userarea wrappers - it results for example
to WRAPPER::stream_read(8192) call by PHP even if the user issued
fread($f, 10);
If the file is for example 20 bytes long then user gets EOF immediately
after
first fread($f, 10) because PHP cached it by calling
WRAPPER::stream_read(8192) instead!

Example:
(file size is 20 bytes)
user: $f=fopen(..., 'r');
zend: stream_open(...);
zend: stream_read(8192); // And we immediately get EOF in my example
(8192  20)
user: fread($f, 10); // Reads first 10 bytes
user: feof($f);
zend: stream_eof(...); // Result is TRUE thus when feof() used in
cyclus it does not iterate even if there are 10 bytes more in this
example.


Reproduce code:
---
stream_wrapper_register('xyz', 'MyStream') or die('Failed to register X
protocol.');
test('xyz://me.txt');
test('./test_me2.txt');
function test($fileName) {
  echo TEST: $fileName\n;
  $f=fopen($fileName, 'w+'); fwrite($f, '123456789'); fclose($f);
  $f=fopen($fileName, 'r');
  while(!feof($f)) { echo [.fread($f, 5).]\n;}
  fclose($f);
}
class MyStream {
  private $f;
  function stream_open($path, $mode, $options, $opened_path) {
$path=str_replace('xyz://', './test_', $path);
return (bool) $this-f=fopen($path, $mode);
  }
  function stream_read($count) {return fread($this-f, $count);}
  function stream_write($data) {return fwrite($this-f, $data);}
  function stream_tell() {return ftell($this-f);}
  function stream_eof() {return feof($this-f);}
  function stream_seek($offset, $whence) {return fseek($this-f,
$offset, $whence);}
  function stream_close() {return fclose($this-f);}
}


Expected result:

TEST: xyz://me.txt
[12345]
[6789]
TEST: ./test_me2.txt
[12345]
[6789]


Actual result:
--
TEST: xyz://me.txt
TEST: ./test_me2.txt
[12345]
[6789]






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


#31601 [Fbk-NoF]: static variable-initialisation varies depending on construction scope

2005-04-12 Thread php-bugs
 ID:   31601
 Updated by:   php-bugs@lists.php.net
 Reported By:  phpbugs at kaiundina dot de
-Status:   Feedback
+Status:   No Feedback
 Bug Type: Zend Engine 2 problem
 Operating System: Win XP prof/Apache 2
 PHP Version:  5.0.2
 New Comment:

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.


Previous Comments:


[2005-02-28 21:00:38] [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-01-19 00:19:20] phpbugs at kaiundina dot de

Description:

I have the following problem using the 'self'-operator for static
variable initialisation:

I created a class ('Item' in the reproduce code) persisting of the
following elements:
- class-constants containing key-strings
- a static variable containing an array using the above constants as
associative keys. The array was preinitialized with some values. As
nonation for the keys I used 'self::CONST_NAME' ('self::ARRAY_KEY' in
the example)

The following situations occurred:

case 1:
The first instance was created in scope of another class'  constructor
('Container' in the example).

First I wondered why he was throwing a notice telling me the constant
called 'self::ARRAY_KEY' didn't exist, then I figured out that he was
searching for it in the wrong class. He tried to use the class
'Container' to initialize the static members of the 'Item' class.
Declaring the constant in the 'Container'-class again caused the
message to disappear.

case 2:
A dummy instance was created in scope of the class holding the static
member.

Now everything worked fine. The class' constructor was called from a
static method of the same class.

case 3:
I tried to directly access the static member (array) from outside any
class without having created an instance of it before.

In this case I receive a fatal error telling me Cannot access self::
when no class scope is active


A workaround would be to omit the self-operator when used in
static-initialisations and use the class' name instead.


another strange thing (might be a different bug - please tell me if it
is):
When the static array is filled and returned, the key's order is
different from that specified in the source. Entries having constant
keys (literally entered in the source code) appear before those
receiving their key from a class-constant. Each 'group' is ordered as
expected for itself.


let me know, if the needed information is complete.

thanks for processing

Reproduce code:
---
http://kaiundina.de/bugs/selfbug.php5.txt

(The switch block at the end of the code shows the different use cases
and their respective output)

Expected result:

The static members should be initialized using the constants as
declared in the own class rather than using constants declared in the
scope of the script that creates the first instance of the class.

In other words:
The 'self' operator should always refer to the class in which it
appears when used for initialisation of static members.

Actual result:
--
The 'self'-operator, when used for initialisation of static members,
refers to the class (if present) that executes the first
'new'-statement for the class containing the static member.





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


#29886 [Fbk-NoF]: segment fault when processing curl output with wrapper-registered stream

2005-04-12 Thread php-bugs
 ID:   29886
 Updated by:   php-bugs@lists.php.net
 Reported By:  public at grik dot net
-Status:   Feedback
+Status:   No Feedback
 Bug Type: cURL related
 Operating System: Linux
 PHP Version:  5CVS-2004-08-30 (dev)
 New Comment:

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.


Previous Comments:


[2005-03-08 10:44:17] [EMAIL PROTECTED]

Set to feedback until real feedback has been provided.



[2005-03-08 09:35:39] public at grik dot net

Thank you, I'll try with the new version today.



[2005-03-07 21:33:34] [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

I can't get it to crash..




[2004-08-30 02:08:19] public at grik dot net

Description:

I register a wrapper, create a stream and pass the pointer to the
curl_setopt to process CURL output.
When amount of data returned by CURL exeeds 8192 bytes (size of the
CURL buffer), PHP ends with Segmentation fault.

I could not reach the crash using fwrite().

Similar problem was in PHP 4.3.3, in 4.3.7 everything works fine.
I detected this problem again in 5.0.0 and replicated it in the latest
stable CSV.

I do not know if it happens upon shutdown and if it is relevant to bug
#29358. This happens with CURL only.

Reproduce code:
---
The sample code can be found at:
http://www.grik.net/sample.phps

Can be run form command line:
php -f sample.php

Expected result:

In PHP 4.3.7 this script would output the amount of bytes obtained from
CURL:

8192
8192
...

Actual result:
--
In PHP 5.0.0:

8192
8192
Segmentation fault

Backtrace (I am not enough good with gdb, could not locate):

(gdb) bt
#0  0x081f714a in _zval_copy_ctor (zvalue=0x8344684,
__zend_filename=0x8273780
/usr/src/web/php5-STABLE-200408292230/Zend/zend_execute.c,
__zend_lineno=3001) at
/usr/src/web/php5-STABLE-200408292230/Zend/zend_variables.c:136
#1  0x08227ab6 in zend_send_by_var_helper (execute_data=0xbfffb210,
opline=0x8349e38, op_array=0x834b0e4)
at /usr/src/web/php5-STABLE-200408292230/Zend/zend_execute.c:3001
#2  0x08221824 in zend_send_var_handler (execute_data=0xbfffb210,
opline=0x8349e38, op_array=0x834b0e4)
at /usr/src/web/php5-STABLE-200408292230/Zend/zend_execute.c:3061
#3  0x0821cb76 in execute (op_array=0x834b0e4)
at /usr/src/web/php5-STABLE-200408292230/Zend/zend_execute.c:1400
#4  0x081ed157 in zend_call_function (fci=0xbfffb370, fci_cache=0x0)
at
/usr/src/web/php5-STABLE-200408292230/Zend/zend_execute_API.c:835
#5  0x081ec1a9 in call_user_function_ex (function_table=0x0,
object_pp=0x82e5f00,
function_name=0xbfffb400, retval_ptr_ptr=0xbfffb3fc, param_count=1,
params=0xbfffb3f0,
no_separation=0, symbol_table=0x0)
at
/usr/src/web/php5-STABLE-200408292230/Zend/zend_execute_API.c:550
#6  0x081cd58c in php_userstreamop_write (stream=0x83446c4,
buf=0x4003 !DOCTYPE HTML PUBLIC \-//W3C//DTD HTML 4.01
Transitional//EN\\nhtml\nhead\n titlePHP: Hypertext
Preprocessor/title\n link rel=\stylesheet\
href=\http://static.php.net/www.php.net/style.css\; /\n...,
count=8192)
at
/usr/src/web/php5-STABLE-200408292230/main/streams/userspace.c:459
#7  0x081c539d in _php_stream_write_buffer (stream=0x83446c4,
buf=0x4003 !DOCTYPE HTML PUBLIC \-//W3C//DTD HTML 4.01
Transitional//EN\\nhtml\nhead\n titlePHP: Hypertext
Preprocessor/title\n link rel=\stylesheet\
href=\http://static.php.net/www.php.net/style.css\; /\n...,
count=8192) at
/usr/src/web/php5-STABLE-200408292230/main/streams/streams.c:889
#8  0x081c561f in _php_stream_write (stream=0x83446c4,
buf=0x4003 !DOCTYPE HTML PUBLIC \-//W3C//DTD HTML 4.01
Transitional//EN\\nhtml\nhead\n titlePHP: Hypertext
Preprocessor/title\n link rel=\stylesheet\
href=\http://static.php.net/www.php.net/style.css\; /\n...,
count=8192) at
/usr/src/web/php5-STABLE-200408292230/main/streams/streams.c:1000
#9  0x081c7c66 in stream_cookie_writer (cookie=0x83446c4,
buffer=0x4003 !DOCTYPE HTML PUBLIC \-//W3C//DTD HTML 4.01
Transitional//EN\\nhtml\nhead\n titlePHP: Hypertext
Preprocessor/title\n link rel=\stylesheet\
href=\http://static.php.net/www.php.net/style.css\; /\n...,
size=8192) at
/usr/src/web/php5-STABLE-200408292230/main/streams/cast.c:96
#10 0x42062019 in _IO_cookie_write () from /lib/tls/libc.so.6
#11 0x4206d09e in new_do_write () from /lib/tls/libc.so.6
#12 0x4206d036 in _IO_new_do_write () from /lib/tls/libc.so.6
#13

#32537 [Fbk-NoF]: Segmentation faults and random errors with PostgreSQL 8 and persistence

2005-04-12 Thread php-bugs
 ID:   32537
 Updated by:   php-bugs@lists.php.net
 Reported By:  mauroi at digbang dot com
-Status:   Feedback
+Status:   No Feedback
 Bug Type: PostgreSQL related
 Operating System: Linux
 PHP Version:  5.0.3
 New Comment:

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.


Previous Comments:


[2005-04-05 00:08:15] [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

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.





[2005-04-05 00:03:19] mauroi at digbang dot com

same result...



[2005-04-03 03:24:16] [EMAIL PROTECTED]

Please try using this CVS snapshot:

  http://snaps.php.net/php5-STABLE-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php5.0-win32-latest.zip





[2005-04-02 02:04:05] mauroi at digbang dot com

The following class (code) causes a segmentation fault if it has the
ROLLBACK query in the destructor.
It results in a segfault always if it's executed as a command line
script, and sometimes if it's called by a web request (lots of calls
repeteadly and with persistence).
The extension code (pgsql.c) has a feature which automatically close
every query result that was left opened. But I think that it's pretty
acceptable to have a script like this one.
?
class db
{
public function __construct($string)
{
$this-handle = pg_pconnect($string);
$this-Execute('BEGIN');
}

public function Commit()
{
$this-execute('COMMIT');
$this-execute('BEGIN');
}

public function Execute($query)
{
$res = pg_query($this-handle, $query);
pg_affected_rows($res);
pg_free_result($res);
}

public function __destruct()
{
$this-execute('ROLLBACK');
pg_close($this-handle);
}

private $handle;
}

$c = new db([connection string]);
$c-execute(SELECT 1);
$c-Commit();
?



[2005-04-01 18:29:01] [EMAIL PROTECTED]

Not enough information was provided for us to be able
to handle this bug. Please re-read the instructions at
http://bugs.php.net/how-to-report.php

If you can provide more information, feel free to add it
to this bug and change the status back to Open.

Thank you for your interest in 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/32537

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


#29044 [Fbk-NoF]: compact function doesn't take account of infinitly recursive arrays

2005-04-12 Thread php-bugs
 ID:   29044
 Updated by:   php-bugs@lists.php.net
 Reported By:  tomas_matousek at hotmail dot com
-Status:   Feedback
+Status:   No Feedback
 Bug Type: Reproducible crash
 Operating System: *
 PHP Version:  5.0.0RC3
 New Comment:

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.


Previous Comments:


[2005-03-06 20:36:46] [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-07 11:13:40] tomas_matousek at hotmail dot com

I don't think it very hard. You can add a flag to each array, e.g. bool
visited, which will be false on array creation. You set the flag to true
when going down the recursion and clears it on return. Than it suffice
to test whether the flag has been set.

Functions such print_r does detect recursion in some way.



[2004-07-07 11:05:41] [EMAIL PROTECTED]

Nothing much we could do about it. 
Detecting a recursion at the same level, as in your example, is easy
but detecting multi-level recursion is very hard. Also it would slow
down the function very much and require lots of memory when it is used
with multi level arrays.

Maybe we can disallow array references or something like that. Patch is
here:

http://marcus-boerger.de/php/ext/bug29044.diff.txt

please try.



[2004-07-07 10:39:37] tomas_matousek at hotmail dot com

Description:

The compact() function crashes (terminates PHP process) if an array
with infinite recursion is passed to it.

Reproduce code:
---
$a = array($a);
compact($a);

Expected result:

none

Actual result:
--
crash





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


#30525 [Fbk-NoF]: mysql_close() fails in some situations with shared links

2005-04-12 Thread php-bugs
 ID:   30525
 Updated by:   php-bugs@lists.php.net
 Reported By:  l dot cameron2 at ugrad dot unimelb dot edu dot au
-Status:   Feedback
+Status:   No Feedback
 Bug Type: MySQL related
 Operating System: Fedora Core 2
 PHP Version:  5.0.2
 New Comment:

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.


Previous Comments:


[2005-03-07 22:31:13] [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

..and update the version field if this still happens, otherwise close
this report.




[2004-10-22 06:19:48] l dot cameron2 at ugrad dot unimelb dot edu dot
au

Description:

Preface: I *do* understand that by default MySQL connections are shared
in PHP.
 I also note that in older versions a single mysql_close() would close
all of the links; see #9107: there now there appears to be reference
counting before finally closing the TCP connection -- which is IMHO
better than the older behaviour, but the implementation has its own
bugs:

 PHP appears to keeps an internal count of the number of times a link
has been duplicated. When the link count is = 0, the underlying TCP
connection is actually closed.
 * close() reduces the link count by 1
 * setting the connection to null *also* reduces the link count by 1 --
even if that link has already been close()d

 Currently the only workarounds for this are to:

[1] Set new_link to true every time you mysql_connect() -- potentially
creating a lot of TCP connections and slowing the program down

[2] close() the link, but never set it to null and hope that PHP won't
clean it up until the end of the program: This *will* fail sometimes
though; see the example at http://www.levi.id.au/mysql4.php.txt

[3] Never mysql_close() links, only set them to null and hope that PHP
will in fact clean up the TCP connection before MySQL runs out of
available connections (admittedly only a problem when you have a lot of
simultaneous connections to your database) -- this does work now, but
we're not supposed to assume anything about when PHP does its object
destruction.

 The third is really the only viable solution; but is dependent on the
internal implementation of the MySQL extension.



 At best, the current situation is that if you ever have shared links,
you should never call mysql_close if you ever expect to use that
database again in your program.

Reproduce code:
---
Simple example:

#!/usr/local/bin/php -q
?
$conn1 = mysql_connect('localhost:3306', 'levi', 'DaCr0n!');
$conn2 = mysql_connect('localhost:3306', 'levi', 'DaCr0n!');

mysql_select_db('surveytest', $conn1);
mysql_select_db('surveytest', $conn2);

mysql_close($conn1); $conn1 = null;
mysql_close($conn2); $conn2 = null;

?

See also the example at http://www.levi.id.au/mysql4.php.txt

Expected result:


Blank output.


Actual result:
--
PHP Warning:  mysql_close(): 1 is not a valid MySQL-Link resource in
/home/levi/public_html/mysql2.php on line 10
br /
bWarning/b:  mysql_close(): 1 is not a valid MySQL-Link resource in
b/home/levi/public_html/mysql2.php/b on line b10/bbr /



(If I remove the mysql_close($conn1); it works)
(If I remove the $conn1 = null; it also works)





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


#30393 [Fbk-NoF]: CLI and ISAPI give different line endings in ERRORS.LOG file.

2005-04-12 Thread php-bugs
 ID:   30393
 Updated by:   php-bugs@lists.php.net
 Reported By:  richard dot quadling at bandvulc dot co dot uk
-Status:   Feedback
+Status:   No Feedback
 Bug Type: Scripting Engine problem
 Operating System: Windows XP SP2
 PHP Version:  5.0.2
 New Comment:

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.


Previous Comments:


[2005-03-07 22:04:26] [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-10-11 10:38:27] richard dot quadling at bandvulc dot co dot uk

I may have got the CLI / ISAPI bits back to front half way through
this.

Sorry.



[2004-10-11 10:13:51] richard dot quadling at bandvulc dot co dot uk

Description:

I use both CLI and ISAPI PHP code.

I have PHP.INI set to log errors to PHP Errors.log.

If I have an error in a CLI program, the error that is logged ends with
CR/LF.

If I have an error in a ISAPI program (i.e. launched by a web server),
I get the error with CR/CR/LF. One too many CR.

An example from my error log file (hoping that this gets through
cleanly)...

[08-Oct-2004 15:00:03] PHP Notice:  Undefined offset:  1 in C:\McAfee
AntiVirus Updates\AVUpdate.php on line 90[cr/lf]
[08-Oct-2004 15:00:03] PHP Notice:  Undefined offset:  2 in C:\McAfee
AntiVirus Updates\AVUpdate.php on line 90[cr/lf]
[08-Oct-2004 15:18:54] PHP Notice:  Undefined variable:  _SESSION in
C:\WebSites\PHP\Includes\class_Form_Maint.inc on line 332[cr/cr/lf]

[08-Oct-2004 15:18:54] PHP Notice:  Undefined variable:
sRequireFormAction in C:\WebSites\PHP\Includes\class_Form_Maint.inc on
line 332[cr/cr/lf]

[08-Oct-2004 15:18:54] PHP Notice:  Undefined variable:  _SESSION in
C:\WebSites\PHP\Includes\class_Form_Maint.inc on line 332[cr/cr/lf]



I'm not using the CGI version.

Having examined the source, I can see why this happens the extra CR
occurs.

In Windows, opening a file using C's fopen, will open the file in text
mode unless 'b' as a mode.

So, the constant PHP_EOL is set to \r\n (main\php.h line 58).

The function php_log_err (main\main.c line 344) only uses append mode -
a - to open the file. Which will be in text mode and \r\n will
become \r\r\n, as \n = \r\n in a text file.

But, why this is not true for the CLI version ...

Now. The PHP_EOL was added by 5.0.2 (NEWS line 10).

Examining main\php.h (Lines 49 to 68) it LOOKS like there is a way
through to setting PHP_EOL to \n (which is what the CLI version is
outputting.

I am not sure, but is the constant PHP_WIN32 set for ALL windows forms
of PHP (ISAPI, CGI, CLI)? If not, then this may be a cause. I can see
no other way that PHP_EOL could NOT be \r\n (which is wrong for a
text file, but ...).

Solution? I think opening the error file in binary mode (ab) will
mean you do not need to change the PHP_EOL.

As a final request, is there any one who can help me get PHP to
compile? I don't have newsgroup access here.

Regards,

Richard Quadling.

Reproduce code:
---
Set PHP ...

error_log = C:\WebSites\PHP\PHP Errors.log  

and then any PHP code that will generate an error.

?php

$var = 1 / 0; // Cannot divide by zero.

?

Run this in both CLI and ISAPI mode.

I ran the program 4 times, first in ISAPI mode (via a webpage) and then
in CLI mode.


Expected result:

[11-Oct-2004 09:09:22] PHP Warning:  Division by zero in Unknown on
line 0[cr/lf]
[11-Oct-2004 09:09:36] PHP Warning:  Division by zero in Unknown on
line 0[cr/lf]
[11-Oct-2004 09:09:37] PHP Warning:  Division by zero in Unknown on
line 0[cr/lf]
[11-Oct-2004 09:09:37] PHP Warning:  Division by zero in Unknown on
line 0[cr/lf]
[11-Oct-2004 09:09:56] PHP Warning:  Division by zero in Unknown on
line 0[cr/lf]
[11-Oct-2004 09:09:57] PHP Warning:  Division by zero in Unknown on
line 0[cr/lf]
[11-Oct-2004 09:09:57] PHP Warning:  Division by zero in Unknown on
line 0[cr/lf]
[11-Oct-2004 09:09:57] PHP Warning:  Division by zero in Unknown on
line 0[cr/lf]

Actual result:
--
[11-Oct-2004 09:09:22] PHP Warning:  Division by zero in Unknown on
line 0[cr/cr/lf]
[11-Oct-2004 09:09:36] PHP Warning:  Division by zero in Unknown on
line 0[cr/cr/lf]
[11-Oct-2004 09:09:37] PHP Warning:  Division by zero in Unknown on
line 0[cr/cr/lf]
[11-Oct-2004 09:09:37] PHP Warning:  Division by zero in Unknown on
line 0[cr/cr/lf]
[11-Oct-2004 09:09:56] PHP Warning:  Division by zero in Unknown on
line 0[cr/lf]
[11-Oct-2004 09:09:57] PHP Warning:  Division by zero in Unknown on
line 0[cr/lf]
[11-Oct-2004 09:09

#32231 [Bgs]: zend_objects_clone_obj ( Exception ) = segfault

2005-04-12 Thread bugs at niluje dot net
 ID:   32231
 User updated by:  bugs at niluje dot net
 Reported By:  bugs at niluje dot net
 Status:   Bogus
 Bug Type: Reproducible crash
 Operating System: Debian linux x86
 PHP Version:  5.0.3
 New Comment:

you have the expertise to do so, i don't. don't get me wrong i have
spent a considerable amount of time trying to find the bug, i can't do
much more.

i have enough trouble explaining my boss why php crashes as it is
supposed to be production ready.


Previous Comments:


[2005-03-29 11:41:03] [EMAIL PROTECTED]

And we don't have time to come up with simple reproducing scripts
either.




[2005-03-29 11:33:51] bugs at niluje dot net

i do not have the time or the expertise to compile php with debug
options.

the segfault happends in PEAR.php (PEAR 1.3.5) line 863

eval('$e = new Exception($this-message, $this-code);$e-PEAR_Error =
$this;throw($e);');

it appears that $e-PEAR_Error = $this causes the segfault.



[2005-03-24 18:41:15] [EMAIL PROTECTED]

Please read the above 2 comments I added. Read them very carefully..





[2005-03-24 18:40:25] [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

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.





[2005-03-24 18:40:14] [EMAIL PROTECTED]

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

A proper reproducing script starts with ?php and ends with ?,
is max. 10-20 lines long and does not require any external 
resources such as databases, etc.

If possible, make the script source available online and provide
an URL to it here. Try to avoid embedding huge scripts into the report.





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

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


#32231 [Fbk-Opn]: zend_objects_clone_obj ( Exception ) = segfault

2005-04-12 Thread bugs at niluje dot net
 ID:   32231
 User updated by:  bugs at niluje dot net
 Reported By:  bugs at niluje dot net
-Status:   Feedback
+Status:   Open
 Bug Type: Reproducible crash
 Operating System: Debian linux x86
 PHP Version:  5.0.3
 New Comment:

i do not have the time or the expertise to compile php with debug
options.

the segfault happends in PEAR.php (PEAR 1.3.5) line 863

eval('$e = new Exception($this-message, $this-code);$e-PEAR_Error =
$this;throw($e);');

it appears that $e-PEAR_Error = $this causes the segfault.


Previous Comments:


[2005-03-24 18:41:15] [EMAIL PROTECTED]

Please read the above 2 comments I added. Read them very carefully..





[2005-03-24 18:40:25] [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

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.





[2005-03-24 18:40:14] [EMAIL PROTECTED]

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

A proper reproducing script starts with ?php and ends with ?,
is max. 10-20 lines long and does not require any external 
resources such as databases, etc.

If possible, make the script source available online and provide
an URL to it here. Try to avoid embedding huge scripts into the report.





[2005-03-24 17:45:23] bugs at niluje dot net

here is a test case to trigger the segfault :

you need PEAR, DB, DB_Dataobject:


test.php
--
?php
require_once 'PEAR.php';
require_once 'DB/DataObject.php';
PEAR::setErrorHandling(PEAR_ERROR_EXCEPTION);

$config = parse_ini_file('dao.ini', TRUE);
foreach($config as $class=$values) {
$options = PEAR::getStaticProperty($class,
'options');
$options = $values;
}

$options =
PEAR::getStaticProperty('DB_DataObject','options');
$options['class_prefix'] = '';
$options['persistent'] = true;

class Test extends DB_Dataobject
{
public $__table = 'test';
}


$dao = new Test();

try {
$dao-field1 = 'test';
$dao-insert();
}
catch (Exception $e)
{
var_dump($e);
}

?
---


dao.ini
-
[DB_DataObject]
debug = 1
database_test   = mysqli://[EMAIL PROTECTED]/test
table_test  = test
-


gdb backtrace:
---
#0  0xb57f0c0e in zend_objects_clone_obj () from
/usr/lib/apache/1.3/libphp5.so
#0  0xb57f0c0e in zend_objects_clone_obj () from
/usr/lib/apache/1.3/libphp5.so
#1  0xb577f00d in php_var_dump () from /usr/lib/apache/1.3/libphp5.so
#2  0xb577ee3f in url_adapt () from /usr/lib/apache/1.3/libphp5.so
#3  0xb57e5986 in zend_hash_apply_with_arguments () from
/usr/lib/apache/1.3/libphp5.so
#4  0xb577f0b7 in php_var_dump () from /usr/lib/apache/1.3/libphp5.so
#5  0xb577f1d6 in zif_var_dump () from /usr/lib/apache/1.3/libphp5.so
#6  0xb581b851 in zend_do_fcall_common_helper () from
/usr/lib/apache/1.3/libphp5.so
#7  0xb581bfd0 in zend_do_fcall_handler () from
/usr/lib/apache/1.3/libphp5.so
#8  0xb580024f in execute () from /usr/lib/apache/1.3/libphp5.so
#9  0xb57df043 in zend_execute_scripts () from
/usr/lib/apache/1.3/libphp5.so
#10 0xb57a8c55 in php_execute_script () from
/usr/lib/apache/1.3/libphp5.so
#11 0xb5824755 in apache_php_module_main () from
/usr/lib/apache/1.3/libphp5.so
#12 0xb582537e in apache_php_module_main () from
/usr/lib/apache/1.3/libphp5.so
#13 0xb58253e5 in apache_php_module_main () from
/usr/lib/apache/1.3/libphp5.so
#14 0x080553c3 in ap_invoke_handler ()
#15 0x08068465 in ap_some_auth_required ()
#16 0x08068614 in ap_process_request ()
#17 0x08060bd2 in ap_child_terminate ()
#18 0x08060de7 in ap_child_terminate ()
#19 0x08060f10 in ap_child_terminate ()
#20 0x08061a9a in ap_child_terminate ()
#21 0x08061ff8 in main ()




[2005-03-09 00:40:45] [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

Your example script gives me this output:

Parse error: syntax error, unexpected T_CATCH in Command line code on
line 1

#29544 [Fbk-NoF]: not flush stdout in pipe command which ob_handler and with-apxs2 configuration

2005-04-12 Thread php-bugs
 ID:   29544
 Updated by:   php-bugs@lists.php.net
 Reported By:  suguru at sak dot iis dot u-tokyo dot ac dot jp
-Status:   Feedback
+Status:   No Feedback
 Bug Type: Output Control
 Operating System: Linux, Solaris
 PHP Version:  5.0.0
 New Comment:

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.


Previous Comments:


[2005-03-06 20:53:59] [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-08-06 10:41:47] suguru at sak dot iis dot u-tokyo dot ac dot jp

Description:

PHP version: 5.0.0, CVS(2004-08-06 06:30)
PHP5 configuration: '--with-apxs2' and '--mbstring' (when
'output_handler=mb_output_handler')
php.ini: specify 'output_handler=ob_gzhandler' or
'output_handler=mb_output_handler'
Apache version: 2.0.50
OS and compiler: Linux(debian)+gcc-3.3.4, Solaris8+gcc-3.3.3

In above configuration, php(cli version) does not flush tail of stdout
when output to pipe(|).

point:
 1. PHP is cli version (not apache2handler, but it is configurated with
'--with-apxs2'.)
 2. Only when 'output_handler' is specified in php.ini.
No effect ob_start()/ob_end_*() in PHP script.
 3. Only when Unix pipe(|) output. Normal output is correct.

solution:
  call flush() at the exit point of script.

Reproduce code:
---
test.php
?php
$dat=01234567890123456789012345678901234567890123456789\n;
for( $l = 0; $l  100; ++$l ){
  print sprintf( %2d , $l ) . $dat;
}
?

 ./php.ini 
use php.ini-recommended adding 'output_handler=ob_gzhandler' or
'output_handler=mb_output_handler'.

 execute 
./sapi/cli/php -c ./php.ini test.php | tail -5


Expected result:

95 01234567890123456789012345678901234567890123456789
96 01234567890123456789012345678901234567890123456789
97 01234567890123456789012345678901234567890123456789
98 01234567890123456789012345678901234567890123456789
99 01234567890123456789012345678901234567890123456789


Actual result:
--
67 01234567890123456789012345678901234567890123456789
68 01234567890123456789012345678901234567890123456789
69 01234567890123456789012345678901234567890123456789
70 01234567890123456789012345678901234567890123456789
71 0123456789012345678901234567890123456789012

note: not exactly same result in case of diffent OS and so on.






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


#17563 [Com]: PHP has encountered an Access Violation at 77XXXXX

2005-04-12 Thread bugs dot php dot net at ghort dot wz dot cz
 ID:   17563
 Comment by:   bugs dot php dot net at ghort dot wz dot cz
 Reported By:  stanley at in2nett dot com
 Status:   No Feedback
 Bug Type: MSSQL related
 Operating System: WIN2K
 PHP Version:  4.2.1
 New Comment:

I first noticed this error with PHP5 running as ISAPI on IIS 5.1 on
WinXP (SP1, now SP2). If configured as CGI, there is no prob. Before
PHP5 I never noticed this error.

Ghort*


Previous Comments:


[2003-06-19 08:18:18] matsd at sssk dot se

Was this bug corrected?  

I installed PHP 4.3.2 on a Win2kServer running IIS5 but still get this
error.  The application I'm working on uses MySQL 3.23.45; on the same
machine an ASP/MSSQL application is also running.

regards,
mats d.



[2002-12-23 01:00:03] php-bugs at lists dot php dot net

No feedback was provided for this bug for over 2 weeks, 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-12-07 01:43:29] [EMAIL PROTECTED]

Please try using this CVS snapshot:

  http://snaps.php.net/php4-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php4-win32-latest.zip





[2002-11-30 20:39:12] mail-php dot net at kimihia dot org dot nz

Can you please be very specific about your table and column names. The
ODBC driver doesn't handle odd names very well.

There's a big difference between:

SELECT * FROM froo

SELECT * FROM [FR oO]



[2002-08-25 23:54:30] stanley at in2nett dot com

Yes, try that first, after recreate the data field, I have no problem
afterwards. You can use the mssql.dll if you 
want~ I use that in all time, I don't like ODBC,



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

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


#32624 [Fbk-Opn]: Rephrase: Please allow this report to be send to the PHP QA team.

2005-04-12 Thread php-bugs-2005 at ryandesign dot com
 ID:   32624
 User updated by:  php-bugs-2005 at ryandesign dot com
 Reported By:  php-bugs-2005 at ryandesign dot com
-Status:   Feedback
+Status:   Open
 Bug Type: Compile Warning
 Operating System: N/A
 PHP Version:  5.0.4
 New Comment:

Oh, very well. :-)

http://test.michel-consulting.de/ryan/php-5.0.4-failed-
test-message.patch


Previous Comments:


[2005-04-07 17:53:58] [EMAIL PROTECTED]

Could you please be so kind and provide a patch?
(for run-tests.php)




[2005-04-07 16:17:35] php-bugs-2005 at ryandesign dot com

Description:

In ./run-tests.php and ./server-tests.php the following 
message can be displayed:

 Please allow this report to be send to the PHP QA
 team. This will give us a better understanding in how
 PHP's test cases are doing.

There are a number of problems with this message. For 
one thing, it should be sent and not send, and I 
think understanding of how is better than 
understanding in how.

The fundamental problem though is made obvious by the 
prompt that follows it:

 (choose s to just save the results to a file)?
 [Yns]:

See, there's a question mark, and it expects a yes or 
no (or save) answer. I would therefore reformulate 
it as a question.

The message also seems to appear without any 
explanation to the user. It could be made friendlier. 
Suggestion below.

This problem is presumably also present in PHP4.

Reproduce code:
---
N/A

Expected result:

You may have found a problem in PHP's test cases.
We'd like to automatically send this report to the
PHP QA team, to give us a better understanding of how
the test cases are doing. If you don't want to send it
immediately, you can choose s to save the report to
a file that you can send us later.

May we send this report now? [Yns]:

Actual result:
--
Please allow this report to be send to the PHP QA
team. This will give us a better understanding in how
PHP's test cases are doing.

(choose s to just save the results to a file)? [Yns]:





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


#32579 [Opn-Csd]: Segfault (Memory Leak on debug build) caused in __destruct

2005-04-12 Thread mailfrom-bugs dot php dot net at kopka dot net
 ID:   32579
 User updated by:  mailfrom-bugs dot php dot net at kopka dot net
 Reported By:  mailfrom-bugs dot php dot net at kopka dot net
-Status:   Open
+Status:   Closed
 Bug Type: Reproducible crash
 Operating System: Linux
 PHP Version:  PHP 5.0.5-dev (cli) (built: Apr  5 2005 11:42:27)
 New Comment:

Newly opened as Bug #32596 because this vanished from bugzilla.
Closing this.
Gregor


Previous Comments:


[2005-04-05 11:54:57] mailfrom-bugs dot php dot net at kopka dot net

Also in PHP 5.0.5-dev (cli) (built: Apr  5 2005 11:42:27)

Hope this is actual enough.
Please slay the bastard.

Thanks for your support.

Gregor



[2005-04-05 11:33:04] mailfrom-bugs dot php dot net at kopka dot net

Same problem with php 5.0.4



[2005-04-05 11:32:57] mailfrom-bugs dot php dot net at kopka dot net

Same problem with php 5.0.4



[2005-04-05 09:23:46] [EMAIL PROTECTED]

Thank you for taking the time to report a problem with PHP.
Unfortunately you are not using a current version of PHP -- 
the problem might already be fixed. Please download a new
PHP version from http://www.php.net/downloads.php

If you are able to reproduce the bug with one of the latest
versions of PHP, please change the PHP version on this bug report
to the version you tested and change the status back to Open.
Again, thank you for your continued support of PHP.





[2005-04-05 02:42:32] mailfrom-bugs dot php dot net at kopka dot net

Description:

I ran into this using the following construct:

if (database::query($string)-error) {}

where database::query() returns an object wrapping a result set (or
providing info on success of the request).

PHP 5.0.3 (and i am quite sure this applies to other versions as well
as i experience this for quite a time) segfaults under the following
cumulating circumstances:
- If the object is only used once and not referenced to a variable
- If a property is read/set (if a function is called all is OK)
- If __destruct references the class name by some means (others are
OK)

When you try the demo uncomment one of the lines which cause a segfault
(and are noted as a memory leak with --enable-debug):

//  $c=get_class($this);unset ($c);
//  echo get_class($this);
//  if(defined('DEBUG_'.__CLASS__)){}


The following lines don't raise a segfault:

  $c=__CLASS__;unset($c);
  if(__CLASS__ == BUG) {};
  get_class($this);
  echo __CLASS__;

The following line don't raise a segfault but is noted as a memory leak
(--enable-debug):

  $c=get_class($this);  // -- this is reported as a memory leak 

Naturally the hidden beast came up a long time after i wrote the line -
spending a good month of free time trying to locate it i am happy to
finally nail it to the ground for someone who knows what he is doing to
slay it (it cost me a keyboard and brought quite a few white hairs into
existence).
Good hunting.


Configure Command =  './configure' '--prefix=/usr'
'--host=i686-pc-linux-gnu' '--mandir=/usr/share/man'
'--infodir=/usr/share/info' '--datadir=/usr/share' '--sysconfdir=/etc'
'--localstatedir=/var/lib' '--disable-cgi' '--enable-cli'
'--enable-embed' '--with-config-file-path=/etc/php/cli-php5'
'--disable-bcmath' '--without-bz2' '--disable-calendar'
'--without-cpdflib' '--disable-ctype' '--without-curl'
'--without-curlwrappers' '--disable-dbase' '--disable-dio'
'--disable-dom' '--disable-exif' '--without-fam' '--without-fbsql'
'--without-fdftk' '--disable-filepro' '--disable-ftp'
'--without-gettext' '--without-gmp' '--without-hwapi' '--without-iconv'
'--without-informix' '--without-ingres' '--without-interbase'
'--without-kerberos' '--disable-libxml' '--disable-mbstring'
'--without-mcrypt' '--without-mcve' '--disable-memory-limit'
'--without-mhash' '--without-mime-magic' '--without-ming'
'--without-mnogosearch' '--without-msql' '--without-mssql'
'--without-ncurses' '--without-oci8' '--without-oracle'
'--without-openssl' '--without-openssl-dir' '--without-ovrimos'
'--disable-pcntl' '--without-pcre-regx' '--without-pfpro'
'--without-pgsql' '--disable-posix' '--without-pspell'
'--without-recode' '--disable-simplexml' '--disable-shmop'
'--without-snmp' '--disable-soap' '--disable-sockets' '--disable-spl'
'--without-sybase' '--without-sybase-ct' '--disable-sysvmsg'
'--disable-sysvsem' '--disable-sysvshm' '--without-tidy'
'--disable-tokenizer' '--disable-wddx' '--without-xsl'
'--without-xmlrpc' '--disable-yp' '--without-zlib' '--disable-debug'
'--without-jpeg-dir' '--without-freetype-dir' '--without-t1lib'
'--without-ttf' '--disable-gd-jis-conf' '--disable-gd-native-ttf'
'--without-png-dir' '--without-tiff-dir

#32577 [Fbk-NoF]: sun one restarts after sybase requests made

2005-04-12 Thread php-bugs
 ID:   32577
 Updated by:   php-bugs@lists.php.net
 Reported By:  ravi_kumarm at hotmail dot com
-Status:   Feedback
+Status:   No Feedback
 Bug Type: iPlanet related
 Operating System: Solaris
 PHP Version:  5.0.3
 New Comment:

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.


Previous Comments:


[2005-04-05 01:10:02] [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-04-04 23:31:54] ravi_kumarm at hotmail dot com

Description:

I think this old bug which was assigned as bogus should be re-opened
as we are running into this problem.

Sybase - database
Solaris 6.1
PHP 5.1

SunOne web server restarts after a minute or so of making Sybase
database calls from PHP web pages.

If database access is not done, it doesn't restart.
So, I guess this bug should be re-opened.



Expected result:

SunOne web server should not restart and continue running the web site
after making calls from PHP code to Sybase database tables for
retrieving data.

Actual result:
--
SunOne web server restarts.





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


<    4   5   6   7   8   9   10   11   12   13   >