#44564 [NEW]: escapeshellarg removes UTF-8 multi-byte characters

2008-03-29 Thread email at steffenweber dot net
From: email at steffenweber dot net
Operating system: Gentoo Linux (x86_64)
PHP version:  5.2.6RC3
PHP Bug Type: Strings related
Bug description:  escapeshellarg removes UTF-8 multi-byte characters

Description:

In PHP 5.2.6 RC3 escapeshellarg removes UTF-8 multi-byte characters (well,
to be honest I have only tested german umlauts) from the input. RC1 has
worked fine. I suspect that the following entry in the NEWS file has
something to do with this: "Properly address incomplete multibyte chars
inside escapeshellcmd() (Ilia, Stefan Esser)"

Reproduce code:
---
php -r "var_dump(escapeshellarg('ä'));"

Expected result:

string(2) "'ä'"

Actual result:
--
string(2) "''"

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



#44564 [Opn]: escapeshellarg removes UTF-8 multi-byte characters

2008-03-29 Thread email at steffenweber dot net
 ID:   44564
 User updated by:  email at steffenweber dot net
 Reported By:  email at steffenweber dot net
 Status:   Open
 Bug Type: Strings related
 Operating System: Gentoo Linux (x86_64)
 PHP Version:  5.2.6RC3
 New Comment:

I should add that this has worked fine in RC1.


Previous Comments:


[2008-03-29 09:52:51] email at steffenweber dot net

Description:

In PHP 5.2.6 RC3 escapeshellarg removes UTF-8 multi-byte characters
(well, to be honest I have only tested german umlauts) from the input.
RC1 has worked fine. I suspect that the following entry in the NEWS file
has something to do with this: "Properly address incomplete multibyte
chars inside escapeshellcmd() (Ilia, Stefan Esser)"

Reproduce code:
---
php -r "var_dump(escapeshellarg('ä'));"

Expected result:

string(2) "'ä'"

Actual result:
--
string(2) "''"





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



#32979 [Com]: socket stream opened with stream_socket_client doesnt work with stream_select

2008-03-29 Thread stotty at tvnet dot hu
 ID:   32979
 Comment by:   stotty at tvnet dot hu
 Reported By:  mjpph at stardust dot fi
 Status:   Assigned
 Bug Type: Streams related
 Operating System: Linux (Fedora Core 3)
 PHP Version:  5CVS-2006-01-18 (dev)
 Assigned To:  wez
 New Comment:

Joe Orton has analyzed the bug and found the root cause, see here:

http://marc.info/?l=php-internals&m=120522857529781&w=2


Previous Comments:


[2007-10-08 06:03:08] roberto at spadim dot com dot br

without openssl everythink work ok now, socket and stream
where could i send .php files to develop team check it?



[2007-10-08 05:37:14] roberto at spadim dot com dot br

the problem occur with php 5.2.4



[2007-10-08 05:32:50] roberto at spadim dot com dot br

i'm having the same problem with xeon quad core (prolian HP) on linux
socket_select work ok
but stream_select don't work
i will recompile php without openssl and check what happen



[2006-08-25 19:19:54] stotty at tvnet dot hu

Bug is still present in 5.1.4



[2006-01-31 23:08:00] stotty at tvnet dot hu

I have compared the original socket operations code, and the one in the
xp_ssl.x file, and it seems that even in the non-ssl path the code is
not identical. 

I have fixed four differences, two of which caused some functions to be
called twice, and two of which are casting to *(int*)

I do not claim to know the real cause for the bug, and how these
changes fix the problem, but they do, and they make the code more
consistent, and faster, so I think they should be committed.

Here is the patch that solves this problem form me (against 5.1.2)

cut here---
*** php-5.1.2/ext/openssl/xp_ssl.c  2006-01-01 13:50:10.0 +0100
--- php-5.1.2ssl/ext/openssl/xp_ssl.c   2006-01-31 23:00:58.0
+0100
***
*** 188,194 
} while(retry);

} else {
!   didwrite = php_stream_socket_ops.write(stream, buf, count
TSRMLS_CC);
}

if (didwrite > 0) {
--- 188,195 
} while(retry);

} else {
!   didwrite = php_stream_socket_ops.write(stream, buf, count
TSRMLS_CC); 
!   return didwrite;
}

if (didwrite > 0) {
***
*** 226,231 
--- 227,233 
else
{
nr_bytes = php_stream_socket_ops.read(stream, buf, count
TSRMLS_CC);
+   return nr_bytes;
}
  
if (nr_bytes > 0) {
***
*** 636,642 
  
case PHP_STREAM_AS_FD_FOR_SELECT:
if (ret) {
!   *ret = (void*)sslsock->s.socket;
}
return SUCCESS;
  
--- 638,644 
  
case PHP_STREAM_AS_FD_FOR_SELECT:
if (ret) {
!   *(int*)ret = (void*)sslsock->s.socket;
}
return SUCCESS;
  
***
*** 646,652 
return FAILURE;
}
if (ret) {
!   *ret = (void*)sslsock->s.socket;
}
return SUCCESS;
default:
--- 648,654 
return FAILURE;
}
if (ret) {
!   *(int*)ret = (void*)sslsock->s.socket;
}
return SUCCESS;
default:

cut here---



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

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



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

2008-03-29 Thread sysdev at gmx dot net
 ID:   43977
 User updated by:  sysdev at gmx dot net
 Reported By:  sysdev at gmx dot net
-Status:   Feedback
+Status:   Open
 Bug Type: Directory function related
 Operating System: Windows Server 2003
 PHP Version:  5.2.5
 New Comment:

Seems to be fine for the first chdir-call, but the first getcwd-call
still shows the CWD of the last PHP-script-run before, not the base
directory of the current PHP-script.


Previous Comments:


[2008-03-26 12:31:16] [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-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->Opn]: Core dump using PHP 5.2.5 with suExec and mod_cgid

2008-03-29 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 new compilation for the binary php-cgi without Suoshin patch
resolves the problem.

Suoshin id definitively out for me


Previous Comments:


[2008-03-26 21:24:04] [EMAIL PROTECTED]

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



[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.



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



#44528 [Fbk->Csd]: Memory Leaks

2008-03-29 Thread admin at itech7 dot com
 ID:   44528
 User updated by:  admin at itech7 dot com
 Reported By:  admin at itech7 dot com
-Status:   Feedback
+Status:   Closed
 Bug Type: Session related
 Operating System: Fedora 8 / i386
 PHP Version:  5.2.5
 New Comment:

UPDATE: The PHP-5.2.5 release I downloaded from in.php.net was giving
problems. When I downloaded it from the PHP's default mirror i.e.
www.php.net it had no memory leak problems. This suggests that the PHP
releases at the Indian mirrors in.php.net and in2.php.net have been
edited/modified. PHP should look upon this.


Previous Comments:


[2008-03-25 10:57:37] [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-25 09:20:50] admin at itech7 dot com

Description:

When sessions are configured to autostart in php.ini ; there two memory
leaks when calling a simple phpinfo() script using FastCGI with lighttpd
server. I have a Pentium 3 / 500 Mhz / 384 MB RAM / 50 GB HDD box.

Reproduce code:
---



Expected result:

Clean working without any errors on the terminal.

Actual result:
--
PHP printed two memory leaks in my terminal.

backtrace -

[Tue Mar 25 14:49:38 2008]  Script: 
'/var/www/lighttpd/_server/index.php'
/root/php-5.2.5/ext/standard/url_scanner_ex.c(305) :  Freeing
0x096F2D28 (79 bytes), script=/var/www/lighttpd/_server/index.php
[Tue Mar 25 14:49:38 2008]  Script: 
'/var/www/lighttpd/_server/index.php'
/root/php-5.2.5/ext/standard/url_scanner_ex.c(316) :  Freeing
0x096F2DA4 (79 bytes), script=/var/www/lighttpd/_server/index.php
=== Total 2 memory leaks detected ===






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



#44565 [NEW]: constructor argument by reference return value

2008-03-29 Thread wursttrooper at gmx dot de
From: wursttrooper at gmx dot de
Operating system: Linux
PHP version:  5.2.5
PHP Bug Type: *Compile Issues
Bug description:  constructor argument by reference return value

Description:

When using a func return value by reference as constructor argument,
produces 
Fatal error: Can't use method return value in write context in
D:\xampplite\htdocs\test\writectx.php on line 22

removing by ref '&' symbol lets code execute.

Reproduce code:
---
func1());

/**
works
**/
$c2 = new MyClass2("sf",$obj->func1());
?>


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



#44425 [Opn]: Extending PDO/MySQL class with a __call() function doesn't work

2008-03-29 Thread phpbugs at wayoverthere dot com
 ID:   44425
 User updated by:  phpbugs at wayoverthere dot com
 Reported By:  phpbugs at wayoverthere dot com
 Status:   Open
 Bug Type: PDO related
 Operating System: Linux/Windows
 PHP Version:  5.2CVS-2008-03-13 (snap)
 New Comment:

I have compiled directly from a CVS checkout (PHP_5_3) on openSuse 
10.2, and I still see this problem. Is there anything I can do to 
convince someone that this bug actually exists? I don't understand 
how I'm the only one who can reproduce it, when I can reproduce it 
anywhere I test it - even using the precompiled Windows snapshots.

I followed the instructions on compiling from CVS (meaning compiling 
all the specific version requirements of autoconf, etc. and running 
buildconf), and used these configure options:

./configure --prefix=/home/shared/php5cvs/ --with-zlib
--with-mysql=shared --enable-pdo=shared --with-pdo-mysql=shared
--with-pdo-sqlite=shared --with-sqlite=shared

My php.ini:
extension=pdo.so
extension=pdo_mysql.so
extension=pdo_sqlite.so

Running this test script:
';
}
function foo() {
echo "Called foo in ".__CLASS__.'';
}
}

$sqlite = new test('sqlite::memory:');
$sqlite->foo();
$sqlite->bar();

$mysql = new test('mysql:dbname=test;host=localhost','root','');
$mysql->foo();
$mysql->bar();

?>

Gives:
Called foo in testCalled bar in testCalled foo in test
Fatal error: Call to undefined method test::bar() 
in /home/shared/php5cvs/test.php on line 17

If necessary, I might be able to provide ssh access to one of the 
boxes I'm seeing this on.


Previous Comments:


[2008-03-15 19:34:40] phpbugs at wayoverthere dot com

Can someone confirm/deny this bug using the Windows binary version as 
I did? At least that way there's no compiling issues to complicate 
things.

Also, I poked around cvs.php.net and found what I think is the fix 
for #43663:

http://cvs.php.net/viewvc.cgi/php-src/ext/pdo/pdo_dbh.c?r1=1.82.2.31.2.17.2.2&r2=1.82.2.31.2.17.2.3

I checked my local 5.3 snapshot and it does have those added lines.



[2008-03-14 06:07:22] crrodriguez at suse dot de

Works for me as well, with current 5_3 CVS



[2008-03-13 22:25:06] phpbugs at wayoverthere dot com

I'm still seeing the problem. I have recompiled PHP 
(php5.3-200803131930) on several different boxes - all Linux, but 
different distros (Ubuntu 7.10, openSuse 10.2, and a very old Gentoo 
box). On a hunch, I uninstalled the system PHP, thinking the custom 
PHP was using the system .so's. Same thing.

I even tried installing PHP on a Win2k box using the snapshot  
http://snaps.php.net/win32/php5.3-win32-200803132030.zip. I used the 
recommended php.ini file as a base config file, but enabled 
php_pdo.dll, php_pdo_mysql.dll, and php_pdo_sqlite.dll extensions. 
Then I created test.php and put this in it:

';
}
function foo() {
echo "Called foo in ".__CLASS__.'';
}
}

$sqlite = new test('sqlite::memory:');
$sqlite->foo();
$sqlite->bar();

$mysql = new test('mysql:dbname=foo;host=10.1.1.142','foo','bar');
$mysql->foo();
$mysql->bar();

?>

Running "php test.php" gives:

Called foo in testCalled bar in testCalled foo in 
testFatal error: Call to undefined method test::bar() in C:
\php5\test.php on line 17



[2008-03-13 16:10:44] [EMAIL PROTECTED]

Works fine in snapshot and PHP 5.3



[2008-03-13 04:52:06] phpbugs at wayoverthere dot com

Description:

Exact(?) same bug as #43663, except connecting to a MySQL 5 server. I 
have also tried a 5.3 snapshot & got the same result. Tried both cgi 
and cli.


Reproduce code:
---
';
}
function foo() {
echo "Called foo in ".__CLASS__.'';
}
}
$a = new test('mysql:dbname=test;host=localhost','user','pw');
$a->foo();
$a->bar();
?>


Expected result:

"Called foo in test
Called bar in test"

Actual result:
--
"Called foo in test

 Fatal error: Call to undefined method test::bar() in call.php on 
line 24"





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



#44563 [Opn->Bgs]: UTF-8 Session_start()

2008-03-29 Thread jani
 ID:   44563
 Updated by:   [EMAIL PROTECTED]
 Reported By:  quick dot webmaster at gmail dot com
-Status:   Open
+Status:   Bogus
 Bug Type: *Unicode Issues
 Operating System: Linux
 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




Previous Comments:


[2008-03-29 05:34:24] quick dot webmaster at gmail dot com

Description:

If file A or file B has UTF-8 encoding then you will get the error:

Warning: session_start() [function.session-start]: Cannot send session
cache limiter - headers already sent (output started at index.php:1) in
session.php on line 3

Using UTF-8 encoding WITHOUT BOM (Byte Order Mark) seems to fix the
problem.

Reproduce code:
---
File A:



File B:



Expected result:

Session is created.

Actual result:
--
Warning: session_start() [function.session-start]: Cannot send session
cache limiter - headers already sent (output started at index.php:1) in
session.php on line 3





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



#44554 [Opn->Fbk]: *** glibc detected *** double free or corruption

2008-03-29 Thread jani
 ID:   44554
 Updated by:   [EMAIL PROTECTED]
 Reported By:  vlada at mysh dot cz
-Status:   Open
+Status:   Feedback
 Bug Type: Apache2 related
 Operating System: Debian etch
 PHP Version:  5.2.5
 Assigned To:  fb-req-jani
 New Comment:

What was the configure line you used?


Previous Comments:


[2008-03-28 12:55:11] vlada at mysh dot cz

Same problem with latest version. Should be problem in incompatibility
with libc library in newer Debian? 

On other Debian servers (with older libc package) I am needed to
upgrade libc to same version on, but i am worried about compatibility.



[2008-03-28 10:03:48] [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-27 21:16:46] vlada at mysh dot cz

Description:

I've compiled latest PHP 5.2.5 on newly installed Debian Etch with
libc6 version 2.3.6.ds1-13etch5
Problem is, that almost randomly serves blank page. Mostly this problem
occurs while using phpmyadmin (tested different versions with same
result)

In error_log of apache is:
*** glibc detected *** double free or corruption (out): 0x084471f0 ***
[Thu Mar 27 21:45:34 2008] [notice] child pid 29274 exit signal Aborted
(6)

I also tried to run backtrace, i put it here. Strace gives loads of
data. I could also put it here.

When i tried downgrade to php 5.1.6, same error is in error_log, but on
the other hand, blank page never occured.


Reproduce code:
---
problem occures on random phpmyadmin page, mostly with mysql
connection.

Actual result:
--
Starting program: /usr/local/apache/bin/httpd -X
[Thread debugging using libthread_db enabled]
[New Thread -1211000608 (LWP 29696)]

*** glibc detected *** double free or corruption (out): 0x08439bf0 ***

Program received signal SIGABRT, Aborted.
[Switching to Thread -1211000608 (LWP 29696)]
0xb7d42947 in raise () from /lib/tls/libc.so.6
(gdb) bt
#0  0xb7d42947 in raise () from /lib/tls/libc.so.6
#1  0xb7d440c9 in abort () from /lib/tls/libc.so.6
#2  0xb7d786ba in __fsetlocking () from /lib/tls/libc.so.6
#3  0xb7d7ff7f in mallopt () from /lib/tls/libc.so.6
#4  0xb7d80022 in free () from /lib/tls/libc.so.6
#5  0xb7787e3b in zend_hash_apply_deleter (ht=0x8302420, p=0x841b0f0)
at /install/php-5.2.5/Zend/zend_hash.c:614
#6  0xb7788341 in zend_hash_reverse_apply (ht=0x8302420,
apply_func=0xb776bb28 )
at /install/php-5.2.5/Zend/zend_hash.c:760
#7  0xb776c257 in shutdown_executor ()
at /install/php-5.2.5/Zend/zend_execute_API.c:290
#8  0xb777b43a in zend_deactivate () at
/install/php-5.2.5/Zend/zend.c:860
#9  0xb77299d4 in php_request_shutdown (dummy=0x0)
at /install/php-5.2.5/main/main.c:1485
#10 0xb77f4821 in php_apache_request_dtor (r=0x83fd1f8)
at /install/php-5.2.5/sapi/apache2handler/sapi_apache2.c:471
#11 0xb77f510f in php_handler (r=0x83fd1f8)
at /install/php-5.2.5/sapi/apache2handler/sapi_apache2.c:643
#12 0x08074547 in ap_run_handler (r=0x83fd1f8) at config.c:157
#13 0x08077637 in ap_invoke_handler (r=0x83fd1f8) at config.c:372
#14 0x080824e8 in ap_process_request (r=0x83fd1f8) at
http_request.c:258
#15 0x0807f74e in ap_process_http_connection (c=0x83f31b0) at
http_core.c:190
#16 0x0807b4d7 in ap_run_process_connection (c=0x83f31b0) at
connection.c:43
#17 0x080868d4 in child_main (child_num_arg=)
at prefork.c:640
#18 0x08086b34 in make_child (s=0x80a9f98, slot=0) at prefork.c:680
#19 0x080878dc in ap_mpm_run (_pconf=0x80a80a8, plog=0x80d6160,
s=0x80a9f98)
at prefork.c:956
#20 0x08061f8f in main (argc=134897824, argv=0x83f0fd8) at main.c:730
(gdb)





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



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

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

As it isn't a PHP bug -> bogus. Please report this to the Suhosin
author!


Previous Comments:


[2008-03-29 12:54:23] obonhomme at nerim dot net

The new compilation for the binary php-cgi without Suoshin patch
resolves the problem.

Suoshin id definitively out for me



[2008-03-26 21:24:04] [EMAIL PROTECTED]

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



[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.



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



#44561 [Opn->Bgs]: Invalid command 'PHPIniDir'

2008-03-29 Thread jani
 ID:   44561
 Updated by:   [EMAIL PROTECTED]
 Reported By:  daniel dot jheelan at free dot fr
-Status:   Open
+Status:   Bogus
 Bug Type: Apache related
 Operating System: Windows XP
 PHP Version:  5.2.5
 New Comment:

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

Thank you for your interest in PHP.

Please as support questions elsewhere, this is no bug.


Previous Comments:


[2008-03-28 17:22:52] daniel dot jheelan at free dot fr

Description:

Getting Syntax error on line 1001 of c:/program files/apache
group/apache/conf/httpd.con
f: Invalid command 'PHPIniDir', perhaps mis-spelled or defined by a
module not included in the server configuration
Note the errors or messages above, and press the  key to exit. 
26...


Expected result:

Lauch Apache and was expecting Apache to be started as before
installing PHP ( 5.2.5)
I am starting with PHP and MySQL and it is not very easy.

Thanks for your help.

Daniel

Actual result:
--
Syntax error on line 1001 of c:/program files/apache
group/apache/conf/httpd.con
f:
Invalid command 'PHPIniDir', perhaps mis-spelled or defined by a module
not incl
uded in the server configuration
Note the errors or messages above, and press the  key to exit. 
26...





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



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

2008-03-29 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
-Assigned To:  
+Assigned To:  fb-req-jani
 New Comment:

Then you need to figure out what really is the bottleneck. It doesn't
seem to be mysql_connect(), so check the phpbb/joomla/whatever you're
experiencing with, what they're actually using to connnect to mysql. I'd
use something like Xdebug to figure out where the real problem is..


Previous Comments:


[2008-03-27 15:25:42] damien at zaide dot org

I have make a very small script and the connection, execution is fast.
Everything is fine. Very strange.

Here the small script:
$db_link = mysql_connect("x", "user", "pass");
mysql_select_db("database");
$ret = mysql_query("SELECT * FROM zp_options");
while ($tmp = mysql_fetch_array($ret))
  print_r($tmp);
mysql_close($db_link);



[2008-03-26 21:27:09] [EMAIL PROTECTED]

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



[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.



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



#33224 [Com]: require_once includes the same file again even if path/filename is identical

2008-03-29 Thread m dot hertzog at mhs dot ch
 ID:   33224
 Comment by:   m dot hertzog at mhs dot ch
 Reported By:  ypae at hotmail dot com
 Status:   No Feedback
 Bug Type: Scripting Engine problem
 Operating System: Windows 2003 Server
 PHP Version:  5.0.4
 New Comment:

It's still there in 5.2.5. Seems not to occour if the includes files
are specified with full path i.E.
require_once(c:\www\test.com\docs\tobeincluded.php);


Previous Comments:


[2005-08-18 10:39:19] matthius at pointbtel dot com

I am experiencing this in v4.4.0 as well.



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

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



[2005-06-02 20:40:40] [EMAIL PROTECTED]

Please try using this CVS snapshot:

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





[2005-06-02 17:16:47] ypae at hotmail dot com

Description:

When I created a lib.inc.php that has a few functions defined (e.g.
getmicrocode(), myfunction()) and try to include it on several files
with require_once, it somehow included more than once even though the
end result of 'path/filename' is identical.

My understanding of require_once limitation on Windows (or non-POSIX)
platform was that if you have mixed case with the same file name, it
will be included again. Another words, as long as you have identical
"path/filename" as part of require_once statement, it should include
only once.

As a result, since you cannot redeclare the same function within the
page, you get:

Fatal error: Cannot redeclare "functionname()" (previously declared
in...



Reproduce code:
---
For example,

On lib.inc.php:
===
myfunction1() 
{ echo "hello!";}

myfunction2() 
{ echo "hello again!";}

On index.php 

$_my_absolute_path = 'c:/inetpub/wwwroot/';

require_once($_my_absolute_path.'lib.inc.php');
require_once($_my_absolute_path.'template.inc.php');
   
on template.inc.php
===
$_my_absolute_path = 'c:/inetpub/wwwroot/';

require_once($_my_absolute_path.'lib.inc.php'); // Just in case someone
didn't call this previously

The realistic code is quite complex: 
A require_once B and C
B require_once C and *D*
C require_once *D*

and *D* causes redeclare issue when I load A.


Expected result:

the second attempt to include lib.inc.php by using require_once should
be ignored because it was already loaded. 

The same code running on Linux works perfectly and it used to be fine
on PHP 4.3.10

But right after I rebuild the server with PHP 5.0.4, I got the
following error:

Fatal error: Cannot redeclare myfunction1() (previously declared in...



Actual result:
--
the second attempt to include lib.inc.php by using require_once WAS
performed and it causes error.






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



#44554 [Fbk->Opn]: *** glibc detected *** double free or corruption

2008-03-29 Thread vlada at mysh dot cz
 ID:   44554
 User updated by:  vlada at mysh dot cz
 Reported By:  vlada at mysh dot cz
-Status:   Feedback
+Status:   Open
 Bug Type: Apache2 related
 Operating System: Debian etch
 PHP Version:  5.2.5
 Assigned To:  fb-req-jani
 New Comment:

This configuration. I've added --enable-debug because of dbg.

./configure --with-apxs2=/usr/local/apache/bin/apxs
--with-mysql=/usr/local/mysql  --with-mysql-sock=/tmp/mysql.sock
--with-sqlite --with-zlib --with-zlib-dir  --with-bz2  --with-gd 
--enable-gd-native-ttf  --with-jpeg-dir --with-png-dir --with-ttf
--with-freetype-dir=/usr/local --with-iconv=/usr/local 
--with-curl=/usr/local --with-gettext
--with-config-file-path=/etc/apache --enable-ftp --enable-mbstring 
--with-openssl --with-openssl-dir=/usr/include/openssl --enable-calendar
 --enable-exif --enable-sockets  --with-mcrypt
--with-mysqli=/usr/local/mysql/bin/mysql_config --enable-debug


Previous Comments:


[2008-03-29 17:49:17] [EMAIL PROTECTED]

What was the configure line you used?



[2008-03-28 12:55:11] vlada at mysh dot cz

Same problem with latest version. Should be problem in incompatibility
with libc library in newer Debian? 

On other Debian servers (with older libc package) I am needed to
upgrade libc to same version on, but i am worried about compatibility.



[2008-03-28 10:03:48] [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-27 21:16:46] vlada at mysh dot cz

Description:

I've compiled latest PHP 5.2.5 on newly installed Debian Etch with
libc6 version 2.3.6.ds1-13etch5
Problem is, that almost randomly serves blank page. Mostly this problem
occurs while using phpmyadmin (tested different versions with same
result)

In error_log of apache is:
*** glibc detected *** double free or corruption (out): 0x084471f0 ***
[Thu Mar 27 21:45:34 2008] [notice] child pid 29274 exit signal Aborted
(6)

I also tried to run backtrace, i put it here. Strace gives loads of
data. I could also put it here.

When i tried downgrade to php 5.1.6, same error is in error_log, but on
the other hand, blank page never occured.


Reproduce code:
---
problem occures on random phpmyadmin page, mostly with mysql
connection.

Actual result:
--
Starting program: /usr/local/apache/bin/httpd -X
[Thread debugging using libthread_db enabled]
[New Thread -1211000608 (LWP 29696)]

*** glibc detected *** double free or corruption (out): 0x08439bf0 ***

Program received signal SIGABRT, Aborted.
[Switching to Thread -1211000608 (LWP 29696)]
0xb7d42947 in raise () from /lib/tls/libc.so.6
(gdb) bt
#0  0xb7d42947 in raise () from /lib/tls/libc.so.6
#1  0xb7d440c9 in abort () from /lib/tls/libc.so.6
#2  0xb7d786ba in __fsetlocking () from /lib/tls/libc.so.6
#3  0xb7d7ff7f in mallopt () from /lib/tls/libc.so.6
#4  0xb7d80022 in free () from /lib/tls/libc.so.6
#5  0xb7787e3b in zend_hash_apply_deleter (ht=0x8302420, p=0x841b0f0)
at /install/php-5.2.5/Zend/zend_hash.c:614
#6  0xb7788341 in zend_hash_reverse_apply (ht=0x8302420,
apply_func=0xb776bb28 )
at /install/php-5.2.5/Zend/zend_hash.c:760
#7  0xb776c257 in shutdown_executor ()
at /install/php-5.2.5/Zend/zend_execute_API.c:290
#8  0xb777b43a in zend_deactivate () at
/install/php-5.2.5/Zend/zend.c:860
#9  0xb77299d4 in php_request_shutdown (dummy=0x0)
at /install/php-5.2.5/main/main.c:1485
#10 0xb77f4821 in php_apache_request_dtor (r=0x83fd1f8)
at /install/php-5.2.5/sapi/apache2handler/sapi_apache2.c:471
#11 0xb77f510f in php_handler (r=0x83fd1f8)
at /install/php-5.2.5/sapi/apache2handler/sapi_apache2.c:643
#12 0x08074547 in ap_run_handler (r=0x83fd1f8) at config.c:157
#13 0x08077637 in ap_invoke_handler (r=0x83fd1f8) at config.c:372
#14 0x080824e8 in ap_process_request (r=0x83fd1f8) at
http_request.c:258
#15 0x0807f74e in ap_process_http_connection (c=0x83f31b0) at
http_core.c:190
#16 0x0807b4d7 in ap_run_process_connection (c=0x83f31b0) at
connection.c:43
#17 0x080868d4 in child_main (child_num_arg=)
at prefork.c:640
#18 0x08086b34 in make_child (s=0x80a9f98, slot=0) at prefork.c:680
#19 0x080878dc in ap_mpm_run (_pconf=0x80a80a8, plog=0x80d6160,
s=0x80a9f98)
at prefork.c:956
#20 0x08061f8f in main (argc=134897824, argv=0x83f0fd8) at main.c:730
(gdb)





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



#44565 [Opn->Bgs]: constructor argument by reference return value

2008-03-29 Thread felipe
 ID:   44565
 Updated by:   [EMAIL PROTECTED]
 Reported By:  wursttrooper at gmx dot de
-Status:   Open
+Status:   Bogus
 Bug Type: Scripting Engine problem
 Operating System: Linux
 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

See:
- http://docs.php.net/manual/en/language.references.pass.php


Previous Comments:


[2008-03-29 16:42:01] wursttrooper at gmx dot de

Description:

When using a func return value by reference as constructor argument,
produces 
Fatal error: Can't use method return value in write context in
D:\xampplite\htdocs\test\writectx.php on line 22

removing by ref '&' symbol lets code execute.

Reproduce code:
---
func1());

/**
works
**/
$c2 = new MyClass2("sf",$obj->func1());
?>






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



#44559 [Opn->Bgs]: Array keys being added when returning by reference

2008-03-29 Thread felipe
 ID:   44559
 Updated by:   [EMAIL PROTECTED]
 Reported By:  kurt at surfmerchants dot com
-Status:   Open
+Status:   Bogus
 Bug Type: Arrays related
 Operating System: Linux
 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

Says the documentation:
"Note: If you assign, pass or return an undefined variable by
reference, it will get created."

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


Previous Comments:


[2008-03-28 14:05:42] kurt at surfmerchants dot com

Description:

When returning an array element from a function by reference, if the
element key does not exist, the element key is added.

Reproduce code:
---
class simple
{
var $items = array();

function &getItem($name)
{
return $this->items[$name];
}
}

$obj = new simple();

print "Keys before getting item:\n".print_r(array_keys($obj->items),
TRUE)."\n";

$retrieved =& $obj->getItem('SHOULD_NOT_EXIST');

print "Retrieved: \n";
var_dump($retrieved);

print "Keys after getting item:\n".print_r(array_keys($obj->items),
TRUE)."\n";

Expected result:

Keys before getting item:
Array
(
)

Retrieved: 
NULL
Keys after getting item:
Array
(
)


Actual result:
--
Keys before getting item:
Array
(
)

Retrieved: 
NULL
Keys after getting item:
Array
(
[0] => SHOULD_NOT_EXIST
)






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



#44226 [Com]: Throwing an exception causes crash

2008-03-29 Thread auroraeosrose at gmail dot com
 ID:   44226
 Comment by:   auroraeosrose at gmail dot com
 Reported By:  james dot j dot hackett at gmail dot com
 Status:   Open
 Bug Type: Reproducible crash
 Operating System: linux debian 2.6.18-5-686
 PHP Version:  5.3CVS-2008-02-23 (snap)
 New Comment:

Wow, pretty bug - I can confirm this with Apache 2.2.8 on windows with
a 5.3 snap - note this ONLY is an issue for the apache 2.2.x handler, I
can't get it to crash cgi, fastcgi, or cli

Here's a backtrace from a Debug_TS build

cdcdcdcd()  
>   php5ts_debug.dll!execute(_zend_op_array * op_array=0x026c2268, void *
* * tsrm_ls=0x0148a970)  Line 91 + 0x11 bytes   C
php5ts_debug.dll!zend_execute_scripts(int type=8, void * * *
tsrm_ls=0x0148a970, _zval_struct * * retval=0x, int
file_count=3, ...)  Line 1169 + 0x21 bytes  C
php5ts_debug.dll!php_execute_script(_zend_file_handle *
primary_file=0x0262fe30, void * * * tsrm_ls=0x0148a970)  Line 2077 +
0x1b bytes  C
php5apache2_2.dll!php_handler(request_rec * r=0x006d3ae0)  Line 630 +
0x13 bytes  C
libhttpd.dll!ap_run_handler(request_rec * r=0x006d3ae0)  Line 158 +
0x21 bytes  C
libhttpd.dll!ap_invoke_handler(request_rec * r=0x006b0e08)  Line 372
+ 0x6 bytes C
libhttpd.dll!ap_process_request(request_rec * r=0x006d3ae0)  Line
262 C
libhttpd.dll!ap_process_http_connection(conn_rec * c=0x006cea90) 
Line 190 + 0x6 bytesC
libhttpd.dll!ap_run_process_connection(conn_rec * c=0x006cea90)  Line
43 + 0x21 bytes C
libhttpd.dll!ap_process_connection(conn_rec * c=0x006cea90, void *
csd=0x006c7a58)  Line 178 + 0x6 bytes   C
libhttpd.dll!worker_main(void * thread_num_val=0x006cea88)  Line
778 C
msvcrt.dll!__endthreadex()  + 0xa9 bytes
kernel32.dll!7c80b683()


Previous Comments:


[2008-03-29 01:00:13] jeremy at omegavortex dot net

Just wanted to add that this still isn't fixed in the latest 5.3
snapshot, for me. Windows XP Pro with SP2. Apache 2.2.8.



[2008-02-26 11:07:01] petr at hroch dot info

Hi,
I'm experiencing the same problem on Windows platform.

Throwing an Exception causes PHP to crash.
Using PHP5.3-dev latest snapshot, running as Apache 2.2.8 module.

Regards
Petr



[2008-02-26 00:26:03] james dot j dot hackett at gmail dot com

There was no change when using the latest snapshot. I used a configure
of "./configure --with-apxs2=/usr/bin/apxs2".

I am able to run 5.2.5 with no problems.



[2008-02-24 19:50:01] [EMAIL PROTECTED]

Please try using this CVS snapshot:

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

For Windows (installer):

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

Does not crash for me..please try the latest CVS snapshot. And if that
fails, provide the configure line you used.



[2008-02-23 14:44:12] james dot j dot hackett at gmail dot com

Description:

Throwing an exception causes a segmentation fault

Reproduce code:
---
getMessage();
}
?>


Expected result:

display "Hi, I am an Exception"

Actual result:
--
#0  0x in ?? ()
#1  0x2acf5c4008de in execute (op_array=0xa1af00, tsrm_ls=0xa00550)
zend_vm_execute.h:91
#2  0x2acf5c3db6aa in zend_execute_scripts (type=8,
tsrm_ls=0xa00550, retval=0xa98be8, file_count=3) zend.c:1173
#3  0x2acf5c38ba36 in php_execute_script (primary_file=0x4700cf40,
tsrm_ls=0xa00550) main.c:2026
#4  0x2acf5c474849 in php_handler (r=0x9fa5b8) sapi_apache2.c:629
#5  0x00437c4a in ap_run_handler ()
#6  0x0043affc in ap_invoke_handler ()
#7  0x00447248 in ap_process_request ()
#8  0x0044468c in ?? ()
#9  0x0043ec22 in ap_run_process_connection ()
#10 0x0044b696 in ?? ()
#11 0x2acf57bbd317 in start_thread () from /lib/libpthread.so.0
#12 0x2acf580a9d5d in clone () from /lib/libc.so.6
#13 0x in ?? ()






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



#43189 [Com]: Fails to link iconv

2008-03-29 Thread sdfsa at mailinator dot com
 ID:   43189
 Comment by:   sdfsa at mailinator dot com
 Reported By:  meh at mailinator dot com
 Status:   No Feedback
 Bug Type: ICONV related
 Operating System: Mac OS X 10.5
 PHP Version:  5.3CVS-2007-11-04 (snap)
 New Comment:

This problem still occurs in 10.5.2 for me.


Previous Comments:


[2008-02-12 00:03:48] mjs at beebo dot org

This appears to be fixed in 10.5.2: the 10.5.2 /usr/include/iconv.h is

different to the 10.5.1 version, and it compiles successfully as well.



[2008-02-03 09:25:38] mjs at beebo dot org

Replacing /usr/include/iconv.h with the one from MacPorts and worked
for 
me.  (I did need to re-configure and re-compile the whole thing
though--
just re-running configure didn't work.)

For what it's worth, the --with-iconv=shared,/opt/local idea *didn't* 
work for me--php configured and built okay, but the iconv module didn't

actually become available.  (php -m doesn't show it.)



[2008-01-20 19:59:20] mariano at petersonpages dot com

This configure option worked for me:

--with-iconv=shared,/opt/local

(Mac OS 10.5.1, PHP 5.2.5, iconv installed in /opt/local using
macports)



[2007-12-18 08:45:48] leon at messiah dot co dot nz

Scott's method may work, but I'm loath to replace system provided
header files.  Seems a bit hacky to me...

Wouldn't a more elegant solution be to configure your build to use the
fink versions of the headers and library?

Something like:

--with-iconv-dir=/sw

I'm using MacPorts so have been trying to do the same thing but using
/opt/local, so far without success.  However, I'm probably doing
something wrong with the configure script (we're not the best of
friends).



[2007-12-14 15:45:05] aaa at mailinator dot com

@jani:
there are one per OS X sdk, one in /usr and one in /sw.

Linking suggested by scott solves the problem on me.



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

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



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

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

This bug has been fixed in CVS.

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




Previous Comments:


[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



#44566 [NEW]: Incorrect variable assignment doesn't cause parse error

2008-03-29 Thread Jonathon dot Reinhart at gmail dot com
From: Jonathon dot Reinhart at gmail dot com
Operating system: Linux (Suse 10.2)
PHP version:  5.2.5
PHP Bug Type: Scripting Engine problem
Bug description:  Incorrect variable assignment doesn't cause parse error

Description:

Simply putting a dollar sign ($) with no variable name afterwards, and no
semicolon does not cause any error.

Reproduce code:
---
Example 1 (Gives no error):


Example 2
Notice: Undefined variable: b in /srv/test2/htdocs/phpbug.php on line 4


Expected result:

Expected to see a parse error on line 2 of Example 1.  Wouldn't expect the
parser to continue looking after a "$" for a variable name after a "\n".

Actual result:
--
No error in Example 1.  Incorrect error in Example 2.

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



#44567 [NEW]: json_encode return unexpected result on uncontinues array

2008-03-29 Thread xiezhenye at gmail dot com
From: xiezhenye at gmail dot com
Operating system: any
PHP version:  5.2.5
PHP Bug Type: JSON related
Bug description:  json_encode return unexpected result on uncontinues array

Description:

json_encode return unexpected result on uncontinues array.


Reproduce code:
---
$a = array(1,2,3);
echo json_encode($a),"\n";
unset($a[1]);
echo json_encode($a),"\n";

Expected result:

[1,2,3]
[1,3]


Actual result:
--
[1,2,3]
{"0":1,"2":3}


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