#34868 [NEW]: sqlite_open() fails if directory along path misses read flag

2005-10-14 Thread Bjorn dot Wiberg at its dot uu dot se
From: Bjorn dot Wiberg at its dot uu dot se
Operating system: AIX 5.2 ML5
PHP version:  5.0.5
PHP Bug Type: SQLite related
Bug description:  sqlite_open() fails if directory along path misses read flag

Description:

If the path to the database to be created or opened does not have read
(directory listing) rights all the way, sqlite_open() fails.

Presumably because of getcwd() usage.


If one specifies the full path to the database file to be opened or
created, everything appears to work just fine.

Similarly, if one makes sure that read rights are present all the way,
everything appears to work just fine as well.


I do not know if this is specific to PHP+sqlite or to SQLite itself.

I'm using the bundled SQLite (automatically detected during ./configure).

Reproduce code:
---
?php
  if ($db = sqlite_open('mysqlitedb', 0666, $sqliteerror)) {
  //if ($db = sqlite_open('./mysqlitedb', 0666, $sqliteerror)) {
  //if ($db = sqlite_open(dirname(__FILE__) . '/mysqlitedb', 0666,
$sqliteerror)) {
 sqlite_query($db, 'CREATE TABLE foo (bar varchar(10))');
 sqlite_query($db, INSERT INTO foo VALUES ('fnord'));
 $result = sqlite_query($db, 'select bar from foo');
 var_dump(sqlite_fetch_array($result));
  } else {
die($sqliteerror);
  }
?


Expected result:

Successful creation of the database in all cases:

array(2) { [0]=  string(5) fnord [bar]=  string(5) fnord }


Actual result:
--
CASE 1 (open mysqldb):

Warning: sqlite_open(): unable to open database: mysqlitedb in
/apache/htdocs/bwiberg/test/sqlite/sqlite.php on line 2 unable to open
database: mysqlitedb

CASE 2 (open ./mysqldb):

Warning: sqlite_open(): unable to open database: ./mysqlitedb in
/apache/htdocs/bwiberg/test/sqlite/sqlite.php on line 3 unable to open
database: ./mysqlitedb

CASE 3 (open with full path):

array(2) { [0]=  string(5) fnord [bar]=  string(5) fnord } 


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


#34089 [Com]: Configure fails build test for libxml2

2005-10-14 Thread register at sosgmbh dot at
 ID:   34089
 Comment by:   register at sosgmbh dot at
 Reported By:  [EMAIL PROTECTED]
 Status:   Open
 Bug Type: Compile Failure
 Operating System: Mac OS X 10.4.2
 PHP Version:  6CVS-2005-10-07
 New Comment:

Hi! 
 
I got the same problem with libxml2. 
I am on SUSE 9.0. 
Do you need a specific version of libxml?  
 
When I try with --disable-libxml --disable-dom 
--disable-simplexml 
 
it dies at this command: 
gcc -o conftest -g -O2   conftest.c -lresolv -lm -ldl 
-lnsl  15 
In the config.log file it shows:  
bash: 5: Bad file descriptor 
 
./configure --disable-all --with-icu-dir=/usr/local/icu 
works fine with me as well.  
 
What should I do next?  
Please help 
Werner


Previous Comments:


[2005-10-07 21:38:20] [EMAIL PROTECTED]

I've just updated my checkout and tried to rebuild it. I'm still
getting the Library not loaded errors, though.

I don't have access to another MacOSX machine. Is there someone else
who can try to build this on their Mac to verify whether this issue can
be reproduced?



[2005-09-16 12:31:41] [EMAIL PROTECTED]

Can you reproduce this on some other Macosx machine?
Can someone else reproduce this?



[2005-09-15 23:20:58] [EMAIL PROTECTED]

I grabbed the latest HEAD and I'm using the latest ICU (v3.4).

With the following config line, everything configures, makes, and make
installs just fine:
./configure --with-layout=PHP --prefix=/usr/local/php/6.0.0
--disable-all --with-icu-dir=/usr/local/icu

However, I still receive an error:

ramsey:~ ramsey$ /usr/local/php/6.0.0/bin/php -i
dyld: Library not loaded: libicui18n.dylib.34
  Referenced from: /usr/local/php/6.0.0/bin/php
  Reason: image not found
Trace/BPT trap



[2005-09-13 09:54:19] [EMAIL PROTECTED]

Try with newer icu release and latest CVS HEAD.





[2005-08-23 20:18:58] [EMAIL PROTECTED]

I did compile icu myself. I followed Andrei's instructions to download
and build it. It compiled just fine without any problems.

Andrei's instructions are here:
http://news.php.net/php.internals/17848



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

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


#34870 [NEW]: 404 ErrorDocument in safe mode

2005-10-14 Thread petr at kodytek dot net
From: petr at kodytek dot net
Operating system: linux
PHP version:  5.1.0RC1
PHP Bug Type: Safe Mode/open_basedir
Bug description:  404 ErrorDocument in safe mode

Description:

If Apache server uses PHP script as 404 ErrorDocument returns following
error message when 404 Error invoked. Previous versions of PHP are gone
OK. Direct access to the script is OK and it's running fine accessing by
URL.

Expected result:

running script

Actual result:
--
Warning: Unknown: SAFE MODE Restriction in effect. The script whose uid is
2286 is not allowed to access /path/to/404.phtml owned by uid 23708 in
Unknown on line 0

Warning: Unknown: failed to open stream: No such file or directory in
Unknown on line 0

Warning: Unknown: Failed opening '/path/to/404.phtml' for inclusion
(include_path='.') in Unknown on line 0

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


#34870 [Opn-Bgs]: 404 ErrorDocument in safe mode

2005-10-14 Thread tony2001
 ID:   34870
 Updated by:   [EMAIL PROTECTED]
 Reported By:  petr at kodytek dot net
-Status:   Open
+Status:   Bogus
 Bug Type: Safe Mode/open_basedir
 Operating System: linux
 PHP Version:  5.1.0RC1
 New Comment:

The eror message is quite clear, isn't it ?


Previous Comments:


[2005-10-14 11:54:59] petr at kodytek dot net

Description:

If Apache server uses PHP script as 404 ErrorDocument returns following
error message when 404 Error invoked. Previous versions of PHP are gone
OK. Direct access to the script is OK and it's running fine accessing
by URL.

Expected result:

running script

Actual result:
--
Warning: Unknown: SAFE MODE Restriction in effect. The script whose uid
is 2286 is not allowed to access /path/to/404.phtml owned by uid 23708
in Unknown on line 0

Warning: Unknown: failed to open stream: No such file or directory in
Unknown on line 0

Warning: Unknown: Failed opening '/path/to/404.phtml' for inclusion
(include_path='.') in Unknown on line 0





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


#34870 [Bgs-Opn]: 404 ErrorDocument in safe mode

2005-10-14 Thread petr at kodytek dot net
 ID:   34870
 User updated by:  petr at kodytek dot net
 Reported By:  petr at kodytek dot net
-Status:   Bogus
+Status:   Open
 Bug Type: Safe Mode/open_basedir
 Operating System: linux
 PHP Version:  5.1.0RC1
 New Comment:

I think that it's not OK, i can't find way to run ErrorDocument script
on 404 error. UID of script who calls 404.phtml is different in each
access.


Previous Comments:


[2005-10-14 12:05:24] [EMAIL PROTECTED]

The eror message is quite clear, isn't it ?



[2005-10-14 11:54:59] petr at kodytek dot net

Description:

If Apache server uses PHP script as 404 ErrorDocument returns following
error message when 404 Error invoked. Previous versions of PHP are gone
OK. Direct access to the script is OK and it's running fine accessing
by URL.

Expected result:

running script

Actual result:
--
Warning: Unknown: SAFE MODE Restriction in effect. The script whose uid
is 2286 is not allowed to access /path/to/404.phtml owned by uid 23708
in Unknown on line 0

Warning: Unknown: failed to open stream: No such file or directory in
Unknown on line 0

Warning: Unknown: Failed opening '/path/to/404.phtml' for inclusion
(include_path='.') in Unknown on line 0





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


#34870 [Opn-Fbk]: 404 ErrorDocument in safe mode

2005-10-14 Thread tony2001
 ID:   34870
 Updated by:   [EMAIL PROTECTED]
 Reported By:  petr at kodytek dot net
-Status:   Open
+Status:   Feedback
 Bug Type: Safe Mode/open_basedir
 Operating System: linux
 PHP Version:  5.1.0RC1
 New Comment:

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

Works perfectly fine here.


Previous Comments:


[2005-10-14 12:53:36] petr at kodytek dot net

I think that it's not OK, i can't find way to run ErrorDocument script
on 404 error. UID of script who calls 404.phtml is different in each
access.



[2005-10-14 12:05:24] [EMAIL PROTECTED]

The eror message is quite clear, isn't it ?



[2005-10-14 11:54:59] petr at kodytek dot net

Description:

If Apache server uses PHP script as 404 ErrorDocument returns following
error message when 404 Error invoked. Previous versions of PHP are gone
OK. Direct access to the script is OK and it's running fine accessing
by URL.

Expected result:

running script

Actual result:
--
Warning: Unknown: SAFE MODE Restriction in effect. The script whose uid
is 2286 is not allowed to access /path/to/404.phtml owned by uid 23708
in Unknown on line 0

Warning: Unknown: failed to open stream: No such file or directory in
Unknown on line 0

Warning: Unknown: Failed opening '/path/to/404.phtml' for inclusion
(include_path='.') in Unknown on line 0





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


#34870 [Fbk-Opn]: 404 ErrorDocument in safe mode

2005-10-14 Thread petr at kodytek dot net
 ID:   34870
 User updated by:  petr at kodytek dot net
 Reported By:  petr at kodytek dot net
-Status:   Feedback
+Status:   Open
 Bug Type: Safe Mode/open_basedir
 Operating System: linux
 PHP Version:  5.1.0RC1
 New Comment:

OK, I'll try to use it and I'll send a report.

Thanx.


Previous Comments:


[2005-10-14 13:04:36] [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

Works perfectly fine here.



[2005-10-14 12:53:36] petr at kodytek dot net

I think that it's not OK, i can't find way to run ErrorDocument script
on 404 error. UID of script who calls 404.phtml is different in each
access.



[2005-10-14 12:05:24] [EMAIL PROTECTED]

The eror message is quite clear, isn't it ?



[2005-10-14 11:54:59] petr at kodytek dot net

Description:

If Apache server uses PHP script as 404 ErrorDocument returns following
error message when 404 Error invoked. Previous versions of PHP are gone
OK. Direct access to the script is OK and it's running fine accessing
by URL.

Expected result:

running script

Actual result:
--
Warning: Unknown: SAFE MODE Restriction in effect. The script whose uid
is 2286 is not allowed to access /path/to/404.phtml owned by uid 23708
in Unknown on line 0

Warning: Unknown: failed to open stream: No such file or directory in
Unknown on line 0

Warning: Unknown: Failed opening '/path/to/404.phtml' for inclusion
(include_path='.') in Unknown on line 0





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


#34868 [Opn-Fbk]: sqlite_open() fails if directory along path misses read flag

2005-10-14 Thread tony2001
 ID:   34868
 Updated by:   [EMAIL PROTECTED]
 Reported By:  Bjorn dot Wiberg at its dot uu dot se
-Status:   Open
+Status:   Feedback
 Bug Type: SQLite related
 Operating System: AIX 5.2 ML5
 PHP Version:  5.0.5
 New Comment:

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


read (directory listing)
So is it r (read) or x (directory listing)? Or both?


Previous Comments:


[2005-10-14 10:15:47] Bjorn dot Wiberg at its dot uu dot se

Description:

If the path to the database to be created or opened does not have
read (directory listing) rights all the way, sqlite_open() fails.

Presumably because of getcwd() usage.


If one specifies the full path to the database file to be opened or
created, everything appears to work just fine.

Similarly, if one makes sure that read rights are present all the
way, everything appears to work just fine as well.


I do not know if this is specific to PHP+sqlite or to SQLite itself.

I'm using the bundled SQLite (automatically detected during
./configure).

Reproduce code:
---
?php
  if ($db = sqlite_open('mysqlitedb', 0666, $sqliteerror)) {
  //if ($db = sqlite_open('./mysqlitedb', 0666, $sqliteerror)) {
  //if ($db = sqlite_open(dirname(__FILE__) . '/mysqlitedb', 0666,
$sqliteerror)) {
 sqlite_query($db, 'CREATE TABLE foo (bar varchar(10))');
 sqlite_query($db, INSERT INTO foo VALUES ('fnord'));
 $result = sqlite_query($db, 'select bar from foo');
 var_dump(sqlite_fetch_array($result));
  } else {
die($sqliteerror);
  }
?


Expected result:

Successful creation of the database in all cases:

array(2) { [0]=  string(5) fnord [bar]=  string(5) fnord }


Actual result:
--
CASE 1 (open mysqldb):

Warning: sqlite_open(): unable to open database: mysqlitedb in
/apache/htdocs/bwiberg/test/sqlite/sqlite.php on line 2 unable to open
database: mysqlitedb

CASE 2 (open ./mysqldb):

Warning: sqlite_open(): unable to open database: ./mysqlitedb in
/apache/htdocs/bwiberg/test/sqlite/sqlite.php on line 3 unable to open
database: ./mysqlitedb

CASE 3 (open with full path):

array(2) { [0]=  string(5) fnord [bar]=  string(5) fnord } 






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


#34870 [Opn-Fbk]: 404 ErrorDocument in safe mode

2005-10-14 Thread tony2001
 ID:   34870
 Updated by:   [EMAIL PROTECTED]
 Reported By:  petr at kodytek dot net
-Status:   Open
+Status:   Feedback
 Bug Type: Safe Mode/open_basedir
 Operating System: linux
 PHP Version:  5.1.0RC1


Previous Comments:


[2005-10-14 13:13:07] petr at kodytek dot net

OK, I'll try to use it and I'll send a report.

Thanx.



[2005-10-14 13:04:36] [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

Works perfectly fine here.



[2005-10-14 12:53:36] petr at kodytek dot net

I think that it's not OK, i can't find way to run ErrorDocument script
on 404 error. UID of script who calls 404.phtml is different in each
access.



[2005-10-14 12:05:24] [EMAIL PROTECTED]

The eror message is quite clear, isn't it ?



[2005-10-14 11:54:59] petr at kodytek dot net

Description:

If Apache server uses PHP script as 404 ErrorDocument returns following
error message when 404 Error invoked. Previous versions of PHP are gone
OK. Direct access to the script is OK and it's running fine accessing
by URL.

Expected result:

running script

Actual result:
--
Warning: Unknown: SAFE MODE Restriction in effect. The script whose uid
is 2286 is not allowed to access /path/to/404.phtml owned by uid 23708
in Unknown on line 0

Warning: Unknown: failed to open stream: No such file or directory in
Unknown on line 0

Warning: Unknown: Failed opening '/path/to/404.phtml' for inclusion
(include_path='.') in Unknown on line 0





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


#34863 [Opn-Fbk]: strip_tags cannot work when string include img tags

2005-10-14 Thread tony2001
 ID:   34863
 Updated by:   [EMAIL PROTECTED]
 Reported By:  backdream at gmail dot com
-Status:   Open
+Status:   Feedback
-Bug Type: Scripting Engine problem
+Bug Type: Strings related
 Operating System: Windows
 PHP Version:  4.4.0
 New Comment:

Can't reproduce.
Both your scripts work fine with any PHP version I can find (4.3.11,
4.4, 5.0.x, 5.1).



Previous Comments:


[2005-10-14 03:31:24] backdream at gmail dot com

Sorry, the Reproduce code would be:
---
?php

$txt = Next: a
href=\http://www.joelonsoftware.com/uibook/chapters/fog63.html\
 target=\_blank\Designing for People Who Have Better Things To Do
With Their Lives, Part Two/a br /br /img
src=\http://86.0.190.20/test/ipb21/skin_acp/IPB2_Standard/images/users.
png\ border=\0\ align=\absmiddle\ alt=\Á´½ÓͼƬ\
onload=\if(screen.width*0.7this.width) {this.resized=true;
this.width=screen.width*0.7;}\ /br /bAdverment#33;/b Do
you
need to control a computer remotely, even when firewalls get in the
way?
My company#39;s latest product, a href=\https://www.copilot.com/\;
target=\_blank\Fog Creek Copilot/a, is a remote control system
that
requires no setup, no configuration, and works even if both users are
behind firewalls. It#39;s designed to make remote tech support easy.
br /br /Enter your email address to receive a (very
occasional) email whenever I write a major new article. You can
unsubscribe at any time, of course.br //div;

$txt = strip_tags( $txt );
print $txt;

?



[2005-10-14 03:24:18] backdream at gmail dot com

Description:

strip_tags cannot work when string include img tags

Reproduce code:
---
?php

$txt = Next: a
href=\http://www.joelonsoftware.com/uibook/chapters/fog63.html\;
target=\_blank\Designing for People Who Have Better Things To Do With
Their Lives, Part Two/a br /br /img
src=\http://86.0.190.20/test/ipb21/skin_acp/IPB2_Standard/images/users.png\;
border=\0\ align=\absmiddle\ alt=\Á´½ÓͼƬ\
onload=\if(screen.width*0.7this.width) {this.resized=true;
this.width=screen.width*0.7;}\ /br /bAdverment#33;/b Do
you need to control a computer remotely, even when firewalls get in the
way? My company#39;s latest product, a
href=\https://www.copilot.com/\; target=\_blank\Fog Creek
Copilot/a, is a remote control system that requires no setup, no
configuration, and works even if both users are behind firewalls.
It#39;s designed to make remote tech support easy. br /br
/Enter your email address to receive a (very occasional) email
whenever I write a major new article. You can unsubscribe at any time,
of course.br //div;
$txt = preg_replace( #img[^]*#i, , $txt );
$txt = strip_tags( $txt );
print $txt;

?

Expected result:

strip all the html tags

Actual result:
--
break when run over img tag.





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


#34860 [Opn-Bgs]: fwrite returns 0 instead of false on some failures

2005-10-14 Thread tony2001
 ID:   34860
 Updated by:   [EMAIL PROTECTED]
 Reported By:  aaron-php at oakadaptive dot com
-Status:   Open
+Status:   Bogus
 Bug Type: Filesystem function related
 Operating System: Linux (Red Hat and SUSE)
 PHP Version:  5.0.5
 New Comment:

The docs are clear about it:
fwrite() returns the number of bytes written, or FALSE on error.

There were no error, but 0 bytes were written (because of the obvious
reason).


Previous Comments:


[2005-10-13 21:04:53] aaron-php at oakadaptive dot com

Description:

When fwrite can't write its whole second argument, it
returns the number of bytes it did succeed in writing
instead of false.

This behavior is mentioned in the user comments for fwrite,
but I couldn't find it reported as a bug.  I consider it a
bug, because it makes testing for a failed fwrite harder;
it's necessary to compare the length of the string with
fwrite's return value.

If it is intended behavior, I think the documentation should
be clearer, explicitly saying that if fwrite does return an
int, it can be less than the string's length (and as little
as zero).

(fwrite does return false if, for instance, its first
argument is not a file handle.  It also triggers a warning.)

Reproduce code:
---
$Filename = 'deleteme';
if (touch($Filename)): // Make sure file exists.
  $FileHnd = fopen($Filename, 'r'); // Open read-only.
  if ($FileHnd):
$ByteCount = fwrite($FileHnd, 'test'); // Try to write 4 bytes.
if ($ByteCount === false):
  echo fwrite() returned false\n;
else:
  echo fwrite() wrote $ByteCount byte(s)\n; // Reports
// that 0 bytes were written (tested on v.  5.0.5 and 4.3.4):
endif;
fclose($FileHnd);
unlink($Filename); // Clean up.
  endif;
endif;

Expected result:

fwrite() returned false

Actual result:
--
fwrite() wrote 0 byte(s)





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


#34861 [Opn-Fbk]: No documented way for PDO to escape a colon

2005-10-14 Thread tony2001
 ID:   34861
 Updated by:   [EMAIL PROTECTED]
 Reported By:  todd at bluecliff dot net
-Status:   Open
+Status:   Feedback
 Bug Type: PDO related
 Operating System: FreeBSD
 PHP Version:  5.0.5
 New Comment:

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

Works perfectly here:
?php
$pdo = new PDO('mysql:host=localhost;dbname=test', 'root', '');
$stmt = $pdo-prepare(UPDATE test SET a = '10:53:00');
var_dump($stmt-execute());
?
bool(true)


Previous Comments:


[2005-10-13 21:21:24] todd at bluecliff dot net

Description:

There is no documented way to escape a colon in PDO.  I understand that
there may be a new patch to make this optional, however, I would not
like to use the bindParam function, I would just like to escape it
outright.  no number of backslashes seem to work.  This bug hints at
the problem, however, there is no note on how to escape a : (colon):
http://bugs.php.net/bug.php?id=33736edit=2

Reproduce code:
---
// basically just an update on a time field
$sql_query_str = UPDATE _sif_message_queue SET
msg_time_remote='10:53:00' WHERE
message_queue_id=.$this-message_queue_id;
$stmt = $appconnection-prepare($sql_query_str);
$stmt-execute();

Expected result:

Query executes successfully

Actual result:
--
SQLSTATE[HY093]: Invalid parameter number: no parameters were bound






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


#34821 [Fbk-Opn]: zlib encoders fail on widely varying binary data

2005-10-14 Thread mike
 ID:   34821
 Updated by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
-Status:   Feedback
+Status:   Open
 Bug Type: Zlib Related
 Operating System: Win32
 PHP Version:  5CVS-2005-10-10 (cvs)
 New Comment:

Reopen for Win32, Edin yould you verify or the opposite?
Thanks.


Previous Comments:


[2005-10-13 21:13:47] [EMAIL PROTECTED]

It apparently only fails on Windows...

Don't ask me why I didn't check on Linux too, at the first place, but
Tony, why did you request a patch? Did you try the script and did it
fail or not?





[2005-10-13 19:05:23] [EMAIL PROTECTED]

I've just tried the code on Linux using 5.1-cvs and I am not seeing any
errors being reported.



[2005-10-11 19:03:43] [EMAIL PROTECTED]

http://dev.iworks.at/PATCHES/bug_34821.txt



[2005-10-11 18:43:31] [EMAIL PROTECTED]

Do you have a patch?



[2005-10-11 17:38:00] [EMAIL PROTECTED]

A possible fix would be to raise the size of the memory allocated by
default, e.g. adding 1% to the length of the incoming data instead of
0.1% additionally to some safe padding bytes.




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

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


#34844 [Opn-Fbk]: PHP 5.1.0RC1 Make Fails on OS X

2005-10-14 Thread tony2001
 ID:   34844
 Updated by:   [EMAIL PROTECTED]
 Reported By:  admin at allthingsinteresting dot com
-Status:   Open
+Status:   Feedback
 Bug Type: Compile Failure
 Operating System: Mac OS X
 PHP Version:  5.1.0RC1
 New Comment:

`/usr/bin/xml2-config --version` should the version number.
I'm not sure xml2-config is under /usr/bin/ in MacOS, so you should
find it yourself.


Previous Comments:


[2005-10-13 16:25:18] admin at allthingsinteresting dot com

How Do I tell?

I would be perfectly glad to disable it, if I knew how...



[2005-10-13 10:44:22] [EMAIL PROTECTED]

Which version of libxml2 you have in your system?



[2005-10-13 01:32:39] admin at allthingsinteresting dot com

The snapshot is suffering with the same xml parser bug, at least on my
computer.



[2005-10-13 00:29:09] [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-10-13 00:23:27] admin at allthingsinteresting dot com

Description:

It appears that there is some problem which is preventing me from
installing php on my iBook running Mac OS 10.3

I believe that I am following the correct installation procedure, but
when I shellmake it dies with a bunch of errors.

Reproduce code:
---
cd /usr/local/php-5.1.0RC1
./configure --without-pear
make
make install

Expected result:

PHP Install Itself

Actual result:
--
/bin/sh /usr/local/php-5.1.0RC1/libtool --silent --preserve-dup-deps
--mode=compile gcc  -Iext/libxml/ -I/usr/local/php-5.1.0RC1/ext/libxml/
-DPHP_ATOM_INC -I/usr/local/php-5.1.0RC1/include
-I/usr/local/php-5.1.0RC1/main -I/usr/local/php-5.1.0RC1
-I/usr/include/libxml2 -I/usr/local/php-5.1.0RC1/TSRM
-I/usr/local/php-5.1.0RC1/Zend  -no-cpp-precomp  -g -O2  -c
/usr/local/php-5.1.0RC1/ext/libxml/libxml.c -o ext/libxml/libxml.lo 
/usr/local/php-5.1.0RC1/ext/libxml/libxml.c:337: error: parse error
before error
/usr/local/php-5.1.0RC1/ext/libxml/libxml.c: In function
`_php_libxml_free_error':
/usr/local/php-5.1.0RC1/ext/libxml/libxml.c:339: error: `error'
undeclared (first use in this function)
/usr/local/php-5.1.0RC1/ext/libxml/libxml.c:339: error: (Each
undeclared identifier is reported only once
/usr/local/php-5.1.0RC1/ext/libxml/libxml.c:339: error: for each
function it appears in.)
/usr/local/php-5.1.0RC1/ext/libxml/libxml.c: At top level:
/usr/local/php-5.1.0RC1/ext/libxml/libxml.c:343: error: parse error
before error
/usr/local/php-5.1.0RC1/ext/libxml/libxml.c: In function
`_php_list_set_error_structure':
/usr/local/php-5.1.0RC1/ext/libxml/libxml.c:345: error: `xmlError'
undeclared (first use in this function)
/usr/local/php-5.1.0RC1/ext/libxml/libxml.c:345: error: parse error
before error_copy
/usr/local/php-5.1.0RC1/ext/libxml/libxml.c:350: error: `error_copy'
undeclared (first use in this function)
/usr/local/php-5.1.0RC1/ext/libxml/libxml.c:352: error: `error'
undeclared (first use in this function)
/usr/local/php-5.1.0RC1/ext/libxml/libxml.c:357: error: `XML_ERR_ERROR'
undeclared (first use in this function)
/usr/local/php-5.1.0RC1/ext/libxml/libxml.c:363: error: `msg'
undeclared (first use in this function)
/usr/local/php-5.1.0RC1/ext/libxml/libxml.c: At top level:
/usr/local/php-5.1.0RC1/ext/libxml/libxml.c:455: error: parse error
before xmlErrorPtr
/usr/local/php-5.1.0RC1/ext/libxml/libxml.c: In function
`php_libxml_structured_error_handler':
/usr/local/php-5.1.0RC1/ext/libxml/libxml.c:457: error: `error'
undeclared (first use in this function)
make: *** [ext/libxml/libxml.lo] Error 1





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


#32935 [Com]: SNMP timeouts on specific OIDs and truncating of certain OID return strings

2005-10-14 Thread pawelgl at interia dot pl
 ID:   32935
 Comment by:   pawelgl at interia dot pl
 Reported By:  nospam-php at homeuseonly dot co dot uk
 Status:   Open
 Bug Type: SNMP related
 Operating System: Windows 2003 SP1 / Windows XP SP
 PHP Version:  5CVS-2005-07-29
 New Comment:

I have the same problem with php 4.3.10.
It looks that problem is related to number of backslashes \. It looks
like inside conversion unwind \ into \\ not changing size of string
array. During return conversion all \\ are winded into \ but trailing
chars are lost.


Previous Comments:


[2005-07-29 18:34:34] nospam-php at homeuseonly dot co dot uk

I have upgraded to the Windows CVS snapshot, but I am still getting
truncated output.

?php
print_R(snmpwalk(192.168.253.10,public,
.1.3.6.1.2.1.25.4.2.1.4));
?

gives me:
Array ( [0] =  [1] =  [2] = C:\\WINDOWS [3] = C:\\Program
Files\\Microsoft Office\\OFFICE [4] = \\SystemRoot\\System3 [5] =
C:\\WINDOWS\\system3 [6] =  [7] = C:\\WINDOWS\\system3 [8] =
C:\\WINDOWS\\system3 [9] = C:\\WINDOWS\\system3 [10] =
C:\\WINDOWS\\system3 [11] = C:\\WINDOWS\\System3 [12] =
C:\\WINDOWS\\system3 [13] = C:\\WINDOWS\\System3 [14] =
C:\\PROGRA~1\\Grisoft\\AV [15] = C:\\WINDOWS\\system3 [16] =
C:\\WINDOWS\\system3 [17] = C:\\PROGRA~1\\Grisoft\\AV [18] =
C:\\Program Files\\Alcohol Soft\\Alcohol 1 [19] = C:\\WINDOWS\
.SNIP



[2005-05-03 23:24:35] nospam-php at homeuseonly dot co dot uk

Description:

When running making specific SNMP get/walks against Windows 2003 or
Windows XP the following has been seen to occur

1.  Sometimes the SNMP walk against .1.3.6.1.2.1.25.2.3 the request
times out.  If I use GetIf to walk the OID the results are displayed,
but PHP fails randomly

2.  When viewing .1.3.6.1.2.1.25.4.2.1.4 with GetIf the file
paths/names are displayed in full, but when I do a SNMP walk the output
is truncated.




Reproduce code:
---
The code can be downloaded from 
http://sourceforge.net/users/lsms-mrtg/

The example windows code is in the package.

Example of the truncated output

?php
print_R(snmpwalk(127.0.0.1,public, .1.3.6.1.2.1.25.4.2.1.4));

?

Expected result:

The full program paths displayed, where appropriate.


Actual result:
--
Array ( [0] =  [1] =  [2] = C:\\Program Files\\Promise
Technology, Inc.\\Promise Array Manageme [3] =  [4] =  [5] =
C:\\users\\isms\\l [6] =  [7] = C:\\WINDOWS\\System3 [8] =
C:\\users\\isms\\l [9] = \\SystemRoot\\System3 [10] =  [11] =
c:\\squid\\sbi [12] = C:\\WINDOWS\\system3 [13] =  [14] =
C:\\WINDOWS\\system3 [15] = C:\\WINDOWS\\System3 [16] =
C:\\WINDOWS\\system3 [17] = C:\\WINDOWS\\system3 [18] =
C:\\WINDOWS\\system3 [19] = C:\\users\\isms\\l [20] = C:\\FS3
[21] =  [22] =  [23] =  [24] =  [25] =
C:\\WINDOWS\\System3 [26] = C:\\WINDOWS\\system3 [27] =
C:\\WINDOWS\\system3 [28] =  [29] = C:\\Program
Files\\TightVNC-unstabl [30] = C:\\PROGRA~1\\Grisoft\\AV [31] =
C:\\users\\isms\\l [32] = C:\\Program Files\\Apache
Group\\Apache2\\ [33] =  [34] = C:\\PROGRA~1\\Grisoft\\AV [35]
= C:\\Program Files\\Promise Technology, Inc\\Promise Array Manageme
[36] = C:\\PROGRA~1\\Grisoft\\AV [37] = C:\\WINDOWS\\system3 [38]
= C:\\users\\isms\\l [39] =  [40] = C:\\WINDOWS\\System3 [41]
= C:\\users\\isms\\l [42] =  [43] = C:\\FS3 [44] =
C:\\users\\isms\\l [45] =  [46] = C:\\Program Files\\Promise
Technology, Inc.\\Promise Array Manageme [47] =  [48] =
C:\\WINDOWS [49] =  [50] = C:\\PROGRA~1\\Grisoft\\AV [51] =
C:\\WINDOWS [52] = C:\\Program Files\\ASUS\\Pro [53] =
C:\\WINDOWS\\system3 [54] = C:\\Program Files\\ATI
Technologies\\ATI Control Pan [55] =  [56] =  [57] =
C:\\WINDOWS\\system32\\wb [58] = C:\\Program Files\\Apache
Group\\Apache2\\ [59] = C:\\FS3 [60] =  [61] =
C:\\PROGRA~1\\HAUPPA~ [62] =  [63] =
C:\\PROGRA~1\\HAUPPA~1\\Hardwa [64] =  [65] = C:\\Program
Files\\Apache Group\\Apache2\\ [66] =
C:\\PROGRA~1\\HAUPPA~1\\Hardwa [67] =  [68] =
C:\\WINDOWS\\system3 [69] =  ) 





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


#34851 [Opn]: SO_RECVTIMEO sec stands for usec!!!! and usec has no effect!

2005-10-14 Thread mike
 ID:   34851
 Updated by:   [EMAIL PROTECTED]
 Reported By:  khayll at motoros dot hu
 Status:   Open
 Bug Type: Sockets related
 Operating System: win 2k3 server
 PHP Version:  4.4.0
 New Comment:

Winsock implementation does not support all BSD options for setsockopt,
SO_RCVTIMEO is within these.





Previous Comments:


[2005-10-13 18:18:23] khayll at motoros dot hu

Please read carefully what I wrote...

If I use 0 sec and 500 usec, the script HANGS when there's no response
(which means usec has NO EFFECT)! (Sorry I cannot reproduce remote
machine not sending a response, but accepting connections) and with a
setting of 1 sec 0 usec which is pretty much for a response I get a
timeout error.

here execute this script and it will show you the script execution time
is less than 1 sec at all giving a timeout:

?php

echo microtime().br\n;

$socket = socket_create(AF_INET, SOCK_STREAM, SOL_TCP);
socket_set_option($socket, SOL_SOCKET, SO_RCVTIMEO, array(sec=1,
usec=0));
socket_connect($socket, 81.182.13.109, 502);

$pdu = ;
$pdu .= chr(0x03).chr(floor(16000 / 256)).chr(16000 %
256).chr(floor(10 / 256)).chr(10 % 256);

$rand = mt_rand(1,65535); //generate random adu id
$adu = ;
$adu .= chr(floor($rand / 256)).chr($rand %
256).chr(0).chr(0).chr(floor(6 / 256)).chr(6 % 256).chr(1);

$data = $adu.$pdu;

socket_write($socket, $data, strlen($data));

$result = socket_read($socket, 512, PHP_BINARY_READ);

if($result===false) echo
socket_strerror(socket_last_error()).br\n;

socket_shutdown($socket, 2);
socket_close($socket);

echo microtime().br\n;

?

result:

0.32968200 1129220264

Warning: socket_read() unable to read from socket [0]: A connection
attempt failed because the connected party did not properly respond
after a period of time, or established connection failed because
connected host has failed to respond. in
c:\data\web\rtu\rtu_web\phpbug.php on line 20
A connection attempt failed because the connected party did not
properly respond after a period of time, or established connection
failed because connected host has failed to respond. 
0.89507800 1129220264



[2005-10-13 17:52:57] [EMAIL PROTECTED]

Well, that's because USEC are *microseconds*, not milliseconds.
Try to use sec=0 usec=500 instead.



[2005-10-13 17:52:20] khayll at motoros dot hu

sorry I forgot a line from the code:

I also decreased the sec param to 1 because for me the remote host is
quite fast.

?php

$socket = socket_create(AF_INET, SOCK_STREAM, SOL_TCP);
socket_set_option($socket, SOL_SOCKET, SO_RCVTIMEO, array(sec=1,
usec=0));
socket_connect($socket, 81.182.13.109, 502);

$pdu = ;
$pdu .= chr(0x03).chr(floor(16000 / 256)).chr(16000 %
256).chr(floor(10 / 256)).chr(10 % 256);

$rand = mt_rand(1,65535); //generate random adu id
$adu = ;
$adu .= chr(floor($rand / 256)).chr($rand %
256).chr(0).chr(0).chr(floor(6 / 256)).chr(6 % 256).chr(1);

$data = $adu.$pdu;

socket_write($socket, $data, strlen($data));

$result = socket_read($socket, 512, PHP_BINARY_READ);

echo socket_strerror(socket_last_error());

socket_shutdown($socket, 2);
socket_close($socket);

?



[2005-10-13 17:41:05] khayll at motoros dot hu

And if I set sec=0 usec=50 (or 5 for a shorter timeout) it hangs,
meaning to me, that usec has no effect.



[2005-10-13 17:38:56] khayll at motoros dot hu

Actual: Script gives timeout error but it does not wait for 5 seconds
for the answer, as set in SO_RCVTIMEO.

Expeted: to wait max. 5 second for remote host to answer, but script
executes much faster. I tried to increase second to 50 and then it
works ok.



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

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


#34871 [NEW]: php isapi does not impersonate app. pool user

2005-10-14 Thread giunta dot gaetano at sea-aeroportimilano dot it
From: giunta dot gaetano at sea-aeroportimilano dot it
Operating system: Windows 2003
PHP version:  4.4.0
PHP Bug Type: IIS related
Bug description:  php isapi does not impersonate app. pool user

Description:

I had a very hard time trying to figure out which user will be used to
actually run the php processes on IIS 6+php isapi.

The server is configured in non-IIS5-compliant security mode, and php runs
fine, but it keeps using the windows user account configured for anonymous
website access, instead of the user account set for the Application Pool
connected to the website in question.

All MS docs state that web apps run under the user account/using the
privileges of the account defined for the App. Pool (by default NETWORK
SERVICE).

User comments on the online manual vary wildly: some users seem to have
had success in using the app. pool user, some using the anonymous
connection user.

Docs at
http://www.microsoft.com/technet/prodtechnol/windowsserver2003/technologies/webapp/iis/appisoa.mspx#EGAA
indicate that in order for the web app to exibhit this behaviour, it has
to call the he Win32API RevertToSelf function, of which I sould finnd no
trace in the php source code, except for the FCGI module...

Am I missing something?


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


#34871 [Opn-Fbk]: php isapi does not impersonate app. pool user

2005-10-14 Thread wez
 ID:   34871
 Updated by:   [EMAIL PROTECTED]
 Reported By:  giunta dot gaetano at sea-aeroportimilano dot it
-Status:   Open
+Status:   Feedback
 Bug Type: IIS related
 Operating System: Windows 2003
 PHP Version:  4.4.0
 New Comment:

How did you determine that it isn't impersonating?



Previous Comments:


[2005-10-14 14:56:53] giunta dot gaetano at sea-aeroportimilano dot it

Description:

I had a very hard time trying to figure out which user will be used to
actually run the php processes on IIS 6+php isapi.

The server is configured in non-IIS5-compliant security mode, and php
runs fine, but it keeps using the windows user account configured for
anonymous website access, instead of the user account set for the
Application Pool connected to the website in question.

All MS docs state that web apps run under the user account/using the
privileges of the account defined for the App. Pool (by default NETWORK
SERVICE).

User comments on the online manual vary wildly: some users seem to have
had success in using the app. pool user, some using the anonymous
connection user.

Docs at
http://www.microsoft.com/technet/prodtechnol/windowsserver2003/technologies/webapp/iis/appisoa.mspx#EGAA
indicate that in order for the web app to exibhit this behaviour, it
has to call the he Win32API RevertToSelf function, of which I sould
finnd no trace in the php source code, except for the FCGI module...

Am I missing something?






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


#34851 [Opn]: SO_RECVTIMEO sec stands for usec!!!! and usec has no effect!

2005-10-14 Thread mike
 ID:   34851
 Updated by:   [EMAIL PROTECTED]
 Reported By:  khayll at motoros dot hu
 Status:   Open
 Bug Type: Sockets related
 Operating System: win 2k3 server
 PHP Version:  4.4.0
 New Comment:

But I cannot reproduce either, here's what I receive (base64),
without warnings (on Win2k):

PHP-4.3.8: UukXAQMUcmV2LjIuMiAgIgFQMUVSSyA=
PHP-5-CVS: /AoXAQMUcmV2LjIuMiAgIgFQMUVSSyA=



Previous Comments:


[2005-10-14 14:36:03] [EMAIL PROTECTED]

Winsock implementation does not support all BSD options for setsockopt,
SO_RCVTIMEO is within these.






[2005-10-13 18:18:23] khayll at motoros dot hu

Please read carefully what I wrote...

If I use 0 sec and 500 usec, the script HANGS when there's no response
(which means usec has NO EFFECT)! (Sorry I cannot reproduce remote
machine not sending a response, but accepting connections) and with a
setting of 1 sec 0 usec which is pretty much for a response I get a
timeout error.

here execute this script and it will show you the script execution time
is less than 1 sec at all giving a timeout:

?php

echo microtime().br\n;

$socket = socket_create(AF_INET, SOCK_STREAM, SOL_TCP);
socket_set_option($socket, SOL_SOCKET, SO_RCVTIMEO, array(sec=1,
usec=0));
socket_connect($socket, 81.182.13.109, 502);

$pdu = ;
$pdu .= chr(0x03).chr(floor(16000 / 256)).chr(16000 %
256).chr(floor(10 / 256)).chr(10 % 256);

$rand = mt_rand(1,65535); //generate random adu id
$adu = ;
$adu .= chr(floor($rand / 256)).chr($rand %
256).chr(0).chr(0).chr(floor(6 / 256)).chr(6 % 256).chr(1);

$data = $adu.$pdu;

socket_write($socket, $data, strlen($data));

$result = socket_read($socket, 512, PHP_BINARY_READ);

if($result===false) echo
socket_strerror(socket_last_error()).br\n;

socket_shutdown($socket, 2);
socket_close($socket);

echo microtime().br\n;

?

result:

0.32968200 1129220264

Warning: socket_read() unable to read from socket [0]: A connection
attempt failed because the connected party did not properly respond
after a period of time, or established connection failed because
connected host has failed to respond. in
c:\data\web\rtu\rtu_web\phpbug.php on line 20
A connection attempt failed because the connected party did not
properly respond after a period of time, or established connection
failed because connected host has failed to respond. 
0.89507800 1129220264



[2005-10-13 17:52:57] [EMAIL PROTECTED]

Well, that's because USEC are *microseconds*, not milliseconds.
Try to use sec=0 usec=500 instead.



[2005-10-13 17:52:20] khayll at motoros dot hu

sorry I forgot a line from the code:

I also decreased the sec param to 1 because for me the remote host is
quite fast.

?php

$socket = socket_create(AF_INET, SOCK_STREAM, SOL_TCP);
socket_set_option($socket, SOL_SOCKET, SO_RCVTIMEO, array(sec=1,
usec=0));
socket_connect($socket, 81.182.13.109, 502);

$pdu = ;
$pdu .= chr(0x03).chr(floor(16000 / 256)).chr(16000 %
256).chr(floor(10 / 256)).chr(10 % 256);

$rand = mt_rand(1,65535); //generate random adu id
$adu = ;
$adu .= chr(floor($rand / 256)).chr($rand %
256).chr(0).chr(0).chr(floor(6 / 256)).chr(6 % 256).chr(1);

$data = $adu.$pdu;

socket_write($socket, $data, strlen($data));

$result = socket_read($socket, 512, PHP_BINARY_READ);

echo socket_strerror(socket_last_error());

socket_shutdown($socket, 2);
socket_close($socket);

?



[2005-10-13 17:41:05] khayll at motoros dot hu

And if I set sec=0 usec=50 (or 5 for a shorter timeout) it hangs,
meaning to me, that usec has no effect.



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

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


#34871 [Fbk-Opn]: php isapi does not impersonate app. pool user

2005-10-14 Thread giunta dot gaetano at sea-aeroportimilano dot it
 ID:   34871
 User updated by:  giunta dot gaetano at sea-aeroportimilano dot it
 Reported By:  giunta dot gaetano at sea-aeroportimilano dot it
-Status:   Feedback
+Status:   Open
 Bug Type: IIS related
 Operating System: Windows 2003
 PHP Version:  4.4.0
 New Comment:

Quick test:
Anonymous access for IIS set to IUSR_XXX; App Pool user set to
IWAM_XXX; set a .txt file permissions to 'read access only for
IWAM_XXX' and called readfile() on it.


Previous Comments:


[2005-10-14 15:04:03] [EMAIL PROTECTED]

How did you determine that it isn't impersonating?




[2005-10-14 14:56:53] giunta dot gaetano at sea-aeroportimilano dot it

Description:

I had a very hard time trying to figure out which user will be used to
actually run the php processes on IIS 6+php isapi.

The server is configured in non-IIS5-compliant security mode, and php
runs fine, but it keeps using the windows user account configured for
anonymous website access, instead of the user account set for the
Application Pool connected to the website in question.

All MS docs state that web apps run under the user account/using the
privileges of the account defined for the App. Pool (by default NETWORK
SERVICE).

User comments on the online manual vary wildly: some users seem to have
had success in using the app. pool user, some using the anonymous
connection user.

Docs at
http://www.microsoft.com/technet/prodtechnol/windowsserver2003/technologies/webapp/iis/appisoa.mspx#EGAA
indicate that in order for the web app to exibhit this behaviour, it
has to call the he Win32API RevertToSelf function, of which I sould
finnd no trace in the php source code, except for the FCGI module...

Am I missing something?






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


#34851 [Opn]: SO_RECVTIMEO sec stands for usec!!!! and usec has no effect!

2005-10-14 Thread mike
 ID:   34851
 Updated by:   [EMAIL PROTECTED]
 Reported By:  khayll at motoros dot hu
 Status:   Open
 Bug Type: Sockets related
 Operating System: win 2k3 server
 PHP Version:  4.4.0
 New Comment:

Ok, ok, my last comment :)

The real problem seems to be that windows expects a DWORD and not a
timeval as parameter.



Previous Comments:


[2005-10-14 15:08:03] [EMAIL PROTECTED]

But I cannot reproduce either, here's what I receive (base64),
without warnings (on Win2k):

PHP-4.3.8: UukXAQMUcmV2LjIuMiAgIgFQMUVSSyA=
PHP-5-CVS: /AoXAQMUcmV2LjIuMiAgIgFQMUVSSyA=




[2005-10-14 14:36:03] [EMAIL PROTECTED]

Winsock implementation does not support all BSD options for setsockopt,
SO_RCVTIMEO is within these.






[2005-10-13 18:18:23] khayll at motoros dot hu

Please read carefully what I wrote...

If I use 0 sec and 500 usec, the script HANGS when there's no response
(which means usec has NO EFFECT)! (Sorry I cannot reproduce remote
machine not sending a response, but accepting connections) and with a
setting of 1 sec 0 usec which is pretty much for a response I get a
timeout error.

here execute this script and it will show you the script execution time
is less than 1 sec at all giving a timeout:

?php

echo microtime().br\n;

$socket = socket_create(AF_INET, SOCK_STREAM, SOL_TCP);
socket_set_option($socket, SOL_SOCKET, SO_RCVTIMEO, array(sec=1,
usec=0));
socket_connect($socket, 81.182.13.109, 502);

$pdu = ;
$pdu .= chr(0x03).chr(floor(16000 / 256)).chr(16000 %
256).chr(floor(10 / 256)).chr(10 % 256);

$rand = mt_rand(1,65535); //generate random adu id
$adu = ;
$adu .= chr(floor($rand / 256)).chr($rand %
256).chr(0).chr(0).chr(floor(6 / 256)).chr(6 % 256).chr(1);

$data = $adu.$pdu;

socket_write($socket, $data, strlen($data));

$result = socket_read($socket, 512, PHP_BINARY_READ);

if($result===false) echo
socket_strerror(socket_last_error()).br\n;

socket_shutdown($socket, 2);
socket_close($socket);

echo microtime().br\n;

?

result:

0.32968200 1129220264

Warning: socket_read() unable to read from socket [0]: A connection
attempt failed because the connected party did not properly respond
after a period of time, or established connection failed because
connected host has failed to respond. in
c:\data\web\rtu\rtu_web\phpbug.php on line 20
A connection attempt failed because the connected party did not
properly respond after a period of time, or established connection
failed because connected host has failed to respond. 
0.89507800 1129220264



[2005-10-13 17:52:57] [EMAIL PROTECTED]

Well, that's because USEC are *microseconds*, not milliseconds.
Try to use sec=0 usec=500 instead.



[2005-10-13 17:52:20] khayll at motoros dot hu

sorry I forgot a line from the code:

I also decreased the sec param to 1 because for me the remote host is
quite fast.

?php

$socket = socket_create(AF_INET, SOCK_STREAM, SOL_TCP);
socket_set_option($socket, SOL_SOCKET, SO_RCVTIMEO, array(sec=1,
usec=0));
socket_connect($socket, 81.182.13.109, 502);

$pdu = ;
$pdu .= chr(0x03).chr(floor(16000 / 256)).chr(16000 %
256).chr(floor(10 / 256)).chr(10 % 256);

$rand = mt_rand(1,65535); //generate random adu id
$adu = ;
$adu .= chr(floor($rand / 256)).chr($rand %
256).chr(0).chr(0).chr(floor(6 / 256)).chr(6 % 256).chr(1);

$data = $adu.$pdu;

socket_write($socket, $data, strlen($data));

$result = socket_read($socket, 512, PHP_BINARY_READ);

echo socket_strerror(socket_last_error());

socket_shutdown($socket, 2);
socket_close($socket);

?



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

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


#34868 [Fbk-Opn]: sqlite_open() fails if directory along path misses read flag

2005-10-14 Thread Bjorn dot Wiberg at its dot uu dot se
 ID:   34868
 User updated by:  Bjorn dot Wiberg at its dot uu dot se
 Reported By:  Bjorn dot Wiberg at its dot uu dot se
-Status:   Feedback
+Status:   Open
 Bug Type: SQLite related
 Operating System: AIX 5.2 ML5
-PHP Version:  5.0.5
+PHP Version:  5.1.0RC1
 New Comment:

Hello Tony!

Thanks for your reply!

The permission missing is r (allowing directory listings), which
needs to be present all the way.

Has something changed in the CVS recently (e.g., today) pertaining to
this issue? I have tried it on 5.1.0RC1.

The reason why I'm asking is that compilation, dependency checking etc.
takes several hours on this machine, and has to be introduced into a
production environment, so unless the PHP code for the SQLite extension
has actually changed since 5.1.0RC1 (e.g. a synchronization of the code
with the upstream provider, i.e., the SQLite developers), I'd like to
avoid recompiles as much as possible.

Eagerly awaiting your reply, and wishing you a nice weekend!

Best regards,
Björn


Previous Comments:


[2005-10-14 13:13:40] [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


read (directory listing)
So is it r (read) or x (directory listing)? Or both?



[2005-10-14 10:15:47] Bjorn dot Wiberg at its dot uu dot se

Description:

If the path to the database to be created or opened does not have
read (directory listing) rights all the way, sqlite_open() fails.

Presumably because of getcwd() usage.


If one specifies the full path to the database file to be opened or
created, everything appears to work just fine.

Similarly, if one makes sure that read rights are present all the
way, everything appears to work just fine as well.


I do not know if this is specific to PHP+sqlite or to SQLite itself.

I'm using the bundled SQLite (automatically detected during
./configure).

Reproduce code:
---
?php
  if ($db = sqlite_open('mysqlitedb', 0666, $sqliteerror)) {
  //if ($db = sqlite_open('./mysqlitedb', 0666, $sqliteerror)) {
  //if ($db = sqlite_open(dirname(__FILE__) . '/mysqlitedb', 0666,
$sqliteerror)) {
 sqlite_query($db, 'CREATE TABLE foo (bar varchar(10))');
 sqlite_query($db, INSERT INTO foo VALUES ('fnord'));
 $result = sqlite_query($db, 'select bar from foo');
 var_dump(sqlite_fetch_array($result));
  } else {
die($sqliteerror);
  }
?


Expected result:

Successful creation of the database in all cases:

array(2) { [0]=  string(5) fnord [bar]=  string(5) fnord }


Actual result:
--
CASE 1 (open mysqldb):

Warning: sqlite_open(): unable to open database: mysqlitedb in
/apache/htdocs/bwiberg/test/sqlite/sqlite.php on line 2 unable to open
database: mysqlitedb

CASE 2 (open ./mysqldb):

Warning: sqlite_open(): unable to open database: ./mysqlitedb in
/apache/htdocs/bwiberg/test/sqlite/sqlite.php on line 3 unable to open
database: ./mysqlitedb

CASE 3 (open with full path):

array(2) { [0]=  string(5) fnord [bar]=  string(5) fnord } 






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


#30931 [Com]: is_writable() and is_readable() return false when access is permitted via ACL

2005-10-14 Thread cunha17 at gmail dot com
 ID:   30931
 Comment by:   cunha17 at gmail dot com
 Reported By:  bugzilla-php at bwurst dot org
 Status:   No Feedback
 Bug Type: Filesystem function related
 Operating System: gentoo linux (kernel 2.6)
 PHP Version:  5.0.2
 New Comment:

PHP should not try to calculate permissions because only the Operating
System can do it right. As someone pointed out, PHP is ignoring my
POSIX ACL and Trustees too.


Previous Comments:


[2005-09-02 23:01:48] 1 at 234 dot cx

I was just wondering if anyone can review the patch which has been
posted here.  This seems to be a well defined bug with a patch that
solves the problem, is there any reason not to check it in?

If there *is* a reason not to check the patch in, I am sure one of us
will work on improving it.  Before we can do this, though, we need a
clue what issues people see with the patch as it stands.



[2005-08-26 03:03:50] matthew at acintrix dot net

I too am expierencing this bug on Fedora Core 4 with PHP 
5.0.4.



[2005-08-08 18:18:11] ka at pacific dot net

Same bug found here in 5.04 on Fedora Core 4 with modphp
Symptom: modphp cannot write to files even if they are `chmod 777`, if
there is an acl for apache on the file.



[2005-06-15 23:51:26] 1 at 234 dot cx

I don't know if this is useful to anyone, but this seems to be a
regression of bug #14923, which was fixed back in 2002.

I have just experienced the bug on Fedora 4.  I tried JR's patch, and
that solves the problem for me.

Thanks,
Pete



[2005-06-12 16:16:35] jr at terragate dot net

I've written a patch to address this issue.

It uses POSIX's access function to determine file 
permissions.

I tested this patch on Mac OS 10.4.1, Windows XP SP2 and 
FreeBSD 5.2.1.

I am not sure if this patch also works for Win 9x (maybe 
R_OK, W_OK etc. are not defined there) and other non POSIX 
conformant OSes. Probably some more #ifndefs are required.

http://jr.terragate.net/access.diff



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

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


#34828 [Bgs]: new mysqli_result($mysql); doesn't return expected instance

2005-10-14 Thread [EMAIL PROTECTED]
 ID:   34828
 User updated by:  [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
 Status:   Bogus
 Bug Type: MySQLi related
 Operating System: Windows XP Pro SP2
 PHP Version:  5.0.5
 New Comment:

Tested the latest 5.0.6-dev from snaps.php.net

$mysql = new mysqli($host, $user, $passwd);
$mysql-real_query(SELECT 'foo' FROM DUAL);
$myresult = new mysqli_result($mysql);
$row = $myresult-fetch_row();
$myresult-close();
$mysql-close();

And it fails the test. (Couldn't fetch mysqli_result...)


Previous Comments:


[2005-10-11 15:54:45] [EMAIL PROTECTED]

Oups, a mistake in my previous comment. I ment:

This works:

$mysql = new mysqli('localhost', 'root', '', 'test');
$result = $mysql-query(SELECT 'test');
$row = $result-fetch_row();

And this doesn't:

$mysql = new mysqli('localhost', 'root', '', 'test');
$mysql-query(SELECT 'test');
$result = new mysqli_result($mysql);
$row = $result-fetch_row();

---

$mysql-real_query('...'); is not relevant to this problem.



[2005-10-11 15:29:36] [EMAIL PROTECTED]

Use $mysql-real_query() if you want to create mysqli_result instance
yourself.
No bug here, that's how it works.



[2005-10-11 15:12:29] [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-10-11 15:10:14] [EMAIL PROTECTED]

This works:

$mysql = new mysqli('localhost', 'root', '', 'test');
$mysql-query(SELECT 'test');
$result = new mysqli_result($mysql);
$row = $result-fetch_row();

And this doesn't:

$mysql = new mysqli('localhost', 'root', '', 'test');
$result = $mysql-query(SELECT 'test');
$row = $result-fetch_row();



[2005-10-11 15:07:14] [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



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

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


#34828 [Bgs]: new mysqli_result($mysql); doesn't return expected instance

2005-10-14 Thread [EMAIL PROTECTED]
 ID:   34828
 User updated by:  [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
 Status:   Bogus
 Bug Type: MySQLi related
 Operating System: Windows XP Pro SP2
 PHP Version:  5.0.5
 New Comment:

With PHP-5.1.0RC1 works ok though.


Previous Comments:


[2005-10-14 16:31:44] [EMAIL PROTECTED]

Tested the latest 5.0.6-dev from snaps.php.net

$mysql = new mysqli($host, $user, $passwd);
$mysql-real_query(SELECT 'foo' FROM DUAL);
$myresult = new mysqli_result($mysql);
$row = $myresult-fetch_row();
$myresult-close();
$mysql-close();

And it fails the test. (Couldn't fetch mysqli_result...)



[2005-10-11 15:54:45] [EMAIL PROTECTED]

Oups, a mistake in my previous comment. I ment:

This works:

$mysql = new mysqli('localhost', 'root', '', 'test');
$result = $mysql-query(SELECT 'test');
$row = $result-fetch_row();

And this doesn't:

$mysql = new mysqli('localhost', 'root', '', 'test');
$mysql-query(SELECT 'test');
$result = new mysqli_result($mysql);
$row = $result-fetch_row();

---

$mysql-real_query('...'); is not relevant to this problem.



[2005-10-11 15:29:36] [EMAIL PROTECTED]

Use $mysql-real_query() if you want to create mysqli_result instance
yourself.
No bug here, that's how it works.



[2005-10-11 15:12:29] [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-10-11 15:10:14] [EMAIL PROTECTED]

This works:

$mysql = new mysqli('localhost', 'root', '', 'test');
$mysql-query(SELECT 'test');
$result = new mysqli_result($mysql);
$row = $result-fetch_row();

And this doesn't:

$mysql = new mysqli('localhost', 'root', '', 'test');
$result = $mysql-query(SELECT 'test');
$row = $result-fetch_row();



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

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


#34873 [NEW]: Segmentation Fault on foreach in object (used by smarty)

2005-10-14 Thread antleclercq at online dot fr
From: antleclercq at online dot fr
Operating system: Ubuntu (breezy)
PHP version:  5CVS-2005-10-14 (CVS)
PHP Bug Type: Arrays related
Bug description:  Segmentation Fault on foreach in object (used by smarty)

Description:

Hello,

I'm running:
- PHP 5.1RC2 CVS200510141230

I've got a nice segfault with that simple piece of code. The problem is
that the code style showed below is used by Smarty (in the compile
system)...

That problem has been reproduced on several systems.

Thanks for your help,

Antoine

Reproduce code:
---
?php
class pwa {
public $var;

function __construct()  {
$this-var = array();
}

function test (){
$cont = array();
$cont[mykey] = myvalue;

foreach ($cont as $this-var['key'] = $this-var['value'])
echo $this-var['value'];
}
}
$myPwa = new Pwa();
$myPwa-test();
?

Expected result:

This code should display:
myvalue
and continue its execution.

Actual result:
--
[EMAIL PROTECTED]:/home/web/sandbox.local/html $ php pwa.php
myvalue*** glibc detected *** double free or corruption (fasttop):
0x085149c8 ***
Aborted


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


#34874 [NEW]: strtotime(Day,time) output differs from earlier PHP5 versions

2005-10-14 Thread dverspui at hotpop dot com
From: dverspui at hotpop dot com
Operating system: Linux (Fedora 2)
PHP version:  5.1.0RC1
PHP Bug Type: Date/time related
Bug description:  strtotime(Day,time) output differs from earlier PHP5 
versions

Description:

strtotime(day,time) returns the specified day of the next week of
time if time itself is on day day.


Reproduce code:
---
print date(Ymd,strtotime(date(l,time()),time()));


Expected result:

Output should be the date of today, but on my installation it returns the
date of 7 days ahead. This differs from all earlier PHP versions.



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


#34729 [NoF-Opn]: SoapClient-SoapServer crashes under apache with 5.10RC2

2005-10-14 Thread matthew_peters at uk dot ibm dot com
 ID:   34729
 User updated by:  matthew_peters at uk dot ibm dot com
 Reported By:  matthew_peters at uk dot ibm dot com
-Status:   No Feedback
+Status:   Open
 Bug Type: SOAP related
 Operating System: WinXP
 PHP Version:  5CVS-2005-10-04 (snap)
 Assigned To:  dmitry
 New Comment:

I just checked and still fails in the same way - that is it fails and
works alternately - with the latest from snaps, that is, a build dated
1014. Note I am using Windows, not Linux. I just also checked that it
does work perfectly with my php5-RC1. I would try to build a debug
build and look at the problem myself but my attempt to build with the
soap extension enabled failed at the link step...I am not exactly sure
what the right config options are. 

BTW we had a similar (but not identical) problem with the SDO extension
that turned out to be our code calling xmlCleanupParser and reinstalling
the default input handlers so they no longer went through PHP. That
would cause the failures on every call from the second onward though. 

The exact code I am using, cut and pasted, is:
the client:

?php
ini_set(soap.wsdl_cache_enabled, 0);
$client = new SoapClient(stockquote.wsdl, array(trace = 1,
exceptions = 0));
print($client-getQuote(ibm));
?

the server:?php
$quotes = array(ibm = 98.45);

function getQuote($symbol) {
global $quotes;
return $quotes[$symbol];
}

ini_set(soap.wsdl_cache_enabled, 0);

$server = new SoapServer(C:\Program Files\Apache
Group\Apache2\htdocs\stockquote.wsdl);
$server-addFunction(getQuote);
$server-handle();

?

The wsdl is a bit larger and is taken from the article, unchanged
except for the 
soap:address location='http://localhost/server1.php'/ 
at the bottom.


Previous Comments:


[2005-10-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-10-04 19:00:55] [EMAIL PROTECTED]

I can't reproduce on Linux.
Please provide the reproduce case you've used (the code from the
article works perfectly here).



[2005-10-04 18:29:58] [EMAIL PROTECTED]

Assigned to the maintainer.



[2005-10-04 14:43:13] matthew_peters at uk dot ibm dot com

Description:

Running the samples in http://www.zend.com/php5/articles/php5-SOAP.php

Specifically using the sample client5.php to talk to server1.php, both
locally onthe same apache.

Works OK with 5.1.0RC1 but every two times pops up dialog box Apache
HTTP server has encountered a problem... with 5.1.0RC2. Actually
Apache is still running. 

Environment:
PHP 5.1.0RC2 - reports build date Oct 3 2005 20:23:30
WinXP
Apache 2.0
just the one php_soap.dll extension enabled in php.ini

I have also tried with 0916 build of RC2 (see stack trace below)

Reproduce code:
---
Use the samples straight from the SOAP article. Run at least twice as
working alternates with failing. 


Expected result:

Normal results as I see with RC1

Actual result:
--
Dialog box as mentioned,  

I also tried with a copy of RC2 I took from snaps at 200509160830 and
built with debug, and went into the debugger - the stack trace was:
NTDLL! 77f585c0()
_emalloc(unsigned int 10, char * 0x014165d0 `string', unsigned int 240,
char * 0x, unsigned int 0) line 182 + 63 bytes
_estrdup(const char * 0x007d47f0, char * 0x014165d0 `string', unsigned
int 240, char * 0x, unsigned int 0) line 403 + 25 bytes
sapi_get_default_content_type(void * * * 0x00b0a678) line 240 + 29
bytes
php_apache_request_ctor(request_rec * 0x005e1508, php_struct *
0x005e2da0, void * * * 0x00b0a678) line 419 + 12 bytes
php_handler(request_rec * 0x005e1508) line 535 + 17 bytes
LIBHTTPD! 6ff0155f()






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


#34863 [Fbk-Opn]: strip_tags cannot work when string include img tags

2005-10-14 Thread backdream at gmail dot com
 ID:   34863
 User updated by:  backdream at gmail dot com
 Reported By:  backdream at gmail dot com
-Status:   Feedback
+Status:   Open
 Bug Type: Strings related
 Operating System: Windows
-PHP Version:  4.4.0
+PHP Version:  4.3.11
 New Comment:

I tested with 4.3.11, It also have the bug.

--
?php

$txt = Next:
ahref=\http://www.joelonsoftware.com/uibook/chapters/fog63.html\;
target=\_blank\Designing for People Who Have Better Things To DoWith
Their Lives, Part Two/a br /br
/imgsrc=\http://86.0.190.20/test/ipb21/skin_acp/IPB2_Standard/images/users.png\;
border=\0\ align=\absmiddle\
alt=\Á´½ÓͼƬ\onload=\if(screen.width*0.7this.width)
{this.resized=true;this.width=screen.width*0.7;}\ /br
/bAdverment#33;/b Doyouneed to control a computer remotely,
even when firewalls get in theway?My company#39;s latest product, a
href=\https://www.copilot.com/\target=\_blank\;Fog Creek
Copilot/a, is a remote control systemthatrequires no setup, no
configuration, and works even if both users arebehind firewalls.
It#39;s designed to make remote tech support easy.br /br
/Enter your email address to receive a (veryoccasional) email
whenever I write a major new article. You canunsubscribe at any time,
of course.br //div;

$txt = strip_tags( $txt );
print $txt;

?
---

It print Next: Designing for People Who Have Better Things To DoWith
Their Lives, Part Two , but not the whole html tags striped
string.


Previous Comments:


[2005-10-14 13:18:53] [EMAIL PROTECTED]

Can't reproduce.
Both your scripts work fine with any PHP version I can find (4.3.11,
4.4, 5.0.x, 5.1).




[2005-10-14 03:31:24] backdream at gmail dot com

Sorry, the Reproduce code would be:
---
?php

$txt = Next: a
href=\http://www.joelonsoftware.com/uibook/chapters/fog63.html\
 target=\_blank\Designing for People Who Have Better Things To Do
With Their Lives, Part Two/a br /br /img
src=\http://86.0.190.20/test/ipb21/skin_acp/IPB2_Standard/images/users.
png\ border=\0\ align=\absmiddle\ alt=\Á´½ÓͼƬ\
onload=\if(screen.width*0.7this.width) {this.resized=true;
this.width=screen.width*0.7;}\ /br /bAdverment#33;/b Do
you
need to control a computer remotely, even when firewalls get in the
way?
My company#39;s latest product, a href=\https://www.copilot.com/\;
target=\_blank\Fog Creek Copilot/a, is a remote control system
that
requires no setup, no configuration, and works even if both users are
behind firewalls. It#39;s designed to make remote tech support easy.
br /br /Enter your email address to receive a (very
occasional) email whenever I write a major new article. You can
unsubscribe at any time, of course.br //div;

$txt = strip_tags( $txt );
print $txt;

?



[2005-10-14 03:24:18] backdream at gmail dot com

Description:

strip_tags cannot work when string include img tags

Reproduce code:
---
?php

$txt = Next: a
href=\http://www.joelonsoftware.com/uibook/chapters/fog63.html\;
target=\_blank\Designing for People Who Have Better Things To Do With
Their Lives, Part Two/a br /br /img
src=\http://86.0.190.20/test/ipb21/skin_acp/IPB2_Standard/images/users.png\;
border=\0\ align=\absmiddle\ alt=\Á´½ÓͼƬ\
onload=\if(screen.width*0.7this.width) {this.resized=true;
this.width=screen.width*0.7;}\ /br /bAdverment#33;/b Do
you need to control a computer remotely, even when firewalls get in the
way? My company#39;s latest product, a
href=\https://www.copilot.com/\; target=\_blank\Fog Creek
Copilot/a, is a remote control system that requires no setup, no
configuration, and works even if both users are behind firewalls.
It#39;s designed to make remote tech support easy. br /br
/Enter your email address to receive a (very occasional) email
whenever I write a major new article. You can unsubscribe at any time,
of course.br //div;
$txt = preg_replace( #img[^]*#i, , $txt );
$txt = strip_tags( $txt );
print $txt;

?

Expected result:

strip all the html tags

Actual result:
--
break when run over img tag.





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


#34861 [Fbk-Opn]: No documented way for PDO to escape a colon

2005-10-14 Thread todd at bluecliff dot net
 ID:   34861
 User updated by:  todd at bluecliff dot net
 Reported By:  todd at bluecliff dot net
-Status:   Feedback
+Status:   Open
 Bug Type: PDO related
 Operating System: FreeBSD
 PHP Version:  5.0.5
 New Comment:

I will try the latest snapshot, but I am also connecting against a
Postgresql 8 database with a column type of TIME, I don't know if
that makes a difference in your testing.


Previous Comments:


[2005-10-14 13:41:47] [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

Works perfectly here:
?php
$pdo = new PDO('mysql:host=localhost;dbname=test', 'root', '');
$stmt = $pdo-prepare(UPDATE test SET a = '10:53:00');
var_dump($stmt-execute());
?
bool(true)



[2005-10-13 21:21:24] todd at bluecliff dot net

Description:

There is no documented way to escape a colon in PDO.  I understand that
there may be a new patch to make this optional, however, I would not
like to use the bindParam function, I would just like to escape it
outright.  no number of backslashes seem to work.  This bug hints at
the problem, however, there is no note on how to escape a : (colon):
http://bugs.php.net/bug.php?id=33736edit=2

Reproduce code:
---
// basically just an update on a time field
$sql_query_str = UPDATE _sif_message_queue SET
msg_time_remote='10:53:00' WHERE
message_queue_id=.$this-message_queue_id;
$stmt = $appconnection-prepare($sql_query_str);
$stmt-execute();

Expected result:

Query executes successfully

Actual result:
--
SQLSTATE[HY093]: Invalid parameter number: no parameters were bound






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



#34875 [NEW]: Soap call crashes when encoding is set

2005-10-14 Thread mano at easymail dot hu
From: mano at easymail dot hu
Operating system: Linux
PHP version:  5.0.5
PHP Bug Type: SOAP related
Bug description:  Soap call crashes when encoding is set

Description:

When I make a call with __soapCall function and encoding was set in the
constructor the process dies and an apache log created with
php: relocation error: php: undefined symbol: xmlBufferCreateStatic 
If I quote the encoding option, everything works fine. This does not
happen in win32 enviroment.
The page returns internal server error. The example code is a proper call
to eBay's SOAP api, so for reproduction you need a valid certification id,
application id and development id for the sandbox-enviroment and a token
for a user. I don't know any other SOAP-services to try with but I know
that this was working on win32/apache/php5 combination.

Reproduce code:
---
$devId = 'exampledevid';
$appId = 'exampleappid';
$certId = 'examplecerid';
 
// Token for the ebay user
$token = abc...123;


// The wsdl file for SOAP
$wsdl_url = 'http://developer.ebay.com/webservices/latest/eBaySvc.wsdl'; 

// Creating SOAPClient object with the HTTPS location. This is the
endpoint for the call.
$client = new SOAPClient($wsdl_url, array(
'trace' = 1
, 'exceptions'= 1
, 'encoding'='ISO-8859-1'
, 'location' =
'https://api.sandbox.ebay.com/wsapi?callname=GetSellerListsiteid=0appid='.urlencode($appId).'version=417Routing=New'
));



// The valid authentification header for a call on eBay
$Auth = new ArrayObject(array(
'eBayAuthToken' = new SoapVar($token, XSD_STRING, NULL, NULL, NULL,
'urn:ebay:apis:eBLBaseComponents'),
'Credentials' = new SoapVar(
new ArrayObject(
array(
'AppId' = $appId,
'DevID' = $devId,
'AuthCert' = $certId
)
)
, SOAP_ENC_OBJECT
, null
, null
, null
, 'urn:ebay:apis:eBLBaseComponents'
),
));

// formatting header
$header_body = new SoapVar($Auth, SOAP_ENC_OBJECT);

$header = array(new SOAPHeader('urn:ebay:apis:eBLBaseComponents',
'RequesterCredentials', $header_body));

$params = array('Version' = 417, 'DetailLevel' = 'ReturnAll',
'UserID'='auseridfromsandbox', 'Pagination'=
array('EntriesPerPage'=200)
,'StartTimeFrom'='2005-08-01'
,'StartTimeTo'='2005-08-20'
);
try {
$user = $client-__soapCall('GetSellerList', array($params), NULL,
$header);
}catch (SoapFault $e){
print_r($e);
}
print_r($user);

Expected result:

An stdClass object with other childobjects

Actual result:
--
Execution stops.

error log in apache:
php: relocation error: php: undefined symbol: xmlBufferCreateStatic

Internal Server Error screen

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


#34861 [Opn-Csd]: No documented way for PDO to escape a colon

2005-10-14 Thread wez
 ID:   34861
 Updated by:   [EMAIL PROTECTED]
 Reported By:  todd at bluecliff dot net
-Status:   Open
+Status:   Closed
 Bug Type: PDO related
 Operating System: FreeBSD
 PHP Version:  5.0.5
 New Comment:

This was fixed in 5.1 a while back.


Previous Comments:


[2005-10-14 19:51:37] todd at bluecliff dot net

I will try the latest snapshot, but I am also connecting against a
Postgresql 8 database with a column type of TIME, I don't know if
that makes a difference in your testing.



[2005-10-14 13:41:47] [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

Works perfectly here:
?php
$pdo = new PDO('mysql:host=localhost;dbname=test', 'root', '');
$stmt = $pdo-prepare(UPDATE test SET a = '10:53:00');
var_dump($stmt-execute());
?
bool(true)



[2005-10-13 21:21:24] todd at bluecliff dot net

Description:

There is no documented way to escape a colon in PDO.  I understand that
there may be a new patch to make this optional, however, I would not
like to use the bindParam function, I would just like to escape it
outright.  no number of backslashes seem to work.  This bug hints at
the problem, however, there is no note on how to escape a : (colon):
http://bugs.php.net/bug.php?id=33736edit=2

Reproduce code:
---
// basically just an update on a time field
$sql_query_str = UPDATE _sif_message_queue SET
msg_time_remote='10:53:00' WHERE
message_queue_id=.$this-message_queue_id;
$stmt = $appconnection-prepare($sql_query_str);
$stmt-execute();

Expected result:

Query executes successfully

Actual result:
--
SQLSTATE[HY093]: Invalid parameter number: no parameters were bound






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


#34875 [Opn-Fbk]: Soap call crashes when encoding is set

2005-10-14 Thread tony2001
 ID:   34875
 Updated by:   [EMAIL PROTECTED]
 Reported By:  mano at easymail dot hu
-Status:   Open
+Status:   Feedback
 Bug Type: SOAP related
 Operating System: Linux
 PHP Version:  5.0.5
 New Comment:

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




Previous Comments:


[2005-10-14 20:34:24] mano at easymail dot hu

Description:

When I make a call with __soapCall function and encoding was set in the
constructor the process dies and an apache log created with
php: relocation error: php: undefined symbol: xmlBufferCreateStatic 
If I quote the encoding option, everything works fine. This does not
happen in win32 enviroment.
The page returns internal server error. The example code is a proper
call to eBay's SOAP api, so for reproduction you need a valid
certification id, application id and development id for the
sandbox-enviroment and a token for a user. I don't know any other
SOAP-services to try with but I know that this was working on
win32/apache/php5 combination.

Reproduce code:
---
$devId = 'exampledevid';
$appId = 'exampleappid';
$certId = 'examplecerid';
 
// Token for the ebay user
$token = abc...123;


// The wsdl file for SOAP
$wsdl_url =
'http://developer.ebay.com/webservices/latest/eBaySvc.wsdl'; 

// Creating SOAPClient object with the HTTPS location. This is the
endpoint for the call.
$client = new SOAPClient($wsdl_url, array(
'trace' = 1
, 'exceptions'= 1
, 'encoding'='ISO-8859-1'
, 'location' =
'https://api.sandbox.ebay.com/wsapi?callname=GetSellerListsiteid=0appid='.urlencode($appId).'version=417Routing=New'
));



// The valid authentification header for a call on eBay
$Auth = new ArrayObject(array(
'eBayAuthToken' = new SoapVar($token, XSD_STRING, NULL, NULL, NULL,
'urn:ebay:apis:eBLBaseComponents'),
'Credentials' = new SoapVar(
new ArrayObject(
array(
'AppId' = $appId,
'DevID' = $devId,
'AuthCert' = $certId
)
)
, SOAP_ENC_OBJECT
, null
, null
, null
, 'urn:ebay:apis:eBLBaseComponents'
),
));

// formatting header
$header_body = new SoapVar($Auth, SOAP_ENC_OBJECT);

$header = array(new SOAPHeader('urn:ebay:apis:eBLBaseComponents',
'RequesterCredentials', $header_body));

$params = array('Version' = 417, 'DetailLevel' = 'ReturnAll',
'UserID'='auseridfromsandbox', 'Pagination'=
array('EntriesPerPage'=200)
,'StartTimeFrom'='2005-08-01'
,'StartTimeTo'='2005-08-20'
);
try {
$user = $client-__soapCall('GetSellerList', array($params), NULL,
$header);
}catch (SoapFault $e){
print_r($e);
}
print_r($user);

Expected result:

An stdClass object with other childobjects

Actual result:
--
Execution stops.

error log in apache:
php: relocation error: php: undefined symbol: xmlBufferCreateStatic

Internal Server Error screen





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


#34874 [Opn-Fbk]: strtotime(Day,time) output differs from earlier PHP5 versions

2005-10-14 Thread tony2001
 ID:   34874
 Updated by:   [EMAIL PROTECTED]
 Reported By:  dverspui at hotpop dot com
-Status:   Open
+Status:   Feedback
 Bug Type: Date/time related
 Operating System: Linux (Fedora 2)
 PHP Version:  5.1.0RC1
 New Comment:

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




Previous Comments:


[2005-10-14 17:36:00] dverspui at hotpop dot com

Description:

strtotime(day,time) returns the specified day of the next week of
time if time itself is on day day.


Reproduce code:
---
print date(Ymd,strtotime(date(l,time()),time()));


Expected result:

Output should be the date of today, but on my installation it returns
the date of 7 days ahead. This differs from all earlier PHP versions.







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


#34873 [Opn-Asn]: Segmentation Fault on foreach in object (used by smarty)

2005-10-14 Thread tony2001
 ID:   34873
 Updated by:   [EMAIL PROTECTED]
 Reported By:  antleclercq at online dot fr
-Status:   Open
+Status:   Assigned
-Bug Type: Arrays related
+Bug Type: Scripting Engine problem
 Operating System: Ubuntu (breezy)
 PHP Version:  5CVS-2005-10-14 (CVS)
-Assigned To:  
+Assigned To:  dmitry
 New Comment:

Dmitry, this patch breaks it:
http://cvs.php.net/diff.php/ZendEngine2/zend_compile.c?r1=1.647.2.7r2=1.647.2.8ty=u

Please, take a look at it.


Previous Comments:


[2005-10-14 17:18:20] antleclercq at online dot fr

Description:

Hello,

I'm running:
- PHP 5.1RC2 CVS200510141230

I've got a nice segfault with that simple piece of code. The problem is
that the code style showed below is used by Smarty (in the compile
system)...

That problem has been reproduced on several systems.

Thanks for your help,

Antoine

Reproduce code:
---
?php
class pwa {
public $var;

function __construct()  {
$this-var = array();
}

function test (){
$cont = array();
$cont[mykey] = myvalue;

foreach ($cont as $this-var['key'] = $this-var['value'])
echo $this-var['value'];
}
}
$myPwa = new Pwa();
$myPwa-test();
?

Expected result:

This code should display:
myvalue
and continue its execution.

Actual result:
--
[EMAIL PROTECTED]:/home/web/sandbox.local/html $ php pwa.php
myvalue*** glibc detected *** double free or corruption (fasttop):
0x085149c8 ***
Aborted






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


#34876 [NEW]: preg_split should return empty array when splitting

2005-10-14 Thread embeddedlinuxguy at gmail dot com
From: embeddedlinuxguy at gmail dot com
Operating system: Linux
PHP version:  5.0.5
PHP Bug Type: Feature/Change Request
Bug description:  preg_split should return empty array when splitting 

Description:

$b = preg_split(/q/, , PREG_SPLIT_NO_EMPTY);

should return an empty array (0 elements).  Instead it returns an array
with one element which is an empty string, i.e. ().  This is the same
with or without PREG_SPLIT_NO_EMPTY.

Compare to Perl

my @a = split(/q/, );

Here @a == () not ()



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


#34877 [NEW]: problem loading mysql.dll

2005-10-14 Thread lannys1 at yahoo dot com
From: lannys1 at yahoo dot com
Operating system: WIN XP PRO
PHP version:  5.0.5
PHP Bug Type: MySQL related
Bug description:  problem loading mysql.dll

Description:

I am running mySQL 4.0.26 on a WIN XP Pro machine i installed php
according to your instructions even some books that other folks have
suggested. I tried all but everytime i uncomment that dll in the
extensions directive i get an erro


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


#34877 [Opn-Bgs]: problem loading mysql.dll

2005-10-14 Thread tony2001
 ID:   34877
 Updated by:   [EMAIL PROTECTED]
 Reported By:  lannys1 at yahoo dot com
-Status:   Open
+Status:   Bogus
 Bug Type: MySQL related
 Operating System: WIN XP PRO
 PHP Version:  5.0.5
 New Comment:

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

Thank you for your interest in PHP.




Previous Comments:


[2005-10-14 22:13:42] lannys1 at yahoo dot com

Description:

I am running mySQL 4.0.26 on a WIN XP Pro machine i installed php
according to your instructions even some books that other folks have
suggested. I tried all but everytime i uncomment that dll in the
extensions directive i get an erro






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


#34873 [Asn]: Segmentation Fault on foreach in object (used by smarty)

2005-10-14 Thread tony2001
 ID:   34873
 Updated by:   [EMAIL PROTECTED]
 Reported By:  antleclercq at online dot fr
 Status:   Assigned
 Bug Type: Scripting Engine problem
 Operating System: Ubuntu (breezy)
 PHP Version:  5CVS-2005-10-14 (CVS)
 Assigned To:  dmitry
 New Comment:

gdb bt:

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 1081772576 (LWP 18178)]
0x083961f1 in zend_hash_find (ht=0x88b1060, arKey=0x88b2458 value,
nKeyLength=6, pData=0xbfffc6c4) at
/usr/src/dev/orig/php-src_5_1/Zend/zend_hash.c:852
852 p = ht-arBuckets[nIndex];
(gdb) bt
#0  0x083961f1 in zend_hash_find (ht=0x88b1060, arKey=0x88b2458
value, nKeyLength=6, pData=0xbfffc6c4) at
/usr/src/dev/orig/php-src_5_1/Zend/zend_hash.c:852
#1  0x083f4f20 in zend_symtable_find (ht=0x88b1060, arKey=0x88b2458
value, nKeyLength=6, pData=0xbfffc6c4) at zend_hash.h:346
#2  0x083f6f6e in zend_fetch_dimension_address_inner (ht=0x88b1060,
dim=0x88b3a8c, type=0) at
/usr/src/dev/orig/php-src_5_1/Zend/zend_execute.c:958
#3  0x083b31cb in zend_fetch_dimension_address (result=0xbfffc8b8,
container_ptr=0xbfffc8a8, dim=0x88b3a8c, dim_is_tmp_var=0, type=0)
at /usr/src/dev/orig/php-src_5_1/Zend/zend_execute.c:1088
#4  0x083c713d in ZEND_FETCH_DIM_R_SPEC_VAR_CONST_HANDLER
(execute_data=0xbfffc8e0) at zend_vm_execute.h:8518
#5  0x083b3aee in execute (op_array=0x88b3540) at zend_vm_execute.h:88
#6  0x083b3f31 in zend_do_fcall_common_helper_SPEC
(execute_data=0xbfffca80) at zend_vm_execute.h:224
#7  0x083b4328 in ZEND_DO_FCALL_BY_NAME_SPEC_HANDLER
(execute_data=0xbfffca80) at zend_vm_execute.h:310
#8  0x083b3aee in execute (op_array=0x88ac8d0) at zend_vm_execute.h:88
#9  0x0838dc66 in zend_execute_scripts (type=8, retval=0x0,
file_count=3) at /usr/src/dev/orig/php-src_5_1/Zend/zend.c:1087
#10 0x0834ce3b in php_execute_script (primary_file=0xbfffeed0) at
/usr/src/dev/orig/php-src_5_1/main/main.c:1677
#11 0x083f9d16 in main (argc=2, argv=0xbfffefb4) at
/usr/src/dev/orig/php-src_5_1/sapi/cli/php_cli.c:1041

valgrind's output is here:
http://tony2001.phpclub.net/dev/tmp/bug34873_valgrind.txt


Previous Comments:


[2005-10-14 21:44:25] [EMAIL PROTECTED]

Dmitry, this patch breaks it:
http://cvs.php.net/diff.php/ZendEngine2/zend_compile.c?r1=1.647.2.7r2=1.647.2.8ty=u

Please, take a look at it.



[2005-10-14 17:18:20] antleclercq at online dot fr

Description:

Hello,

I'm running:
- PHP 5.1RC2 CVS200510141230

I've got a nice segfault with that simple piece of code. The problem is
that the code style showed below is used by Smarty (in the compile
system)...

That problem has been reproduced on several systems.

Thanks for your help,

Antoine

Reproduce code:
---
?php
class pwa {
public $var;

function __construct()  {
$this-var = array();
}

function test (){
$cont = array();
$cont[mykey] = myvalue;

foreach ($cont as $this-var['key'] = $this-var['value'])
echo $this-var['value'];
}
}
$myPwa = new Pwa();
$myPwa-test();
?

Expected result:

This code should display:
myvalue
and continue its execution.

Actual result:
--
[EMAIL PROTECTED]:/home/web/sandbox.local/html $ php pwa.php
myvalue*** glibc detected *** double free or corruption (fasttop):
0x085149c8 ***
Aborted






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


#34874 [Fbk-Opn]: strtotime(Day,time) output differs from earlier PHP5 versions

2005-10-14 Thread dverspui at hotpop dot com
 ID:   34874
 User updated by:  dverspui at hotpop dot com
 Reported By:  dverspui at hotpop dot com
-Status:   Feedback
+Status:   Open
 Bug Type: Date/time related
 Operating System: Linux (Fedora 2)
 PHP Version:  5.1.0RC1
 New Comment:

Hi, thanks for your reply.
I succesfully compiled 5.1.0RC3-dev you gave me the link to, but the
problem remains!


Previous Comments:


[2005-10-14 21:40: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-10-14 17:36:00] dverspui at hotpop dot com

Description:

strtotime(day,time) returns the specified day of the next week of
time if time itself is on day day.


Reproduce code:
---
print date(Ymd,strtotime(date(l,time()),time()));


Expected result:

Output should be the date of today, but on my installation it returns
the date of 7 days ahead. This differs from all earlier PHP versions.







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


#34874 [Opn-Asn]: strtotime(Day,time) output differs from earlier PHP5 versions

2005-10-14 Thread tony2001
 ID:   34874
 Updated by:   [EMAIL PROTECTED]
 Reported By:  dverspui at hotpop dot com
-Status:   Open
+Status:   Assigned
 Bug Type: Date/time related
 Operating System: Linux (Fedora 2)
 PHP Version:  5.1.0RC1
-Assigned To:  
+Assigned To:  derick
 New Comment:

Looks like a feature, but I'm not sure.
Please have a look.


Previous Comments:


[2005-10-15 00:09:27] dverspui at hotpop dot com

Hi, thanks for your reply.
I succesfully compiled 5.1.0RC3-dev you gave me the link to, but the
problem remains!



[2005-10-14 21:40: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-10-14 17:36:00] dverspui at hotpop dot com

Description:

strtotime(day,time) returns the specified day of the next week of
time if time itself is on day day.


Reproduce code:
---
print date(Ymd,strtotime(date(l,time()),time()));


Expected result:

Output should be the date of today, but on my installation it returns
the date of 7 days ahead. This differs from all earlier PHP versions.







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


#34878 [NEW]: domxml cannot create a element use name of element 'channel'

2005-10-14 Thread js1 at qq dot com
From: js1 at qq dot com
Operating system: windows2003+IIS6
PHP version:  5.0.5
PHP Bug Type: DOM XML related
Bug description:  domxml cannot create a element  use name of element   
'channel'

Description:

domxml cannot create a element  use name of element   'channel'

Reproduce code:
---
?php
  $dom = domxml_new_doc(1.0);
  $root = $dom-add_root(channel) ;
  echo $dom-dump_mem(true,utf-8); 
? 

Expected result:

alert 'add to Favorites'


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