#42849 [Com]: Configuration File (php.ini) Path incorrect

2008-03-26 Thread wiseup24 at hotmail dot com
 ID:   42849
 Comment by:   wiseup24 at hotmail dot com
 Reported By:  inglis-php at yahoo dot com dot au
 Status:   No Feedback
 Bug Type: *General Issues
 Operating System: win xp pro
 PHP Version:  5.2.4
 New Comment:

I am having a simular issue but in my phpinfo test i get this:

Configuration File (php.ini) Path   C:\Windows
Loaded Configuration File   (none)


there is no php.ini in the windows directory and my apache httpd conf
file has this: PHPIniDir "C:\PHP\"

I tried to copy the php.ini to the windows directory but apache fails
to start when it is in there.

I am running Vista with PHP 5.2.5 and Apache 2.2
I have tried using the msi install for php and the zipped version and
still doesnt work. without the correct php.ini being read, i can not
enable the correct extensions.


Previous Comments:


[2008-03-12 10:36:50] algisimu at gmail dot com

I'm using Apache 2.0.54, Php 5.2.5 and Win XP Pro. My php.ini file is
locaed in the c:\php dir (php installation dir, no more php.ini files
found on the computer), apache httpd.conf file is set up with PHPIniDir
"C:/php/", but phpinfo() reports these results:

Configuration File (php.ini) Path   C:\WINDOWS
Loaded Configuration File   C:\php\php.ini

Have tried to add registry values as described in
http://uk3.php.net/configuration, have tried to add PHPRC environment
variable, but phpinf() still gives same result. One thing worth
mentioning is that then I run php script as CLI with '-c c:\php' option
everything works fine, but then I run same script thru my browser
expected php.ini file is not loaded.



[2007-10-13 01:00:01] php-bugs at lists dot php dot net

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



[2007-10-05 15:23:16] [EMAIL PROTECTED]

Exactly what does phpinfo() have about php.ini? There are 2 places in
the output, paste both here..(in the very beginning of the output..)




[2007-10-04 07:37:01] inglis-php at yahoo dot com dot au

Description:

I have just used the .msi file to install php 5.2.4  All appeared to
work well. I installed to c:\PHP folder. Then wrote a small .php test
file (below) and tried it and the noticed that: 
The phpinfo() function is reporting php.ini file as being in the
'C:\Windows' directory.  It is actually located in 'C:\PHP' directory. I
have searched my c drive and there is only one copy of php.ini and it is
in the c:\PHP directory.  I assume it finds the php.ini via the path
environment which now starts with c:\PHP.


Reproduce code:
---

 
  PHP Test
 
 
 Hello World'; ?> 
 
 


Expected result:

C:\PHP

Actual result:
--
C:\Windows





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



#44544 [NEW]: parse_ini_file() parsing error with character '$'

2008-03-26 Thread frederes at free dot fr
From: frederes at free dot fr
Operating system: Gentoo 2006
PHP version:  5.2.6RC2
PHP Bug Type: *General Issues
Bug description:  parse_ini_file() parsing error with character '$'

Description:

when character '$' is present in a value string , parse_ini_file() return
a warning/error and cut the value string before the $
so data result is wrong !

Reproduce code:
---


test.ini file content :

toto = aaa$bbb

Expected result:

Array ( [toto] => aaa$bbb)

Actual result:
--
Warning: Error parsing test.ini on line 8 in parse_ini.php on line 2
Array ( [toto] => aaa)

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



#44543 [Opn->Bgs]: preg_split: patterns with assertions

2008-03-26 Thread felipe
 ID:   44543
 Updated by:   [EMAIL PROTECTED]
 Reported By:  unkind at regex dot su
-Status:   Open
+Status:   Bogus
 Bug Type: PCRE related
 Operating System: Windows XP
 PHP Version:  5.2.5
 New Comment:

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

The your regexp no make senses, and a regexp doesn't will remove the
escape on matching.

http://www.pcre.org/man.txt


Previous Comments:


[2008-03-26 22:33:17] unkind at regex dot su

Description:

I want to split string like this: "cell:cell:cell with '\:':cell" by
pattern "/(?!\\):/"

Reproduce code:
---


Expected result:

Array
(
[0] => cell
[1] => cell
[2] => cell with ':'
[3] => cell
)

Actual result:
--
Array
(
[0] => cell
[1] => cell
[2] => cell with '\
[3] => '
[4] => cell
)





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



#44543 [NEW]: preg_split: patterns with assertions

2008-03-26 Thread unkind at regex dot su
From: unkind at regex dot su
Operating system: Windows XP
PHP version:  5.2.5
PHP Bug Type: PCRE related
Bug description:  preg_split: patterns with assertions

Description:

I want to split string like this: "cell:cell:cell with '\:':cell" by
pattern "/(?!\\):/"

Reproduce code:
---


Expected result:

Array
(
[0] => cell
[1] => cell
[2] => cell with ':'
[3] => cell
)

Actual result:
--
Array
(
[0] => cell
[1] => cell
[2] => cell with '\
[3] => '
[4] => cell
)

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



#44542 [NEW]: __tostring does not work when using it for calling a function

2008-03-26 Thread account at dds dot nl
From: account at dds dot nl
Operating system: Windows Vista
PHP version:  5.2.5
PHP Bug Type: Scripting Engine problem
Bug description:  __tostring does not work when using it for calling a function

Description:

When I try to use __tostring to call a function I get an error that 'the
function name must be a string'. While calling a class member with
__tostring does work.

--Steven

Reproduce code:
---
$test."\n";
print $test->$function_name()."\n";
print $test->$test()."\n";
?>

Expected result:

-- PHP --
string
Class member named `string`.
This is a string from a function.
This is a string from a function.

Output completed (0 sec consumed)

Actual result:
--
-- PHP --
string
Class member named `string`.
This is a string from a function.

Fatal error: Method name must be a string in C:\projects\test.php on line
18

Output completed (0 sec consumed)

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



#44497 [Opn->Fbk]: Php is very slow to make a MySQL connection

2008-03-26 Thread jani
 ID:   44497
 Updated by:   [EMAIL PROTECTED]
 Reported By:  damien at zaide dot org
-Status:   Open
+Status:   Feedback
 Bug Type: MySQL related
 Operating System: Windows 2003 Server
 PHP Version:  5.2.5
 New Comment:

Try the smallest possible script. Just "mysql_connect()" with proper
parameters..


Previous Comments:


[2008-03-26 13:57:50] damien at zaide dot org

I have tested with the fqdn and with the IP address, result is the
same.
I have added the fqdn in my host file in windows and result is the
same.
It's big application like phpbb or joomla who get this problem ... So i
think they use mysql_connect(). I haven't tested small scripts on the
servers.



[2008-03-26 12:02:57] [EMAIL PROTECTED]

How exactly are you connecting to Mysql? Exactly _what_ line is used?
Do you connect using the IP of the mysql server?



[2008-03-26 10:36:26] damien at zaide dot org

More informations :
- The problem occurs since the php installation with the installation
package. So i have the problem from the beggining i start using php with
IIS.
- My customers php files is on a Samba Server and PHP is installed on 2
HTTP servers (load balancing answer) and the problem occurs for both.
- I have no problem with ODBC MySQL connector (fast connection) and ASP
run fast on these servers.
- I have set to "on" the "output_buffering" option. I have see it could
solve my problem but no finally.
- I have "C:\Program Files\PHP" in my PATH variable.

I think the progress of the execution of this script is like this:
1/ File is loaded from the samba server. Everything is OK.
2/ Php is launched and start interpreting it. Everything is OK.
3/ Php needs to use MySQL ! The slowdown occurs here. Maybe problem to
locate phpmysql.dll or anything else.
4/ Php contacts MySQL Server and sends requests. Eveything is OK.
5/ Php prints result to the browser.



[2008-03-25 23:38:50] damien at zaide dot org

Yes i have copied the .dll/.exe/.lib from the .zip to my C:\Program
Files\PHP directory.
Then restart IIS and the problem occurs again.



[2008-03-25 19:30:53] [EMAIL PROTECTED]

And you really updated ALL dlls using the ones from the snapshot
package?



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

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



#44421 [Opn->Fbk]: Core dump using PHP 5.2.5 with suExec and mod_cgid

2008-03-26 Thread jani
 ID:   44421
 Updated by:   [EMAIL PROTECTED]
 Reported By:  obonhomme at nerim dot net
-Status:   Open
+Status:   Feedback
 Bug Type: Reproducible crash
 Operating System: FreeBSD 6.3
 PHP Version:  5.2CVS-2008-25-03
 Assigned To:  fb-req-jani
 New Comment:

Please remove this "Suhosin" thing. We don't support any 3rd party
patches / extension and it is known to cause weird crashes like this.


Previous Comments:


[2008-03-26 13:53:17] obonhomme at nerim dot net

The phpinfo script is available at the following URL

http://forum.kajiura.fr/phpdebug4421.php

The issue occurs with the index.php script which is effectively is very
big. The problem is that the bug is reproductible only with this script.
So it is not possible for the moment to make a shorter script.



[2008-03-26 12:29:06] [EMAIL PROTECTED]

And also that the binary does NOT have ZTS enabled!



[2008-03-26 12:27:52] [EMAIL PROTECTED]

That script is way too big for reproducing this elsewhere. Please
provide a shorter script, 10-20 lines which still causes the crash.
I'd also check with plain '' script that the used
PHP  binary is the correct one and what php.ini file(s) are loaded and
what possible extensions are loaded.



[2008-03-26 10:10:28] obonhomme at nerim dot net

I recompiled my PHP with the following command line : 

'./configure' '--with-layout=GNU'
'--with-config-file-scan-dir=/usr/local/etc/php' '--disable-all'
'--enable-libxml' '--with-libxml-dir=/usr/local' '--enable-reflection'
'--program-prefix=' '--enable-fastcgi' '--prefix=/usr/local'
'--mandir=/usr/local/man' '--infodir=/usr/local/info/'

Nevertheless, the php-cgi binary still cores with this script.



[2008-03-25 19:34:37] [EMAIL PROTECTED]

Yes, you might have those binaries there, but they're NOT from the same
build: That simply is NOT possible. So check for real WHICH ones are
from this build. Then I suggest you rebuild the CGI binary just in case
_without_ these options:

'--with-apxs2=/usr/local/sbin/apxs' '--with-regex=php'
'--with-zend-vm=CALL' '--enable-zend-multibyte' 




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

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



#41350 [Com]: Error in my_thread_global_end()

2008-03-26 Thread lizwatson02452 at yahoo dot com
 ID:   41350
 Comment by:   lizwatson02452 at yahoo dot com
 Reported By:  graham at directhostinguk dot com
 Status:   No Feedback
 Bug Type: MySQL related
 Operating System: Windows 2003
 PHP Version:  5.2.3
 New Comment:

Following up briefly on my previous postchanging to an earlier
libmysql.dll appears to have fixed the problem for us, even though we
don't use MySQL.

Two difficulties with that:
 1) It was hard for me to believe that was the solution.
 2) It took some doing to persuade our hoster that changing the .dll
was not merely a fool's errand.


Previous Comments:


[2008-03-22 22:01:12] lizwatson02452 at yahoo dot com

I have this problem, and I am *not* using MySQL. I'm on PHP 5.2.4, with
SQL Server. Are there any workarounds that are not MySQL-specific?



[2008-03-20 20:05:06] [EMAIL PROTECTED]

Try PHP 5.2.5 with the libmysql.dll from
http://dev.mysql.com/downloads/mysql/5.0.html#win32

Make sure there are no other libmysql.dll lurking around your path.



[2008-03-20 19:39:43] stein at visibone dot com

...free PHP cheatsheet or wall chart to anyone who helps me get around
this.  ;-)



[2008-03-19 18:39:59] stein at visibone dot com

...addendum to previous, the php_mysql.dll and php_mysqli.dll I
installed were from PHP 5.2.1 zip file.



[2008-03-18 22:37:59] stein at visibone dot com

I'm still having a 5 second delay at the end of my command-line
invocation.  Putting 5.0.51a libmysql.dll in C:\Program Files\PHP seemed
to eliminate the my_thread_global_end() error, and replacing
ext\php_mysql.dll and ext\php_mysqli.dll stopped the 5-second delay when
running a simple "php --ini" or hello-world script.  But I still get a 5
second delay if I call mysql_connect() & mysql_close().

php -i (phpinfo) excerpts:
   mysql
   Client API version => 5.0.51a
   mysqli
   Client API library version => mysqlnd 5.0.1-beta - 070402 -
$Revision: 321 $

Help would sure be appreciated.  5 seconds x 1000 hurts.

-- Bob Stein, VisiBone



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

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



#42987 [Com]: Add LSAPI support

2008-03-26 Thread gwang at litespeedtech dot com
 ID:   42987
 Comment by:   gwang at litespeedtech dot com
 Reported By:  rick dot martinez at gmail dot com
 Status:   Assigned
 Bug Type: Feature/Change Request
 Operating System: *
 PHP Version:  5.2.*
 Assigned To:  johannes
 New Comment:

Hi Johannes,

I am the maintainer of LiteSpeed SAPI code.
The code has been checked into PHP CVS under /pecl/litespeed, has been
updated to the latest release.

As to the license issue, our LSAPI library are BSD license, according
to discussion with Stanislav on PHP-DEV email list, BSD license is not
likely a problem. 

I hope it could make into the 5.3 release and I am ready to help with
any issues in this regard.

Thanks!


Previous Comments:


[2007-10-16 20:02:29] [EMAIL PROTECTED]

SAPIs don't need much maintaining but still we need to be sure that
somebody cares even in a few years - best would be if the Litespeed guys
agree to maintain it inside the PHP tree.

I didn't review the code, yet but, additionally to Marcus's comments I
saw that some files use another license than PHP License and other refer
to an outdated version. when bundling they should be licensed under the
current PHP License 3.01.





[2007-10-16 18:45:38] rick dot martinez at gmail dot com

Sounds great. I'm not the actual LSAPI maintainer but I'll go ahead and

make the style changes myself and notify the Litespeed developers about

it.

Thanks so much! This will make life SO much easier for so many PHP
users 
on Litespeed.

Rick



[2007-10-16 18:42:13] [EMAIL PROTECTED]

This can imho go into 5.3 and looks pretty good already. You are
however not following our coding standards completely. Read
CODING_STYLE. Especially the following:
- keep { on same line if not beginning of a function or structure
- no // comments allowed

Apart from that you could shorten the code a bit by having /* {{{ */
after the function declaration and not on a separate line when not
adding comments.

As Johannes is the RM for 5.3 he has to decide about this mostly and
finally add the code.



[2007-10-16 11:13:00] rick dot martinez at gmail dot com

Description:

It would be great if support for the growing Litespeed web server could

be included with PHP.  This especially because it's increasingly 
difficult for people to support Litespeed with distributions such as 
Debian which would require you to completely recompile the PHP deb 
packages just to support the server.

I think the server is popular enough to warrant inclusion of their SAPI

into the PHP core.  Many people are enjoying it and its popularity is 
increasing.

Link to the SAPI:
http://www.litespeedtech.com/packages/lsapi/php-litespeed-4.1.tgz






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



#44541 [NEW]: new feature in PDOStatement::fetchAll()

2008-03-26 Thread 007NOT at gmail dot com
From: 007NOT at gmail dot com
Operating system: 
PHP version:  5.2.5
PHP Bug Type: PDO related
Bug description:  new feature in PDOStatement::fetchAll()

Description:

>General error: PDO::FETCH_LAZY can't be used with
PDOStatement::fetchAll()
It seems to me it will be usefull to have parameter fetch_style =
PDO::FETCH_LAZY


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



#44024 [Opn->Bgs]: Can't call instanciated objects methods from stylesheets

2008-03-26 Thread rrichards
 ID:   44024
 Updated by:   [EMAIL PROTECTED]
 Reported By:  locutus dot unimatrix01 at gmail dot com
-Status:   Open
+Status:   Bogus
 Bug Type: XSLT related
 Operating System: ubuntu 7.10
 PHP Version:  5.2CVS-2008-02-02 (snap)
 New Comment:

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

only functions and static methods can be called


Previous Comments:


[2008-02-02 13:31:21] locutus dot unimatrix01 at gmail dot com

Description:

$ php -v
PHP 5.2.3-1ubuntu6.3 (cli) (built: Jan 10 2008 09:38:41) 
Copyright (c) 1997-2007 The PHP Group
Zend Engine v2.2.0, Copyright (c) 1998-2007 Zend Technologies

Using XSLTProcessor::registerPHPFunctions(), i can call static methods,
but not normal ones.

In the source linked with my bug report i made two version of the call
to the normal method, one with '>' and one with '>', that's because
i'm not really sure how xslt handle special chars in attributes.

You may need to know that this code is actually executed in a php
script i'm writing as an apache handler for an xml document i use as a
website template, here is the relevant part of my virtual host:

Alias /uis /usr/share/uis/
Action uis-processor /uis/uis.php
AddHandler uis-processor .uis
DirectoryIndex index.uis

Reproduce code:
---
You can get the code at this url:
http://daffy.vuegate.net/php/register_php_functions.phps

Expected result:

This is the static method.
This is the normal method.
This is the normal method.

Actual result:
--
Warning: XSLTProcessor::transformToXml()
[function.XSLTProcessor-transformToXml]: Unable to call handler
$test_instance->normal_method() in /usr/share/uis/uis.php on line 56

Warning: XSLTProcessor::transformToXml()
[function.XSLTProcessor-transformToXml]: xmlXPathCompiledEval:
evaluation failed in /usr/share/uis/uis.php on line 56

Warning: XSLTProcessor::transformToXml()
[function.XSLTProcessor-transformToXml]: runtime error: file
/usr/share/uis/ line 21 element value-of in /usr/share/uis/uis.php on
line 56

Warning: XSLTProcessor::transformToXml()
[function.XSLTProcessor-transformToXml]: XPath evaluation returned no
result. in /usr/share/uis/uis.php on line 56

This is the static method.





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



#44116 [Opn->Fbk]: DOMDocument->loadHTMLFile() & ->saveHtml(), losing misc characters after save

2008-03-26 Thread rrichards
 ID:   44116
 Updated by:   [EMAIL PROTECTED]
 Reported By:  chris dot shepherd at gmail dot com
-Status:   Open
+Status:   Feedback
 Bug Type: DOM XML related
 Operating System: Fedora Core 6
 PHP Version:  5.2CVS-2008-02-14 (snap)
 New Comment:

Cannot reproduce. Have you tried an updated version of libxml2?


Previous Comments:


[2008-02-14 03:23:22] chris dot shepherd at gmail dot com

Description:

I built a script which I pull the html down from a url and then do some
editing and output the source with ->saveHTML(); 

I noticed every now and again the code outputted was missing characters
in misc spots. For example one of my  became a . I noticed this
through a diff.

I wanted to eliminate it being on my end of the code so I simply pulled
out all the code and left just $doc->loadHTMLFile($url); and then simply
output with $doc->saveHTML(); 

If do this and hit refresh, it would during random refreshes lose the
character (every 10/15 refreshes). It was always characters in the same
place in my code, but random when they would disappear.

Reproduce code:
---
$conn = $doc->loadHTMLFile('http://www.chrishan.org');

if($conn){
echo "";
echo $doc->saveHTML();
echo "";
}

Expected result:

I expect it to output my sourcecode from my website. But every 10 to 15
refreshes it loses a couple misc characters from my source. 






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



#44529 [Opn->Fbk]: XSL Transformation never finishes

2008-03-26 Thread rrichards
 ID:   44529
 Updated by:   [EMAIL PROTECTED]
 Reported By:  zoran dot bodiroga at gmail dot com
-Status:   Open
+Status:   Feedback
 Bug Type: XSLT related
 Operating System: Windows Server 2003
 PHP Version:  5.2.5
 New Comment:

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

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

Please avoid embedding huge scripts into the report.

Does the problem also occur when using xsltproc for the
transformations?


Previous Comments:


[2008-03-25 12:36:44] zoran dot bodiroga at gmail dot com

Description:

We develop application that use xslt to produce on screen output, pdf
and Excel files. 
Problem is that when we produce small excel files or pdf files
everything is ok but when we have, for example excel sheet with 2
lines php block. We saw that he work something but transformation never
finish. 
We test with PHP version 5.0.3, and everything works fine.
This is information for libxslt for this version:
XSL enabled
libxslt Version 1.1.7
libxslt compiled against libxml Version 2.6.11
EXSLT   enabled
libexslt Version0.8.5

and for version 5.2.5:

XSL enabled
libxslt Version 1.1.17
libxslt compiled against libxml Version 2.6.26
EXSLT   enabled
libexslt Version0.8.13.

With old version, php takes about 120MB of memory and finish within 1
second, and with new version it block on 60 - 70MB and works
infinitely.

Also I tried with snapshot php5.2-win32-200803250030 which have latest
libxslt (ver.1.1.22) and we have the same problem.

Just to mention that in both cases we use same XSL and XML files.

Regards,
Zoran Bodiroga








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



#37440 [Opn->WFx]: Problem assigning multiple objects with XML parser (works in PHP >= 5.1)

2008-03-26 Thread rrichards
 ID:   37440
 Updated by:   [EMAIL PROTECTED]
 Reported By:  kenashkov at gmail dot com
-Status:   Open
+Status:   Wont fix
 Bug Type: XML related
 Operating System: Fedora Core 4
 PHP Version:  4.4.2
 New Comment:

We are sorry, but we can not support PHP 4 related problems anymore.
Momentum is gathering for PHP 6, and we think supporting PHP 4 will
lead to a waste of resources which we want to put into getting PHP 6
ready.




Previous Comments:


[2006-07-22 15:22:18] kenashkov at gmail dot com

This can be reproduced useing the example from xml_set_object()
function reference found here:
http://www.php.net/manual/en/function.xml-set-object.php

Here is the exact reproduce code:
-
parser = xml_parser_create();

   xml_set_object($this->parser, $this);
   xml_set_element_handler($this->parser, "tag_open",
"tag_close");
   xml_set_character_data_handler($this->parser, "cdata");
   }

   function parse($data)
   {
   xml_parse($this->parser, $data);
   }

   function tag_open($parser, $tag, $attributes)
   {
   var_dump($parser, $tag, $attributes);
   }

   function cdata($parser, $cdata)
   {
   var_dump($parser, $cdata);
   }

   function tag_close($parser, $tag)
   {
   var_dump($parser, $tag);
   }

} // end of class xml

$xml_parser = new xml();
$xml_parser->parse("PHP");

$xml_parser = new xml();
$xml_parser->parse("PHP");
?>
-

The only modification in comparison with the given example in the
manual is the second assignment of $xml_parser to a new object.

The result is:
-
resource(2) of type (xml) string(1) "A" array(1) { ["ID"]=>  string(5)
"hallo" } resource(2) of type (xml) string(3) "PHP" resource(2) of type
(xml) string(1) "A"
Warning: xml_parse() [function.xml-parse.html]: Unable to call handler
tag_open() in /home/local/dev.kenashkov.com/XPATS/bug_test/t4.php on
line 16

Warning: xml_parse() [function.xml-parse.html]: Unable to call handler
cdata() in /home/local/dev.kenashkov.com/XPATS/bug_test/t4.php on line
16

Warning: xml_parse() [function.xml-parse.html]: Unable to call handler
tag_close() in /home/local/dev.kenashkov.com/XPATS/bug_test/t4.php on
line 16
-

It works as expected in PHP 5.1.4

The code produces the bug in PHP 4.4.2 with the following cofigure
line:
-
'./configure' '--prefix=/web/php4.4.2'
'--with-apxs2=/web/apache2-php4/bin/apxs' '--enable-bcmath=shared'
'--with-bz2=shared' '--enable-calendar=shared' '--enable-ctype=shared'
'--with-curl=shared' '--enable-dba=shared' '--enable-dbase=shared'
'--enable-dbx=shared' '--enable-dio=shared' '--with-dom=shared'
'--with-dom-xsl=shared' '--with-dom-xslt=shared'
'--with-dom-exslt=shared' '--enable-exif=shared' '--with-fam=shared'
'--enable-ftp=shared' '--with-gettext=shared' '--with-gmp=shared'
'--with-iconv=shared' '--with-gd=shared' '--with-jpeg-dir'
'--with-png-dir' '--with-xpm-dir' '--with-ttf' '--with-freetype-dir'
'--enable-gd-native-ttf' '--with-ldap=shared' '--enable-mbstring=all'
'--enable-mbstr-enc-trans' '--enable-mbregex' '--with-mime-magic=shared'
'--with-mysql=/web/mysql-max-5.0.15-linux-i686-glibc23'
'--with-ncurses=shared' '--with-openssl=shared'
'--enable-overload=shared' '--enable-pcntl=shared' '--with-pgsql=shared'
'--with-regex' '--enable-maintainer-zts' '--enable-sysvsem=shared'
'--enable-sysvshm=shared' '--enable-sysvmsg=shared'
'--enable-shmop=shared' '--enable-sockets=shared'
'--enable-memory-limit' '--enable-wddx=shared' '--with-zlib=shared'
'--with-mhash=shared' '--with-mcrypt=shared' '--enable-xslt=shared'
'--with-xslt-sablot' '--with-mssql=shared' '--with-kerberos=shared'
'--enable-yp' '--enable-fastcgi'
'--with-oci8=/u01/app/oracle/product/10.1.0/Db_1'
-



[2006-05-14 20:11:51] kenashkov at gmail dot com

Description:

When assigning multiple times to ane variable an object which contains
a XML parser, there is a problem when the xml_parse is called. The
parser can not call the registered handlers.
The problem can be avoided if the variable is unset before the second
call, or using $doc1 =& new xml_doc() for every assignment.

Reproduce code:
---
res = xml_parser_create_ns();
xml_set_object($this->res,$this);
xml_set_element_handler($this->res,'start_element','end_element');
}

function load_string($string)
{
xml_parse($this->res,$string);
}

function start_element()
{
}

function end_element()
{
}
}

$str = '';
$doc1 = new xml_doc();
$doc1->load_string($str);
//unset($doc1);//this solves the problem
//or using $doc1 =& new xml_doc(); in every assign

#44125 [Opn->Fbk]: Doubled memory usage on XInclude with Unix-style filenames

2008-03-26 Thread rrichards
 ID:   44125
 Updated by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
-Status:   Open
+Status:   Feedback
 Bug Type: XML related
 Operating System: Windows Vista
 PHP Version:  5.2.5
 New Comment:

Does this only occur on Vista? Running on XP, I cannot reproduce the 
issue. It runs just as quick using either notation. As for your "side-
effect" issue. Re-use the dom object causes the tree to be unloaded
with 
the second load() call and takes a  while due to the size.

In any case, it is best to use file:/// for windows files

as the paths do not conform well to uris. By using the file schema
(note 
the 3 slashes), dom extension is able to know it is a file and 
automatically performs the real path call.


Previous Comments:


[2008-02-15 00:29:49] [EMAIL PROTECTED]

P.S. There is a rather obvious (and effective) workaround for this:
realpath($file) before passing it to DOMDocument::load(). However, in
theory, such a call should not be necessary.



[2008-02-15 00:27:42] [EMAIL PROTECTED]

Description:

On Windows, XML files with large amounts of XIncludes (such as the PHP
Documentation Manual, where this bug was discovered) exhibit curious
behavior when they were loaded with Unix-style paths: they appear to
require double the memory than if they were loaded with Windows-style
paths.

Reproduce code:
---
load($file);
echo "Performing XIncludes\n";
$dom->xinclude();


Expected result:

With an external process manager (Task Manager or Process Explorer),
memory usage should spike on $dom->load(), and then stay constant during
XIncludes. XIncludes should be very quick.

Actual result:
--
XIncludes take a long time to run, and double the memory usage of
php.exe.

A curious side-effect of this is that call to $dom->load() immediately
after the offending XInclude is extremely slow. This can be from a
completely separate process.





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



#44539 [Opn->Bgs]: Anonymous Functions

2008-03-26 Thread colder
 ID:  44539
 Updated by:  [EMAIL PROTECTED]
 Reported By: xwisdom at yahoo dot com
-Status:  Open
+Status:  Bogus
 Bug Type:Feature/Change Request
 PHP Version: 5.2.5
 New Comment:

Please do not submit the same bug more than once. An existing
bug report already describes this very problem. Even if you feel
that your issue is somewhat different, the resolution is likely
to be the same. 

Thank you for your interest in PHP.

http://wiki.php.net/gsoc/2008#anonymous_functions_and_closures_and_other_missing_object_oriented_features


Previous Comments:


[2008-03-26 16:36:32] xwisdom at yahoo dot com

Description:

Hello,

I would like to see improved anonymous functions in PHP6 or maybe
5.2.6

It would be really nice to be able to do the following similar to what
we can do in Javascript:

$fn = function($a,$b){
   return $a + $b;
}

echo $fn(2,5);

// with anonymous functions we can do things like:
$object.each(function($index,$value) {
   // do something here
});

// to remove reference to the function we just do this:
unset($fn); // or $fn = null;

Anonymous functions must conform to scope and maybe closures, etc.

__
xwisdom
http://xwisdomhtml.com







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



#44393 [Com]: [PATCH] Support for Keep-Alive connections under IIS using ISAPI sapi

2008-03-26 Thread Richard dot Krehbiel at gmail dot com
 ID:   44393
 Comment by:   Richard dot Krehbiel at gmail dot com
 Reported By:  richard dot krehbiel at gmail dot com
 Status:   Open
 Bug Type: Feature/Change Request
 Operating System: Windows
 PHP Version:  5.2.5
 New Comment:

New feature:  It now detects the presence of a "Content-Length" header
and declines to emit "chunked" transfer encoding.  I also tried to make
the code use more of the conventions established in the original
module.

Note:
It works great with zlib.output_compression.  However (and I'm sure
this is not news to many of you) supplying a Content-Length header mixed
with compression will almost certainly do the wrong thing.  The
Content-Length must supply the compressed size, which your script will
almost certainly be unaware of.  So, compression will definitely work
best with chunked - meaning, don't supply Content-Length.

The latest patch version:

--- /mnt/rich3/c/php-5.2.5/sapi/isapi/php5isapi.c   2007-02-23
17:08:30.0 -0500
+++ /mnt/rich3/c/buildphp/php-5.2.5/sapi/isapi/php5isapi.c  2008-03-26
13:25:10.0 -0400
@@ -143,6 +143,19 @@
NULL
 };
 
+typedef struct
+{
+   int chunked;/* Whether to send the data 
"chunked" */
+} PHP_STREAM_INFO;
+
+ts_rsrc_id tls_php_stream_info;
+
+static void php_stream_info_ctor(void *vsi, void ***foo) {
+   memset(vsi, 0, sizeof(PHP_STREAM_INFO));
+}
+
+static void php_stream_info_dtor(void *vsi, void ***foo) {
+}
 
 static void php_info_isapi(ZEND_MODULE_INFO_FUNC_ARGS)
 {
@@ -206,11 +219,36 @@
 {
DWORD num_bytes = str_length;
LPEXTENSION_CONTROL_BLOCK ecb;
-   
+   /* For chunked write */
+   char chunksize[16];
+   uint chunksizelen;
+   PHP_STREAM_INFO *phpinfo;
+
ecb = (LPEXTENSION_CONTROL_BLOCK) SG(server_context);
-   if (ecb->WriteClient(ecb->ConnID, (char *) str, &num_bytes,
HSE_IO_SYNC) == FALSE) {
-   php_handle_aborted_connection();
+
+   phpinfo = (PHP_STREAM_INFO*)ts_resource(tls_php_stream_info);
+
+   if(phpinfo->chunked) {
+   if(str_length > 0) {
+   uint two = 2;
+   _snprintf(chunksize, sizeof(chunksize), "%lX\r\n", 
str_length);
+   chunksizelen = strlen(chunksize);
+   if (ecb->WriteClient(ecb->ConnID, chunksize, 
&chunksizelen,
HSE_IO_SYNC) == FALSE) {
+   php_handle_aborted_connection();
+   }
+   if (ecb->WriteClient(ecb->ConnID, (char *) str, 
&num_bytes,
HSE_IO_SYNC) == FALSE) {
+   php_handle_aborted_connection();
+   }
+   if (ecb->WriteClient(ecb->ConnID, "\r\n", &two, 
HSE_IO_SYNC) ==
FALSE) {
+   php_handle_aborted_connection();
+   }
+   }
+   } else {
+   if (ecb->WriteClient(ecb->ConnID, (char *) str, &num_bytes,
HSE_IO_SYNC) == FALSE) {
+   php_handle_aborted_connection();
+   }
}
+
return num_bytes;
 }
 
@@ -220,52 +258,82 @@
return SAPI_HEADER_ADD;
 }
 
-
-
-static void accumulate_header_length(sapi_header_struct *sapi_header,
uint *total_length TSRMLS_DC)
+struct header_params
 {
-   *total_length += sapi_header->header_len+2;
-}
-
+   char *combined_headers_ptr; /* pointer to headers, Advances during
contat_header calls */
+   int content_length; /* Indicates whether 
Content-Length: was
encountered while counting up headers' total length  */
+   int total_length;   /* Accumulates headers' total 
length */
+};
 
-static void concat_header(sapi_header_struct *sapi_header, char
**combined_headers_ptr TSRMLS_DC)
+static void accumulate_header_length(sapi_header_struct *sapi_header,
struct header_params *params TSRMLS_DC)
 {
-   memcpy(*combined_headers_ptr, sapi_header->header,
sapi_header->header_len);
-   *combined_headers_ptr += sapi_header->header_len;
-   **combined_headers_ptr = '\r';
-   (*combined_headers_ptr)++;
-   **combined_headers_ptr = '\n';
-   (*combined_headers_ptr)++;
+   params->total_length += sapi_header->header_len+2;
+   /* Make a note here if the script provided a Content-Length: header.
*/
+   if(_strnicmp(sapi_header->header, "Content-Length:", 15) == 0)
+   params->content_length = 1;
+}
+
+static void concat_header(sapi_header_struct *sapi_header, struct
header_params *params TSRMLS_DC)
+{
+   memcpy(params->combined_headers_ptr, sapi_header->header,
sapi_header->header_len);
+   params->combined_headers_ptr += sapi_header->header_len;
+   *params->combined_headers_ptr = '\r';
+   (params->combined_headers_ptr)++;
+   *params->combined_headers_ptr = '\n';
+   (params->combined_headers_ptr)++;
 }
 
-
 static int sapi_isapi_send_hea

#44538 [Fbk]: str_replace does not work for some regular expressions

2008-03-26 Thread scottmac
 ID:   44538
 Updated by:   [EMAIL PROTECTED]
 Reported By:  andre dot thompson at sta dot uwi dot edu
 Status:   Feedback
 Bug Type: Strings related
 Operating System: Windows 2003 Server Standard
 PHP Version:  5.2.5
 New Comment:

Web browser flatten multiple spaces down to one. If you run this via
the command line it would show correctly.


Previous Comments:


[2008-03-26 16:50:22] [EMAIL PROTECTED]

Please try using this CVS snapshot:

  http://snaps.php.net/php5.2-latest.tar.gz
 
For Windows (zip):
 
  http://snaps.php.net/win32/php5.2-win32-latest.zip

For Windows (installer):

  http://snaps.php.net/win32/php5.2-win32-installer-latest.msi

Works fine to me on 5.2.6.



[2008-03-26 16:29:57] andre dot thompson at sta dot uwi dot edu

Description:

str_replace does not replace with more than one space.

Reproduce code:
---
$repstr = "', W";
$astring = "UPDATE Assets SET Supplier = '6', WHERE AssetID = '112'";
$update1 = str_replace($repstr, "'W", $astring);
echo $update1;


Expected result:

UPDATE Assets SET Supplier = '6'WHERE AssetID = '112'


Actual result:
--
UPDATE Assets SET Supplier = '6' WHERE AssetID = '112'






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



#44538 [Opn->Fbk]: str_replace does not work for some regular expressions

2008-03-26 Thread felipe
 ID:   44538
 Updated by:   [EMAIL PROTECTED]
 Reported By:  andre dot thompson at sta dot uwi dot edu
-Status:   Open
+Status:   Feedback
-Bug Type: *Regular Expressions
+Bug Type: Strings related
 Operating System: Windows 2003 Server Standard
 PHP Version:  5.2.5
 New Comment:

Please try using this CVS snapshot:

  http://snaps.php.net/php5.2-latest.tar.gz
 
For Windows (zip):
 
  http://snaps.php.net/win32/php5.2-win32-latest.zip

For Windows (installer):

  http://snaps.php.net/win32/php5.2-win32-installer-latest.msi

Works fine to me on 5.2.6.


Previous Comments:


[2008-03-26 16:29:57] andre dot thompson at sta dot uwi dot edu

Description:

str_replace does not replace with more than one space.

Reproduce code:
---
$repstr = "', W";
$astring = "UPDATE Assets SET Supplier = '6', WHERE AssetID = '112'";
$update1 = str_replace($repstr, "'W", $astring);
echo $update1;


Expected result:

UPDATE Assets SET Supplier = '6'WHERE AssetID = '112'


Actual result:
--
UPDATE Assets SET Supplier = '6' WHERE AssetID = '112'






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



#44539 [NEW]: Anonymous Functions

2008-03-26 Thread xwisdom at yahoo dot com
From: xwisdom at yahoo dot com
Operating system: 
PHP version:  5.2.5
PHP Bug Type: Feature/Change Request
Bug description:  Anonymous Functions

Description:

Hello,

I would like to see improved anonymous functions in PHP6 or maybe 5.2.6

It would be really nice to be able to do the following similar to what we
can do in Javascript:

$fn = function($a,$b){
   return $a + $b;
}

echo $fn(2,5);

// with anonymous functions we can do things like:
$object.each(function($index,$value) {
   // do something here
});

// to remove reference to the function we just do this:
unset($fn); // or $fn = null;

Anonymous functions must conform to scope and maybe closures, etc.

__
xwisdom
http://xwisdomhtml.com



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



#44538 [NEW]: str_replace does not work for some regular expressions

2008-03-26 Thread andre dot thompson at sta dot uwi dot edu
From: andre dot thompson at sta dot uwi dot edu
Operating system: Windows 2003 Server Standard
PHP version:  5.2.5
PHP Bug Type: *Regular Expressions
Bug description:  str_replace does not work for some regular expressions

Description:

str_replace does not replace with more than one space.

Reproduce code:
---
$repstr = "', W";
$astring = "UPDATE Assets SET Supplier = '6', WHERE AssetID = '112'";
$update1 = str_replace($repstr, "'W", $astring);
echo $update1;


Expected result:

UPDATE Assets SET Supplier = '6'WHERE AssetID = '112'


Actual result:
--
UPDATE Assets SET Supplier = '6' WHERE AssetID = '112'


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



#44537 [NEW]: mb_send_mail overwrites extra headers

2008-03-26 Thread anders at cb-it dot dk
From: anders at cb-it dot dk
Operating system: Mac OS X
PHP version:  5.2.5
PHP Bug Type: Mail related
Bug description:  mb_send_mail overwrites extra headers

Description:

Old bug reintroduced?
http://bugs.php.net/bug.php?id=21985


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



#38111 [Com]: PHP crashes IIS worker process and application pool

2008-03-26 Thread registrations at mjonesweb dot com
 ID:   38111
 Comment by:   registrations at mjonesweb dot com
 Reported By:  svendavidh at hotmail dot com
 Status:   No Feedback
 Bug Type: IIS related
 Operating System: Windows Server 2003 Std. Ed. R2
 PHP Version:  5.1.4
 New Comment:

We are seeing the same issue.  We are running Windows Server 2003
Standard Edition R2 SP1.  I have loaded PHP 5.2.5 per the instructions
listed at
http://www.wikihow.com/Install-PHP-5-for-Iis-6-on-Windows-Xp-and-2003. 
When I log into the server, I am usually presented with several dialog
boxes stating "IIS Worker Process encountered a problem and needed to
close".  I also see the same messages in the event log as others have
already reported here.  Is there a fix anywhere in the near future?


Previous Comments:


[2008-03-03 17:01:37] oliver at webbworlds dot com

I've got a backtrace for this issue, I believe. I'm running PHP 5.2.1
on IIS6/Windows Server 2003 Web Edition with Service Pack 2.

Function Arg 1 Arg 2 Arg 3   Source 
php5isapi!php_isapi_report_exception+17 00fbf970 0033
02a6c7a0
php5isapi!HttpExtensionProc+2e0 010237d0 010224d8 01023160 
  
w3isapi!ProcessIsapiRequest+100 01023748 01d01de0 00fbfe50 
  
w3core+68ff   010224d8
w3core+67e0 00fbfee8 010224d8 
w3core+6764 010224d8  00fbfec4
w3core+66f4 010224e0 010224d8 0001
w3core+66ae 0001 00fbfee8 0026add0
w3core+6648   
w3core+2264   
w3core+65ea 01021a10 01021a10 5a361650
w3dt!UlAtqAllocateMemory+16f 050e  01021a14   

w3dt!UlAtqAllocateMemory+19a  050e 01021a14   

w3tp!THREAD_POOL::PostCompletion+c9  002685e8
5a30
w3tp!THREAD_POOL::~THREAD_POOL+153 002684d0 

w3tp+1da9 002685e8  
kernel32!GetModuleHandleA+df 5a301d70 002685e8    


PHP5ISAPI!PHP_ISAPI_REPORT_EXCEPTION+17
In
w3wp__PID__3172__Date__03_03_2008__Time_04_49_41PM__995__Second_Chance_Exception_C005.dmp
the assembly instruction at php5isapi!php_isapi_report_exception+17 in
\\?\C:\php-5.2.1-Win32\php5isapi.dll from The PHP Group has caused an
access violation exception (0xC005) when trying to read from memory
location 0x0090 on thread 0



[2008-03-03 05:17:38] markness at gmail dot com

I removed the ISAPI DLL from the ISAPI Filters in IIS7 (as I don't need
to do HTTP_AUTH from PHP, which seems to be what is causing the
problem), and I haven't had any crashes yet.

Hope it works for you too (assuming you don't do HTTP Authentication
through PHP)



[2008-02-20 21:58:44] wim-bart at vanderwaals dot net

Found a MS KB doc related to this issue.
http://support.microsoft.com/kb/892988

Did not solve problem. Process Explorer tells php5ts.dll.



[2008-02-20 21:55:15] wim-bart at vanderwaals dot net

Same problem here. Configuration:

Windows Server 2003 Standard edition
Windows Server 2003 Web edition
Windows Server 2003 Enterprise Edition
Windows Server 2003 Standard edition R2

Additional software:
IIS version 6

Service packs:
Windows 2003 SP 2
Hotixes until 20th feb 2008

Popup window on console:
IIS Worker Process encountered a problem and needed to close.

Eventlog:
Source: Application Error
Catagory: (100)
Type: Error
Event ID: 1000
User: N/A
Description: Faulting application w3wp.exe, version 6.0.3790.3959,
faulting module w3core.dll, version 6.0.3790.3959, fault address
0x000201b4.

Data:
: 41 70 70 6c 69 63 61 74   Applicat
0008: 69 6f 6e 20 46 61 69 6c   ion Fail
0010: 75 72 65 20 20 77 33 77   ure  w3w
0018: 70 2e 65 78 65 20 36 2e   p.exe 6.
0020: 30 2e 33 37 39 30 2e 33   0.3790.3
0028: 39 35 39 20 69 6e 20 77   959 in w
0030: 33 63 6f 72 65 2e 64 6c   3core.dl
0038: 6c 20 36 2e 30 2e 33 37   l 6.0.37
0040: 39 30 2e 33 39 35 39 20   90.3959 
0048: 61 74 20 6f 66 66 73 65   at offse
0050: 74 20 30 30 30 32 30 31   t 000201
0058: 62 34 b4  

Related event:
Source: W3SVC
Catagory: None
Type: Warning
Event ID: 1009
User: N/A
Description: A process serving application pool '-'
terminated unexpectedly. The process id was '3484'. The process exit
code was '0xc005'.

Before the error occured:
Source: Security
Catagory: Logon/Logoff
Type: Success Access
Event ID: 538
User: [Computername]\IUSR_[computername]
Description: User Logoff:
User Name:  IUSR_[SERVERNAME]
Domain: [SERVERNAME]
Logon ID:   (0x0,0x37

#44497 [Fbk->Opn]: Php is very slow to make a MySQL connection

2008-03-26 Thread damien at zaide dot org
 ID:   44497
 User updated by:  damien at zaide dot org
 Reported By:  damien at zaide dot org
-Status:   Feedback
+Status:   Open
 Bug Type: MySQL related
 Operating System: Windows 2003 Server
 PHP Version:  5.2.5
 New Comment:

I have tested with the fqdn and with the IP address, result is the
same.
I have added the fqdn in my host file in windows and result is the
same.
It's big application like phpbb or joomla who get this problem ... So i
think they use mysql_connect(). I haven't tested small scripts on the
servers.


Previous Comments:


[2008-03-26 12:02:57] [EMAIL PROTECTED]

How exactly are you connecting to Mysql? Exactly _what_ line is used?
Do you connect using the IP of the mysql server?



[2008-03-26 10:36:26] damien at zaide dot org

More informations :
- The problem occurs since the php installation with the installation
package. So i have the problem from the beggining i start using php with
IIS.
- My customers php files is on a Samba Server and PHP is installed on 2
HTTP servers (load balancing answer) and the problem occurs for both.
- I have no problem with ODBC MySQL connector (fast connection) and ASP
run fast on these servers.
- I have set to "on" the "output_buffering" option. I have see it could
solve my problem but no finally.
- I have "C:\Program Files\PHP" in my PATH variable.

I think the progress of the execution of this script is like this:
1/ File is loaded from the samba server. Everything is OK.
2/ Php is launched and start interpreting it. Everything is OK.
3/ Php needs to use MySQL ! The slowdown occurs here. Maybe problem to
locate phpmysql.dll or anything else.
4/ Php contacts MySQL Server and sends requests. Eveything is OK.
5/ Php prints result to the browser.



[2008-03-25 23:38:50] damien at zaide dot org

Yes i have copied the .dll/.exe/.lib from the .zip to my C:\Program
Files\PHP directory.
Then restart IIS and the problem occurs again.



[2008-03-25 19:30:53] [EMAIL PROTECTED]

And you really updated ALL dlls using the ones from the snapshot
package?



[2008-03-25 15:22:07] damien at zaide dot org

I have setting up the cvs version and the problem occurs again.



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

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



#44421 [Fbk->Opn]: Core dump using PHP 5.2.5 with suExec and mod_cgid

2008-03-26 Thread obonhomme at nerim dot net
 ID:   44421
 User updated by:  obonhomme at nerim dot net
 Reported By:  obonhomme at nerim dot net
-Status:   Feedback
+Status:   Open
 Bug Type: Reproducible crash
 Operating System: FreeBSD 6.3
 PHP Version:  5.2CVS-2008-25-03
 Assigned To:  fb-req-jani
 New Comment:

The phpinfo script is available at the following URL

http://forum.kajiura.fr/phpdebug4421.php

The issue occurs with the index.php script which is effectively is very
big. The problem is that the bug is reproductible only with this script.
So it is not possible for the moment to make a shorter script.


Previous Comments:


[2008-03-26 12:29:06] [EMAIL PROTECTED]

And also that the binary does NOT have ZTS enabled!



[2008-03-26 12:27:52] [EMAIL PROTECTED]

That script is way too big for reproducing this elsewhere. Please
provide a shorter script, 10-20 lines which still causes the crash.
I'd also check with plain '' script that the used
PHP  binary is the correct one and what php.ini file(s) are loaded and
what possible extensions are loaded.



[2008-03-26 10:10:28] obonhomme at nerim dot net

I recompiled my PHP with the following command line : 

'./configure' '--with-layout=GNU'
'--with-config-file-scan-dir=/usr/local/etc/php' '--disable-all'
'--enable-libxml' '--with-libxml-dir=/usr/local' '--enable-reflection'
'--program-prefix=' '--enable-fastcgi' '--prefix=/usr/local'
'--mandir=/usr/local/man' '--infodir=/usr/local/info/'

Nevertheless, the php-cgi binary still cores with this script.



[2008-03-25 19:34:37] [EMAIL PROTECTED]

Yes, you might have those binaries there, but they're NOT from the same
build: That simply is NOT possible. So check for real WHICH ones are
from this build. Then I suggest you rebuild the CGI binary just in case
_without_ these options:

'--with-apxs2=/usr/local/sbin/apxs' '--with-regex=php'
'--with-zend-vm=CALL' '--enable-zend-multibyte' 




[2008-03-25 15:03:32] obonhomme at nerim dot net

This configuration line have been generated using the FreeBSD port and
I confirm that php-cli, php-cgi and the apache module are present on my
system.

I confirm that I use the Apache Worker MPM (So a threaded one)

I add that I have severals others vhost using php-cgi which works on
the same server.



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

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



#42815 [Opn->Fbk]: open_basedir incorrectly parsed when configured via "Per directory values"

2008-03-26 Thread jani
 ID:   42815
 Updated by:   [EMAIL PROTECTED]
 Reported By:  simon at bleif dot de
-Status:   Open
+Status:   Feedback
 Bug Type: Safe Mode/open_basedir
 Operating System: Windows Server 2003 x64 R2 SP2
 PHP Version:  5.2.4
 New Comment:

Please try using this CVS snapshot:

  http://snaps.php.net/php5.2-latest.tar.gz
 
For Windows (zip):
 
  http://snaps.php.net/win32/php5.2-win32-latest.zip

For Windows (installer):

  http://snaps.php.net/win32/php5.2-win32-installer-latest.msi

This is most likely fixed now.


Previous Comments:


[2007-10-03 16:38:56] simon at bleif dot de

I filed the bug #42646 in the assumption that all "per
directory"-assignments don't work - as only open_basedir seems affected,
I decided to file a new bug report in the appropriate category (here).



[2007-10-02 12:21:45] [EMAIL PROTECTED]

What's the difference between this report and bug #42646?
Isn't this the same issue?



[2007-10-01 14:12:02] simon at bleif dot de

Description:

When running PHP via php-cgi.exe using CGI/FastCGI, open_basedir values
configured via "Per Directory Values" are not working correctly. ISAPI
module and PHP-CLI are not affected, PHP-CGI is.

Also see http://bugs.php.net/bug.php?id=42646, reposted here as only
open_basedir seems to be affected.

Reproduce code:
---
Prerequisites:
- properly set "Per Directory Values"-registry key, open_basedir set to
C:\Inetpub\wwwroot\test for the "test"-folder there.
- test.php, just containing a call to phpinfo(), located in that
"test"-folder
- php.ini, open_basedir only set to temp and session directory there,
not to the "test"-folder

Test1:
php.exe -f C:\Inetpub\wwwroot\test\test.php

Test2:
php-cgi.exe -f C:\Inetpub\wwwroot\test\test.php

Test3:
Change: Configure php.ini-open_basedir value to include the path to the
"test"-folder, then again (exactly as in Test2):
php-cgi.exe -f C:\Inetpub\wwwroot\test\test.php

Expected result:

Test1, Test2 and Test3:
Each of them should display the correct phpinfo-output, the additional
setting for open_basedir (set via "Per Directory Values") should be
reflected correctly under "Local Value".

Actual result:
--
Test1:
Works as expected

Test2:
Does not work as expected, "No input file specified" is displayed

Test3:
Works as expected.
Interesting: the local value of open_basedir, configured via registry
is displayed in the phpinfo-output under "Local Value"!





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



#42915 [Opn->Bgs]: mod_proxy + php5_module + URL � UTF-8 = HTTP 404

2008-03-26 Thread jani
 ID:   42915
 Updated by:   [EMAIL PROTECTED]
 Reported By:  yeti at na-svyazi dot ru
-Status:   Open
+Status:   Bogus
 Bug Type: Apache related
 Operating System: Win
 PHP Version:  5.2.4
-Assigned To:  
+Assigned To:  fb-req-jani
 New Comment:

And how is this a _PHP_ bug?


Previous Comments:


[2007-10-10 12:08:34] yeti at na-svyazi dot ru

Description:

>>>httpd.conf
LoadModule php5_module "C:/SOFT/PHP524/php5apache.dll
PHPIniDir "C:/SOFT/PHP524/"

 
ProxyPass http://iis/demo 
ProxyPassReverse http://iis/demo 


---
in browser:
http://apache/demo/ôôô.txt

browser send to apache:
GET /demo/%D1%84%D1%84%D1%84.txt

apache send to iis:80 :
GET /demo/╤%84╤%84╤%84.txt

(i.e. %D1 convert to chr(0xd1))

if php5_module is not loaded apache send to iis:80 :
GET /demo/%D1%84%D1%84%D1%84.txt

tested on: Apache 1.3.39, 2.0.59, 2.2.6 & PHP 5.2.4, 5.0.5, 4.4.6






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



#41779 [Com]: ftp_nlist() and ftp_rawlist() fail with open_basedir

2008-03-26 Thread phpbts at gmx-topmail dot de
 ID:   41779
 Comment by:   phpbts at gmx-topmail dot de
 Reported By:  derernst at gmx dot ch
 Status:   No Feedback
 Bug Type: Safe Mode/open_basedir
 Operating System: Linux
 PHP Version:  5.2.3
 New Comment:

I'm experiencing the same problem even with the latest stable version
5.2.5 and also the latest snapshot (OS: Debian Sarge). There are already
a few bugs concerning this issue and it has never been fixed so far. As
in #39555 the user tried using TMPDIR to define a user defined temporary
directory - I would really like to have such a flexible solution. Is
there any way to implement such solution?


Previous Comments:


[2007-07-14 01:00:00] php-bugs at lists dot php dot net

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



[2007-07-06 09:12:33] [EMAIL PROTECTED]

You can safely install everything you want in your home directory.



[2007-07-06 08:33:48] derernst at gmx dot ch

The ISP informed me now that he will not install the snapshot as he
does not have a test environment, and only wants to run stable releases.
So I am sorry I am not able to provide feedback about the snapshot.



[2007-06-27 12:23:39] derernst at gmx dot ch

I am working on shared hosting and don't have a server or a local PHP
installation nor the knowledge how to maintain it. So I asked the ISP
where the issue occurred to kindly try the new snapshot posted. I did
not get an answer so far; if he does help with the test, I will post the
results here as soon as possible.
Anyway if there was someone else who does not mind testing the snapshot
with correct open_basedir settings and ftp_nlist() or ftp_rawlist(), I
would highly appreciate this.



[2007-06-25 17:49:27] [EMAIL PROTECTED]

Please try using this CVS snapshot:

  http://snaps.php.net/php5.2-latest.tar.gz
 
For Windows (zip):
 
  http://snaps.php.net/win32/php5.2-win32-latest.zip

For Windows (installer):

  http://snaps.php.net/win32/php5.2-win32-installer-latest.msi





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

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



#43740 [NoF->Bgs]: htmlspecialchars Bug UTF-8

2008-03-26 Thread jani
 ID:   43740
 Updated by:   [EMAIL PROTECTED]
 Reported By:  heurika at gmail dot com
-Status:   No Feedback
+Status:   Bogus
 Bug Type: *Unicode Issues
 Operating System: openSuse 10.1
 PHP Version:  5.2.5
 New Comment:

See bug #43896



Previous Comments:


[2008-01-03 19:36:43] [EMAIL PROTECTED]

Works fine for me:

[EMAIL PROTECTED]:~$ php
';
echo trim(htmlspecialchars($test, ENT_QUOTES, "UTF-8"));
?>
Das für $ <>

[EMAIL PROTECTED]:~$ php -v
PHP 5.2.5RC2-dev (cli) (built: Oct 31 2007 11:42:16) (DEBUG)




[2008-01-03 19:29:25] heurika at gmail dot com

Description:

PHP 5.2.5 cannot convert german special-chars like äöü$ with UTF-8.
It worked fine on PHP 5.2.4.

Reproduce code:
---
';
echo trim(htmlspecialchars($test, ENT_QUOTES, "UTF-8"));
?>

Expected result:

Das für $ <>

Actual result:
--
(empty output)





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



#44513 [Fbk->Bgs]: htmlspecialchars charset doesn't work

2008-03-26 Thread jani
 ID:   44513
 Updated by:   [EMAIL PROTECTED]
 Reported By:  juan at multiporte dot com dot br
-Status:   Feedback
+Status:   Bogus
 Bug Type: Strings related
 Operating System: WinXP
 PHP Version:  5.2.5
 Assigned To:  fb-req-jani
 New Comment:

Please do not submit the same bug more than once. An existing
bug report already describes this very problem. Even if you feel
that your issue is somewhat different, the resolution is likely
to be the same. 

Thank you for your interest in PHP.

See bug #43896



Previous Comments:


[2008-03-26 11:52:02] [EMAIL PROTECTED]

Eh..so you're passing non-utf8 to the function and use UTF-8 as charset
and expect it to work? How is this a bug?



[2008-03-25 22:32:24] juan at multiporte dot com dot br

Well, I tried using snap version and nothing... Let's go to tecnical
infos:

PHP Code:


Result:
string(0) ""
string(6) "março"

PHP version: PHP Version 5.2.6RC3-dev 
PHP extensions: curl, gd2, gettext, mbstring, mcrypt, mysql, mysqli,
openssl, pdo, pdo_mysql, pdo_pgsql, pdo_sqlite, pgsql, soap, sockets,
svn, xmlrpc, xsl
System: Windows NT * 5.1 build 2600 
Server API: Apache 2.0 Handler 
Apache version: Apache/2.0.59 (Win32) PHP/5.2.6RC3-dev SVN/1.4.4 DAV/2

Apache modules: core mod_win32 mpm_winnt http_core mod_so mod_access
mod_actions mod_alias mod_asis mod_auth mod_autoindex mod_cgi mod_dav
mod_dir mod_env mod_imap mod_include mod_isapi mod_log_config mod_mime
mod_negotiation mod_rewrite mod_setenvif mod_userdir mod_php5
mod_dav_svn mod_authz_svn 

[iconv]
iconv.input_encoding = ISO-8859-1
iconv.internal_encoding = UTF-8
iconv.output_encoding = UTF-8

Apache configuration (httpd.conf):
LoadModule php5_module "c:/arquiv~1/php5/php5apache2.dll"
AddType application/x-httpd-php .php
AddType application/x-httpd-php .php5

# configure the path to php.ini
PHPIniDir "C:/arquiv~1/php5"


More information about source file: The source code must be in ANSI
mode for see that error. If the source file in UTF-8, work's great.



[2008-03-25 13:25:05] [EMAIL PROTECTED]

Works just fine for me using latest CVS snapshot. Try with this:

For Windows (zip):
 
  http://snaps.php.net/win32/php5.2-win32-latest.zip

For Windows (installer):

  http://snaps.php.net/win32/php5.2-win32-installer-latest.msi


But I'd guess you're just not using it properly and you're not really
passing valid UTF-8 data to it..



[2008-03-23 20:14:03] juan at multiporte dot com dot br

Description:

When using htmlspecialchars with charset UTF-8 in Windows, this not
display anything if have special chars. But, if I use utf8_encode
function, work nice.

I'm tested in Apache 2.0 and PHP 5.2.5.

Reproduce code:
---


Expected result:

março (in UTF-8)

Actual result:
--
(empty)





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



#43977 [Opn->Fbk]: chdir() not working with absolute path / CWD not properly reset

2008-03-26 Thread jani
 ID:   43977
 Updated by:   [EMAIL PROTECTED]
 Reported By:  sysdev at gmx dot net
-Status:   Open
+Status:   Feedback
 Bug Type: Directory function related
 Operating System: Windows Server 2003
 PHP Version:  5.2.5
 New Comment:

Please try using this CVS snapshot:

  http://snaps.php.net/php5.2-latest.tar.gz
 
For Windows (zip):
 
  http://snaps.php.net/win32/php5.2-win32-latest.zip

For Windows (installer):

  http://snaps.php.net/win32/php5.2-win32-installer-latest.msi




Previous Comments:


[2008-01-29 21:49:37] sysdev at gmx dot net

Description:

IIS 6 with PHP 5 SAPI:

In some cases, the CWD of a PHP-script run is not properly reset to the
script's directory. Its instead the directory of another previously run
script.

chdir() with an absulote path fails in these cases if the desired path
is no child of the script's path itself, while chdir() with a relative
path to the same destination succeedes.

Reproduce code:
---
Script located in d:\webshare\web3

echo 'CWD is '.getcwd().'';
chdir( 'd:\\webshare\\web3' );
echo 'CWD is '.getcwd().'';
chdir( 'd:\\webshare\\web3\\test' );
echo 'CWD is '.getcwd().'';

Expected result:

Script located in d:\webshare\web3

CWD is 'd:\webshare\web3'
CWD is 'd:\webshare\web3'
CWD is 'd:\webshare\web3\test'

Actual result:
--
Script located in d:\webshare\web3

CWD is 'd:\webshare\another\scripts\path'
Warning: chdir() [function.chdir]: No such file or directory (errno 2)
in D:\webshare\web3\test.php on line 4
CWD is 'd:\webshare\another\scripts\path'
CWD is 'd:\webshare\web3\test'

-- or sometimes --

Script located in d:\webshare\web3

CWD is 'd:\webshare\another\scripts\path'
Warning: chdir() [function.chdir]: No error (errno 0) in
D:\webshare\web3\test.php on line 4
CWD is 'd:\webshare\another\scripts\path'
CWD is 'd:\webshare\web3\test'







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



#44421 [Fbk]: Core dump using PHP 5.2.5 with suExec and mod_cgid

2008-03-26 Thread jani
 ID:   44421
 Updated by:   [EMAIL PROTECTED]
 Reported By:  obonhomme at nerim dot net
 Status:   Feedback
 Bug Type: Reproducible crash
 Operating System: FreeBSD 6.3
 PHP Version:  5.2CVS-2008-25-03
 Assigned To:  fb-req-jani
 New Comment:

And also that the binary does NOT have ZTS enabled!


Previous Comments:


[2008-03-26 12:27:52] [EMAIL PROTECTED]

That script is way too big for reproducing this elsewhere. Please
provide a shorter script, 10-20 lines which still causes the crash.
I'd also check with plain '' script that the used
PHP  binary is the correct one and what php.ini file(s) are loaded and
what possible extensions are loaded.



[2008-03-26 10:10:28] obonhomme at nerim dot net

I recompiled my PHP with the following command line : 

'./configure' '--with-layout=GNU'
'--with-config-file-scan-dir=/usr/local/etc/php' '--disable-all'
'--enable-libxml' '--with-libxml-dir=/usr/local' '--enable-reflection'
'--program-prefix=' '--enable-fastcgi' '--prefix=/usr/local'
'--mandir=/usr/local/man' '--infodir=/usr/local/info/'

Nevertheless, the php-cgi binary still cores with this script.



[2008-03-25 19:34:37] [EMAIL PROTECTED]

Yes, you might have those binaries there, but they're NOT from the same
build: That simply is NOT possible. So check for real WHICH ones are
from this build. Then I suggest you rebuild the CGI binary just in case
_without_ these options:

'--with-apxs2=/usr/local/sbin/apxs' '--with-regex=php'
'--with-zend-vm=CALL' '--enable-zend-multibyte' 




[2008-03-25 15:03:32] obonhomme at nerim dot net

This configuration line have been generated using the FreeBSD port and
I confirm that php-cli, php-cgi and the apache module are present on my
system.

I confirm that I use the Apache Worker MPM (So a threaded one)

I add that I have severals others vhost using php-cgi which works on
the same server.



[2008-03-25 13:55:28] [EMAIL PROTECTED]

You're trying to build 3 SAPIs at the same time? It's not possible, you
only get CLI binary and the Apache module with that configure line.
And I would guess your Apache is using some threaded MPM..?



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

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



#44421 [Opn->Fbk]: Core dump using PHP 5.2.5 with suExec and mod_cgid

2008-03-26 Thread jani
 ID:   44421
 Updated by:   [EMAIL PROTECTED]
 Reported By:  obonhomme at nerim dot net
-Status:   Open
+Status:   Feedback
 Bug Type: Reproducible crash
 Operating System: FreeBSD 6.3
 PHP Version:  5.2.5
 Assigned To:  fb-req-jani
 New Comment:

That script is way too big for reproducing this elsewhere. Please
provide a shorter script, 10-20 lines which still causes the crash.
I'd also check with plain '' script that the used
PHP  binary is the correct one and what php.ini file(s) are loaded and
what possible extensions are loaded.


Previous Comments:


[2008-03-26 10:10:28] obonhomme at nerim dot net

I recompiled my PHP with the following command line : 

'./configure' '--with-layout=GNU'
'--with-config-file-scan-dir=/usr/local/etc/php' '--disable-all'
'--enable-libxml' '--with-libxml-dir=/usr/local' '--enable-reflection'
'--program-prefix=' '--enable-fastcgi' '--prefix=/usr/local'
'--mandir=/usr/local/man' '--infodir=/usr/local/info/'

Nevertheless, the php-cgi binary still cores with this script.



[2008-03-25 19:34:37] [EMAIL PROTECTED]

Yes, you might have those binaries there, but they're NOT from the same
build: That simply is NOT possible. So check for real WHICH ones are
from this build. Then I suggest you rebuild the CGI binary just in case
_without_ these options:

'--with-apxs2=/usr/local/sbin/apxs' '--with-regex=php'
'--with-zend-vm=CALL' '--enable-zend-multibyte' 




[2008-03-25 15:03:32] obonhomme at nerim dot net

This configuration line have been generated using the FreeBSD port and
I confirm that php-cli, php-cgi and the apache module are present on my
system.

I confirm that I use the Apache Worker MPM (So a threaded one)

I add that I have severals others vhost using php-cgi which works on
the same server.



[2008-03-25 13:55:28] [EMAIL PROTECTED]

You're trying to build 3 SAPIs at the same time? It's not possible, you
only get CLI binary and the Apache module with that configure line.
And I would guess your Apache is using some threaded MPM..?



[2008-03-25 13:50:03] obonhomme at nerim dot net

The configure command used is the following : 

'./configure' '--with-layout=GNU'
'--with-config-file-scan-dir=/usr/local/etc/php' '--disable-all'
'--enable-libxml' '--with-libxml-dir=/usr/local' '--enable-reflection'
'--program-prefix=' '--enable-fastcgi'
'--with-apxs2=/usr/local/sbin/apxs' '--with-regex=php'
'--with-zend-vm=CALL' '--enable-zend-multibyte' '--prefix=/usr/local'
'--mandir=/usr/local/man' '--infodir=/usr/local/info/'



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

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



#44497 [Opn->Fbk]: Php is very slow to make a MySQL connection

2008-03-26 Thread jani
 ID:   44497
 Updated by:   [EMAIL PROTECTED]
 Reported By:  damien at zaide dot org
-Status:   Open
+Status:   Feedback
 Bug Type: MySQL related
 Operating System: Windows 2003 Server
 PHP Version:  5.2.5
 New Comment:

How exactly are you connecting to Mysql? Exactly _what_ line is used?
Do you connect using the IP of the mysql server?


Previous Comments:


[2008-03-26 10:36:26] damien at zaide dot org

More informations :
- The problem occurs since the php installation with the installation
package. So i have the problem from the beggining i start using php with
IIS.
- My customers php files is on a Samba Server and PHP is installed on 2
HTTP servers (load balancing answer) and the problem occurs for both.
- I have no problem with ODBC MySQL connector (fast connection) and ASP
run fast on these servers.
- I have set to "on" the "output_buffering" option. I have see it could
solve my problem but no finally.
- I have "C:\Program Files\PHP" in my PATH variable.

I think the progress of the execution of this script is like this:
1/ File is loaded from the samba server. Everything is OK.
2/ Php is launched and start interpreting it. Everything is OK.
3/ Php needs to use MySQL ! The slowdown occurs here. Maybe problem to
locate phpmysql.dll or anything else.
4/ Php contacts MySQL Server and sends requests. Eveything is OK.
5/ Php prints result to the browser.



[2008-03-25 23:38:50] damien at zaide dot org

Yes i have copied the .dll/.exe/.lib from the .zip to my C:\Program
Files\PHP directory.
Then restart IIS and the problem occurs again.



[2008-03-25 19:30:53] [EMAIL PROTECTED]

And you really updated ALL dlls using the ones from the snapshot
package?



[2008-03-25 15:22:07] damien at zaide dot org

I have setting up the cvs version and the problem occurs again.



[2008-03-25 13:34:41] [EMAIL PROTECTED]

Please try using this CVS snapshot:

  http://snaps.php.net/php5.2-latest.tar.gz
 
For Windows (zip):
 
  http://snaps.php.net/win32/php5.2-win32-latest.zip

For Windows (installer):

  http://snaps.php.net/win32/php5.2-win32-installer-latest.msi





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

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



#44536 [Opn->Bgs]: wrong result (timestamp)

2008-03-26 Thread jani
 ID:   44536
 Updated by:   [EMAIL PROTECTED]
 Reported By:  anas1305 at gmail dot com
-Status:   Open
+Status:   Bogus
 Bug Type: Date/time related
 Operating System: XP and Linux
 PHP Version:  5.2CVS-2008-03-26
 New Comment:

Congratulations! You have found the DST (daylight saving time) and it's
problems. :) Hint: Use gmmktime() instead and you'll never encounter
this in the future.


Previous Comments:


[2008-03-26 11:28:22] anas1305 at gmail dot com

Description:

function return wrong result between 2 dates 2008-03-30 -> 2008-03-31.
PHP version : 5.2.3

Reproduce code:
---
$ddebut = "2008-03-30";
$dfin   = "2008-03-31";

$tab_ddebut = explode("-", $ddebut);
$tab_dfin   = explode("-", $dfin);

$timestamp_ddebut = mktime(0, 0, 0, $tab_ddebut[1], $tab_ddebut[2],
$tab_ddebut[0]);
$timestamp_dfin   = mktime(0, 0, 0, $tab_dfin[1], $tab_dfin[2],
$tab_dfin[0]);

echo abs(($timestamp_dfin - $timestamp_ddebut)/86400);


Expected result:

this code abs(($timestamp_dfin - $timestamp_ddebut)/86400) return wrong
result : 0.9583. the correct result is 1.

Actual result:
--
0.9583





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



#44533 [Bgs->Opn]: floatval() issues E_NOTICE "non well formed numeric value"

2008-03-26 Thread felipe
 ID:  44533
 Updated by:  [EMAIL PROTECTED]
 Reported By: cschneid at cschneid dot com
-Status:  Bogus
+Status:  Open
 Bug Type:*Math Functions
 PHP Version: 6CVS-2008-03-25 (CVS)
 New Comment:

Re-opened.


Previous Comments:


[2008-03-25 18:52:43] [EMAIL PROTECTED]

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





[2008-03-25 18:41:12] cschneid at cschneid dot com

Description:

floatval("4foo"); issues E_NOTICE "non well formed numeric value"


Reproduce code:
---
php -d error_reporting=65535 -r 'var_dump(floatval("4foo"));'


Expected result:

float(4)

Actual result:
--
Notice: A non well formed numeric value encountered in Command line
code on line 1
float(4)





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



#44513 [Opn->Fbk]: htmlspecialchars charset doesn't work

2008-03-26 Thread jani
 ID:   44513
 Updated by:   [EMAIL PROTECTED]
 Reported By:  juan at multiporte dot com dot br
-Status:   Open
+Status:   Feedback
 Bug Type: Strings related
 Operating System: WinXP
 PHP Version:  5.2.5
-Assigned To:  
+Assigned To:  fb-req-jani
 New Comment:

Eh..so you're passing non-utf8 to the function and use UTF-8 as charset
and expect it to work? How is this a bug?


Previous Comments:


[2008-03-25 22:32:24] juan at multiporte dot com dot br

Well, I tried using snap version and nothing... Let's go to tecnical
infos:

PHP Code:


Result:
string(0) ""
string(6) "março"

PHP version: PHP Version 5.2.6RC3-dev 
PHP extensions: curl, gd2, gettext, mbstring, mcrypt, mysql, mysqli,
openssl, pdo, pdo_mysql, pdo_pgsql, pdo_sqlite, pgsql, soap, sockets,
svn, xmlrpc, xsl
System: Windows NT * 5.1 build 2600 
Server API: Apache 2.0 Handler 
Apache version: Apache/2.0.59 (Win32) PHP/5.2.6RC3-dev SVN/1.4.4 DAV/2

Apache modules: core mod_win32 mpm_winnt http_core mod_so mod_access
mod_actions mod_alias mod_asis mod_auth mod_autoindex mod_cgi mod_dav
mod_dir mod_env mod_imap mod_include mod_isapi mod_log_config mod_mime
mod_negotiation mod_rewrite mod_setenvif mod_userdir mod_php5
mod_dav_svn mod_authz_svn 

[iconv]
iconv.input_encoding = ISO-8859-1
iconv.internal_encoding = UTF-8
iconv.output_encoding = UTF-8

Apache configuration (httpd.conf):
LoadModule php5_module "c:/arquiv~1/php5/php5apache2.dll"
AddType application/x-httpd-php .php
AddType application/x-httpd-php .php5

# configure the path to php.ini
PHPIniDir "C:/arquiv~1/php5"


More information about source file: The source code must be in ANSI
mode for see that error. If the source file in UTF-8, work's great.



[2008-03-25 13:25:05] [EMAIL PROTECTED]

Works just fine for me using latest CVS snapshot. Try with this:

For Windows (zip):
 
  http://snaps.php.net/win32/php5.2-win32-latest.zip

For Windows (installer):

  http://snaps.php.net/win32/php5.2-win32-installer-latest.msi


But I'd guess you're just not using it properly and you're not really
passing valid UTF-8 data to it..



[2008-03-23 20:14:03] juan at multiporte dot com dot br

Description:

When using htmlspecialchars with charset UTF-8 in Windows, this not
display anything if have special chars. But, if I use utf8_encode
function, work nice.

I'm tested in Apache 2.0 and PHP 5.2.5.

Reproduce code:
---


Expected result:

março (in UTF-8)

Actual result:
--
(empty)





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



#44534 [Opn->Fbk]: ldap_add() does not work

2008-03-26 Thread jani
 ID:   44534
 Updated by:   [EMAIL PROTECTED]
-Summary:  ldap_add() (perhaps other ldap functions) crash
 Reported By:  thegner at trilliumit dot com
-Status:   Open
+Status:   Feedback
 Bug Type: LDAP related
 Operating System: ubuntu gutsy server
 PHP Version:  5.2.5
 Assigned To:  fb-req-jani
 New Comment:

So it doesn't crash. Then what the actual problem is? What error do you
get? (EXACTLY!) Did you check the ldap server's logs for possible
reason?


Previous Comments:


[2008-03-25 19:47:41] thegner at trilliumit dot com

@jani:
Perhaps I am using the word "crash" too loosely. To me, if it doesn't
do what I expect, then it's crashed :).

Sorry for the mixup.



[2008-03-25 19:29:07] [EMAIL PROTECTED]

If it crashes, you should be seeing something in the webserver's logs?
And if it really crashes, you should be able to provide a GDB
backtrace.



[2008-03-25 19:15:18] thegner at trilliumit dot com

Sorry,

This Line: ldap_add($gc_con, "CN=Die\, Test,OU=Users,DC=Domain,DC=Com",
$user_attributes);

should be: ldap_add($gc_con, "CN=Die\\,
Test,OU=Users,DC=Domain,DC=Com",
$user_attributes);



[2008-03-25 19:12:42] thegner at trilliumit dot com

Description:

when doing an ldap_add() with "Die" as a persons last name, the server
returns unwilling to perform. If I change only the last name to "Die2"
it operates as expected. In our environment the following user
attributes are associated with the last name.

sn
cn
displayName
distinguishedName
sAMAccountName
mailNickname
userPrincipalName
unicodePwd

The ldap directory is Microsoft Active Directory on Windows Server 2003

Reproduce code:
---


Expected result:

We should expect the object to be added to the directory.

Actual result:
--
Error: Add: Server unwilling to perform...





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



#44536 [NEW]: wrong result (timpstamp)

2008-03-26 Thread anas1305 at gmail dot com
From: anas1305 at gmail dot com
Operating system: XP and Linux
PHP version:  5.2CVS-2008-03-26 (CVS)
PHP Bug Type: Date/time related
Bug description:  wrong result (timpstamp)

Description:

function return wrong result between 2 dates 2008-03-30 -> 2008-03-31.
PHP version : 5.2.3

Reproduce code:
---
$ddebut = "2008-03-30";
$dfin   = "2008-03-31";

$tab_ddebut = explode("-", $ddebut);
$tab_dfin   = explode("-", $dfin);

$timestamp_ddebut = mktime(0, 0, 0, $tab_ddebut[1], $tab_ddebut[2],
$tab_ddebut[0]);
$timestamp_dfin   = mktime(0, 0, 0, $tab_dfin[1], $tab_dfin[2],
$tab_dfin[0]);

echo abs(($timestamp_dfin - $timestamp_ddebut)/86400);


Expected result:

this code abs(($timestamp_dfin - $timestamp_ddebut)/86400) return wrong
result : 0.9583. the correct result is 1.

Actual result:
--
0.9583

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



#44497 [Opn]: Php is very slow to make a MySQL connection

2008-03-26 Thread damien at zaide dot org
 ID:   44497
 User updated by:  damien at zaide dot org
 Reported By:  damien at zaide dot org
 Status:   Open
 Bug Type: MySQL related
 Operating System: Windows 2003 Server
 PHP Version:  5.2.5
 New Comment:

More informations :
- The problem occurs since the php installation with the installation
package. So i have the problem from the beggining i start using php with
IIS.
- My customers php files is on a Samba Server and PHP is installed on 2
HTTP servers (load balancing answer) and the problem occurs for both.
- I have no problem with ODBC MySQL connector (fast connection) and ASP
run fast on these servers.
- I have set to "on" the "output_buffering" option. I have see it could
solve my problem but no finally.
- I have "C:\Program Files\PHP" in my PATH variable.

I think the progress of the execution of this script is like this:
1/ File is loaded from the samba server. Everything is OK.
2/ Php is launched and start interpreting it. Everything is OK.
3/ Php needs to use MySQL ! The slowdown occurs here. Maybe problem to
locate phpmysql.dll or anything else.
4/ Php contacts MySQL Server and sends requests. Eveything is OK.
5/ Php prints result to the browser.


Previous Comments:


[2008-03-25 23:38:50] damien at zaide dot org

Yes i have copied the .dll/.exe/.lib from the .zip to my C:\Program
Files\PHP directory.
Then restart IIS and the problem occurs again.



[2008-03-25 19:30:53] [EMAIL PROTECTED]

And you really updated ALL dlls using the ones from the snapshot
package?



[2008-03-25 15:22:07] damien at zaide dot org

I have setting up the cvs version and the problem occurs again.



[2008-03-25 13:34:41] [EMAIL PROTECTED]

Please try using this CVS snapshot:

  http://snaps.php.net/php5.2-latest.tar.gz
 
For Windows (zip):
 
  http://snaps.php.net/win32/php5.2-win32-latest.zip

For Windows (installer):

  http://snaps.php.net/win32/php5.2-win32-installer-latest.msi





[2008-03-21 15:10:52] damien at zaide dot org

Description:

Hi,
I have installed php on our Windows 2003 Server from 1 or 2 year but we
have a recurrent problem.
The MySQL connection is very slow, Php is fast but when it use Mysql
the performance fall.
I have made some research to fix the bug.
Firstly think it was a DNS problem because the mysql on not on the
localhost but on a remote server (Debian 4.0 with MySQL 5).
So i insert the resolv DNS in the host file, but it didn't solve.

After this i monitor my MySQL server to check if it come from him, so i
make the request to the page on my Win2k3 server and receive the MySQL
connection just 5/10 seconds after my request (and 1 or 2 second after
my page is printed) ... So the problem is on the Win2k3 side.

I have checked if the libmysql.dll is in a directory in the PATH
variables. And it was.

The sames scripts (PhpBB and other) run very fast on our Linux server,
on the same MySQL server asked.

If you want me to trace a process, or debug something there is no
problem ;)
Thanks

Reproduce code:
---
Use a phpbb or a huge php/mysql script

Expected result:

Run quickly

Actual result:
--
The request is very long





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



#39449 [Com]: Overloaded array properties do not work correctly

2008-03-26 Thread johnking3004 at yahoo dot com
 ID:   39449
 Comment by:   johnking3004 at yahoo dot com
 Reported By:  pstradomski at gmail dot com
 Status:   No Feedback
 Bug Type: Scripting Engine problem
 Operating System: Linux
 PHP Version:  5.2.0
 Assigned To:  dmitry
 New Comment:

http://cashing-murisoku.sakura.ne.jp/";>Á”ïŽÒ‹à—Z 

http://cashing-kariru.sakura.ne.jp/";>Á”ïŽÒ‹à—Z


Previous Comments:


[2008-03-26 10:29:44] johnking3004 at yahoo dot com

http://cashing-murisoku.sakura.ne.jp/";>Á”ïŽÒ‹à—Z 

http://cashing-kariru.sakura.ne.jp/";>Á”ïŽÒ‹à—Z



[2008-02-06 01:00:00] php-bugs at lists dot php dot net

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



[2008-01-29 11:31:17] [EMAIL PROTECTED]

The original test-cases from first post and from [19 Nov 2006 11:53am
UTC] work fine for me. The following code is not covered by this.

$this->idMappings[$id] = $this->entries[$offset];

The warning message is expected here.

You can fix it by redefining __get() with return by reference.



[2008-01-24 16:42:14] mail at jfcom dot de

For me it's hard to understand, what it should be, that you call fixed.
I searched quite a while, but I came to the conclusion, that fixing was
just closing the thread?
If it stays as it is, the overloading in case of __get and __set is
completely useless, because noone limits himself to simple variables or
uses such sick constructs. Is it really the solution to read the whole
array, modify it the way you need and write it back as lsmith posted?
Come on...



[2008-01-22 16:36:36] [EMAIL PROTECTED]

I am still seeing this issue on PHP 5.2.5.

Here is a link to a PEAR class affected:
http://pear.php.net/bugs/bug.php?id=10702

The method in question can be found here:
http://pear.php.net/package/XML_Feed_Parser/docs/latest/__filesource/f
source_XML_Feed_Parser__XML_Feed_Parser-1.0.2ParserType.php.html#a189

Changing 

$this->idMappings[$id] = $this->entries[$offset];

to

$mappings = $this->idMappings;
$mappings[$id] = $this->entries[$offset];
$this->idMappings = $mappings;

fixes the notice ..



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

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



#39449 [Com]: Overloaded array properties do not work correctly

2008-03-26 Thread johnking3004 at yahoo dot com
 ID:   39449
 Comment by:   johnking3004 at yahoo dot com
 Reported By:  pstradomski at gmail dot com
 Status:   No Feedback
 Bug Type: Scripting Engine problem
 Operating System: Linux
 PHP Version:  5.2.0
 Assigned To:  dmitry
 New Comment:

http://cashing-murisoku.sakura.ne.jp/";>Á”ïŽÒ‹à—Z 

http://cashing-kariru.sakura.ne.jp/";>Á”ïŽÒ‹à—Z


Previous Comments:


[2008-02-06 01:00:00] php-bugs at lists dot php dot net

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



[2008-01-29 11:31:17] [EMAIL PROTECTED]

The original test-cases from first post and from [19 Nov 2006 11:53am
UTC] work fine for me. The following code is not covered by this.

$this->idMappings[$id] = $this->entries[$offset];

The warning message is expected here.

You can fix it by redefining __get() with return by reference.



[2008-01-24 16:42:14] mail at jfcom dot de

For me it's hard to understand, what it should be, that you call fixed.
I searched quite a while, but I came to the conclusion, that fixing was
just closing the thread?
If it stays as it is, the overloading in case of __get and __set is
completely useless, because noone limits himself to simple variables or
uses such sick constructs. Is it really the solution to read the whole
array, modify it the way you need and write it back as lsmith posted?
Come on...



[2008-01-22 16:36:36] [EMAIL PROTECTED]

I am still seeing this issue on PHP 5.2.5.

Here is a link to a PEAR class affected:
http://pear.php.net/bugs/bug.php?id=10702

The method in question can be found here:
http://pear.php.net/package/XML_Feed_Parser/docs/latest/__filesource/f
source_XML_Feed_Parser__XML_Feed_Parser-1.0.2ParserType.php.html#a189

Changing 

$this->idMappings[$id] = $this->entries[$offset];

to

$mappings = $this->idMappings;
$mappings[$id] = $this->entries[$offset];
$this->idMappings = $mappings;

fixes the notice ..



[2007-01-10 16:01:10] [EMAIL PROTECTED]

Fixed in CVS HEAD and PHP_5_2.



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

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



#27792 [Com]: Functions fail on large files (filesize,is_file,is_dir)

2008-03-26 Thread m dot arief at valdo-intl dot com
 ID:   27792
 Comment by:   m dot arief at valdo-intl dot com
 Reported By:  kode at kodekrash dot com
 Status:   Assigned
 Bug Type: Filesystem function related
 Operating System: * (LFS)
 PHP Version:  6CVS, *CVS
 Assigned To:  wez
 New Comment:

hmm.., i really hate this situation. Actually i dont work at a big file
very often. But while there are some backup files need to be saved to
database, then this become really important problem if the file size is
really large.
I've tried 2 GB text file to store it contents in db. But it was
stopped at line 7305.
Dont have any idea abt this bugs. But if there's no one fix this then
i'll go for another languages, python or ruby i think. But php is still
one of my favorite language.


Previous Comments:


[2008-03-22 22:20:51] xpuctu4 at abv dot bg

php -v
PHP 5.2.3-1ubuntu6.3 (cli) (built: Jan 10 2008 09:38:41) 
Copyright (c) 1997-2007 The PHP Group
Zend Engine v2.2.0, Copyright (c) 1998-2007 Zend Technologies

I do not know if the ubuntu version have any patches but my PHP works
fine.
I created a large file with dd if=/dev/urandom and this is my results:
// print_r($foo)
Array
(
[size] => 4805357568 // filesize()
[isfile] => 1 // is_file()
[isreadable] => 1 // is_readable()
[islink] => //is_link() empty maybe because it is not link
)
// Now I read 1st 32 bytes
// fopen(), fread(), fseek($filesize - 32), fread(), fclose()
// strlen($data)
1st read: 32 bytes
2nd read: 32 bytes



[2008-03-15 21:59:15] sawo at war3z dot org

Does anybody knows if this is fixed in 6.0 ?



[2008-01-29 14:45:08] elevator at thebrainhotel dot com

All indications are that this is *not* fixed in PHP 5.2.x, the one
comment above notwithstanding.  There's another conflicting comment re:
PHP 5.2.x, and there's also a patch provided for PHP 5.3 -- if a patch
is needed for PHP 5.3, it would certainly appear to *not* be fixed in
PHP 5.2.x

And then there's my personal experience with PHP 5.2.4 (from the Xampp
distro for Windows), where I'm actually experiencing the problem when
trying to use move_uploaded_file; likewise on 3 deployments of PHP 5.1.x
I've tried



[2008-01-18 12:01:27] radon8472 at hotmail dot com

file_get_contents() has also Problems with files over 2 GB Border. Doea
anybody know when there will be released an php version with lage File
Support (4GB an larger) ?



[2007-10-14 22:17:19] [EMAIL PROTECTED]

You might like to try the following patch:

http://news.php.net/php.internals/32767



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

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



#44421 [Fbk->Opn]: Core dump using PHP 5.2.5 with suExec and mod_cgid

2008-03-26 Thread obonhomme at nerim dot net
 ID:   44421
 User updated by:  obonhomme at nerim dot net
 Reported By:  obonhomme at nerim dot net
-Status:   Feedback
+Status:   Open
 Bug Type: Reproducible crash
 Operating System: FreeBSD 6.3
 PHP Version:  5.2.5
 Assigned To:  fb-req-jani
 New Comment:

I recompiled my PHP with the following command line : 

'./configure' '--with-layout=GNU'
'--with-config-file-scan-dir=/usr/local/etc/php' '--disable-all'
'--enable-libxml' '--with-libxml-dir=/usr/local' '--enable-reflection'
'--program-prefix=' '--enable-fastcgi' '--prefix=/usr/local'
'--mandir=/usr/local/man' '--infodir=/usr/local/info/'

Nevertheless, the php-cgi binary still cores with this script.


Previous Comments:


[2008-03-25 19:34:37] [EMAIL PROTECTED]

Yes, you might have those binaries there, but they're NOT from the same
build: That simply is NOT possible. So check for real WHICH ones are
from this build. Then I suggest you rebuild the CGI binary just in case
_without_ these options:

'--with-apxs2=/usr/local/sbin/apxs' '--with-regex=php'
'--with-zend-vm=CALL' '--enable-zend-multibyte' 




[2008-03-25 15:03:32] obonhomme at nerim dot net

This configuration line have been generated using the FreeBSD port and
I confirm that php-cli, php-cgi and the apache module are present on my
system.

I confirm that I use the Apache Worker MPM (So a threaded one)

I add that I have severals others vhost using php-cgi which works on
the same server.



[2008-03-25 13:55:28] [EMAIL PROTECTED]

You're trying to build 3 SAPIs at the same time? It's not possible, you
only get CLI binary and the Apache module with that configure line.
And I would guess your Apache is using some threaded MPM..?



[2008-03-25 13:50:03] obonhomme at nerim dot net

The configure command used is the following : 

'./configure' '--with-layout=GNU'
'--with-config-file-scan-dir=/usr/local/etc/php' '--disable-all'
'--enable-libxml' '--with-libxml-dir=/usr/local' '--enable-reflection'
'--program-prefix=' '--enable-fastcgi'
'--with-apxs2=/usr/local/sbin/apxs' '--with-regex=php'
'--with-zend-vm=CALL' '--enable-zend-multibyte' '--prefix=/usr/local'
'--mandir=/usr/local/man' '--infodir=/usr/local/info/'



[2008-03-25 13:45:17] [EMAIL PROTECTED]

What was the configure line used to build PHP?



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

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



#44300 [Com]: mssql_connect fails sometimes

2008-03-26 Thread william at nettsite dot co dot za
 ID:   44300
 Comment by:   william at nettsite dot co dot za
 Reported By:  alfa77 at gmail dot com
 Status:   Open
 Bug Type: MSSQL related
 Operating System: Windows 2000
 PHP Version:  5.2.5
 New Comment:

I am running three Windows XP SP2 boxes as developer workstations, all
PHP 5.2.5, installed into c:\php to avoid the space in "Program Files",
and the MS Sql connection works perfectly on one of the machines, but
not the other two. All three boxes are on the same LAN, can connect to
the database using MS SQL Studio, and all have IIS 5.1. I have copied
the PHP installation from the working PC to the others, no difference.
This is whether the connection is to a remote or local SQL server.


Previous Comments:


[2008-03-10 05:41:10] alfa77 at gmail dot com

I think that this problem occurs due to usage of old DB-Lib for
connecting to MSSQL. There are another bug – that you can’t fetch
varchar more than 256-character length (you have to convert it to
TEXT).
It’s a pity, but the best way to work with MSSQL now is using ADO (no
connection/long varchar/Unicode problems).



[2008-03-08 07:38:07] alfa77 at gmail dot com

Well, I found two solutions.
1) I use ADO to connect to MSSQL. ADO is more slower (up to 2 times!),
than mssql_* functions, but there are no connection problems
2) I set connection timeout in code:
function getmt()
{
   list($usec, $sec)=explode(" ",microtime());
   return ((float)$usec+(float)$sec);
}
$time_st=getmt();
$db=new CSql;
while(!$db->connect_db($Host, $Name, $Login, $Passw))
   if(round(getmt()-$time_st, 0)>60) break;
if(!$db->dbc) die("Connection failed!"); 

It is too hard to use odbc_* functions, because there are a lot of bugs
with TEXT field type – I must put it on the last position in query and
use CONVERT(varbinary, other way I get ODBC errors.

I hope that mssql_* and odbc_* problems will be solved in future PHP
releases.



[2008-03-01 03:30:06] alfa77 at gmail dot com

Description:

Hello!
The number of my site users has recently increased and I have faced the
following bug: 
mssql_connect function sometimes fails to connect to MSSQL. It works
fine for few hours, 
then suddenly fails, and the work is resumed in a few minutes.

Here is the part of my DB class (CSql)
function connect_db($server, $user, $password)
{
$this->dbc=mssql_connect($server, $user, $password);
if(!$this->dbc) return false;
return true;
}

The warnings in Apache log are
[Thu Feb 21 20:50:58 2008] [error] [client 82.200.***.***] PHP Warning:
mssql_connect() 
[function.mssql-connect]: Unable
to connect to server: 
** in **.php on line 22

When I reload the page on site, connection sometimes succeeds,
sometimes – fails.
Web-server configuration: Windows 2000 Server (SP4) + Apache 2 + PHP
5.2.5. Peak usage 
of CPUs is no more than 70%, RAM usage – no more than 50%. There is a
program on this server 
that works with MSSQL through ADO, and it never has connection
problems. There are no 
connection problems from LAN too.
SQL Server 2000 (SP4) is working on dedicated server (Windows 2000
Server (SP4)) 
which is connected to the web server by gigabit LAN. I have tested the
network adapters, 
they work fine. CPUs usage is no more than 60%, RAM usage – no more
than 70%.

I have already:
1) replaced ntwdblib.dll in PHP directory with a new version. Also, I
have installed MDAC 2.81
2) moved SQL Server to a  new, fast server.
3) tried to use mssql_connect or  mssql_pconnect.
4) tried to use server name or server IP and port as the first
parameter for mssql_connect
5) tried to connect through TCP/IP or Named Pipes.
6) When I cycled connection attempts, it succeeded in connection almost
every time (usually 
from the second or third attempt)
$db=new CSql;
$db_failed=1;
while(!$db->connect_db(DBHost, DBLogin, DBPassw))
{ 
   if($db_failed>=5) break;
sleep(2);
$db_failed++;
}
if(!$db->dbc) die("DB connection failed!");
7) I checked the network connection by using sockets or ODBC when
mssql_connect had failed. It worked fine!
if(!fsockopen("192.168.0.3", 1433, $errno, $errstr, 10))
WrLog("C:\\sqlerr.txt","Err1 (($errstr ($errno)))");
if(!odbc_connect("sqlsrv",DBLogin, DBPassw))
WrLog("C:\\sqlerr.txt","Err2");
8) There are no connection limits in SQL Server or PHP.ini
[MSSQL]
mssql.max_persistent = -1
mssql.max_links = -1

I examined Apache logs few months ago, when MSSQL worked on the same
server with Apache. 
There were no messages about connection problems. 






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