#28141 [Asn->Bgs]: socket_read return type: false vs "", when PHP_NORMAL_READ

2005-02-14 Thread sniper
 ID:   28141
 Updated by:   [EMAIL PROTECTED]
 Reported By:  php at richardneill dot org
-Status:   Assigned
+Status:   Bogus
 Bug Type: Sockets related
 Operating System: Linux
 PHP Version:  4CVS, 5CVS (2005-02-14)
 Assigned To:  andrey
 New Comment:

There is no bug to fix here. You're actually getting "Connection reset
by peer" (ECONNRESET) and that makes recv() to return -1 -> PHP
socket_read() returns an error and FALSE.

Here's simplified WORKING script:

#!/usr/local/bin/php




Previous Comments:


[2004-07-28 21:04:13] [EMAIL PROTECTED]

Assigning to myself (to get notification if i forget), changing the
version.



[2004-07-26 10:37:34] php at hristov dot com

I will take a look later today or these days.  But for now, the code in
the function is :
if (type == PHP_NORMAL_READ) {
   retval = php_read(php_sock->bsd_socket, tmpbuf, length, 0);
} else {
  retval = recv(php_sock->bsd_socket, tmpbuf, length, 0);
}

if (retval == -1) {
  PHP_SOCKET_ERROR(php_sock, "unable to read from socket", errno);
  efree(tmpbuf);
  RETURN_FALSE;
}



[2004-07-18 17:13:56] php2 at richardneill dot org

I've still got the same thing happening in PHP5.0.0(final)

I'm having some trouble with your example, so I'm using the attached
instead. It's basically copied from the php-sockets manual, but
slightly modified.

The key point: according to the documentation, when
(socket_read()===false), it means something has gone very wrong, i.e. 
a fatal error. However, in practice, all this means is that the other
side has closed the connection.

I'm running this code as ./testsock.php
and the client is simply: netcat localhost 
The problem is that, if netcat is killed with Ctrl-C, then the server
suffers a fatal error. I don't think that it should.

I've tried it under both version  php-cli-4.3.7-4mdk (the current devel
version from Mandrake cooker) and php-5.0.0-cli which I just compiled.
In both cases, the same thing happens.

Regards

Richard

-
#!/usr/local/bin/php




[2004-07-18 14:29:51] [EMAIL PROTECTED]

I cannot reproduce the problem with latest PHP5. Can you provide a
*full* reproducing case.
My scripts are :
server:

client:





[2004-04-25 06:56:24] php at richardneill dot org

Description:

According to the documentation, socket_read() can return:

1)A string - normal data
2)An empty string "" - the other end closed the connection
3)false - something went wrong.

But it seems to be returning false on connection close.

Reproduce code:
---
$buffer=socket_read($socket,2048,PHP_NORMAL_READ);  

if ($buffer===false){
 echo "Error: socket_read() failed: reason:
".socket_strerror(socket_last_error())." \n";
 exit (1);
}elseif ($buffer==''){
echo "Socket $socket returned an empty string. Closing
connection\n";
socket_close($socket);
}else{
echo "Received data".trim($buffer)."\n";
}

Expected result:

I'm using netcat as a client, and then killing the netcat process with
Ctrl-C to simulate remote host disconnecting.

I expect to see the socket close.

Actual result:
--
Actually, the php script exits, because socket_read returns 
false instead of "".

This may be a bug in the documentation for socket_read, rather than in
its behaviour. 

Thanks for your help - Richard





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



#31963 [NEW]: zend_strtod.c does not respect locale.

2005-02-14 Thread wulff at fyens dot dk
From: wulff at fyens dot dk
Operating system: Linux
PHP version:  4.3.10
PHP Bug Type: Scripting Engine problem
Bug description:  zend_strtod.c does not respect locale.

Description:

The Zend engine does not respect the current locale when it converts from
a string to a float.

Zend assumes that all numbers have a "." as a decimal seperator. This is
not the case in many parts of the world.

Included in this bug is a bit of "non-portable" code that solves the
problem. This may not be the most elegant solution but it illustrates what
needs to be fixed. 

Here are my changes to Zend/zend_strtod.c at line 1249:

//  CONST char decimal_point = ',';

char decimal_point = '.';
#ifdef HAVE_LOCALE_H
struct lconv* current_locale;
current_locale=localeconv();
decimal_point=(*(*current_locale).decimal_point);
#endif


Reproduce code:
---



Expected result:

The result one would expect if PHP respected locale:
4,4



Actual result:
--
What you get is:
4


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


#31964 [NEW]: strip_tags truncates strings at '<<'

2005-02-14 Thread tom at designsolution dot co dot uk
From: tom at designsolution dot co dot uk
Operating system: OS X 10.3.8
PHP version:  4.3.10
PHP Bug Type: Strings related
Bug description:  strip_tags truncates strings at '<<'

Description:

When running strip_tags on a string containing '<<', the string is
truncated at the '<<'.

Reproduce code:
---




Expected result:

Probably should return the complete string eg:

testing << testing testing 1 2 3

At the worst I would have expected it without the << but certainly
containing the rest.

Actual result:
--
testing

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


#31963 [Opn->Bgs]: zend_strtod.c does not respect locale.

2005-02-14 Thread derick
 ID:   31963
 Updated by:   [EMAIL PROTECTED]
 Reported By:  wulff at fyens dot dk
-Status:   Open
+Status:   Bogus
 Bug Type: Scripting Engine problem
 Operating System: Linux
 PHP Version:  4.3.10
 New Comment:

THe reason why we introduced this zend_strtod.c was exactly because of
this reason. This is not a bug, but expected and wanted behavior.


Previous Comments:


[2005-02-14 09:42:15] wulff at fyens dot dk

Description:

The Zend engine does not respect the current locale when it converts
from a string to a float.

Zend assumes that all numbers have a "." as a decimal seperator. This
is not the case in many parts of the world.

Included in this bug is a bit of "non-portable" code that solves the
problem. This may not be the most elegant solution but it illustrates
what needs to be fixed. 

Here are my changes to Zend/zend_strtod.c at line 1249:

//  CONST char decimal_point = ',';

char decimal_point = '.';
#ifdef HAVE_LOCALE_H
struct lconv* current_locale;
current_locale=localeconv();
decimal_point=(*(*current_locale).decimal_point);
#endif


Reproduce code:
---



Expected result:

The result one would expect if PHP respected locale:
4,4



Actual result:
--
What you get is:
4






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


#30029 [Asn->Fbk]: File Copy Creation Time Error

2005-02-14 Thread tony2001
 ID:   30029
 Updated by:   [EMAIL PROTECTED]
 Reported By:  misc6pub at scionix dot com
-Status:   Assigned
+Status:   Feedback
 Bug Type: Filesystem function related
 Operating System: Win 2000
 PHP Version:  4.3.8
 Assigned To:  wez
 New Comment:

Please try using this CVS snapshot:

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




Previous Comments:


[2004-09-08 20:45:55] misc6pub at scionix dot com

Description:

In v 4.3.8 (Win2K) and perhaps later, the copy(x,y) does not follow the
spec for the creation time of the copied file.  Copy should keep the
modified time of the new file the same as the source -- which it does
correctly  --, and the created time of the new file should be the time
of copying -- but it incorrectly makes it the same as that of the
original.







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


#31964 [Opn->Bgs]: strip_tags truncates strings at '<<'

2005-02-14 Thread tony2001
 ID:   31964
 Updated by:   [EMAIL PROTECTED]
 Reported By:  tom at designsolution dot co dot uk
-Status:   Open
+Status:   Bogus
 Bug Type: Strings related
 Operating System: OS X 10.3.8
 PHP Version:  4.3.10
 New Comment:

This behaviour is documented:
"Because strip_tags() does not actually validate the HTML, partial, or
broken tags can result in the removal of more text/data than
expected."
Your HTML is undoubtfully broken.
See http://php.net/strip_tags


Previous Comments:


[2005-02-14 09:51:09] tom at designsolution dot co dot uk

Description:

When running strip_tags on a string containing '<<', the string is
truncated at the '<<'.

Reproduce code:
---




Expected result:

Probably should return the complete string eg:

testing << testing testing 1 2 3

At the worst I would have expected it without the << but certainly
containing the rest.

Actual result:
--
testing





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


#31972 [NEW]: Problem when I compile modperl

2005-02-14 Thread thiago at kionux dot com dot br
From: thiago at kionux dot com dot br
Operating system: Linux Debian
PHP version:  5.0.3
PHP Bug Type: *Compile Issues
Bug description:  Problem when I compile modperl

Description:

I compile php-5.0.3 whith imap support. Thats all is ok, but when I
compile the mod_perl reports this error.
 Error Output for sanity check 
cd ..; cc  -DLINUX=22 -DHAVE_SET_DUMPABLE -DMOD_PERL -DUSE_PERL_SSI
-D_REENTRANT
  -DTHREADS_HAVE_PIDS -DDEBIAN -fno-strict-aliasing -I/usr/local/include
-D_LARG
EFILE_SOURCE -D_FILE_OFFSET_BITS=64 -DMOD_PERL -DUSE_PERL_SSI -D_REENTRANT
 -DTH
READS_HAVE_PIDS -DDEBIAN -fno-strict-aliasing -I/usr/local/include
-D_LARGEFILE_
SOURCE -D_FILE_OFFSET_BITS=64 -DNO_DL_NEEDED -D_REENTRANT
-DTHREADS_HAVE_PIDS -D
DEBIAN -fno-strict-aliasing -I/usr/local/include -D_LARGEFILE_SOURCE
-D_FILE_OFF
SET_BITS=64 `./apaci` -I. -I/usr/lib/perl/5.8/CORE -I.
-I/usr/lib/perl/5.8/CORE
   -o helpers/dummy helpers/dummy.c   -Wl,-rpath,/usr/local/mysql/lib 
-rdynamic
 -rdynamic -L/usr/local/mysql/lib -Lmodules/php5 -L../modules/php5
-L../../modul
es/php5 -lmodphp5-rdynamic -rdynamic -L/usr/local/mysql/lib -lcrypt 
-lc-cli
ent  -lcrypt -lmm -lmysqlclient -lcrypt -lfreetype -lpng -lz -ljpeg -lz
-lresolv
 -lm -ldl -lnsl  -lxml2 -lz -lm -lxml2 -lz -lm -lgssapi_krb5 -lkrb5
-lk5crypto -
lcom_err -lxml2 -lz -lm -lcrypt -lxml2 -lz -lm -lcrypt   -lm -lcrypt
-Wl,-E  -L/
usr/local/lib /usr/lib/perl/5.8/auto/DynaLoader/DynaLoader.a
-L/usr/lib/perl/5.8
/CORE -ldl -lm -lpthread -lc -lcrypt  -Wl,-E  -L/usr/local/lib
/usr/lib/perl/5.8
/auto/DynaLoader/DynaLoader.a -L/usr/lib/perl/5.8/CORE -ldl -lm -lpthread
-lc -l
crypt
/usr/lib/gcc-lib/i486-linux/3.3.5/../../../libc-client.so: undefined
reference t
o `mm_expunged'
/usr/lib/gcc-lib/i486-linux/3.3.5/../../../libc-client.so: undefined
reference t
o `mm_diskerror'
/usr/lib/gcc-lib/i486-linux/3.3.5/../../../libc-client.so: undefined
reference t
o `mm_lsub'
/usr/lib/gcc-lib/i486-linux/3.3.5/../../../libc-client.so: undefined
reference t
o `mm_flags'
/usr/lib/gcc-lib/i486-linux/3.3.5/../../../libc-client.so: undefined
reference t
o `mm_fatal'
/usr/lib/gcc-lib/i486-linux/3.3.5/../../../libc-client.so: undefined
reference t
o `mm_nocritical'
/usr/lib/gcc-lib/i486-linux/3.3.5/../../../libc-client.so: undefined
reference t
o `mm_notify'
/usr/lib/gcc-lib/i486-linux/3.3.5/../../../libc-client.so: undefined
reference t
o `mm_searched'
/usr/lib/gcc-lib/i486-linux/3.3.5/../../../libc-client.so: undefined
reference t
o `mm_status'
/usr/lib/gcc-lib/i486-linux/3.3.5/../../../libc-client.so: undefined
reference t
o `mm_login'
/usr/lib/gcc-lib/i486-linux/3.3.5/../../../libc-client.so: undefined
reference t
o `mm_list'
/usr/lib/gcc-lib/i486-linux/3.3.5/../../../libc-client.so: undefined
reference t
o `mm_critical'
/usr/lib/gcc-lib/i486-linux/3.3.5/../../../libc-client.so: undefined
reference t
o `mm_exists'
/usr/lib/gcc-lib/i486-linux/3.3.5/../../../libc-client.so: undefined
reference t
o `mm_log'
/usr/lib/gcc-lib/i486-linux/3.3.5/../../../libc-client.so: undefined
reference t
o `mm_dlog'
collect2: ld returned 1 exit status
make: *** [dummy] Error 1



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


#31968 [Opn->Asn]: PDO getcolumnmeta returns no value when select returns not data

2005-02-14 Thread wez
 ID:   31968
 Updated by:   [EMAIL PROTECTED]
 Reported By:  jlim at natsoft dot com
-Status:   Open
+Status:   Assigned
 Bug Type: *Database Functions
 Operating System: WinXP SP2
 PHP Version:  5CVS-2005-02-14 (dev)
-Assigned To:  
+Assigned To:  wez
 New Comment:

I'll look into it.

PS: John, can you submit PDO bugs via PECL instead in the future.  I'd
love to find out more about the OCI problems you mentioned.

http://pecl.php.net/bugs/report.php?package=PDO
http://pecl.php.net/bugs/report.php?package=PDO_OCI
etc.

thanks!


Previous Comments:


[2005-02-14 12:09:33] jlim at natsoft dot com

Description:

Hi,

I think PDO should return the getColumnMeta info even if no data is
returned, so long as SQL parses correctly and table exists. I believe
that all of the non-PDO database extensions work like this.

I don't know whether this is an SQLite issue or PDO issue.

Thanks, John Lim

Reproduce code:
---
prepare("select * from hash ");
$ok = $st2->execute();
echo "GetColumnMeta";
for ($i=0; $i<2; $i++) {
$col = $st2->getColumnMeta($i);
var_dump($col);echo "";
}
}

$db = new PDO('sqlite:' . getenv('HOME') . "/.web-watch.sql3");
$db->query('create table hash(url primary key, hash)');
$db->query('delete from hash');
GetColumnMeta($db);

$db->query("insert into hash (url, hash) values
('http://yahoo.com/','100')");
GetColumnMeta($db);  
?> 

Expected result:

GetColumnMeta
array(6) { ["native_type"]=> string(6) "string" ["flags"]=> array(0) {
} ["name"]=> string(3) "url" ["len"]=> int(-1) ["precision"]=> int(0)
["pdo_type"]=> int(2) }
array(6) { ["native_type"]=> string(6) "string" ["flags"]=> array(0) {
} ["name"]=> string(4) "hash" ["len"]=> int(-1) ["precision"]=> int(0)
["pdo_type"]=> int(2) } 

GetColumnMeta
array(6) { ["native_type"]=> string(6) "string" ["flags"]=> array(0) {
} ["name"]=> string(3) "url" ["len"]=> int(-1) ["precision"]=> int(0)
["pdo_type"]=> int(2) }
array(6) { ["native_type"]=> string(6) "string" ["flags"]=> array(0) {
} ["name"]=> string(4) "hash" ["len"]=> int(-1) ["precision"]=> int(0)
["pdo_type"]=> int(2) } 

Actual result:
--
GetColumnMeta
bool(false)
bool(false)

GetColumnMeta
array(6) { ["native_type"]=> string(6) "string" ["flags"]=> array(0) {
} ["name"]=> string(3) "url" ["len"]=> int(-1) ["precision"]=> int(0)
["pdo_type"]=> int(2) }
array(6) { ["native_type"]=> string(6) "string" ["flags"]=> array(0) {
} ["name"]=> string(4) "hash" ["len"]=> int(-1) ["precision"]=> int(0)
["pdo_type"]=> int(2) }






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


#31971 [NEW]: ftp_login fails on messsage from FTP+SSL server (234 Enabling SSL)

2005-02-14 Thread frantisek at augusztin dot com
From: frantisek at augusztin dot com
Operating system: Linux (Fedora Core 3)
PHP version:  5.0.3
PHP Bug Type: FTP related
Bug description:  ftp_login fails on messsage from FTP+SSL server (234 Enabling 
SSL)

Description:

PHP returns following error when connecting using example code:
Warning: ftp_login() : Enabling SSL in /var/www/html/test.php on line 3

Using FTP client the following messages are displayed in the log window of
the client :

*** Connecting to 'XXX.XXX.XXX.XXX:21'...
220 Service Ready for new User
AUTH TLS
234 Enabling SSL

FTP clearly fails on this messsage. But i don't understand why, because i
found in source code, that 234 is not an error, but a valid result code
for this operation.
FTP System type is "215 NETWARE  Type : L8"

Reproduce code:
---


Expected result:

No warning message and successfull connection to FTP server.

Actual result:
--
Warning: ftp_login() : Enabling SSL in /var/www/html/test.php on line 3

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


#31678 [Opn]: ODBC Connection fails on Multiprocessor System

2005-02-14 Thread zipf dot mailcom at boewe-systec dot nospam dot de
 ID:   31678
 User updated by:  zipf dot mailcom at boewe-systec dot nospam dot de
 Reported By:  zipf dot mailcom at boewe-systec dot nospam dot de
 Status:   Open
 Bug Type: ODBC related
 Operating System: Windows 2000
 PHP Version:  4CVS, 5CVS (2005-02-05)
 New Comment:

Is anybody looking into this problem?
Anything else I could test?


Previous Comments:


[2005-02-04 10:26:54] zipf dot mailcom at boewe-systec dot nospam dot
de

Ok we tested today with this development snapshot. it took a very long
time to get that error but it still occured. 
But this time apache didn´t respond at all after the crash. usually
apache was still serving requests, but this time there was no answer
anymore. We tested with IIS as well and it is the same behavior, so
this isn´t just apache related.

testing a dbcheck php page with commandline still works after the
crash.



[2005-02-03 05:17:52] [EMAIL PROTECTED]

Please try using this CVS snapshot:

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

And I ask again:
Does this work on command line? (using PHP CLI binary..)

Using PHP CLI binary means the executably file (is it php.exe or
php-cli.exe in windows?) found in PHP distros..

Get the snapshot first.




[2005-01-28 15:13:52] zipf dot mailcom at boewe-systec dot nospam dot
de

what do you mean with commandline?

you mean after a db-problem check if a commandline connect to the db
still works with php or what?

I will test it next time we get that error. but it needs a couple of
simultanous requests to produce that error so i need a bunch of peple
to test it.



[2005-01-26 05:33:57] [EMAIL PROTECTED]

Does it work on command line? (using PHP CLI binary..)




[2005-01-24 11:54:47] zipf dot mailcom at boewe-systec dot nospam dot
de

A normal ODBC Connection still works. Just Apache/PHP cannot connect to
the database anymore.



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

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


#31088 [Fbk->Opn]: exec fails for command that works ate the command line

2005-02-14 Thread vdlaag at natlab dot research dot philips dot com
 ID:   31088
 User updated by:  vdlaag at natlab dot research dot philips dot com
 Reported By:  vdlaag at natlab dot research dot philips dot com
-Status:   Feedback
+Status:   Open
 Bug Type: Program Execution
 Operating System: RedHat 9.0
 PHP Version:  5.0.2
 New Comment:

I am afraid this was a bogus bug report. As Safe mode isa enabled,
every shell command is escaped. I found this later on in the
documentation. Although I find this a bit peculiar, it works as
designed. My problem occurs because the command is escaped. 

I already solved by creating another shell script, that executes the
createRequest call. I call exec on this other shell script. Then it
works fine. 

I am sorry to have troubled you with this. It turned out to be my own
error and not a bug in PHP.


Previous Comments:


[2005-02-11 23:03:47] [EMAIL PROTECTED]

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

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

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

Please provide a reproduce code that we could run & replicate the
problem.



[2004-12-14 14:32:47] vdlaag at natlab dot research dot philips dot com

Description:

I have a command line tool that adds records to a database. This is the
only way for me to access this database. 

The command line tool works as follows:
  createRequest -p -i "value1" -l "value2" etc
Each option is followed by the value for the record.
The -p option is there so that the ID of the new inserted record is
returned to standard output.

At the command line this works fine. But as soon as a value contains a
& the exec function fails. When a value contains parentheses, they are
escaped (so that the escape characters are inserted in the database as
well).

The configure script for php:
'./configure' '--prefix=/usr/local/php5' '--enable-safe-mode'
'--with-apxs2=/usr/local/httpd/bin/apxs' '--with-gd'
'--with-mssql=/usr/local/freetds' '--with-pgsql=/usr/local/pgsql'
'--with-mysql=/usr/local/mysql' '--with-ldap=/usr/local/openldap'
'--with-png-dir=/usr/local/libpng' '--with-zlib-dir=/usr/local/zlib'
'--with-jpeg-dir=/usr/local/jpeg'
'--with-freetype-dir=/usr/local/freetype/include/freetype2/freetype'
'--with-curl=/usr/local/curl' '--with-mime-magic=/usr/share/magic.mime'
'--with-xslt-sablot=/usr/local/Sablot'
'--with-expat-dir=/usr/local/expat'
'--with-libxml-dir=/usr/local/libxml' '--with-pear' 

I added the folder that holds the cretaeRequest tool to
safe_mode_exec_dir in php.ini

Reproduce code:
---
//These options go OK
$Options['-i'] = "Add user to group X";
$Options['-l'] = "vdlaag";

//This option makes the exec command fail
$Options['-O] = "IP&S";

//This option results in extra slashes 
// it yields: Great stuff \(is it not\)
$Options['-a'] = "Great stuff (is it not)"

$Exec = $_SERVER['DOCUMENT_ROOT'] . 
"/vdlaag/NewUserForm/IPS/createRequest -p";
foreach ($Options as $option => $value)
{
$Exec .= " " . $option . " '" . $value . "'";
}
$HDTCase = exec($Exec); 



Expected result:

I expect to get a number back from the exec command. This happens OK if
there are no "weird" charachters in any of the values (like &). 

Actual result:
--
It returns nothing and the rest of my script fails as a result.





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


#31970 [NEW]: serialized object can't be unserialized

2005-02-14 Thread marie_bw at web dot de
From: marie_bw at web dot de
Operating system: Linux (Gentoo)
PHP version:  4.3.10
PHP Bug Type: *Programming Data Structures
Bug description:  serialized object can't be unserialized

Description:

On complex objects the serialize() function produced
output in which string members of an object would be
stored together with a wrong string size, e.g. the
string length ist 60 bytes but serialize() notes only 58.

The data can't be processed by unserialize().

This would only happen if characters like single or
double quote were present in the string (this string
came from HTTP_POST_VAR). But also a substitution
of quotation character by '"' or 'x' would not
bother serialize() to produce the right output.

This is not reproducible with small objects. The
objects in question where rather complex and came
from the application "phpopenchat".



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


#31792 [Bgs->Opn]: getrusage() does not give ru_nswap

2005-02-14 Thread bertrand at toggg dot com
 ID:  31792
 User updated by: bertrand at toggg dot com
 Reported By: bertrand at toggg dot com
-Status:  Bogus
+Status:  Open
-Bug Type:Documentation problem
+Bug Type:Unknown/Other Function
 PHP Version: Irrelevant
 New Comment:

True, the documentation *is* correct.


Previous Comments:


[2005-02-14 09:41:38] [EMAIL PROTECTED]

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. 

Thank you for your interest in PHP.

This is not a documentation bug.



[2005-02-14 00:19:10] bertrand at toggg dot com

Thanks vrana !
You're right, it's ru_nswap resource usage number of swap.
(as stated in title). So, back from bogus.
Do you have some answer about why it's not reported ?
à+



[2005-02-13 21:43:20] [EMAIL PROTECTED]

It's not ru_nwsap but ru_nswap (typo).



[2005-02-12 15:42:42] bertrand at toggg dot com

Let say it's a documentation problem.
But I still consider this resource usage as an interessant indicator,
if it's existing, sure.
Thanks.



[2005-02-01 12:37:25] bertrand at toggg dot com

Description:

Although this resource usage is documented in PHP manual getrusage(),
ru_nwsap (number of swap) is not reported.
checking ext/standard/microtime.c, it's obviously not copied in the
returned array.
Does exist a technical reason for that ?
Thanks
bertrand






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


#30875 [Com]: xml_parse_into_struct does not resolve entities in element content

2005-02-14 Thread benji at newbenji dot dk
 ID:   30875
 Comment by:   benji at newbenji dot dk
 Reported By:  joern_h at gmx dot net
 Status:   Open
 Bug Type: XML related
 Operating System: Windows 2000
 PHP Version:  4CVS, 5CVS (2005-02-03)
 New Comment:

same problem.
Linux gentoo.
mod_php 5.0.3


Previous Comments:


[2005-02-03 14:59:37] joern_h at gmx dot net

This bug still occurs with current PHP4 (Feb  3 2005 06:13:06) and PHP5
(Feb  3 2005 12:17:00) snapshots.



[2005-02-03 04:41:34] [EMAIL PROTECTED]

Please try using this CVS snapshot:

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





[2004-11-24 00:11:27] joern_h at gmx dot net

Description:

When using xml_parse_into_struct, entities from the internal dtd are
not resolved in element content. Entities in attribute values are
resolved properly. This bug is present in PHP 4.3.8 and PHP5 (cvs from
2004-11-22).

Reproduce code:
---

]>
&test;
HERE;

$parser =& xml_parser_create();

xml_parse_into_struct($parser, $xml, $vals, $idx);

print_r($vals);

xml_parser_free($parser);

?>


Expected result:

Array
(
[0] => Array
(
[tag] => TEST
[type] => complete
[level] => 1
[value] => test
)
)

Actual result:
--
Array
(
[0] => Array
(
[tag] => TEST
[type] => complete
[level] => 1
)
)





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


#31931 [Opn]: image upload returns path and red cross

2005-02-14 Thread website at cellpacksolutions dot com
 ID:   31931
 User updated by:  website at cellpacksolutions dot com
 Reported By:  website at cellpacksolutions dot com
 Status:   Open
 Bug Type: HTTP related
 Operating System: linux
 PHP Version:  4CVS-2005-02-11 (stable)
 Assigned To:  iliaa
 New Comment:

I have tried using the basic upload code posted on the following
thread:

http://www.phpfreaks.com/forums/index.php?showtopic=52077&pid=202571&st=0&#entry202571

which returns:

File (C:\\SEARCH PROGRAM\\product_pics\\3b880.jpg) uploaded!
testupload C:\\SEARCH PROGRAM\\product_pics\\3b880.jpg jpg 

scrolling over and selecting properties of the link shows:

http://domainname.co.uk/testupload/C://SEARCH

this is using the latest cvs version 9 am this morning!


Previous Comments:


[2005-02-14 12:23:52] website at cellpacksolutions dot com

just recieved this comment from our hosts this morning:

We have tested the most recent available snapshot (9:30am) and the bug
regarding PHP file uploads is still present.  I would advise using the
temporary workaround (all it does is remove everything upto and include
the
final \ thus providing you with only the filename) until the issue is
resolved with PHP 4.3.11.

As advised, unfortunately we are unable to revert back to 4.3.10 as
this
contains severe vulnerabilities which we are unable to allow to exist
on our
systems.  I will leave this ticket suspended in our queue and when we
have
further information for you we will mail you again.



[2005-02-12 17:48:18] [EMAIL PROTECTED]

Already fixed in CVS. (Can't reproduce with it)




[2005-02-12 02:33:53] [EMAIL PROTECTED]

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

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

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





[2005-02-11 18:13:36] [EMAIL PROTECTED]

Ilia, you "broke" it. :)
For the reportee: Provide test case.




[2005-02-11 17:57:24] website at cellpacksolutions dot com

it seems to append the local drive onto the upload path
http://domiannamehere.co.uk/data/500/thumbs/C://SEARCH_PROGRAM//test.jpg

testing my local version of php4.3.10 works great

it is a well known script i use, and the develops also say it may be a
bug! Thankyou!



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

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


#31969 [NEW]: disk_free_space() sometimes return Zero in Samba mounted file systems

2005-02-14 Thread lrosa at venus dot it
From: lrosa at venus dot it
Operating system: Linux Fedora Core 3
PHP version:  5.0.3
PHP Bug Type: Filesystem function related
Bug description:  disk_free_space() sometimes return Zero in Samba mounted file 
systems

Description:

I have a Linux box with 20 file system mounted via Samba.
Sometimes, randomly, calling disk_free_space() on some file systems it
retirns zero instead the real value. Reissuing the same command few
minutes later returns the right value. Sometimes happens that the Samba
remote filesystem connection is slow, so this may happen.

It would be nice if disk_free_space() would return a negative value if it
is unable to get the correct value, otherwise it would be impossible to
distinguish between a "real" Zero Bytes Free situation and a Temporary
Timeout Problem situation.


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


#31931 [Bgs->Opn]: image upload returns path and red cross

2005-02-14 Thread website at cellpacksolutions dot com
 ID:   31931
 User updated by:  website at cellpacksolutions dot com
 Reported By:  website at cellpacksolutions dot com
-Status:   Bogus
+Status:   Open
 Bug Type: HTTP related
 Operating System: linux
 PHP Version:  4CVS-2005-02-11 (stable)
 Assigned To:  iliaa
 New Comment:

just recieved this comment from our hosts this morning:

We have tested the most recent available snapshot (9:30am) and the bug
regarding PHP file uploads is still present.  I would advise using the
temporary workaround (all it does is remove everything upto and include
the
final \ thus providing you with only the filename) until the issue is
resolved with PHP 4.3.11.

As advised, unfortunately we are unable to revert back to 4.3.10 as
this
contains severe vulnerabilities which we are unable to allow to exist
on our
systems.  I will leave this ticket suspended in our queue and when we
have
further information for you we will mail you again.


Previous Comments:


[2005-02-12 17:48:18] [EMAIL PROTECTED]

Already fixed in CVS. (Can't reproduce with it)




[2005-02-12 02:33:53] [EMAIL PROTECTED]

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

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

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





[2005-02-11 18:13:36] [EMAIL PROTECTED]

Ilia, you "broke" it. :)
For the reportee: Provide test case.




[2005-02-11 17:57:24] website at cellpacksolutions dot com

it seems to append the local drive onto the upload path
http://domiannamehere.co.uk/data/500/thumbs/C://SEARCH_PROGRAM//test.jpg

testing my local version of php4.3.10 works great

it is a well known script i use, and the develops also say it may be a
bug! Thankyou!



[2005-02-11 11:26:25] website at cellpacksolutions dot com

Description:

Our webhosts have recently upgraded to the snapshot on production
server!

However our upload script no longer works, worked ok on previous
versions,

When you upload, all you get is a image with a red cross, and if you
look at its properties it shows the path of the location on my c:/
drive!

hope this is helpful, i have found a few other people with similar
issues! 

sorry i could not include any other information as i do not have access
to it!






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


#31968 [NEW]: PDO getcolumnmeta returns no value when select returns not data

2005-02-14 Thread jlim at natsoft dot com
From: jlim at natsoft dot com
Operating system: WinXP SP2
PHP version:  5CVS-2005-02-14 (dev)
PHP Bug Type: *Database Functions
Bug description:  PDO getcolumnmeta returns no value when select returns not 
data

Description:

Hi,

I think PDO should return the getColumnMeta info even if no data is
returned, so long as SQL parses correctly and table exists. I believe that
all of the non-PDO database extensions work like this.

I don't know whether this is an SQLite issue or PDO issue.

Thanks, John Lim

Reproduce code:
---
prepare("select * from hash ");
$ok = $st2->execute();
echo "GetColumnMeta";
for ($i=0; $i<2; $i++) {
$col = $st2->getColumnMeta($i);
var_dump($col);echo "";
}
}

$db = new PDO('sqlite:' . getenv('HOME') . "/.web-watch.sql3");
$db->query('create table hash(url primary key, hash)');
$db->query('delete from hash');
GetColumnMeta($db);

$db->query("insert into hash (url, hash) values
('http://yahoo.com/','100')");
GetColumnMeta($db);  
?> 

Expected result:

GetColumnMeta
array(6) { ["native_type"]=> string(6) "string" ["flags"]=> array(0) { }
["name"]=> string(3) "url" ["len"]=> int(-1) ["precision"]=> int(0)
["pdo_type"]=> int(2) }
array(6) { ["native_type"]=> string(6) "string" ["flags"]=> array(0) { }
["name"]=> string(4) "hash" ["len"]=> int(-1) ["precision"]=> int(0)
["pdo_type"]=> int(2) } 

GetColumnMeta
array(6) { ["native_type"]=> string(6) "string" ["flags"]=> array(0) { }
["name"]=> string(3) "url" ["len"]=> int(-1) ["precision"]=> int(0)
["pdo_type"]=> int(2) }
array(6) { ["native_type"]=> string(6) "string" ["flags"]=> array(0) { }
["name"]=> string(4) "hash" ["len"]=> int(-1) ["precision"]=> int(0)
["pdo_type"]=> int(2) } 

Actual result:
--
GetColumnMeta
bool(false)
bool(false)

GetColumnMeta
array(6) { ["native_type"]=> string(6) "string" ["flags"]=> array(0) { }
["name"]=> string(3) "url" ["len"]=> int(-1) ["precision"]=> int(0)
["pdo_type"]=> int(2) }
array(6) { ["native_type"]=> string(6) "string" ["flags"]=> array(0) { }
["name"]=> string(4) "hash" ["len"]=> int(-1) ["precision"]=> int(0)
["pdo_type"]=> int(2) }


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


#31967 [NEW]: mysql_fetch_field() reports weird table names on SHOW queries

2005-02-14 Thread me at derrabus dot de
From: me at derrabus dot de
Operating system: Linux 2.6
PHP version:  5.0.3
PHP Bug Type: MySQL related
Bug description:  mysql_fetch_field() reports weird table names on SHOW queries

Description:

I am running php 5.0.3 and MySQL 5.0.2 on my machine. The MySQL extension
is compiled against a MySQL 5.0.2 client library.

The code below returns weird table names (like #sql_f85_0) although the
query should not affect any tables. So far, I could reproduce the problem
with "SHOW TABLES" and "SHOW TABLE STATUS".

If I do the same on my other machine (php 5.0.3, MySQL server & client API
4.0.22), the returned table name is empty (as it should, imho).

I don't know if this is a bug of the MySQL extension or MySQL's C API, but
since I cannot debug the C API right now, I'm posting this here.

Reproduce code:
---




Expected result:

[table] should be empty.

Actual result:
--
stdClass Object
(
[name] => Tables_in_test
[table] => #sql_f85_0
[def] => 
[max_length] => 2
[not_null] => 1
[primary_key] => 0
[multiple_key] => 0
[unique_key] => 0
[numeric] => 0
[blob] => 0
[type] => string
[unsigned] => 0
[zerofill] => 0
)

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


#31966 [NEW]: SSL:// wrapper does not obey NON_BLOCKING mode.

2005-02-14 Thread james-php at bytehosting dot com
From: james-php at bytehosting dot com
Operating system: linux
PHP version:  4.3.10
PHP Bug Type: *Network Functions
Bug description:  SSL:// wrapper does not obey NON_BLOCKING mode.

Description:

When php is compiled against openssl. If you use a non_blocking stream PHP
does not obet the non_blocking options. If you REMOVE the ssl:// and
connect to a non-secure port, and it works perfectly fine.


OpenSSL 0.9.7e

PHP 4.3.10 (cgi-fcgi) (built: Dec 27 2004 04:01:15)
Copyright (c) 1997-2004 The PHP Group
Zend Engine v1.3.0, Copyright (c) 1998-2004 Zend Technologies
Kernel: 2.4.22-36mdkenterprise
Mandrake Linux release 9.2 (FiveStar) for i586

Dual xeon + hyperthreading:
model name  : Intel(R) Xeon(TM) CPU 2.40GHz
stepping: 9
cpu MHz : 2389.117
cache size  : 512 KB


./configure  --enable-fastcgi --with-mysql --enable-aspell --enable-ftp
--enable-xml --enable-trans-sid --enable-curl \
--enable-force-cgi-redirect --with-gd --with-zlib-dir
--with-curl=/usr/include/curl --with-openssl \
--with-openssl-dir=/usr/compile/openssl-0.9.7e


Reproduce code:
---


Expected result:

Socket to be non-blocked, and return immediately.


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


#31966 [Opn]: SSL:// wrapper does not obey NON_BLOCKING mode.

2005-02-14 Thread james-php at bytehosting dot com
 ID:   31966
 User updated by:  james-php at bytehosting dot com
 Reported By:  james-php at bytehosting dot com
 Status:   Open
 Bug Type: *Network Functions
 Operating System: linux
 PHP Version:  4.3.10
 New Comment:

opps -- stream_set_blocking()

~james


Previous Comments:


[2005-02-14 11:15:36] james-php at bytehosting dot com

Description:

When php is compiled against openssl. If you use a non_blocking stream
PHP does not obet the non_blocking options. If you REMOVE the ssl://
and connect to a non-secure port, and it works perfectly fine.


OpenSSL 0.9.7e

PHP 4.3.10 (cgi-fcgi) (built: Dec 27 2004 04:01:15)
Copyright (c) 1997-2004 The PHP Group
Zend Engine v1.3.0, Copyright (c) 1998-2004 Zend Technologies
Kernel: 2.4.22-36mdkenterprise
Mandrake Linux release 9.2 (FiveStar) for i586

Dual xeon + hyperthreading:
model name  : Intel(R) Xeon(TM) CPU 2.40GHz
stepping: 9
cpu MHz : 2389.117
cache size  : 512 KB


./configure  --enable-fastcgi --with-mysql --enable-aspell --enable-ftp
--enable-xml --enable-trans-sid --enable-curl \
--enable-force-cgi-redirect --with-gd --with-zlib-dir
--with-curl=/usr/include/curl --with-openssl \
--with-openssl-dir=/usr/compile/openssl-0.9.7e


Reproduce code:
---


Expected result:

Socket to be non-blocked, and return immediately.






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


#31966 [Opn]: SSL:// wrapper does not obey NON_BLOCKING mode.

2005-02-14 Thread james-php at bytehosting dot com
 ID:   31966
 User updated by:  james-php at bytehosting dot com
 Reported By:  james-php at bytehosting dot com
 Status:   Open
 Bug Type: *Network Functions
 Operating System: linux
 PHP Version:  4.3.10
 New Comment:

Too late of night, the previous comment was ment to say (I made an
error when submitting the bug). I do have it properly set as
stream_set_blocking($fd,FALSE); and the problem still exists. The code
sample submitted was wrong, the bug applies when you actully use the
proper function names. Thats what I get when re-typing the code out in
the form, instead of pasting it.

~james


Previous Comments:


[2005-02-14 11:20:23] james-php at bytehosting dot com

opps -- stream_set_blocking()

~james



[2005-02-14 11:15:36] james-php at bytehosting dot com

Description:

When php is compiled against openssl. If you use a non_blocking stream
PHP does not obet the non_blocking options. If you REMOVE the ssl://
and connect to a non-secure port, and it works perfectly fine.


OpenSSL 0.9.7e

PHP 4.3.10 (cgi-fcgi) (built: Dec 27 2004 04:01:15)
Copyright (c) 1997-2004 The PHP Group
Zend Engine v1.3.0, Copyright (c) 1998-2004 Zend Technologies
Kernel: 2.4.22-36mdkenterprise
Mandrake Linux release 9.2 (FiveStar) for i586

Dual xeon + hyperthreading:
model name  : Intel(R) Xeon(TM) CPU 2.40GHz
stepping: 9
cpu MHz : 2389.117
cache size  : 512 KB


./configure  --enable-fastcgi --with-mysql --enable-aspell --enable-ftp
--enable-xml --enable-trans-sid --enable-curl \
--enable-force-cgi-redirect --with-gd --with-zlib-dir
--with-curl=/usr/include/curl --with-openssl \
--with-openssl-dir=/usr/compile/openssl-0.9.7e


Reproduce code:
---


Expected result:

Socket to be non-blocked, and return immediately.






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


#29797 [Opn->Bgs]: mkdir function doesn't work correctly when path contains forward slashes

2005-02-14 Thread tony2001
 ID:   29797
 Updated by:   [EMAIL PROTECTED]
 Reported By:  arnoud at procurios dot nl
-Status:   Open
+Status:   Bogus
 Bug Type: Directory function related
 Operating System: Windows XP
 PHP Version:  5.0.0
 New Comment:

As far as I can see, PHP has nothing to do with it, as PHP just calls
mkdir(supplied path).
And PHP doesn't use DIRECTORY_SEPARATOR with mkdir(), but your system's
mkdir() is failing to create directory "g/h".
On the other side "g\h" is valid name for directory on Linux and
mkdir("g\h") successfully creates it.

Marking this report as bogus.


Previous Comments:


[2005-01-06 03:14:13] [EMAIL PROTECTED]

Note: The actual constant is DIRECTORY_SEPARATOR.

However, in PHP, in most (all?) cases \ and / are interchangable when
dealing with the filesystem.

Why shouldn't this be the case for mkdir?



[2004-09-29 09:07:00] php at nowhere dot net

The proper work around is to use the php defined constant
PHP_DIR_SEPARATOR which is set according to the platform.



[2004-09-01 16:56:11] alex dot pagnoni at solarix dot it

Actual workaround is to check for underlying os (look inside
$_ENV['OS']) and, if it is Windows, convert all forward slashes using
str_replace().



[2004-08-23 14:41:27] arnoud at procurios dot nl

Description:

The 'mkdir' function doesn't function correctly on Windows when the
path contains forward slashes. The part of the path with the forward
slashes doesn't get created.

Reproduce code:
---


Expected result:

Two directories should have been created:
c:\a\b\c\d, and
c:\e\f\g\h

Actual result:
--
Actual directories being created:
c:\a\b\c\d, and
C:\e\f





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


#26005 [Com]: Random "cannot change the session's ini settings" errors

2005-02-14 Thread zehunter38 at hotmail dot com
 ID:   26005
 Comment by:   zehunter38 at hotmail dot com
 Reported By:  parsnip11 at hotmail dot com
 Status:   No Feedback
 Bug Type: Session related
 Operating System: *
 PHP Version:  4CVS-2003-10-31
 New Comment:

i'm using php 4.3.9 with apache 1.3.32 and i got the same error message
: A session is active. You cannot change the session module's ini
settings at this time...

memory seems ok in my server (still 46Mo free, maybe it's link to some
memory allocation parameters?)


Previous Comments:


[2004-09-23 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".



[2004-09-15 15:35:53] [EMAIL PROTECTED]

Please try using this CVS snapshot:

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





[2004-07-04 22:28:41] [EMAIL PROTECTED]

We have tackled down the problem to memory allocation issues. If PHP is
unable to allocate more memory it quits, but then the session module
still tries to save stuff, and due to the unavailability of memory, it
is unable to do so.

The interesting part is that regardless of our display_errors=off
setting, this session error still gets printed out to the browser (the
mem allocation problem is only present in our logs). The session module
should not print errors if display_errors is off.



[2004-07-04 13:51:38] [EMAIL PROTECTED]

We also experience the same error with PHP 4.3.7 with Apache 1.3.31. We
have the following session settings in .htaccess:


   php_value session.cache_expire20
   php_value session.gc_maxlifetime  20
   php_value session.cookie_domain   ".weblabor.hu"
   php_value session.cookie_lifetime 200
   php_value session.auto_start  0
   php_value session.save_handleruser
   php_value session.cache_limiter   none


Our session handlers store data in a database, and are set with
session_set_save_handler() in userland code. The error is the exact one
reported by the bug opener.



[2004-07-04 13:25:56] a-n-d-r-a-s at b-a-r-t-h-a-z-i dot hu

I have PHP 4.3.7, and we get this error, running a Drupal 4.4.



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

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


#29864 [Opn->Fbk]: CLI PHP crash after successful script completion when querying Oracle 9 DB CLOB

2005-02-14 Thread tony2001
 ID:   29864
 Updated by:   [EMAIL PROTECTED]
 Reported By:  Volker dot Weinberger at pharma dot novartis dot com
-Status:   Open
+Status:   Feedback
 Bug Type: OCI8 related
 Operating System: Solaris 5.8
 PHP Version:  5.0.1
 New Comment:

Please, see bug #31533 and try the patch supplied there.
Seems that werdie Solarises are broken (or Oracle for Solaris is).
Also I should note that your last bt is very odd. 
I've never seen such senseless backtraces before =)


Previous Comments:


[2005-01-18 14:05:03] Volker dot Weinberger at pharma dot novartis dot
com

I've managed to get --enable-debug compiled in with a recent CVS
version of PHP: php5-200501180930 .  The same error still occurs.

Following instructions for a gdb backtrace I get:

 gdb ./php ./core
GNU gdb 5.0
...
(gdb) bt
#0  0x34e204 in ZEND_RETURN_SPEC_CV_HANDLER ()
#1  0x31946c in execute ()
#2  0x319948 in zend_do_fcall_common_helper_SPEC ()
#3  0x319d84 in ZEND_DO_FCALL_BY_NAME_SPEC_HANDLER ()
#4  0x31946c in execute ()
#5  0x319948 in zend_do_fcall_common_helper_SPEC ()
#6  0x319d84 in ZEND_DO_FCALL_BY_NAME_SPEC_HANDLER ()
#7  0x31946c in execute ()
#8  0x319948 in zend_do_fcall_common_helper_SPEC ()
#9  0x319d84 in ZEND_DO_FCALL_BY_NAME_SPEC_HANDLER ()
#10 0x31946c in execute ()
#11 0x2db78c in zend_execute_scripts ()
#12 0x265050 in php_execute_script ()
#13 0x370018 in main ()
(gdb) frame 1
#1  0x31946c in execute ()
(gdb) print (char
*)(executor_globals.function_state_ptr->function)->common.function_name
Attempt to extract a component of a value that is not a structure.
(gdb) 

Since PHP wasn't compiled with GCC, but with Solaris CC, using GDB
might not give the expected result.

Using SUN dbx instead:
dbx ./php ./cor
...
detected a multithreaded program
[EMAIL PROTECTED] ([EMAIL PROTECTED]) terminated by signal BUS (invalid address 
alignment)
Current function is ZEND_RETURN_SPEC_CV_HANDLER (optimized)
17699   || (opline->extended_value ==
ZEND_RETURNS_FUNCTION &&
!EX_T(opline->op1.u.var).var.fcall_returned_reference)) {

(/opt/SUNWspro/bin/../WS6U2/bin/sparcv9/dbx) where
current thread: [EMAIL PROTECTED]
=>[1] ZEND_RETURN_SPEC_CV_HANDLER(execute_data = ???) (optimized), at
0x34e204 (line ~17699) in "zend_vm_execute.h"
  [2] execute(op_array = ???) (optimized), at 0x319464 (line ~78) in
"zend_vm_execute.h"
  [3] zend_do_fcall_common_helper_SPEC(execute_data = ???) (optimized),
at 0x319940 (line ~204) in "zend_vm_execute.h"
  [4] ZEND_DO_FCALL_BY_NAME_SPEC_HANDLER(execute_data = ???)
(optimized), at 0x319d7c (line ~288) in "zend_vm_execute.h"
  [5] execute(op_array = ???) (optimized), at 0x319464 (line ~78) in
"zend_vm_execute.h"
  [6] zend_do_fcall_common_helper_SPEC(execute_data = ???) (optimized),
at 0x319940 (line ~204) in "zend_vm_execute.h"
  [7] ZEND_DO_FCALL_BY_NAME_SPEC_HANDLER(execute_data = ???)
(optimized), at 0x319d7c (line ~288) in "zend_vm_execute.h"
  [8] execute(op_array = ???) (optimized), at 0x319464 (line ~78) in
"zend_vm_execute.h"
  [9] zend_do_fcall_common_helper_SPEC(execute_data = ???) (optimized),
at 0x319940 (line ~204) in "zend_vm_execute.h"
  [10] ZEND_DO_FCALL_BY_NAME_SPEC_HANDLER(execute_data = ???)
(optimized), at 0x319d7c (line ~288) in "zend_vm_execute.h"
  [11] execute(op_array = ???) (optimized), at 0x319464 (line ~78) in
"zend_vm_execute.h"
  [12] zend_execute_scripts(type = ???, retval = ???, file_count = ???,
...) (optimized), at 0x2db784 (line ~1058) in "zend.c"
  [13] php_execute_script(primary_file = ???) (optimized), at 0x265048
(line ~1636) in "main.c"
  [14] main(argc = ???, argv = ???) (optimized), at 0x370010 (line
~944) in "php_cli.c"

>frame 2
Current function is execute (optimized)
   78   if (EX(opline)->handler(&execute_data
TSRMLS_CC) > 0) {

(char *)
executor_globals.function_state_ptr->function->common.function_name =
0xac55c0 "raiseError"



[2004-08-27 15:47:28] Volker dot Weinberger at pharma dot novartis dot
com

Backtrace attempt:

unfortunately I'm not able to compile with --enable-debug (filed as a
separate bug report).

Backtrace info without --enable-debug:

(gdb) bt
#0  0x7edbe1ac in kpughndl0 ()from
/u01/home/oracle/product/9.2.0/lib32/libclntsh.so.9.0
#1  0xbcd5c in _oci_close_session ()
#2  0x2597ec in list_entry_destructor ()
#3  0x256fc4 in zend_hash_del_key_or_index ()
#4  0x259480 in _zend_list_delete ()
#5  0xb8ea0 in _oci_conn_list_dtor ()
#6  0x2597ec in list_entry_destructor ()
#7  0x2572a4 in zend_hash_apply_deleter ()
#8  0x25746c in zend_hash_graceful_reverse_destroy ()
#9  0x23d1cc in shutdown_executor ()
#10 0x24ec38 in zend_deactivate ()
#11 0x1eda8c in php_request_shutdown ()
#12 0x28a984 in main ()


(gdb) frame 2
#2  0x2597ec in list_entry_destructor ()
function)->common.function_name   
 
Attempt to extract a

#28141 [Bgs]: socket_read return type: false vs "", when PHP_NORMAL_READ

2005-02-14 Thread php at richardneill dot org
 ID:   28141
 User updated by:  php at richardneill dot org
 Reported By:  php at richardneill dot org
 Status:   Bogus
 Bug Type: Sockets related
 Operating System: Linux
 PHP Version:  4CVS, 5CVS (2005-02-14)
 Assigned To:  andrey
 New Comment:

Thanks. That makes sense. However, it still leaves a few problems,
essentially with wrong documentation.

---
1)The documentation for socket_read 
http://uk.php.net/manual/en/function.socket-read.php
claims:

"Note:  socket_read() may return a zero length string ("") indicating
the end of communication (i.e. the remote end point has closed the
connection)."

which is obviously not true.
-

2)Example 1 on the sockets page
http://uk.php.net/manual/en/ref.sockets.php
also supports the interpretation that 
False => error; null => connection closed

   if (false === ($buf = socket_read($msgsock, 2048,
PHP_NORMAL_READ))) {
   echo "socket_read() failed: reason: " .
socket_strerror($ret) . "\n";
   break 2;
   }
   if (!$buf = trim($buf)) {
   continue;
   }


--

3)How is one to determine the difference between 
 i)the other side closing the connection normally
and 
 ii)something going very wrong with the function?

According to the documentation, 

   ""   => (i)
  false =>  (ii)

In fact, it seems that 

  false  => (i) or (ii), with no way to tell
  "" =>  never actually happens
  

Thanks for your help,

Richard


Previous Comments:


[2005-02-14 09:10:12] [EMAIL PROTECTED]

There is no bug to fix here. You're actually getting "Connection reset
by peer" (ECONNRESET) and that makes recv() to return -1 -> PHP
socket_read() returns an error and FALSE.

Here's simplified WORKING script:

#!/usr/local/bin/php





[2004-07-28 21:04:13] [EMAIL PROTECTED]

Assigning to myself (to get notification if i forget), changing the
version.



[2004-07-26 10:37:34] php at hristov dot com

I will take a look later today or these days.  But for now, the code in
the function is :
if (type == PHP_NORMAL_READ) {
   retval = php_read(php_sock->bsd_socket, tmpbuf, length, 0);
} else {
  retval = recv(php_sock->bsd_socket, tmpbuf, length, 0);
}

if (retval == -1) {
  PHP_SOCKET_ERROR(php_sock, "unable to read from socket", errno);
  efree(tmpbuf);
  RETURN_FALSE;
}



[2004-07-18 17:13:56] php2 at richardneill dot org

I've still got the same thing happening in PHP5.0.0(final)

I'm having some trouble with your example, so I'm using the attached
instead. It's basically copied from the php-sockets manual, but
slightly modified.

The key point: according to the documentation, when
(socket_read()===false), it means something has gone very wrong, i.e. 
a fatal error. However, in practice, all this means is that the other
side has closed the connection.

I'm running this code as ./testsock.php
and the client is simply: netcat localhost 
The problem is that, if netcat is killed with Ctrl-C, then the server
suffers a fatal error. I don't think that it should.

I've tried it under both version  php-cli-4.3.7-4mdk (the current devel
version from Mandrake cooker) and php-5.0.0-cli which I just compiled.
In both cases, the same thing happens.

Regards

Richard

-
#!/usr/local/bin/php




[2004-07-18 14:29:51] [EMAIL PROTECTED]

I cannot reproduce the problem with latest PHP5. Can you provide a
*full* reproducing case.
My scripts are :
server:

client:





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

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


#31965 [NEW]: PREG_SPLIT_NO_EMPTY strips non-empty pieces in some cases

2005-02-14 Thread mikael at SPAMMENOTchl dot chalmers dot se
From: mikael at SPAMMENOTchl dot chalmers dot se
Operating system: Linux
PHP version:  4.3.8
PHP Bug Type: *Regular Expressions
Bug description:  PREG_SPLIT_NO_EMPTY strips non-empty pieces in some cases

Description:

In some cases the preg_split strips non-empty pieces when the
PREG_SPLIT_NO_EMPTY flag i set. Specifically when using assertions only to
split on, eg. the string to split on itself is actually empty (but not the
pieces)

Reproduce code:
---
$terms = preg_split('/(?<=\d)(?=[a-zåäö])/', 'ser1ia456l', 0,
PREG_SPLIT_NO_EMPTY);
print_r($terms);


Expected result:

Array
(
[0] => ser1
[1] => ia456
[2] => l
)

Actual result:
--
Array
(
[0] => ser1
[1] => ia456
)

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


#31971 [Opn]: ftp_login fails on messsage from FTP+SSL server (234 Enabling SSL)

2005-02-14 Thread frantisek at augusztin dot com
 ID:   31971
 User updated by:  frantisek at augusztin dot com
 Reported By:  frantisek at augusztin dot com
 Status:   Open
 Bug Type: FTP related
 Operating System: Linux (Fedora Core 3)
 PHP Version:  5.0.3
 New Comment:

After examining (and debuging PHP code) i found out, that the ftp_login
function exits after getting the response for PBSZ command (from
ext/ftp/ftp.c, lines 305-313) :

   if (!ftp->old_ssl) {

/* set protection buffersize to zero */
if (!ftp_putcmd(ftp, "PBSZ", "0")) {
return 0;
}
if (!ftp_getresp(ftp)) {
return 0; /* <<< here it exits
}

Why ? What can i do to make it work ? As i said, using regular FTP+SSL
client it works.


Previous Comments:


[2005-02-14 16:19:47] frantisek at augusztin dot com

Description:

PHP returns following error when connecting using example code:
Warning: ftp_login() : Enabling SSL in /var/www/html/test.php on line
3

Using FTP client the following messages are displayed in the log window
of the client :

*** Connecting to 'XXX.XXX.XXX.XXX:21'...
220 Service Ready for new User
AUTH TLS
234 Enabling SSL

FTP clearly fails on this messsage. But i don't understand why, because
i found in source code, that 234 is not an error, but a valid result
code for this operation.
FTP System type is "215 NETWARE  Type : L8"

Reproduce code:
---


Expected result:

No warning message and successfull connection to FTP server.

Actual result:
--
Warning: ftp_login() : Enabling SSL in /var/www/html/test.php on line 3





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


#31088 [Opn->Bgs]: exec fails for command that works ate the command line

2005-02-14 Thread tony2001
 ID:   31088
 Updated by:   [EMAIL PROTECTED]
 Reported By:  vdlaag at natlab dot research dot philips dot com
-Status:   Open
+Status:   Bogus
 Bug Type: Program Execution
 Operating System: RedHat 9.0
 PHP Version:  5.0.2
 New Comment:

Bogusified on user request.


Previous Comments:


[2005-02-14 14:52:42] vdlaag at natlab dot research dot philips dot com

I am afraid this was a bogus bug report. As Safe mode isa enabled,
every shell command is escaped. I found this later on in the
documentation. Although I find this a bit peculiar, it works as
designed. My problem occurs because the command is escaped. 

I already solved by creating another shell script, that executes the
createRequest call. I call exec on this other shell script. Then it
works fine. 

I am sorry to have troubled you with this. It turned out to be my own
error and not a bug in PHP.



[2005-02-11 23:03:47] [EMAIL PROTECTED]

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

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

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

Please provide a reproduce code that we could run & replicate the
problem.



[2004-12-14 14:32:47] vdlaag at natlab dot research dot philips dot com

Description:

I have a command line tool that adds records to a database. This is the
only way for me to access this database. 

The command line tool works as follows:
  createRequest -p -i "value1" -l "value2" etc
Each option is followed by the value for the record.
The -p option is there so that the ID of the new inserted record is
returned to standard output.

At the command line this works fine. But as soon as a value contains a
& the exec function fails. When a value contains parentheses, they are
escaped (so that the escape characters are inserted in the database as
well).

The configure script for php:
'./configure' '--prefix=/usr/local/php5' '--enable-safe-mode'
'--with-apxs2=/usr/local/httpd/bin/apxs' '--with-gd'
'--with-mssql=/usr/local/freetds' '--with-pgsql=/usr/local/pgsql'
'--with-mysql=/usr/local/mysql' '--with-ldap=/usr/local/openldap'
'--with-png-dir=/usr/local/libpng' '--with-zlib-dir=/usr/local/zlib'
'--with-jpeg-dir=/usr/local/jpeg'
'--with-freetype-dir=/usr/local/freetype/include/freetype2/freetype'
'--with-curl=/usr/local/curl' '--with-mime-magic=/usr/share/magic.mime'
'--with-xslt-sablot=/usr/local/Sablot'
'--with-expat-dir=/usr/local/expat'
'--with-libxml-dir=/usr/local/libxml' '--with-pear' 

I added the folder that holds the cretaeRequest tool to
safe_mode_exec_dir in php.ini

Reproduce code:
---
//These options go OK
$Options['-i'] = "Add user to group X";
$Options['-l'] = "vdlaag";

//This option makes the exec command fail
$Options['-O] = "IP&S";

//This option results in extra slashes 
// it yields: Great stuff \(is it not\)
$Options['-a'] = "Great stuff (is it not)"

$Exec = $_SERVER['DOCUMENT_ROOT'] . 
"/vdlaag/NewUserForm/IPS/createRequest -p";
foreach ($Options as $option => $value)
{
$Exec .= " " . $option . " '" . $value . "'";
}
$HDTCase = exec($Exec); 



Expected result:

I expect to get a number back from the exec command. This happens OK if
there are no "weird" charachters in any of the values (like &). 

Actual result:
--
It returns nothing and the rest of my script fails as a result.





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


#31538 [Com]: MySQLi disconnects after termination of child in master

2005-02-14 Thread peter at netkey dot at
 ID:   31538
 Comment by:   peter at netkey dot at
 Reported By:  rudy dot metzger at xs4all dot nl
 Status:   Open
 Bug Type: MySQLi related
 Operating System: Fedora Core 3
 PHP Version:  5.0.3
 New Comment:

You need a seperate connection for each child, or MySQL will get
confused. 
See http://dev.mysql.com/doc/mysql/en/gone-away.html the comment from
Christophe C.

HTH


Previous Comments:


[2005-01-13 15:45:20] rudy dot metzger at xs4all dot nl

Used DB versions

MySQL-devel-4.1.7-0
MySQL-shared-4.1.7-0
MySQL-server-4.1.7-0
MySQL-client-4.1.7-0



[2005-01-13 15:42:01] rudy dot metzger at xs4all dot nl

Description:

When connecting to a database, then forking off a new child, the
database connection will be terminated (disconnected) when the child
exits.

I have the feeling that at the "cleanup" of the child process the
database connection is closed. This should not be the case because the
master process might still use it.

This is not the case with the mysql extension, only with mysqli. With
the mysql extension, you might be required to give the optional
parameter "open new session" on the connect. at least this is what I
did.

Reproduce code:
---
 0 ) {
if ( !pcntl_wifexited($status) )
  echo "Collected killed pid $pid\n";
else
  echo "Collected pid $pid\n";
  }
}

declare(ticks=1);
pcntl_signal( SIGCHLD, 'SigChild' );

$res = mysqli_connect('localhost','zpc','zpc');
ping_db($res,'after connect');

$pid = pcntl_fork();
ping_db($res,'right after fork');

if ( !$pid ) {  // --- the slave
  echo "child sleep\n";
  sleep(5);
  echo "child exiting\n";
  exit(0);
}

ping_db($res,'after fork');

echo "master sleep\n";
sleep(10);
ping_db($res,'after sleep');

while ( ($pid=pcntl_wait($status)) > 0 ) {
  if ( !pcntl_wifexited($status) )
echo "Collected killed pid $pid\n";
 else
echo "Collected pid $pid\n";
}

mysqli_close( $res );

?>


Expected result:

The database connection in the master should not have terminated.

Actual result:
--
6311 after connect: still alive
6313 right after fork: still alive
child sleep
6311 right after fork: still alive
6311 after fork: still alive
master sleep
child exiting
Collected pid 6313
6311 after sleep: died

In the last line you can see that the connection died (6311 is master,
6313 is child)





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


#29956 [Fbk->Opn]: support for s390 architecture in aclocal.m4 and configure script

2005-02-14 Thread mark dot post at eds dot com
 ID:   29956
 User updated by:  mark dot post at eds dot com
 Reported By:  mark dot post at eds dot com
-Status:   Feedback
+Status:   Open
 Bug Type: Compile Failure
 Operating System: Linux
 PHP Version:  5.0.0
 New Comment:

Ok, I did that.  The current CVS snapshot still has the same problem,
because the patch I provided has not been applied.

Was there some reason you wanted me to try this when nothing had been
changed?

Mark Post


Previous Comments:


[2005-02-10 19:57:33] [EMAIL PROTECTED]

Please try using this CVS snapshot:

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





[2004-09-02 18:47:30] mark dot post at eds dot com

Description:

For some time now, I've been having problems with building PHP on
Linux/390.  The Apache module would not build because libtool was
having problems.  I finally tracked the problem down to the aclocal.m4
file (and the resulting configure script).

The following patch should be applied to PHP 5.0.0 (and later versions)
to enable correct building on Linux/390.

--- aclocal.m4.orig 2004-07-13 15:13:14.0 -0400
+++ aclocal.m4  2004-09-02 12:44:12.0 -0400
@@ -5315,7 +5315,7 @@
 # This must be Linux ELF.
 linux-gnu*)
   case $host_cpu in
-  alpha* | hppa* | i*86 | mips | mipsel | powerpc* | sparc* | ia64*)
+  alpha* | hppa* | i*86 | mips | mipsel | powerpc* | sparc* | ia64* |
s390*)
 lt_cv_deplibs_check_method=pass_all ;;
   *)
 # glibc up to 2.1.1 does not perform some relocations on ARM









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


#31970 [Opn->Bgs]: serialized object can't be unserialized

2005-02-14 Thread marie_bw at web dot de
 ID:   31970
 User updated by:  marie_bw at web dot de
 Reported By:  marie_bw at web dot de
-Status:   Open
+Status:   Bogus
 Bug Type: *Programming Data Structures
 Operating System: Linux (Gentoo)
 PHP Version:  4.3.10
 New Comment:

After heavy investigation I suspect that
the problems originate from the Adodb mysql
driver which is bundled with Phpopenchat and
another problem in this application.

Escape characters are erroneously stripped
from already serialized strings in two
different places (one of them in the 
approvement cycle of moderated chat channels)

It basically can be circumvented by disabling
"magic_quotes_gpc" but only by chance.

I reset the status of this report to "bogus"
as this might not touch PHP in any way.


Previous Comments:


[2005-02-14 14:39:45] marie_bw at web dot de

Description:

On complex objects the serialize() function produced
output in which string members of an object would be
stored together with a wrong string size, e.g. the
string length ist 60 bytes but serialize() notes only 58.

The data can't be processed by unserialize().

This would only happen if characters like single or
double quote were present in the string (this string
came from HTTP_POST_VAR). But also a substitution
of quotation character by '"' or 'x' would not
bother serialize() to produce the right output.

This is not reproducible with small objects. The
objects in question where rather complex and came
from the application "phpopenchat".







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


#31970 [Bgs]: serialized object can't be unserialized

2005-02-14 Thread helly
 ID:   31970
 Updated by:   [EMAIL PROTECTED]
 Reported By:  marie_bw at web dot de
 Status:   Bogus
 Bug Type: *Programming Data Structures
-Operating System: Linux (Gentoo)
+Operating System: *
 PHP Version:  4.3.10
 New Comment:

In version prior to 4.3.10 there was such an error. So if the input is
from such a version the problem is solved now. Unless you have a
reproducing script that generates serialized data that cannot be
unserialized using current version this report should stay bogus.


Previous Comments:


[2005-02-14 18:51:16] marie_bw at web dot de

After heavy investigation I suspect that
the problems originate from the Adodb mysql
driver which is bundled with Phpopenchat and
another problem in this application.

Escape characters are erroneously stripped
from already serialized strings in two
different places (one of them in the 
approvement cycle of moderated chat channels)

It basically can be circumvented by disabling
"magic_quotes_gpc" but only by chance.

I reset the status of this report to "bogus"
as this might not touch PHP in any way.



[2005-02-14 14:39:45] marie_bw at web dot de

Description:

On complex objects the serialize() function produced
output in which string members of an object would be
stored together with a wrong string size, e.g. the
string length ist 60 bytes but serialize() notes only 58.

The data can't be processed by unserialize().

This would only happen if characters like single or
double quote were present in the string (this string
came from HTTP_POST_VAR). But also a substitution
of quotation character by '"' or 'x' would not
bother serialize() to produce the right output.

This is not reproducible with small objects. The
objects in question where rather complex and came
from the application "phpopenchat".







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


#31678 [Opn->Fbk]: ODBC Connection fails on Multiprocessor System

2005-02-14 Thread wez
 ID:   31678
 Updated by:   [EMAIL PROTECTED]
 Reported By:  zipf dot mailcom at boewe-systec dot nospam dot de
-Status:   Open
+Status:   Feedback
 Bug Type: ODBC related
 Operating System: Windows 2000
 PHP Version:  4CVS, 5CVS (2005-02-05)
 New Comment:

Please try using this CVS snapshot:

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

You could try the new database stuff in PHP 5.

http://snaps.php.net/win32/PECL_5_0/php_pdo.dll
http://snaps.php.net/win32/PECL_5_0/php_pdo_odbc.dll

Documentation at: http://www.php.net/pdo

PDO is to be bundled with the PHP 5.1 release; it's currently in beta,
and has proven to be quite stable so far.
I'd really appreciate your feedback to see if PDO has the same issues
that you've found with the older ODBC extension.

If you decide to try PDO and run into problems, ask for help on
[EMAIL PROTECTED]; we're currently in aggressive beta/QA mode and
aim to turnaround bug fixes next-day if possible.



Previous Comments:


[2005-02-14 15:33:09] zipf dot mailcom at boewe-systec dot nospam dot
de

Is anybody looking into this problem?
Anything else I could test?



[2005-02-04 10:26:54] zipf dot mailcom at boewe-systec dot nospam dot
de

Ok we tested today with this development snapshot. it took a very long
time to get that error but it still occured. 
But this time apache didn´t respond at all after the crash. usually
apache was still serving requests, but this time there was no answer
anymore. We tested with IIS as well and it is the same behavior, so
this isn´t just apache related.

testing a dbcheck php page with commandline still works after the
crash.



[2005-02-03 05:17:52] [EMAIL PROTECTED]

Please try using this CVS snapshot:

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

And I ask again:
Does this work on command line? (using PHP CLI binary..)

Using PHP CLI binary means the executably file (is it php.exe or
php-cli.exe in windows?) found in PHP distros..

Get the snapshot first.




[2005-01-28 15:13:52] zipf dot mailcom at boewe-systec dot nospam dot
de

what do you mean with commandline?

you mean after a db-problem check if a commandline connect to the db
still works with php or what?

I will test it next time we get that error. but it needs a couple of
simultanous requests to produce that error so i need a bunch of peple
to test it.



[2005-01-26 05:33:57] [EMAIL PROTECTED]

Does it work on command line? (using PHP CLI binary..)




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

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


#31974 [NEW]: func_get_args() does not work when variables have "_" in the middle of the name

2005-02-14 Thread pinhinha at gmail dot com
From: pinhinha at gmail dot com
Operating system: LINUX
PHP version:  5.0.3
PHP Bug Type: *Programming Data Structures
Bug description:  func_get_args() does not work when variables have "_" in the 
middle of the name

Description:

Builds an associative array using value of previous defined vars.
It works on PHP 4.0.10
It doens't work on PHP 5.0.3

If the var names don't have "_" (underscore) in the name it works on PHP4
AND PHP5.

Reproduce code:
---
function do_array() {
  $new_array=array(); 
  foreach (func_get_args() as $var) { 
  if (isset($GLOBALS[$var]))
$new_array[$var]=$GLOBALS[$var];
  else exit("Error: var '$var' is not set.");
  } 
  return $new_array;
} 
$domain_name = "php.net";
$visit_date = date("Y-m-d");
$array = do_array("domain_name", "visit_date");

Expected result:

$array = ("domain_name" => "php.net",
  "visit_date" => "2005-02-14"
);

Actual result:
--
Error: var 'domain_name' is not set.

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


#28029 [Com]: HTTP request failed!

2005-02-14 Thread maxim at enelis dot ru
 ID:   28029
 Comment by:   maxim at enelis dot ru
 Reported By:  coadmin at hostings dot pl
 Status:   No Feedback
 Bug Type: URL related
 Operating System: FreeBSD 4.9 and 5.2.1
 PHP Version:  4CVS-2004-04-16 (stable)
 New Comment:

Have the same problem on FreeBSD 5.3 Release. + Apache 2.0.48 or 2.0.52
 + PHP 4.3.8 + 4.3.9 + 4.3.10

--enable-debug doesn't solve the problem. Using --disable-all can't be
done because this is a production host. It worked without any problems
until last days. And right now fopen http doesnt work at all.

Have tested the same on FreeBSD 4.9 + Apache 2.0.48 + PHP 4.3.10. Works
correct with no problems.

The server where we catch this bug hosts about  500 virtualhosts. 

code:

http://ya.ru","r";);
fpassthru($r);
fclose($r);
?>

--
error:

Warning: fopen(http://ya.ru/): failed to open stream: HTTP request
failed! in /home/test/www/test2.php on line 6
--

Sometimes after "HTTP request failed!" there are some unreadable chars
as "".


Previous Comments:


[2004-11-10 01:00:08] 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".



[2004-11-02 10:41:52] [EMAIL PROTECTED]

Please try using this CVS snapshot:

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

If using fsockopen and friends on servers with large numbers of error
logs configured and seeing memory corruption bugs or otherwise, then
that's bug 24189 - select vs FD_SETSIZE issues.

This is fixed for future 5.0.x releases (all praise Wez!), so try a
5.0.x snapshot.  Bugs in Fedora Core or RHEL PHP packages should be
reported to https://bugzilla.redhat.com/bugzilla/.




[2004-11-01 15:51:16] tongsam at 126 dot com

I'v this problem too, on apache started a few hours, the logs:

kernel: pid 65604 (httpd), uid 1011: exited on signal 11

Freebsd 4.9 + Apache 2.0.52 + php 4.3.9



[2004-10-08 01:02:52] joseph at digiweb dot net dot nz

Apache 2.0.46
PHP 4.3.2
Redhat Enterprise 3.0

We were seeing very similar behaviour to this with fopen, getimagesize,
etc, however, we were not experiencing any segfaults.

What we found was that first, the number of VirtualHosts we had defined
would affect the behaviour of this bug: If we had more than 502
virtualhosts, the fopen HTTP requests would fail, if we had 502 or
less, they would work correctly.

We thought it might have something to do with the number of open file
handles, but as far as we could tell, we were well clear of these
limits.

Then (basically by accident) we worked out that if we had each
VirtualHost use the same, global "ErrorLog" file, the problem went
away, as opposed to the situation before when we had seperate error
logs for each virtualhost.

We also had another test box, running Fedora Core 2, Apache 2.0.51, and
PHP 5.02, on which we were unable to reproduce the problem.

I hope this might possibly shed some light on things.



[2004-09-02 00:02:10] maximander at gmail dot com

this has been happening to my site too.
the following code errors, as does almost any use of
file(),fopen(),file_get_contents() or readfile() on remote files.
fsockopen seems to work for now though.

http://gerpok.darkflux.com/write.php";);
if(strpos($file[0],"you don't")) { echo "not updated";}
?>

and, whats more, after a recompile with --enable-debug, it is still
error'ing. anything useful we can do with a debug build that errors on
a regular basis?



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

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


#31910 [Com]: A special string containing "E" causes an Unhandled Exception

2005-02-14 Thread plyrvt at mail dot ru
 ID:   31910
 Comment by:   plyrvt at mail dot ru
 Reported By:  jakub at icewarp dot com
 Status:   Open
 Bug Type: Scripting Engine problem
 Operating System: win32 / ISAPI
 PHP Version:  4CVS-2005-02-10
 New Comment:

"PHP has encountered an Unhandled Exception Code %d at %p"
it's a part of php4isapi.dll file, but I cannot reproduce this bug
neither under 4.3.8 nor 4.3.9 nor 5.0.2 (winxp-sp1-iis5.1)


Previous Comments:


[2005-02-14 18:44:45] jakub at icewarp dot com

Any news on the issue?



[2005-02-11 10:13:33] jakub at icewarp dot com

I did some more tests and it is true I could not reproduce it in
command line using php.exe (CGI). It is a subject of the ISAPI
interface only then. Did you test ISAPI?



[2005-02-11 03:40:37] [EMAIL PROTECTED]

And I can not reproduce this with Apache2 SAPI either..
So please tell me HOW to reproduce this?




[2005-02-11 03:35:20] [EMAIL PROTECTED]

I can _not_ reproduce this with the latest CVS snapshot build for win32
either. (still using CLI)





[2005-02-11 03:31:51] [EMAIL PROTECTED]

I can _not_ reproduce this on windows using Debug build of CLI binary.




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

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


#31910 [Com]: A special string containing "E" causes an Unhandled Exception

2005-02-14 Thread plyrvt at mail dot ru
 ID:   31910
 Comment by:   plyrvt at mail dot ru
 Reported By:  jakub at icewarp dot com
 Status:   Open
 Bug Type: Scripting Engine problem
 Operating System: win32 / ISAPI
 PHP Version:  4CVS-2005-02-10
 New Comment:

Maybe this is related somehow to 
4.3.10 Changelog: "Added the %F modifier to *printf to render a
non-locale-aware representation of a float with the . as decimal
separator."
and is locale-dependent?


Previous Comments:


[2005-02-14 21:17:17] plyrvt at mail dot ru

"PHP has encountered an Unhandled Exception Code %d at %p"
it's a part of php4isapi.dll file, but I cannot reproduce this bug
neither under 4.3.8 nor 4.3.9 nor 5.0.2 (winxp-sp1-iis5.1)



[2005-02-14 18:44:45] jakub at icewarp dot com

Any news on the issue?



[2005-02-11 10:13:33] jakub at icewarp dot com

I did some more tests and it is true I could not reproduce it in
command line using php.exe (CGI). It is a subject of the ISAPI
interface only then. Did you test ISAPI?



[2005-02-11 03:40:37] [EMAIL PROTECTED]

And I can not reproduce this with Apache2 SAPI either..
So please tell me HOW to reproduce this?




[2005-02-11 03:35:20] [EMAIL PROTECTED]

I can _not_ reproduce this with the latest CVS snapshot build for win32
either. (still using CLI)





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

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


#31966 [Opn->Csd]: SSL:// wrapper does not obey NON_BLOCKING mode.

2005-02-14 Thread wez
 ID:   31966
 Updated by:   [EMAIL PROTECTED]
 Reported By:  james-php at bytehosting dot com
-Status:   Open
+Status:   Closed
 Bug Type: *Network Functions
 Operating System: linux
 PHP Version:  4.3.10
 New Comment:

Should already be fixed in PHP 5.1.
While it could be ported back to PHP 5.0 without much effort (if I
haven't already merged it), back-porting to PHP 4.3 will be a bit more
difficult.
I don't have plans to do that at this time.


Previous Comments:


[2005-02-14 11:23:42] james-php at bytehosting dot com

Too late of night, the previous comment was ment to say (I made an
error when submitting the bug). I do have it properly set as
stream_set_blocking($fd,FALSE); and the problem still exists. The code
sample submitted was wrong, the bug applies when you actully use the
proper function names. Thats what I get when re-typing the code out in
the form, instead of pasting it.

~james



[2005-02-14 11:20:23] james-php at bytehosting dot com

opps -- stream_set_blocking()

~james



[2005-02-14 11:15:36] james-php at bytehosting dot com

Description:

When php is compiled against openssl. If you use a non_blocking stream
PHP does not obet the non_blocking options. If you REMOVE the ssl://
and connect to a non-secure port, and it works perfectly fine.


OpenSSL 0.9.7e

PHP 4.3.10 (cgi-fcgi) (built: Dec 27 2004 04:01:15)
Copyright (c) 1997-2004 The PHP Group
Zend Engine v1.3.0, Copyright (c) 1998-2004 Zend Technologies
Kernel: 2.4.22-36mdkenterprise
Mandrake Linux release 9.2 (FiveStar) for i586

Dual xeon + hyperthreading:
model name  : Intel(R) Xeon(TM) CPU 2.40GHz
stepping: 9
cpu MHz : 2389.117
cache size  : 512 KB


./configure  --enable-fastcgi --with-mysql --enable-aspell --enable-ftp
--enable-xml --enable-trans-sid --enable-curl \
--enable-force-cgi-redirect --with-gd --with-zlib-dir
--with-curl=/usr/include/curl --with-openssl \
--with-openssl-dir=/usr/compile/openssl-0.9.7e


Reproduce code:
---


Expected result:

Socket to be non-blocked, and return immediately.






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


#31910 [Opn]: A special string containing "E" causes an Unhandled Exception

2005-02-14 Thread jakub at icewarp dot com
 ID:   31910
 User updated by:  jakub at icewarp dot com
 Reported By:  jakub at icewarp dot com
 Status:   Open
 Bug Type: Scripting Engine problem
 Operating System: win32 / ISAPI
 PHP Version:  4CVS-2005-02-10
 New Comment:

Any news on the issue?


Previous Comments:


[2005-02-11 10:13:33] jakub at icewarp dot com

I did some more tests and it is true I could not reproduce it in
command line using php.exe (CGI). It is a subject of the ISAPI
interface only then. Did you test ISAPI?



[2005-02-11 03:40:37] [EMAIL PROTECTED]

And I can not reproduce this with Apache2 SAPI either..
So please tell me HOW to reproduce this?




[2005-02-11 03:35:20] [EMAIL PROTECTED]

I can _not_ reproduce this with the latest CVS snapshot build for win32
either. (still using CLI)





[2005-02-11 03:31:51] [EMAIL PROTECTED]

I can _not_ reproduce this on windows using Debug build of CLI binary.




[2005-02-10 15:04:56] [EMAIL PROTECTED]

Updated OS field to be correct. Works fine on *nix.




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

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


#29956 [Opn->Asn]: support for s390 architecture in aclocal.m4 and configure script

2005-02-14 Thread sniper
 ID:   29956
 Updated by:   [EMAIL PROTECTED]
 Reported By:  mark dot post at eds dot com
-Status:   Open
+Status:   Assigned
 Bug Type: Compile Failure
 Operating System: Linux
 PHP Version:  5.0.0
-Assigned To:  
+Assigned To:  sniper
 New Comment:

I have some patches to commit for libtool which fix this one too.



Previous Comments:


[2005-02-14 19:09:49] mark dot post at eds dot com

Ok, I did that.  The current CVS snapshot still has the same problem,
because the patch I provided has not been applied.

Was there some reason you wanted me to try this when nothing had been
changed?

Mark Post



[2005-02-10 19:57:33] [EMAIL PROTECTED]

Please try using this CVS snapshot:

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





[2004-09-02 18:47:30] mark dot post at eds dot com

Description:

For some time now, I've been having problems with building PHP on
Linux/390.  The Apache module would not build because libtool was
having problems.  I finally tracked the problem down to the aclocal.m4
file (and the resulting configure script).

The following patch should be applied to PHP 5.0.0 (and later versions)
to enable correct building on Linux/390.

--- aclocal.m4.orig 2004-07-13 15:13:14.0 -0400
+++ aclocal.m4  2004-09-02 12:44:12.0 -0400
@@ -5315,7 +5315,7 @@
 # This must be Linux ELF.
 linux-gnu*)
   case $host_cpu in
-  alpha* | hppa* | i*86 | mips | mipsel | powerpc* | sparc* | ia64*)
+  alpha* | hppa* | i*86 | mips | mipsel | powerpc* | sparc* | ia64* |
s390*)
 lt_cv_deplibs_check_method=pass_all ;;
   *)
 # glibc up to 2.1.1 does not perform some relocations on ARM









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


#31972 [Opn->Bgs]: Problem when I compile modperl

2005-02-14 Thread derick
 ID:   31972
 Updated by:   [EMAIL PROTECTED]
 Reported By:  thiago at kionux dot com dot br
-Status:   Open
+Status:   Bogus
 Bug Type: *Compile Issues
 Operating System: Linux Debian
 PHP Version:  5.0.3
 New Comment:

Bug in mod_perl.


Previous Comments:


[2005-02-14 16:53:10] thiago at kionux dot com dot br

Description:

I compile php-5.0.3 whith imap support. Thats all is ok, but when I
compile the mod_perl reports this error.
 Error Output for sanity check 
cd ..; cc  -DLINUX=22 -DHAVE_SET_DUMPABLE -DMOD_PERL -DUSE_PERL_SSI
-D_REENTRANT
  -DTHREADS_HAVE_PIDS -DDEBIAN -fno-strict-aliasing
-I/usr/local/include -D_LARG
EFILE_SOURCE -D_FILE_OFFSET_BITS=64 -DMOD_PERL -DUSE_PERL_SSI
-D_REENTRANT  -DTH
READS_HAVE_PIDS -DDEBIAN -fno-strict-aliasing -I/usr/local/include
-D_LARGEFILE_
SOURCE -D_FILE_OFFSET_BITS=64 -DNO_DL_NEEDED -D_REENTRANT
-DTHREADS_HAVE_PIDS -D
DEBIAN -fno-strict-aliasing -I/usr/local/include -D_LARGEFILE_SOURCE
-D_FILE_OFF
SET_BITS=64 `./apaci` -I. -I/usr/lib/perl/5.8/CORE -I.
-I/usr/lib/perl/5.8/CORE
   -o helpers/dummy helpers/dummy.c   -Wl,-rpath,/usr/local/mysql/lib 
-rdynamic
 -rdynamic -L/usr/local/mysql/lib -Lmodules/php5 -L../modules/php5
-L../../modul
es/php5 -lmodphp5-rdynamic -rdynamic -L/usr/local/mysql/lib -lcrypt
 -lc-cli
ent  -lcrypt -lmm -lmysqlclient -lcrypt -lfreetype -lpng -lz -ljpeg -lz
-lresolv
 -lm -ldl -lnsl  -lxml2 -lz -lm -lxml2 -lz -lm -lgssapi_krb5 -lkrb5
-lk5crypto -
lcom_err -lxml2 -lz -lm -lcrypt -lxml2 -lz -lm -lcrypt   -lm -lcrypt
-Wl,-E  -L/
usr/local/lib /usr/lib/perl/5.8/auto/DynaLoader/DynaLoader.a
-L/usr/lib/perl/5.8
/CORE -ldl -lm -lpthread -lc -lcrypt  -Wl,-E  -L/usr/local/lib
/usr/lib/perl/5.8
/auto/DynaLoader/DynaLoader.a -L/usr/lib/perl/5.8/CORE -ldl -lm
-lpthread -lc -l
crypt
/usr/lib/gcc-lib/i486-linux/3.3.5/../../../libc-client.so: undefined
reference t
o `mm_expunged'
/usr/lib/gcc-lib/i486-linux/3.3.5/../../../libc-client.so: undefined
reference t
o `mm_diskerror'
/usr/lib/gcc-lib/i486-linux/3.3.5/../../../libc-client.so: undefined
reference t
o `mm_lsub'
/usr/lib/gcc-lib/i486-linux/3.3.5/../../../libc-client.so: undefined
reference t
o `mm_flags'
/usr/lib/gcc-lib/i486-linux/3.3.5/../../../libc-client.so: undefined
reference t
o `mm_fatal'
/usr/lib/gcc-lib/i486-linux/3.3.5/../../../libc-client.so: undefined
reference t
o `mm_nocritical'
/usr/lib/gcc-lib/i486-linux/3.3.5/../../../libc-client.so: undefined
reference t
o `mm_notify'
/usr/lib/gcc-lib/i486-linux/3.3.5/../../../libc-client.so: undefined
reference t
o `mm_searched'
/usr/lib/gcc-lib/i486-linux/3.3.5/../../../libc-client.so: undefined
reference t
o `mm_status'
/usr/lib/gcc-lib/i486-linux/3.3.5/../../../libc-client.so: undefined
reference t
o `mm_login'
/usr/lib/gcc-lib/i486-linux/3.3.5/../../../libc-client.so: undefined
reference t
o `mm_list'
/usr/lib/gcc-lib/i486-linux/3.3.5/../../../libc-client.so: undefined
reference t
o `mm_critical'
/usr/lib/gcc-lib/i486-linux/3.3.5/../../../libc-client.so: undefined
reference t
o `mm_exists'
/usr/lib/gcc-lib/i486-linux/3.3.5/../../../libc-client.so: undefined
reference t
o `mm_log'
/usr/lib/gcc-lib/i486-linux/3.3.5/../../../libc-client.so: undefined
reference t
o `mm_dlog'
collect2: ld returned 1 exit status
make: *** [dummy] Error 1







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


#31249 [Fbk->Opn]: bad type in zend_strtod.c

2005-02-14 Thread long+phpbugs at kestrel dot cc dot ku dot edu
 ID:   31249
 User updated by:  long+phpbugs at kestrel dot cc dot ku dot edu
 Reported By:  long+phpbugs at kestrel dot cc dot ku dot edu
-Status:   Feedback
+Status:   Open
 Bug Type: Compile Failure
 Operating System: Tru64 4.0F
 PHP Version:  4CVS-2004-12-22 (stable)
 Assigned To:  sniper
 New Comment:

I'm still getting similar errors.  I'm sending you an email containing
the info you've requested.


Previous Comments:


[2005-02-10 23:23:22] [EMAIL PROTECTED]

Please try using this CVS snapshot:

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

And it would help a lot if I could get an account on this machine and
test stuff myself..




[2005-01-24 18:12:13] long+phpbugs at kestrel dot cc dot ku dot edu

With php4-STABLE-200501241530 I now get:

cc  -IZend/ -I/homeb/long/src/php4-STABLE-200501241530/Zend/
-DPHP_ATOM_INC -I/homeb/long/src/php4-STABLE-200501241530/include
-I/homeb/long/src/php4-STABLE-200501241530/main
-I/homeb/long/src/php4-STABLE-200501241530
-I/homeb/long/src/php4-STABLE-200501241530/Zend
-I/homeb/long/src/php4-STABLE-200501241530/ext/xml/expat 
-I/homeb/long/src/php4-STABLE-200501241530/TSRM  -g  -c
/homeb/long/src/php4-STABLE-200501241530/Zend/zend_strtod.c -o
Zend/zend_strtod.o  && echo > Zend/zend_strtod.lo
cc: Error: /homeb/long/src/php4-STABLE-200501241530/Zend/zend_strtod.c,
line 492: In this declaration, "int32_t" must specify a type.
(badparsedecl)
Long x, y;
^
cc: Error: /homeb/long/src/php4-STABLE-200501241530/Zend/zend_strtod.c,
line 851: In this declaration, "int32_t" must specify a type.
(badparsedecl)
Long borrow, y; /* We need signed shifts here. */
^
cc: Error: /homeb/long/src/php4-STABLE-200501241530/Zend/zend_strtod.c,
line 854: In this declaration, "int32_t" must specify a type.
(badparsedecl)
Long z;
^
cc: Error: /homeb/long/src/php4-STABLE-200501241530/Zend/zend_strtod.c,
line 932: Missing ";". (nosemi)
register Long L;
--^
cc: Error: /homeb/long/src/php4-STABLE-200501241530/Zend/zend_strtod.c,
line 1247: In this declaration, "int32_t" must specify a type.
(badparsedecl)
Long L;
^
cc: Error: /homeb/long/src/php4-STABLE-200501241530/Zend/zend_strtod.c,
line 412: In this statement, "int32_t" is not declared. (undeclared)
rv = (Bigint *)MALLOC(sizeof(Bigint) +
(x-1)*sizeof(Long));
^
cc: Error: /homeb/long/src/php4-STABLE-200501241530/Zend/zend_strtod.c,
line 472: In this statement, "int32_t" is not declared. (undeclared)
Bcopy(b1, b);
^
cc: Error: /homeb/long/src/php4-STABLE-200501241530/Zend/zend_strtod.c,
line 494: In this statement, "x" is not declared. (undeclared)
x = (nd + 8) / 9;
^
cc: Error: /homeb/long/src/php4-STABLE-200501241530/Zend/zend_strtod.c,
line 495: In this statement, "y" is not declared. (undeclared)
for(k = 0, y = 1; x > y; y <<= 1, k++) ;
---^
cc: Error: /homeb/long/src/php4-STABLE-200501241530/Zend/zend_strtod.c,
line 881: In this statement, "borrow" is not declared. (undeclared)
borrow = 0;
^
cc: Error: /homeb/long/src/php4-STABLE-200501241530/Zend/zend_strtod.c,
line 884: In this statement, "y" is not declared. (undeclared)
y = (*xa & 0x) - (*xb & 0x) + borrow;
^
cc: Error: /homeb/long/src/php4-STABLE-200501241530/Zend/zend_strtod.c,
line 887: In this statement, "z" is not declared. (undeclared)
z = (*xa++ >> 16) - (*xb++ >> 16) + borrow;
^
cc: Error: /homeb/long/src/php4-STABLE-200501241530/Zend/zend_strtod.c,
line 894: In this statement, "y" is not declared. (undeclared)
y = (*xa & 0x) + borrow;
^
cc: Error: /homeb/long/src/php4-STABLE-200501241530/Zend/zend_strtod.c,
line 897: In this statement, "z" is not declared. (undeclared)
z = (*xa++ >> 16) + borrow;
^
cc: Error: /homeb/long/src/php4-STABLE-200501241530/Zend/zend_strtod.c,
line 936: In this statement, "L" is not declared. (undeclared)
L = (word0(x) & Exp_mask) - (P-1)*Exp_msk1;
^
cc: Error: /homeb/long/src/php4-STABLE-200501241530/Zend/zend_strtod.c,
line 1337: In this statement, "L" is not declared. (undeclared)
L = c - '0';
^
cc: Error: /homeb/long/src/php4-STABLE-200501241530/Zend/zend_strtod.c,
line 1518: In this statement, "int32_t" is not declared. (undeclared)
Bcopy(bd, bd0);
^
cc: Error: /homeb/long/src/php4-STABLE-200501241530/Zend/zend_strtod.c,
line 1616: In this statement, "L" is not

#31931 [Com]: image upload returns path and red cross

2005-02-14 Thread tech at rzpressure dot co dot uk
 ID:   31931
 Comment by:   tech at rzpressure dot co dot uk
 Reported By:  website at cellpacksolutions dot com
 Status:   Open
 Bug Type: HTTP related
 Operating System: linux
 PHP Version:  4CVS-2005-02-11 (stable)
 Assigned To:  iliaa
 New Comment:

i get this to, it seems as though basename is no longer stripping
windows paths. mind this seems to only affect ie browsers!


Previous Comments:


[2005-02-14 12:36:35] website at cellpacksolutions dot com

I have tried using the basic upload code posted on the following
thread:

http://www.phpfreaks.com/forums/index.php?showtopic=52077&pid=202571&st=0&#entry202571

which returns:

File (C:\\SEARCH PROGRAM\\product_pics\\3b880.jpg) uploaded!
testupload C:\\SEARCH PROGRAM\\product_pics\\3b880.jpg jpg 

scrolling over and selecting properties of the link shows:

http://domainname.co.uk/testupload/C://SEARCH

this is using the latest cvs version 9 am this morning!



[2005-02-14 12:23:52] website at cellpacksolutions dot com

just recieved this comment from our hosts this morning:

We have tested the most recent available snapshot (9:30am) and the bug
regarding PHP file uploads is still present.  I would advise using the
temporary workaround (all it does is remove everything upto and include
the
final \ thus providing you with only the filename) until the issue is
resolved with PHP 4.3.11.

As advised, unfortunately we are unable to revert back to 4.3.10 as
this
contains severe vulnerabilities which we are unable to allow to exist
on our
systems.  I will leave this ticket suspended in our queue and when we
have
further information for you we will mail you again.



[2005-02-12 17:48:18] [EMAIL PROTECTED]

Already fixed in CVS. (Can't reproduce with it)




[2005-02-12 02:33:53] [EMAIL PROTECTED]

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

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

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





[2005-02-11 18:13:36] [EMAIL PROTECTED]

Ilia, you "broke" it. :)
For the reportee: Provide test case.




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

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


#31558 [Com]: "apachectl graceful" leaks

2005-02-14 Thread tlamay at cte1 dot com
 ID:   31558
 Comment by:   tlamay at cte1 dot com
 Reported By:  jdw at nearlyfreespeech dot net
 Status:   Open
 Bug Type: Reproducible crash
 Operating System: FreeBSD
 PHP Version:  4CVS-2005-01-21
 New Comment:

I'm getting extremely similar errors on my platform.  It seems to occur
and 4.3.8, 4.3.9, 4.3.10 and the latest CVS (4.3.11).  Actually, using
4.3.11 makes it worse, ie, the errors occur more frequently.  4.3.6 &
4.3.7 dont seem to show this bug in my apache error.log but I get other
crummy bugs with those versions.

Im on a Windows 2003 platform, Apache 2.052.  The errors happen at
fairly consistent intervals, and this interval changes consistently
based on what version of PHP I actually install.  4.3.10 restarts
Apache every 30-45m, 4.3.11 restarts it every 5-15m.  On windows this
really sucks cause the single child process dies and takes out ALL of
my threads.  Its like fully restarting the webserver every half-hour. 

Heres a snippet from error.log:

[Mon Feb 14 13:17:55 2005] [notice] Parent: Created child process 2372
[Mon Feb 14 13:17:55 2005] [notice] Disabled use of AcceptEx() WinSock2
API
[Mon Feb 14 13:18:02 2005] [notice] Child 2372: Child process is
running
[Mon Feb 14 13:18:02 2005] [notice] Child 2372: Acquired the start
mutex.
[Mon Feb 14 13:18:02 2005] [notice] Child 2372: Starting 750 worker
threads.
[Mon Feb 14 13:18:03 2005] [notice] Child 2372: Listening on port 443.
[Mon Feb 14 13:18:03 2005] [notice] Child 2372: Listening on port 443.
[Mon Feb 14 13:18:03 2005] [notice] Child 2372: Listening on port 80.
[Mon Feb 14 13:18:03 2005] [notice] Child 2372: Listening on port 80.
FATAL:  erealloc():  Unable to allocate 360448 bytes
[Mon Feb 14 13:53:26 2005] [notice] Parent: child process exited with
status 1 -- Restarting.
[Mon Feb 14 13:53:27 2005] [notice] Parent: Created child process 3632
[Mon Feb 14 13:53:27 2005] [notice] Disabled use of AcceptEx() WinSock2
API
[Mon Feb 14 13:53:34 2005] [notice] Child 3632: Child process is
running
[Mon Feb 14 13:53:34 2005] [notice] Child 3632: Acquired the start
mutex.
[Mon Feb 14 13:53:34 2005] [notice] Child 3632: Starting 750 worker
threads.
[Mon Feb 14 13:53:34 2005] [notice] Child 3632: Listening on port 443.
[Mon Feb 14 13:53:34 2005] [notice] Child 3632: Listening on port 443.
[Mon Feb 14 13:53:34 2005] [notice] Child 3632: Listening on port 80.
[Mon Feb 14 13:53:34 2005] [notice] Child 3632: Listening on port 80.
FATAL:  erealloc():  Unable to allocate 22528 bytes
[Mon Feb 14 14:27:07 2005] [notice] Parent: child process exited with
status 1 -- Restarting.
[Mon Feb 14 14:27:08 2005] [notice] Parent: Created child process 2956
[Mon Feb 14 14:27:08 2005] [notice] Disabled use of AcceptEx() WinSock2
API
[Mon Feb 14 14:27:17 2005] [notice] Child 2956: Child process is
running
[Mon Feb 14 14:27:17 2005] [notice] Child 2956: Acquired the start
mutex.
[Mon Feb 14 14:27:17 2005] [notice] Child 2956: Starting 750 worker
threads.
[Mon Feb 14 14:27:17 2005] [notice] Child 2956: Listening on port 443.
[Mon Feb 14 14:27:17 2005] [notice] Child 2956: Listening on port 443.
[Mon Feb 14 14:27:17 2005] [notice] Child 2956: Listening on port 80.
[Mon Feb 14 14:27:17 2005] [notice] Child 2956: Listening on port 80.
FATAL:  erealloc():  Unable to allocate 360448 bytes
[Mon Feb 14 15:20:23 2005] [notice] Parent: child process exited with
status 1 -- Restarting.
[Mon Feb 14 15:20:25 2005] [notice] Parent: Created child process 2740
[Mon Feb 14 15:20:26 2005] [notice] Disabled use of AcceptEx() WinSock2
API
[Mon Feb 14 15:20:33 2005] [notice] Child 2740: Child process is
running
[Mon Feb 14 15:20:33 2005] [notice] Child 2740: Acquired the start
mutex.
[Mon Feb 14 15:20:33 2005] [notice] Child 2740: Starting 750 worker
threads.
[Mon Feb 14 15:20:33 2005] [notice] Child 2740: Listening on port 443.
[Mon Feb 14 15:20:33 2005] [notice] Child 2740: Listening on port 443.
[Mon Feb 14 15:20:33 2005] [notice] Child 2740: Listening on port 80.
[Mon Feb 14 15:20:33 2005] [notice] Child 2740: Listening on port 80.

I tried increasing my PHP memory limit to 40m but this has little
effect.  Oddly, the allocation size that fails should be perfectly fine
for my settings, and routinely matches the errors I see elesewhere on
the net, so it looks like some internal 'chunk' going awry somewhere (I
cant imagine why the values would be so similar otherwise).


Previous Comments:


[2005-01-22 06:55:13] jdw at nearlyfreespeech dot net

I also looked at the source code.  Without a detailed understanding of
zend_hash_*, it isn't clear that all the per_dir_info malloc() cases in
sapi/apache/mod_php4.c (particularly php_value_handler_ex() ) are being
properly freed by php_destroy_per_dir_info().  That's just a WAG, but
it might be something to look into as a possible cause.



[2005-01-22 06:48:

#31393 [Asn->Csd]: pg_field_type inner query slows down scripts

2005-02-14 Thread edink
 ID:  31393
 Updated by:  [EMAIL PROTECTED]
 Reported By: mauroi at digbang dot com
-Status:  Assigned
+Status:  Closed
 Bug Type:PostgreSQL related
 PHP Version: Irrelevant
 Assigned To: yohgaki
 New Comment:

The function is added to the current development branch and it will be
a part of PHP 5.1.0 release.

Thank you for the addition of this very useful function.


Previous Comments:


[2005-01-12 13:59:38] mauroi at digbang dot com

The database is very big (lots of schemas). I couldn't find a way to
make that query faster. Of course, I make a regular vaccum full, but I
don't get better results with this particular query. 
I don't think there's another use for this function (in fact, it can be
used in the same situations where you use pg_field_type).
Thanks in advance



[2005-01-12 07:17:03] yohgaki at ohgaki dot net

Although, it seems 500 ms execution time for the query is too long.
(Try vaccumedb -f , if you haven't done yet) The patch itself seems
good. Question is getting OID of data type is good for anything else.



[2005-01-03 22:39:59] [EMAIL PROTECTED]

Assigning to the maintainer.



[2005-01-03 22:18:54] mauroi at digbang dot com

http://webmail.digbang.com/patch_type_oid.diff
Thanks in advance



[2005-01-03 22:14:35] [EMAIL PROTECTED]

Can you provide a patch of this in unified diff format? (External
please, and provide a link)



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

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


#29468 [Opn->Bgs]: Warning POPUP whenever php-cgi.exe is executed

2005-02-14 Thread tony2001
 ID:   29468
 Updated by:   [EMAIL PROTECTED]
 Reported By:  reichard at comcast dot net
-Status:   Open
+Status:   Bogus
 Bug Type: CGI related
 Operating System: WinNT4SP6
 PHP Version:  5.0.0
 New Comment:

Please provide more info on this issue, if you still expirience it.
Until then I see no point in keeping this report open as we don't know
how to reproduce it, what's the exact problem and is it a PHP bug or
just another MS "feature".
Don't hesitate to reopen the report when you got more info.


Previous Comments:


[2005-02-04 06:13:55] reichard at comcast dot net

After reviewing hundreds of similar complaints in your BugReport.  I
have decided to dump PHP5.0.1 in favor of PHP4.2.  I need to get going
on my application's test.

Thanks



[2005-02-04 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-01-26 05:29:33] [EMAIL PROTECTED]

Please try using this CVS snapshot:

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





[2004-07-31 16:37:22] reichard at comcast dot net

Description:

Installed PHP5.0.0 on WindowsNT4SP6 using installer distribution. 
Installation whent flawlessly.  Whenever php-cgi.exe is called by IIS,
a POPUP Warning window appears in server GUI.  PHP page will not return
results until someone at server click in the OK button of the Warning
PopUp.  PopUp window has NO information other than a tittle name of
"WARNING."  No entries in eventlog of any kind.

PHP5 is installed in CGI mode.

Thanks
Eric

Reproduce code:
---
any code produces same behavior.  Tried it with  but
also reproduced if typing "php-cgi -i" at the command prompt

Expected result:

No popup to OK before php script is executed.

Actual result:
--
browser times out if no one "OK" the warning popup at the IIS server. 
Perfect results if OK is clicked (at server) before the browser times
out.





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


#29458 [Opn->Csd]: Dereferencing, __get and array property

2005-02-14 Thread tony2001
 ID:   29458
 Updated by:   [EMAIL PROTECTED]
 Reported By:  hawcue at yahoo dot com
-Status:   Open
+Status:   Closed
 Bug Type: Class/Object related
 Operating System: Windows XP
 PHP Version:  5.0.0
 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:


[2004-07-30 16:03:05] hawcue at yahoo dot com

Description:

Part of this report is related with BUG#24807.

In the following code, I would like to get and set an object property
in the way similar to that in Java, C# and Delphi, e.g.,
"$a->Child->Name='xxx'" and "echo $a->Child->Name". However, the PHP
parser would not allow the first usage.

Another question is about array property. Within current PHP5 release,
I can't see a way to define an object property that is of array type
and supports access to individual array element.

These two questions may not be considered as bugs, however, to my
belief they are very fundamental to object properties.

Reproduce code:
---
class Input {
private $_name='abc';
private $_child;
function __get($name) {
if($name=='Name')
return $this->_name;
else if($name=='Child') {
if(!isset($this->_child))
$this->_child=new Input;
return $this->_child;
}
}
function __set($name,$value) {
if($name=='Name')
$this->_name=$value;
}
}
$a=new Input;
$a->Child->Name='cde';
echo $a->Child->Name;

Expected result:

cde

Actual result:
--
Fatal error: Cannot access undefined property for object with
overloaded property access ...





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


#29426 [Opn->Fbk]: Incomplete/inconsistent functionality

2005-02-14 Thread tony2001
 ID:   29426
 Updated by:   [EMAIL PROTECTED]
 Reported By:  php at peterrobins dot co dot uk
-Status:   Open
+Status:   Feedback
 Bug Type: SimpleXML related
 Operating System: Linux 2.4
 PHP Version:  5.0.0
 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 possible, make the script source available online and provide
an URL to it here. Try to avoid embedding huge scripts into the report.




Previous Comments:


[2004-10-06 07:14:06] matt dot bevan at marginsoftware dot com

I am also in the position where I need to be able to 
create and insert a SimpleXMLElement before or after an 
arbitrary SimpleXMLElement, then remove the previous 
instance.  This is to move XML elements from one location 
in an XML file into another. 
 
I'll likely be switching to/from a DOM object to 
accomplish this, however.



[2004-09-19 17:40:18] phpbugs at ilibi dot com

Either the documentation for simplexml should be 
clarified about exactly what can and can not be added/
edited. Or the ability to add nodes should be added to 
simplexml.



[2004-08-08 01:18:36] cyberlot at cyberlot dot net

Confirming this bug exists, Have the same problem, I need to add to a
simplexml object on the fly and can't



[2004-07-28 13:22:59] php at peterrobins dot co dot uk

Description:

According to the manual page, you can add a node with 
SimpleXML, but this does not seem to work, either as  
$xml->movie[0]->characters[0]->character[0]->age = '21'; 
nor as 
$xml->movie[0]->rating[2] = 'not bad'; 
 
Deletion works on attributes 
unset($xml->movie[0]->rating[1]['type']); 
but at node level, deletes all  
unset($xml->movie[0]->rating); 
This is inconsistent with reading where 
$xml->movie[0]->rating 
fetches the first node only. 
unset($xml->movie->rating); 
deletes all ratings for the 1st movie only. 
It does not appear possible to delete just 1 node 
unset($xml->movie[0]->rating[1]); 
 
Because objs are now refs not copies, can do this 
$rat = $xml->movie[0]->rating[0]; 
$rat['name'] = 'judge'; 
but not this 
$rat = 'new content'; 
nor this 
$rat->child[0] = 'new rating'; 
and if I try and do 
$rat->child = 'new rating'; 
I get 'Attempt to assign property of non-object' 
 






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


#29477 [Opn->Fbk]: Apache & CGI crash on insert query

2005-02-14 Thread tony2001
 ID:   29477
 Updated by:   [EMAIL PROTECTED]
 Reported By:  phprazor at dap dot ro
-Status:   Open
+Status:   Feedback
 Bug Type: SQLite related
 Operating System: Windows XP
 PHP Version:  5CVS-2004-08-01 (dev)
 New Comment:

Please try using this CVS snapshot:

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




Previous Comments:


[2004-08-01 02:59:57] phprazor at dap dot ro

Description:

I used IIS 5.0 with the CGI version of php5 and I was getting a "CGI
has encountered an error..." . I read about other bugs with SQLite and
some users were suggesting the use of Apache. So i switched from the
CGI version of php running with IIS to running it as a module with
Apache 2.0. when i run the code, it tells gives me an "Apache has
encountered an error..." dialog. 

I'm trying to create a script to process a registration form. It would
take the data, an store it in an SQLite database. I tried commenting
out the INSERT query and i get no error. It seems the INSERT Query is
the problem. A SELECT query workd fine. Can someone help?

Reproduce code:
---







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


#29583 [Opn->Fbk]: com_dotnet crashes when trying to strlen

2005-02-14 Thread tony2001
 ID:   29583
 Updated by:   [EMAIL PROTECTED]
 Reported By:  edwin at rabbito dot org
-Status:   Open
+Status:   Feedback
 Bug Type: COM related
 Operating System: Windows
 PHP Version:  5CVS-2004-08-25 (dev)
 New Comment:

Please try using this CVS snapshot:

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




Previous Comments:


[2004-09-02 21:00:44] msisolak at yahoo dot com

I've dug into the COM error reported here and believe I have discovered
the issue.  The problem is that com_object_cast() (in com_handlers.c)
assumes that the readobj and writeobj parameters will never be the same
object.  That appears to work fine, except when the type conversion
request comes from the convert_object_to_type() macro
(zend_operators.c, line 264).  In this case readobj == writeobj and we
end up with an access violation.  Since _convert_to_string() uses
convert_object_to_type(), and _convert_to_string() is used when you try
to strlen() an object, com_object_cast() fails in the code from this bug
report.

Based on using sxe_object_cast() from the SimpleXML extension as a
example, I think that the freeing of the writeobj needs to be the last
thing done in the function rather than the first.  The attached patch
uses that function as a model to move the zval_dtor() call to the end. 
I also feel that the ZVAL_NULL(writeobj) should move after the
CDNO_FETCH(readobj).  It seems to work as is, but only becuase
CDNO_FETCH() isn't checking that what is passed to it is really an
object.

I've played with this patch some and it seems to be holding, but I'm
looking at this with limited understanding of how the objects are
really being passed around so there may be an interaction here I'm not
seeing.  With the patch applied, this PHP code:

echo strlen($rs->Fields(0)->Value), "\n";
echo date("F j, Y", variant_date_to_timestamp($rs->Fields(0)->Value)),
"\n";
echo date("F j, Y", variant_date_to_timestamp($rs->Fields(0))), "\n";
echo $rs->Fields(0)->Value, "\n";
echo $rs->Fields(0), "\n";

returns correct values in all five cases (for my test database):

8
January 1, 2001
January 1, 2001
1/1/2001
1/1/2001



--- php-5.0.1\ext\com_dotnet\com_handlers.c Wed Jul 28 19:48:26 2004
+++ com_handlers.c  Thu Aug 19 15:18:45 2004
@@ -521,17 +521,17 @@
 
 static int com_object_cast(zval *readobj, zval *writeobj, int type, 
int should_free TSRMLS_DC)
 {
+   zval free_obj;
php_com_dotnet_object *obj;
VARIANT v;
VARTYPE vt = VT_EMPTY;
 
if (should_free) {
-   zval_dtor(writeobj);
+   free_obj = *writeobj;
}
 
-   ZVAL_NULL(writeobj);
-
obj = CDNO_FETCH(readobj);
+   ZVAL_NULL(writeobj);
VariantInit(&v);
 
if (V_VT(&obj->v) == VT_DISPATCH) {
@@ -569,6 +569,9 @@
 
php_com_zval_from_variant(writeobj, &v, obj->code_page TSRMLS_CC);
VariantClear(&v);
+   if (should_free) {
+   zval_dtor(&free_obj);
+   }
return SUCCESS;
 }



[2004-08-25 04:53:32] edwin at rabbito dot org

Same error as of 2004-08-25:


Application Error - 
The instruction at "0x009dab5e" referenced memory at "0x0003". The
memory could not be "read".



[2004-08-10 03:46:16] edwin at rabbito dot org

ie) 

php.exe - Application Error

The instruction at "0x1008a9de" referenced memory at "0x0003". The
memory could not be "read".



[2004-08-10 03:22:19] edwin at rabbito dot org

There is no output from the CLI, apart from the Dr. Watson exception
dialog:

An application error has occurred and an application error log is being
generated. 

php.exe

Exception: access violation (0xc005), Address: 0x1008a9de.



[2004-08-09 12:44:38] [EMAIL PROTECTED]

Crash or exception?
Paste the output you see from the CLI here please.



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

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


#29669 [Opn->Fbk]: Setting ADO RecordSet CursorLocation to adUseClient causes query delay

2005-02-14 Thread tony2001
 ID:   29669
 Updated by:   [EMAIL PROTECTED]
 Reported By:  www dot spam at whoah dot net
-Status:   Open
+Status:   Feedback
 Bug Type: COM related
 Operating System: Windows 2000 Professional
 PHP Version:  5.0.1
 New Comment:

Please try using this CVS snapshot:

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




Previous Comments:


[2004-08-14 04:13:53] www dot spam at whoah dot net

Further:

The delay seems to be related to the size of the results data being
returned. The table referenced by my query has some 11000 records
whereas the same query on another table with only a few records
experiences no delay.

Querying the same table (11000 records) using a server-side cursor
causes no delay.

ASP experiences no such delay using the same COM objects and routines,
on the same server.



[2004-08-14 03:29:38] www dot spam at whoah dot net

Description:

When attempting to use ADODB.RecordSet COM object to query an MS Access
database via a DSNless connection, setting the CursorLocation to
adUseClient causes a significant delay on the processing of a query
execution. 

ASP has no such issue with this, so maybe PHP's support can be improved
(client-side cursor location allows the use of additional RecordSet
features such as ->Sort() and ->Filter(), handy for porting ASP code
that uses it instead of writing a dynamic query).

Any database and query should reproduce this, so please modify the
'reproduce code' appropriately (to point to your own database and use
your own query).

Reproduce code:
---
define("adLockReadOnly",1);
define("adOpenStatic",3);
define("adUseClient",3);

function simpleRS($conn,$q) {
$rs = new COM('ADODB.RecordSet');
$rs->ActiveConnection = $conn;
$rs->LockType = adLockReadOnly;
$rs->CursorLocation = adUseClient; //comment this line to remove the
delay
$rs->CursorType = adOpenStatic;
$rs->Source = $q;
echo 'opening... '; $rs->Open(); echo 'done';
return $rs;
}

$dbconn = new COM('ADODB.Connection');
$dbconn->open('Provider=Microsoft.Jet.OLEDB.4.0; Data Source='.
realpath('../../data/phpbb2.mdb'));
$rsUserList = simpleRS($dbconn,'SELECT * FROM phpbb_users');
$dbconn->close();

Expected result:

opening... *almost instant* done

Actual result:
--
opening... *delay* done





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


#29640 [Opn->Fbk]: ASP fails using ISAPI dll

2005-02-14 Thread tony2001
 ID:   29640
 Updated by:   [EMAIL PROTECTED]
 Reported By:  mikey at mikeymejnr dot com
-Status:   Open
+Status:   Feedback
 Bug Type: IIS related
 Operating System: Windows 2000
 PHP Version:  5.0.0
 New Comment:

Please try using this CVS snapshot:

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




Previous Comments:


[2004-08-13 00:10:09] mikey at mikeymejnr dot com

Description:

Note: similar to Bug 11151 but newer version of PHP

Using ISAPI module (with or without ISAPI filter) is causing ASP pages
to fail intermittantly.

Error message given as
The RPC server is unavailable

Also sometimes see just a memory location as the error message.

Tested using latest snapshot also.

Terminating DLLHOST process seems to temporarily fix.
Also could not load IIS MMC until DDLHOST was terminated.

Not sure what code is running since this is on a production server.

Tried using PHP-CGI.exe but this would not allow login scripts to work
using cookies/sessions (in PHPNuke etc).

Register globals enabled.
session.save-path set correctly.
session folder permissions set.






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


#29726 [Opn->Fbk]: Streams socket functionality

2005-02-14 Thread tony2001
 ID:   29726
 Updated by:   [EMAIL PROTECTED]
 Reported By:  lists at cyberlot dot net
-Status:   Open
+Status:   Feedback
 Bug Type: Sockets related
 Operating System: Fedora Core 2
 PHP Version:  5.0.1
 New Comment:

Please try using this CVS snapshot:

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




Previous Comments:


[2004-09-10 13:58:59] [EMAIL PROTECTED]

Please be more specific in what the problem is.
Note:

- PHP fgets() is line based and binary safe, changing it would break
things.  It only returns lines, or the last partial line before the
socket (or file) is closed.

- If you want to break lines on multiple different characters, you need
to code your own buffer handling yourself.  See stream_socket_select()
for a way to avoid blocking and writing multiplexing socket servers.




[2004-08-18 21:09:35] lists at cyberlot dot net

This problem only exists with fread, fget which multiple examples in
the docs use and the docs list as "See Also" functions.

However by using stream_socket_recvfrom this problem was resovled..
This function is not at this time referenced in the manual other in the
functions list so might easily overlooked as I did.

One possible issue I do see, stream_socket_recvfrom looks to work
because it pulls everything in the buffer up to X bytes regardless of
any EOL character. On a slow single line entry settup this shouldn't be
a problem and everything should work fine..

Under high load when data ends up being buffered at both sides this
function would return only partial "blocks" of what a user might expect
and the user would need to program his own internal buffering that
checks for EOL.

This should be covered in more detail in the online manual.



[2004-08-18 00:59:26] lists at cyberlot dot net

Description:

switched from socket functions to stream functions for socket server
usage because streams is supposed to be stable, and are included by
default.. 

The problem socket_read supports  PHP_NORMAL_READ which allows it to
see flashes \0 as EOL...

This is not possible when using streams to create a socket server as
fget does not see \0 as EOL

Expected result:

Expect fgets to return data at \0

Actual result:
--
Nothing is returned until the buffer is filled.





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


#31750 [Opn->Bgs]: pg_fetch_array fails if PGSQL_ASSOC is specified

2005-02-14 Thread edink
 ID:   31750
 Updated by:   [EMAIL PROTECTED]
 Reported By:  mancini at nextcode dot org
-Status:   Open
+Status:   Bogus
 Bug Type: PostgreSQL related
 Operating System: windows 2000
 PHP Version:  5.0.3
 New Comment:

You have to specify the row number if you want to specify the third
argument. In order to have "empty" second argument pass NULL so the
correct code becomes:

while ($line = pg_fetch_array($result, NULL, PGSQL_ASSOC))



Previous Comments:


[2005-01-30 03:55:12] mancini at nextcode dot org

The PostgreSQL version i am running is 8.0.0 windows oficial binary
release

here is the VERSION() output
PostgreSQL 8.0.0 on i686-pc-mingw32, compiled by GCC gcc.exe (GCC)
3.4.2 (mingw-special)



[2005-01-29 20:34:50] [EMAIL PROTECTED]

Can't reproduce with 5.0.3 & PG 7.3.6 under Linux.
Please provide more info.



[2005-01-29 09:29:30] mancini at nextcode dot org

Description:

Tested with original php_pgsql 7.4 binary distribution on php 5.0.3
distribution

The function fails every time if PGSQL_ASSOC is specified to
pg_fetch_array 

It works fine if that is not specified , and pg_fetch_assoc()  works
too btw , furthermore mysql_fetch_assoc() with MYSQL_ASSOC works too

And quite disturbing looking for the error message on google
http://www.google.com/search?hl=en&lr=&q=%22Unable+to+jump+to+row+1+on+PostgreSQL+result+index%22
gives about 2,620 results of pages experiencing it

Reproduce code:
---
$query = "SELECT usename,passwd,usesuper FROM pg_user";
$result = pg_query($query);
while ($line = pg_fetch_array($result,PGSQL_ASSOC)){
echo $line['usename'];
}

Expected result:

pgsql

Actual result:
--
PHP Warning:  pg_fetch_array() Unable to jump to row 1 on PostgreSQL
result index 4 in C:\apache2triad\htdocs\test.pgsql.php on line 4







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


[suspicious - maybe spam] [suspicious - maybe spam] #31751 [Opn->Csd]: pg_parameter_status() undefined function in PHP5

2005-02-14 Thread edink
 ID:   31751
 Updated by:   [EMAIL PROTECTED]
 Reported By:  mancini at nextcode dot org
-Status:   Open
+Status:   Closed
 Bug Type: PostgreSQL related
 Operating System: windows 2000
 PHP Version:  5.0.3
 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:


[2005-01-29 09:43:10] mancini at nextcode dot org

Description:

basically it looks like the function was not implemented or requires
additional extensions to work

tested with php 5.0.3 with php_pgsql 7.4 loaded both official binary
releases

function.pg-parameter-status.html and
http://ro.php.net/pg_parameter_status both say it is available in PHP5

Reproduce code:
---
pg_parameter_status($link,version);

Expected result:

version

Actual result:
--
PHP Fatal error:  Call to undefined function:  pg_parameter_status() in
C:\apache2triad\htdocs\test.pgsql.php on line 2







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


#31647 [Ver->WFx]: output_add_rewrite_var("var","a") called multiple times adds multiple var=a

2005-02-14 Thread iliaa
 ID:   31647
 Updated by:   [EMAIL PROTECTED]
 Reported By:  jeff at wecreate dot com
-Status:   Verified
+Status:   Wont fix
 Bug Type: Output Control
 Operating System: *
 PHP Version:  4CVS, 5CVS (2005-02-10)
 New Comment:

I would make the same assuption about the operation of the code,
however I'd imagine that since this functionality has been around for a
while some people actually rely on it. Changing it now would break BC
and cause all sorts of problems.


Previous Comments:


[2005-02-10 02:22:05] jeff at wecreate dot com

I would assume that in the case where the variables are 
identical, the second call would 'overwrite' the value 
of the first call.

for example:


would result in "bar2".

so I would assume 
test';
?>
would result in: "test".

More to the point, If I call 
output_add_rewrite_var("var","a") twice in the same 
script, it doesn't make sense that it would add ?
var=a&var=a , it should only add var=a once.

Thanks.



[2005-01-24 04:43:10] [EMAIL PROTECTED]

So what exactly should happen (in your opinion) when you call this
function twice for same variable?

I don't think we'll "fix" this since there isn't really anything to fix
here. IMO.




[2005-01-21 21:54:55] jeff at wecreate dot com

Description:

multiple calls to output_add_rewrite_var() with identical vars creates
multiple entries on the link.

Reproduce code:
---
output_add_rewrite_var("var","a");

output_add_rewrite_var("var","b");


echo 'test';


Expected result:

test

Actual result:
--
test

this is useless as var can only have one value.





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


#31931 [Opn->Csd]: image upload returns path and red cross

2005-02-14 Thread iliaa
 ID:   31931
 Updated by:   [EMAIL PROTECTED]
 Reported By:  website at cellpacksolutions dot com
-Status:   Open
+Status:   Closed
 Bug Type: HTTP related
 Operating System: linux
 PHP Version:  4CVS-2005-02-11 (stable)
 Assigned To:  iliaa
 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:


[2005-02-14 22:39:45] tech at rzpressure dot co dot uk

i get this to, it seems as though basename is no longer stripping
windows paths. mind this seems to only affect ie browsers!



[2005-02-14 12:36:35] website at cellpacksolutions dot com

I have tried using the basic upload code posted on the following
thread:

http://www.phpfreaks.com/forums/index.php?showtopic=52077&pid=202571&st=0&#entry202571

which returns:

File (C:\\SEARCH PROGRAM\\product_pics\\3b880.jpg) uploaded!
testupload C:\\SEARCH PROGRAM\\product_pics\\3b880.jpg jpg 

scrolling over and selecting properties of the link shows:

http://domainname.co.uk/testupload/C://SEARCH

this is using the latest cvs version 9 am this morning!



[2005-02-14 12:23:52] website at cellpacksolutions dot com

just recieved this comment from our hosts this morning:

We have tested the most recent available snapshot (9:30am) and the bug
regarding PHP file uploads is still present.  I would advise using the
temporary workaround (all it does is remove everything upto and include
the
final \ thus providing you with only the filename) until the issue is
resolved with PHP 4.3.11.

As advised, unfortunately we are unable to revert back to 4.3.10 as
this
contains severe vulnerabilities which we are unable to allow to exist
on our
systems.  I will leave this ticket suspended in our queue and when we
have
further information for you we will mail you again.



[2005-02-12 17:48:18] [EMAIL PROTECTED]

Already fixed in CVS. (Can't reproduce with it)




[2005-02-12 02:33:53] [EMAIL PROTECTED]

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

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

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





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

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


#28939 [Opn->Bgs]: Invalid array internal pointer behavior in foreach statement

2005-02-14 Thread tony2001
 ID:   28939
 Updated by:   [EMAIL PROTECTED]
 Reported By:  tomas_matousek at hotmail dot com
-Status:   Open
+Status:   Bogus
 Bug Type: Scripting Engine problem
 Operating System: WinXP
 PHP Version:  5.0.0RC3
 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

"Also note that foreach operates on a copy of the specified array and
not the array itself. Therefore, the array pointer is not modified as
with the each() construct, and changes to the array element returned
are not reflected in the original array. However, the internal pointer
of the original array is advanced with the processing of the array.
Assuming the foreach loop runs to completion, the array's internal
pointer will be at the end of the array."
(c) http://php.net/manual/en/control-structures.foreach.php


Previous Comments:


[2004-06-28 09:56:48] tomas_matousek at hotmail dot com

Description:

Array's internal pointer (which one can manipulate by next, prev,
current, etc. functions) has invalid bahavior in foreach statement.
Moreover, there is a contradictional description of this behavior in
the manual.

from manual:

"Note: 
Also note that foreach operates on a copy of the specified array and
not the array itself. Therefore, the ARRAY POINTER IS NOT MODIFIED as
with the each() construct, and changes to the array element returned
are not reflected in the original array. However, the INTERNAL POINTER
OF THE ORIGINAL ARRAY IS ADVANCED with the processing of the array.
Assuming the foreach loop runs to completion, the array's internal
pointer will be at the end of the array. 
"

It is not clear whether or not the internal pointer of the original
array is advanced during enumeration.

I made some tests and it seems to me that foreach statement mishandles
array's internal pointer (see "reproducable code").

I would prefer if the original array's pointer was not influenced by
foreach statement because one can do changes in the array during
enumeration (which is legal since it is assumed that foreach operates
on a copy) and IMHO any changes to the pointer in original array would
necessarily lead to strange behavior.



Reproduce code:
---
echo "-- a --\n";

$a = array(0,1,2);

var_dump(current($a));

foreach ($a as $value)
{
  /* do not touch $a */
}

var_dump(current($a));

$b = array(0,1,2);

echo "-- b --\n";

var_dump(current($b));

foreach ($b as $value)
{
  var_dump(current($b)); 
}

var_dump(current($b));


Expected result:

either the following (pointer is advanced):

-- a --
int(0)
bool(false)
-- b --
int(0)
int(0)
int(1)
int(2)
int(false)

or the following (pointer is not avanced):

-- a --
int(0)
int(0)
-- b --
int(0)
int(0)
int(0)
int(0)
int(0)


Actual result:
--
-- a --
int(0)
bool(false)
-- b --
int(0)
int(0)
int(0)
int(0)
int(0)







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


#28938 [Opn->Fbk]: foreach statement can be forced to crash PHP

2005-02-14 Thread tony2001
 ID:   28938
 Updated by:   [EMAIL PROTECTED]
 Reported By:  tomas_matousek at hotmail dot com
-Status:   Open
+Status:   Feedback
-Bug Type: Scripting Engine problem
+Bug Type: Zend Engine 2 problem
 Operating System: WinXP
 PHP Version:  5.0.0RC3
 New Comment:

Please try using this CVS snapshot:

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




Previous Comments:


[2004-07-13 18:13:23] fixxxer at php5 dot ru

Reproduced on WinXP, latest snap. Could not reproduce on FreeBSD. Seems
to be win32 specific



[2004-06-30 07:10:02] [EMAIL PROTECTED]

here is some output in debug mode:
$a = array(0,1);
foreach ($a as $value)
{
  $a->foo = "bar";
}


PHP Warning:  Attempt to assign property of non-object in
/php/bugs/28938.php on line 6
PHP Warning:  Attempt to assign property of non-object in
/php/bugs/28938.php on line 6
[Wed Jun 30 05:09:40 2004]  Script:  '28938.php'
---
/php/php-src/Zend/zend_execute.c(76) : Block 0x0840AAEC status:
/cvs/php/php-src/Zend/zend_execute.h(61) : Actual location (location
was relayed)
Beginning:  Overrun (magic=0x0006, expected=0x7312F8DC)
  End:  Unknown
---
PHP Warning:  String is not zero-terminated (...)
(source: /cvs/php/php-src/Zend/zend_opcode.c:215) in Unknown on
line 0
[Wed Jun 30 05:09:40 2004]  Script:  '28938.php'
---
/cvs/php/php-src/Zend/zend_opcode.c(215) : Block 0x0840BD18 status:
/cvs/php/php-src/Zend/zend_variables.c(45) : Actual location (location
was relayed)
Beginning:  Cached (allocated on
/cvs/php/php-src/Zend/zend_language_scanner.l:1510, 4 bytes)
  End:  OK
---




[2004-06-28 09:25:32] tomas_matousek at hotmail dot com

Description:

The following code crashes PHP.

Reproduce code:
---
$a = array(0,1,2);
foreach ($a as $value)
{
  $a->foo = "bar";
}

Expected result:

none

Actual result:
--
crash





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


#29042 [Opn->Bgs]: stream fails to close if malformed interface is used

2005-02-14 Thread tony2001
 ID:   29042
 Updated by:   [EMAIL PROTECTED]
 Reported By:  tim at timcrider dot com
-Status:   Open
+Status:   Bogus
 Bug Type: Scripting Engine problem
 Operating System: Fedora Core 2
 PHP Version:  5.0.0RC3
 New Comment:

The problem has nothing to do with interfaces and seems to appear on
any parse error and only when PHP was compiled with --enable-debug.
See #30708 - it describes the same issue, but has a bit more correct
example.


Previous Comments:


[2004-07-07 04:04:37] tim at timcrider dot com

Description:

While playing around with interfaces I came across this error message.

/data/BUILD/php/main/streams/streams.c(374) : Stream of type 'STDIO'
0xf7085204 (path:permissionInterface.php) was not closed

If you do not include permissionInterface.php, and actually write out
that code the error does not occur. The error does not occur also if
the interface is properly formatted.

Here is some general info:

PHP 5.0.0RC3 on Fedora Core 2

Libs:
-lcrypt -lexslt -lcrypt -lpq -lpanel -lncurses -lmysqlclient -lming -lm
-lmhash -lmcrypt -lltdl -lfreetype -lpng -lz -ljpeg -lz -lssl -lcrypto
-lresolv -lm -ldl -lnsl -lgcc -lxml2 -lz -lm -lxml2 -lz -lm -lodbc
-lxml2 -lz -lm -lxml2 -lz -lm -lcrypt -lxml2 -lz -lm -lxslt -lxml2 -lz
-lm -lcrypt

Includes:
-I/usr/local/include/php -I/usr/local/include/php/main
-I/usr/local/include/php/Zend -I/usr/local/include/php/TSRM

LDFlags:
-rdynamic -rdynamic -L/usr/lib/gcc-lib/i386-redhat-linux/3.3.3
-L/usr/local/libxml2-2.6.9/lib -L/usr/local/lib
-L/usr/local/openssl-0.9.7d/lib -L/usr/local//lib
-L/usr/local/lib/mysql -L/usr/local/pgsql/lib



Reproduce code:
---
#!/usr/local/bin/php -q


Expected result:

Fatal error: Interface function permissionInterface::authenticate()
cannot contain body in
/home/tim/projects/permissionWheel/permissionInterface.php on line 5


Actual result:
--
Fatal error: Interface function permissionInterface::authenticate()
cannot contain body in
/home/tim/projects/permissionWheel/permissionInterface.php on line 5
/data/BUILD/php/main/streams/streams.c(374) : Stream of type 'STDIO'
0xf7085204 (path:permissionInterface.php) was not closed





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


#29085 [Opn]: bad default include_path on Windows

2005-02-14 Thread tony2001
 ID:   29085
 Updated by:   [EMAIL PROTECTED]
 Reported By:  christian at wenz dot org
 Status:   Open
-Bug Type: PHP options/info functions
+Bug Type: Feature/Change Request
 Operating System: Windows
 PHP Version:  5.0.0RC3
 New Comment:

This is not a bug, but change request.
Reclassifying.


Previous Comments:


[2005-01-05 21:34:30] justin at telepop dot net

This setting just caused me some problems.  Somehow my php.ini had a
bad path in its include_path setting.  Rather than spit out an error,
it assumed that c:\php4\pear was my default include directory, and gave
me little information to figure out why.  Once I fixed the path, my
declared settings took effect and everything worked fine, but it wasn't
a very intuitive leap to see why that include path was showing up.



[2004-08-06 08:54:57] christian at wenz dot org

sorry, here I completely disagree. Of course it _is_ possible to change
the include_path manually or within the script, however there is a
divergence between the installation section of the manual (where it
says "C:\php") and this built-in behavior of PHP ("C:\php5"). Also, I
know of only very few people who actually use both versions on one
machine (only few now of the possibility to store php.ini in the PHP
directory and not in the Windows directory; furthermore you have to use
PHP as CGI). 
This bug appears again and again; I am getting 2-3 reader mails about
this per month; and it is (IMO) just annoying. Therefore, one thing has
to change IMO: either the installation recommends installing PHP into
C:\php5, or the include_path is set to something that includes C:\php.
Of course, the latter is preferable.  So I dare to reopen this one :)



[2004-08-05 23:33:44] [EMAIL PROTECTED]

Well this is a matter of opinion :) Most people prefer to be able to
run php4 and php5 on the same box right now. This might change in the
future. Anyway setting include_path in php.ini isn't that difficult, is
it :)



[2004-07-10 13:50:01] christian at wenz dot org

Description:

the default include_path on Windows systems is ".;c:\php5\pear". IMO
that's a bad idea (TM) because most installation tutorials recommend
c:\php and the PEAR installer defaults to that directory, too. 

Looks like a "port" of bug #21609 :-)

Reproduce code:
---
call phpinfo(), look at output for include_path

Expected result:

Directive  Local Value  Master Value
include_path .;C:\php\pear .;C:\php\pear 

Actual result:
--
Directive  Local Value  Master Value
include_path .;C:\php5\pear .;C:\php5\pear 





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


#29284 [Opn->Fbk]: Fatal MySQL compilation error

2005-02-14 Thread tony2001
 ID:   29284
 Updated by:   [EMAIL PROTECTED]
 Reported By:  evan at fusion-zero dot com
-Status:   Open
+Status:   Feedback
 Bug Type: Compile Failure
 Operating System: win32
 PHP Version:  5CVS-2004-07-20 (dev)
 New Comment:

Please try using this CVS snapshot:

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




Previous Comments:


[2004-07-20 20:43:51] evan at fusion-zero dot com

For the description, a little better English.
Trying to use cscript to compile with EAPI using the latest snapshot
after continuous failures on the stable release.

Ran buildconf.bat, then ran cscript with flags to exclude errors,
except MySQL.

Then I editted the makefile CFLAGS line to include EAPI, then run
nmake
and it got all the way to the MySQL section and encounters a fatal
error.



[2004-07-20 20:29:56] evan at fusion-zero dot com

Description:

Trying to use cscript to compile for EAPI latest snapshot after
continuous failures on stable release.

Ran buildconf.bat, the ran cscript with flags I to exclude problems
errors, except MySQL.

Then I editted the makefile CFLAGS line to include EAPI, then run nmake
and it get all the way to the MySQL section or encounters a fatal error.

Reproduce code:
---
cscript configure.js --enable-prefix=\server\php\5.0.0
with-php-build=\build\win32build --with-mysql --enable-sockets
--without-iconv --without-libxml --without-gd --enable-apache

Expected result:

A successful compilation of PHP

Actual result:
--
"cl.exe" /I "..\win32build\include"  /D COMPILE_DL_MYSQL /D
MYSQL_EXPORTS=1 /nologo /YX /FD /I . /I main /I regex /I Zend /I TSRM
/D _WINDOWS /D ZEND_WIN32=1 /D PHP_WIN32=1 /D WIN32 /D _MBCS /LD /MD
/W3 /Ox /D NDebug /D NDEBUG /D ZEND_WIN32_FORCE_INLINE /GB /GF /D
ZEND_DEBUG=0 /D ZTS=1 /I "..\win32build\include"
/FoRelease_TS\ext\mysql\ /FdRelease_TS\ext\mysql\
/FpRelease_TS\ext\mysql\ /FRRelease_TS\ext\mysql\ -c
ext\mysql\php_mysql.c -o Release_TS\ext\mysql\php_mysql.obj
php_mysql.c
ext\mysql\php_mysql.c(382) : error C2065: 'CLIENT_INTERACTIVE' :
undeclared identifier
ext\mysql\php_mysql.c(1124) : warning C4013: 'mysql_character_set_name'
undefined; assuming extern returning int
ext\mysql\php_mysql.c(1711) : warning C4013: 'mysql_real_escape_string'
undefined; assuming extern returning int
NMAKE : fatal error U1077: '"cl.exe"' : return code '0x2'





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


#29274 [Opn->Fbk]: mkdir() failed to create dir

2005-02-14 Thread tony2001
 ID:   29274
 Updated by:   [EMAIL PROTECTED]
 Reported By:  ca50015 at yahoo dot com
-Status:   Open
+Status:   Feedback
-Bug Type: Directory function related
+Bug Type: Filesystem function related
 Operating System: windows 98 se
 PHP Version:  5.0.0
 New Comment:

Please try using this CVS snapshot:

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




Previous Comments:


[2004-07-20 10:59:57] ca50015 at yahoo dot com

Description:

mkdir() wont work properly when its parameter is a numeric string

Reproduce code:
---



Expected result:

It should create two directory trees under current dir:
   1/0/0001
   1/1/0001




Actual result:
--
and the result is:
   1/0/0001(correct)
   1/0001  (should be '1/1/0001')






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


#29535 [Fbk->NoF]: CURLOPT_RETURNTRANSFER not maintained when URL is switched

2005-02-14 Thread php-bugs
 ID:   29535
 Updated by:   php-bugs@lists.php.net
 Reported By:  mark_connolly at acm dot org
-Status:   Feedback
+Status:   No Feedback
 Bug Type: cURL related
 Operating System: Linux RedHat 9.0
 PHP Version:  4.3.7
 New Comment:

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


Previous Comments:


[2005-02-03 04:53:49] [EMAIL PROTECTED]

Please try using this CVS snapshot:

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





[2004-08-05 15:09:14] mark_connolly at acm dot org

libcurl/7.12.0 OpenSSL/0.9.7d zlib/1.1.4



[2004-08-05 15:02:15] mark_connolly at acm dot org

ethereal shows that in the fail case, expected results are being
returned in the response from the target server.



[2004-08-05 14:58:27] mark_connolly at acm dot org

Description:

CURLOPT_RETURNTRANSFER is set to 1 for all processes.
String response is properly returned.
Target http site changed to new target https site.
String response is properly returned.

Target is changed back to http site.
Boolean true (1) is returned for each invocation to the http site.

Target is changed back to https site.
String response is properly returned.

Reproduce code:
---
if (GATEWAY_MODE_PROD) {
$gatewayProvider = "https://...";;
} else {
$gatewayProvider = "http://...";;
}
$urlPostFields = "postStringCreatedEarlier";
$curlReq = curl_init($gatewayProvider);
curl_setopt($curlReq, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($curlReq, CURLOPT_REFERER, GATEWAY_REFERER);
curl_setopt($curlReq, CURLOPT_POST, 1);
curl_setopt($curlReq, CURLOPT_HEADER, 0);
curl_setopt($curlReq, CURLOPT_FOLLOWLOCATION, 0);
curl_setopt($curlReq, CURLOPT_FAILONERROR, 1);
curl_setopt($curlReq, CURLOPT_TIMEOUT, CONNECTION_TIMEOUT);
curl_setopt($curlReq, CURLOPT_POSTFIELDS, $urlPostFields);

$curlResp = curl_exec($curlReq);

Expected result:

The expected result is to always see the string response.

Actual result:
--
When starting at !GATEWAY_MODE_PROD and switching to GATEWAY_MODE_PROD,
expected response is returned.

Switching again back to !GATEWAY_MODE_PROD causes the boolean response
to be returned rather than the string response.

Switching again back to GATEWAY_MODE_PROD returns the expected string
result.





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


#28832 [Opn->Bgs]: Operator = doesn't copy $GLOBALS array

2005-02-14 Thread tony2001
 ID:   28832
 Updated by:   [EMAIL PROTECTED]
 Reported By:  tomas_matousek at hotmail dot com
-Status:   Open
+Status:   Bogus
-Bug Type: Scripting Engine problem
+Bug Type: Zend Engine 2 problem
 Operating System: WinXP
 PHP Version:  5.0.0RC3
 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

"Contains a reference to every variable which is currently available
within the global scope of the script. The keys of this array are the
names of the global variables."

As of this, you're copying array of *references* to global variables.
No wonder that you're still able to change them.
That's expected behaviour.


Previous Comments:


[2005-01-25 09:30:57] barond0 at gmail dot com

Is this possibly just the way globals work?  I am having the same
problem with PHP 4.3.8 running on Fedora.

This is what I am trying:

$GLOBALS['test']="info";

$a=$GLOBALS['test']

I expect $a to be "info," but it does not work



[2004-06-18 17:00:41] tomas_matousek at hotmail dot com

Description:

When the operator = is used on user created array on RHS this array
will be copied to LHS. But if $GLOBALS variable is used on RHS a copy
is not made. It seems like it behaves as =& when used on $GLOBALS which
is IMHO not correct.


Reproduce code:
---
$x = 1;
$a = $GLOBALS;
$a["x"] = 2;
echo $x; 

Expected result:

1

Actual result:
--
2





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


#28828 [Opn->Fbk]: Problem with appending session.use_trans_sid to urls

2005-02-14 Thread tony2001
 ID:   28828
 Updated by:   [EMAIL PROTECTED]
 Reported By:  demjan at elkor dot lv
-Status:   Open
+Status:   Feedback
 Bug Type: Session related
 Operating System: Linux
 PHP Version:  5.0.0RC3
 New Comment:

Please try using this CVS snapshot:

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




Previous Comments:


[2004-06-18 14:07:06] demjan at elkor dot lv

Description:

Hello!
There is some problem in adding SESSID when "session.use_trans_sid" is
enabled. See code bellow.

Reproduce code:
---



";
?>
test



Expected result:



00
[... a lot of nulls]
test



Actual result:
--


00[... a lot of nulls]
test







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


#28618 [Opn->Fbk]: fpassthru gives script timeout

2005-02-14 Thread tony2001
 ID:   28618
 Updated by:   [EMAIL PROTECTED]
 Reported By:  lapo at lapo dot it
-Status:   Open
+Status:   Feedback
 Bug Type: Filesystem function related
 Operating System: Win2000
 PHP Version:  5.0.0RC2
 New Comment:

Please try using this CVS snapshot:

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




Previous Comments:


[2004-08-28 22:46:47] ericfabre69 at free dot fr

Hi,

I have the same problem with the 4.3.8 php version.
When I use this script

set_time_limit(0);

$fp = fopen ($path,"r");
$contents = fread($fp,500);
echo $contents;
$fp2 =fopen("temp.txt","w+");
fwrite($fp2,$contents);
fclose($fp);
fclose($fp2);
echo "size : ".filesize("temp.txt");

I try to open a file (size 26ko)
All the time the filesize("temp.txt") result is 4092.
I hadn't this problem with the version 4.2.x.



[2004-06-03 11:05:50] lapo at lapo dot it

Description:

I used to use a little script (see below) to check logs from remote and
it worked like a charm with PHP4.3.2 both on FreeBSD and Win2000 (CGI on
IIS).

Upgrading to PHP5.0.0RC2, on Win2000, it gives timeout when file size
is 'big' (e.g. it does definitely do so with a 5Mb log file).

Of course it should print only the last 5Kb of file, no matter the
filesize.

BTW: using @fread($file, 1024 * $n) instead of @fpassthru($file) works
perfectly and I'm doing so, but @fpassthru($file) SHOULD be more
efficient and I wuold like it to work, anyway.

Reproduce code:
---
$log_file = ini_get('error_log');
$n = 5;
$file = @fopen($log_file, 'r');
@fseek($file, -1024 * $n, SEEK_END);
@fpassthru($file);

Expected result:

Last 5Kb of log file content.

Actual result:
--
CGI timeout.





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


#31974 [Com]: func_get_args() does not work when variables have "_" in the middle of the name

2005-02-14 Thread shadda at gmail dot com
 ID:   31974
 Comment by:   shadda at gmail dot com
 Reported By:  pinhinha at gmail dot com
 Status:   Open
 Bug Type: *Programming Data Structures
 Operating System: LINUX
 PHP Version:  5.0.3
 New Comment:




You do realise, array_combine() does exactly that, right? Not to
mention that even were you using php4 there are several user comments
throughought php.net that show you how to accomplish this very thing
(And if I recall, There's a PEAR_COMPAT package that contains this
functionality.)


Previous Comments:


[2005-02-14 20:23:31] pinhinha at gmail dot com

Description:

Builds an associative array using value of previous defined vars.
It works on PHP 4.0.10
It doens't work on PHP 5.0.3

If the var names don't have "_" (underscore) in the name it works on
PHP4 AND PHP5.

Reproduce code:
---
function do_array() {
  $new_array=array(); 
  foreach (func_get_args() as $var) { 
  if (isset($GLOBALS[$var]))
$new_array[$var]=$GLOBALS[$var];
  else exit("Error: var '$var' is not set.");
  } 
  return $new_array;
} 
$domain_name = "php.net";
$visit_date = date("Y-m-d");
$array = do_array("domain_name", "visit_date");

Expected result:

$array = ("domain_name" => "php.net",
  "visit_date" => "2005-02-14"
);

Actual result:
--
Error: var 'domain_name' is not set.





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


#28734 [Opn->Fbk]: Operator = changes structure of self-referencing arrays

2005-02-14 Thread tony2001
 ID:   28734
 Updated by:   [EMAIL PROTECTED]
 Reported By:  tomas_matousek at hotmail dot com
-Status:   Open
+Status:   Feedback
-Bug Type: Scripting Engine problem
+Bug Type: Zend Engine 2 problem
 Operating System: WinXP
 PHP Version:  5.0.0RC2
 New Comment:

Please try using this CVS snapshot:

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

Can't reproduce with latest snapshots and releases under Linux.


Previous Comments:


[2004-06-13 05:04:26] [EMAIL PROTECTED]

Perhaps this can help track down the problem.
php 5.0.0RC3-dev:

[snip access array ouptut]
   [4] => Array
(
[0] => 1
[1] => 2
[2] => 3
[3] => 4
[4] => Array
 *RECURSION*
)

)

)

)
/usr/home/curt/cvs/php/php-src/Zend/zend_execute.c(662) :  Freeing
0x083C4208 (16 bytes), script=2873.php
/usr/home/curt/cvs/php/php-src/Zend/zend_execute.c(3413) :  Freeing
0x083C4150 (35 bytes), script=2873.php
/usr/home/curt/cvs/php/php-src/Zend/zend_hash.c(377) : Actual location
(location was relayed)
Last leak repeated 3 times
/usr/home/curt/cvs/php/php-src/Zend/zend_execute.c(3382) :  Freeing
0x083C410C (16 bytes), script=2873.php
Last leak repeated 3 times
/usr/home/curt/cvs/php/php-src/Zend/zend_execute.c(3362) :  Freeing
0x083C4A6C (32 bytes), script=2873.php
/usr/home/curt/cvs/php/php-src/Zend/zend_hash.c(157) : Actual location
(location was relayed)
Last leak repeated 1 time
=== Total 11 memory leaks detected ===




[2004-06-11 19:40:24] imprestavel at gameguru dot com dot br

Tested PHP 5.0.0 RC3 and latest build (200406111430) under Windows2000
and had the same problem



[2004-06-11 09:38:37] tomas_matousek at hotmail dot com

Don't know how that is possible in your version of PHP 5.0.0 RC3, but
in mine (I'm testing RC3 available on www.php.net not the latest
version from CVS) the bug is still there (result is the same as I
described in "Actual Result").



[2004-06-11 01:43:58] D dot Kingma at jool dot nl

Results on RC3:

Array
(
[0] => 1
[1] => Z
[2] => 3
[3] => 4
[4] => Array
(
[0] => 1
[1] => Z
[2] => 3
[3] => 4
[4] => Array
 *RECURSION*
)

)

Seems as aspected results



[2004-06-10 20:46:39] tomas_matousek at hotmail dot com

Description:

Create an array $b and set some of its item to reference the array
itself by =& operator. Then assign this array to some other variable.
This assignment (*) makes something wrong in the array $b because if
you change $b's items after this assignment the structure of array $b
is changed.
However, if that assignment (*) doesn't take place the behavior is
correct.



Reproduce code:
---
$b = array(1,2,3,4);
$b[4] =& $b;

// this assignment probably makes changes to $b's structure
$c = $b; 

$b[1] = 'X';
$b[4][1] = 'Y';
$b[4][4][1] = 'Z';

print_r($b);


Expected result:

Array
(
[0] => 1
[1] => Z
[2] => 3
[3] => 4
[4] => Array
 *RECURSION*
)

Actual result:
--
Array
(
[0] => 1
[1] => X
[2] => 3
[3] => 4
[4] => Array
(
[0] => 1
[1] => Y
[2] => 3
[3] => 4
[4] => Array
(
[0] => 1
[1] => Z
[2] => 3
[3] => 4
[4] => Array
(
[0] => 1
[1] => 2
[2] => 3
[3] => 4
[4] => Array
 *RECURSION*
)

)

)
)





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


#28496 [Opn->Fbk]: Fatal Error in the make install caused by broken egrep

2005-02-14 Thread tony2001
 ID:   28496
 Updated by:   [EMAIL PROTECTED]
 Reported By:  rehanann at kfupm dot edu dot sa
-Status:   Open
+Status:   Feedback
-Bug Type: Compile Failure
+Bug Type: *Compile Issues
 Operating System: Aix 5.2
 PHP Version:  4CVS, 5CVS
 New Comment:

Please try using this CVS snapshot:

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




Previous Comments:


[2004-11-27 05:43:30] sjungels at adelphia dot net

I tracked this bug down to a faulty version of GNU grep.  If you are
having problems where no libphp4.so is generated, this may be the cause
in your case also.

If you have this problem you will notice the following symptoms: during
the part of the php configure log that begins "performing libtool
configuration..." you will see the following (or similar) messages:
  checking if the linker (/usr/powerpc-hardhat-linux/bin/ld) is GNU
ld... no
  checking whether the linker (/usr/powerpc-hardhat-linux/bin/ld)
supports shared libraries... no
  checking if libtool supports shared libraries... no
  checking whether to build shared libraries... no
  checking whether to build static libraries... yes

These messages may be correct, but if you have the problem I am
describing, they are caused by a bad version of grep.  Check for this
by typing
  if echo GNU | egrep '(GNU|BFD)' >/dev/null; then echo "Good egrep";
else echo "Bad egrep"; fi 

If you get back "Bad egrep" you are running a version of egrep which
doesn't really support extended regular expressions, and this is
confusing the php configure script.  You can fix the problem by
installing GNU grep 2.5.

If you have this problem, it will have effected apache also (even
though it seems to work, it is statically compiled and probably won't
work with DSOs), so after installing the new grep you will have to
rebuild apache and PHP

Note to whoever wrote the configure script: this issue is verified on
only the Buffalo Linkstation, but indications are that it may apply to
all versions of GNU grep 2.4.2 and earlier.  You can save PHP users
hours of frustration by not relying on egrep in your scripts.  One
workaround is to use grep -E.



[2004-05-23 15:33:46] rehanann at kfupm dot edu dot sa

Description:

Please try to solve this error in PHP 4.3.6. I try lot of latest
snapshots but still no use. 

configure options:
CC="gcc" CFLAGS="-D_THREAD_SAFE" ./configure
--with-apxs2=/usr/local/apache2/bin/apxs --disable-all

Reproduce code:
---
Installing PHP SAPI module:   apache2handler
/usr/local/apache2/build/instdso.sh
SH_LIBTOOL='/usr/local/apache2/build/libtool' libphp4.la
/usr/local/apache2/modules
rm -f /usr/local/apache2/modules/libphp4.so
/usr/local/apache2/build/libtool --mode=install cp libphp4.la
/usr/local/apache2/modules/
cp .libs/libphp4.a /usr/local/apache2/modules/libphp4.a
cp .libs/libphp4.lai /usr/local/apache2/modules/libphp4.la
libtool: install: warning: remember to run `libtool --finish
/tmp/horde/php-4.3.5/libs'
chmod 755 /usr/local/apache2/modules/libphp4.so
chmod: /usr/local/apache2/modules/libphp4.so: A file or directory in
the path name does not exist.
apxs:Error: Command failed with rc=65536
.
make: 1254-004 The error code from the last command is 1.


Stop.







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


#31974 [Opn->Bgs]: func_get_args() does not work when variables have "_" in the middle of the name

2005-02-14 Thread pinhinha at gmail dot com
 ID:   31974
 User updated by:  pinhinha at gmail dot com
 Reported By:  pinhinha at gmail dot com
-Status:   Open
+Status:   Bogus
 Bug Type: *Programming Data Structures
 Operating System: LINUX
 PHP Version:  5.0.3
 New Comment:

ZEND PROBLEM! I FORGET TO TURN IT OF! SORRY PEOPLE!


Previous Comments:


[2005-02-15 01:42:53] pinhinha at gmail dot com

Miss PHP4 version, its 4.3.10



[2005-02-15 01:42:47] shadda at gmail dot com

Got cut off.

The code also works fine in my php5.0.3.



[2005-02-15 01:41:27] shadda at gmail dot com




You do realise, array_combine() does exactly that, right? Not to
mention that even were you using php4 there are several user comments
throughought php.net that show you how to accomplish this very thing
(And if I recall, There's a PEAR_COMPAT package that contains this
functionality.)



[2005-02-14 20:23:31] pinhinha at gmail dot com

Description:

Builds an associative array using value of previous defined vars.
It works on PHP 4.0.10
It doens't work on PHP 5.0.3

If the var names don't have "_" (underscore) in the name it works on
PHP4 AND PHP5.

Reproduce code:
---
function do_array() {
  $new_array=array(); 
  foreach (func_get_args() as $var) { 
  if (isset($GLOBALS[$var]))
$new_array[$var]=$GLOBALS[$var];
  else exit("Error: var '$var' is not set.");
  } 
  return $new_array;
} 
$domain_name = "php.net";
$visit_date = date("Y-m-d");
$array = do_array("domain_name", "visit_date");

Expected result:

$array = ("domain_name" => "php.net",
  "visit_date" => "2005-02-14"
);

Actual result:
--
Error: var 'domain_name' is not set.





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


#28397 [Opn->Bgs]: call-by-value on objects doesn't work

2005-02-14 Thread tony2001
 ID:   28397
 Updated by:   [EMAIL PROTECTED]
 Reported By:  bobalong at gmx dot net
-Status:   Open
+Status:   Bogus
 Bug Type: Scripting Engine problem
 Operating System: Redhat 9
 PHP Version:  4.3.4
 New Comment:

Okay, so let's close this report until someone (you?) is able to
provide a shorter and more readable reproduce script, that clearly
decribes the problem.


Previous Comments:


[2005-02-12 11:56:18] bobalong at gmx dot net

Just to clarify, this is NOT a ZE2 bug - my mistake. I can't make the
reproduce script much shorter than it is, as it involves class
definitions and client code. I could remove the comments, but that's
not really what you're talking about, right?

Personally I've moved to PHP5 and found the object model to be
absoultely fine. If I were working on PHP4 bugs I would rationalise
that anyone looking for this kind of (fairly) advanced OO behaviour
would probably be using PHP5 by now anyway.

Cheers
Rob



[2005-02-11 20:34:12] [EMAIL PROTECTED]

Please provide a *short* but complete reproduce script.
Also, I don't get why it's a ZE2 bug if you're using 4.3.x.



[2004-05-14 13:59:49] bobalong at gmx dot net

Description:

I've created a user-defined list type - a bit like the ubiquitous
ArrayList - and wrapped it in another class, which exposes part of the
internal list's interface... OK, so nothing radical so far.

My problem is that when I make use of the list's exposed interface in
the wrapper class, it becomes a reference type for no apparent reason.

Another consequence, due to a previous bug
(http://bugs.php.net/bug.php?id=20993), is that if I pass the wrapper
object to a function that modifies the internal list, the original
object gets modified too, as though I'd passed it by reference!


Reproduce code:
---

 internalArray, $obj);
}

function Remove($index)
{
unset($this -> internalArray[$index]);
}
}

//create a wrapper for the above list
Class MyListWrapper
{ 
var $myList;

function MyListWrapper()
{
$this -> myList = new MyList();
}

function AddItem($item)
{
$this -> myList -> Add($item);
}

function RemoveItem($index)
{
$this -> myList -> Remove($index);
}
}

//function that modifies the wrapper's internal list
function UpdateListWrapper($listWrapper)
{
$listWrapper -> RemoveItem(0);
}

//1. create a new wrapper object and dump
$listWrapper = new MyListWrapper();
var_dump($listWrapper);

//2. now add item to wrapper object and dump
$listWrapper -> AddItem("id");
var_dump($listWrapper); //notice the list is now a reference type

//3. now pass to modification function
UpdateListWrapper($listWrapper);

//4. see the original has been modified, as if 
//   call-by-reference had been used
var_dump($listWrapper);
?>


Expected result:

object(mylistwrapper)(1) {
  ["myList"]=>
  object(mylist)(1) {
["internalArray"]=>
array(0) {
}
  }
}
object(mylistwrapper)(1) {
  ["myList"]=>
  object(mylist)(1) {
["internalArray"]=>
array(1) {
  [0]=>
  string(2) "id"
}
  }
}
object(mylistwrapper)(1) {
  ["myList"]=>
  object(mylist)(1) {
["internalArray"]=>
array(1) {
  [0]=>
  string(2) "id"
}
  }
}


Actual result:
--
object(mylistwrapper)(1) {
  ["myList"]=>
  object(mylist)(1) {
["internalArray"]=>
array(0) {
}
  }
}
object(mylistwrapper)(1) {
  ["myList"]=>
  &object(mylist)(1) {
["internalArray"]=>
array(1) {
  [0]=>
  string(2) "id"
}
  }
}
object(mylistwrapper)(1) {
  ["myList"]=>
  &object(mylist)(1) {
["internalArray"]=>
array(0) {
}
  }
}







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


#28327 [Opn->Fbk]: chdir("..") not working in PHP5 on WinNT4

2005-02-14 Thread tony2001
 ID:   28327
 Updated by:   [EMAIL PROTECTED]
 Reported By:  zajdee at seznam dot cz
-Status:   Open
+Status:   Feedback
 Bug Type: Directory function related
 Operating System: Windows NT4
 PHP Version:  5CVS-2004-05-08 (dev)
 New Comment:

We're still waiting for feedback..


Previous Comments:


[2005-01-27 08:15:15] zajdee at seznam dot cz

I am not using NT4 anywhere, but will try to set up a virtual machine
in VMware to test it.



[2005-01-26 04:53:57] [EMAIL PROTECTED]

Please try using this CVS snapshot:

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





[2004-05-09 14:53:17] zajdee at seznam dot cz

Of course, it works fine with Apache2+PHP4.3.6 on the same system...



[2004-05-09 09:31:07] vkatragadda at email dot com

did u run this script on [WinNT4 + PHP4]?



[2004-05-08 15:58:22] zajdee at seznam dot cz

I forgot to tell anything about my config:

PHP 5.0.3RC-dev, Apache2, php loaded as module, binaries from
snaps.php.net, running on Windows NT4 Server EN



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

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


#31976 [NEW]: Accessing overloaded member via foreach does not work

2005-02-14 Thread adove at booyahnetworks dot com
From: adove at booyahnetworks dot com
Operating system: WinXP
PHP version:  5.0.3
PHP Bug Type: Zend Engine 2 problem
Bug description:  Accessing overloaded member via foreach does not work

Description:

Using an overloaded property from an object instance directly in a foreach
fails. If you assign the property (or a reference to it) to a variable
first it works fine. This is reproducable. 

Interestingly enough, I see a strange problem with inheritance and
overloaded members. I am unable  to reproduce it in a simple example. I
will continue to work that. Basically, you get the same fatal error as
here BUT on assignment to a member variable of the parent class that is
not overloaded. It's bizzare. As soon as I remove the __get/__set from the
child, the parent method works fine again from an instance of child. Again,
simple examples do not seem to reproduce. 

Reproduce code:
---
class Son
{
protected $m_aActions;

function __construct(&$aActions)
{
$this->m_aActions = $aActions;
}

function __get($mName)
{
$mRetval = null;

switch($mName)
{
case("Actions"):
{
$mRetval = $this->m_aActions;
break;
}
}

return $mRetval;
}
}

$aActions = array("add", "delete");
$oSon = new Son($aActions);

$aActions = $oSon->Actions;
var_dump($aActions);

foreach($oSon->Actions as $strAction)
{
echo $strAction . "\n";
}



Expected result:

array(2) {
  [0]=>
  string(3) "add"
  [1]=>
  string(6) "delete"
}

add
delete

Actual result:
--
array(2) {
  [0]=>
  string(3) "add"
  [1]=>
  string(6) "delete"
}

Fatal error:  Cannot access undefined property for object with overloaded
property access 


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


#31974 [Opn]: func_get_args() does not work when variables have "_" in the middle of the name

2005-02-14 Thread pinhinha at gmail dot com
 ID:   31974
 User updated by:  pinhinha at gmail dot com
 Reported By:  pinhinha at gmail dot com
 Status:   Open
 Bug Type: *Programming Data Structures
 Operating System: LINUX
 PHP Version:  5.0.3
 New Comment:

Miss PHP4 version, its 4.3.10


Previous Comments:


[2005-02-15 01:42:47] shadda at gmail dot com

Got cut off.

The code also works fine in my php5.0.3.



[2005-02-15 01:41:27] shadda at gmail dot com




You do realise, array_combine() does exactly that, right? Not to
mention that even were you using php4 there are several user comments
throughought php.net that show you how to accomplish this very thing
(And if I recall, There's a PEAR_COMPAT package that contains this
functionality.)



[2005-02-14 20:23:31] pinhinha at gmail dot com

Description:

Builds an associative array using value of previous defined vars.
It works on PHP 4.0.10
It doens't work on PHP 5.0.3

If the var names don't have "_" (underscore) in the name it works on
PHP4 AND PHP5.

Reproduce code:
---
function do_array() {
  $new_array=array(); 
  foreach (func_get_args() as $var) { 
  if (isset($GLOBALS[$var]))
$new_array[$var]=$GLOBALS[$var];
  else exit("Error: var '$var' is not set.");
  } 
  return $new_array;
} 
$domain_name = "php.net";
$visit_date = date("Y-m-d");
$array = do_array("domain_name", "visit_date");

Expected result:

$array = ("domain_name" => "php.net",
  "visit_date" => "2005-02-14"
);

Actual result:
--
Error: var 'domain_name' is not set.





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


#31960 [Opn]: PATCH: msql_fetch_row() and msql_fetch_array() dropping columns with NULL values

2005-02-14 Thread danielc at analysisandsolutions dot com
 ID:   31960
 User updated by:  danielc at analysisandsolutions dot com
-Summary:  msql_fetch_row() and msql_fetch_array() dropping
   columns with NULL values
 Reported By:  danielc at analysisandsolutions dot com
 Status:   Open
 Bug Type: mSQL related
 Operating System: NetBSD 2.0
 PHP Version:  5CVS-2005-02-13 (dev)
 New Comment:

I looked at the MySQL extension to see how they handled NULL values and
copied that into the mSQL extension.  Here's the patch against head:
http://www.analysisandsolutions.com/php/php_msql.c.bug31960.diff

Works fine on my installation of 5.0.4-dev.


Previous Comments:


[2005-02-13 21:02:44] danielc at analysisandsolutions dot com

Description:

msql_fetch_row() and msql_fetch_array() silently drop columns that
contain NULL values.  It's important to retrieve all data from a row,
even if it's NULL.  oci8 does this just fine.

While there's a comment in the msql_fetch_array() documentation to
watch out for items that have NULL/0/'' values, it doesn't exactly say
what the problem is and it only talks about results that have only one
column.

Reproduce code:
---
$con = msql_connect();
$db  = msql_select_db('ptdb', $con);
msql_query('CREATE TABLE blah (i INT, c CHAR(5))', $con);
msql_query("INSERT INTO blah VALUES (1, 'a')", $con);
msql_query("INSERT INTO blah VALUES (2, NULL)", $con);
msql_query("INSERT INTO blah VALUES (NULL, 'c')", $con);
$result = msql_query('SELECT * FROM blah', $con);
while ($arr = msql_fetch_array($result, MSQL_ASSOC)) {
var_dump($arr);
echo "\n";
}
msql_query('DROP TABLE blah', $con);

Expected result:

array(2) {
  ["i"]=>
  string(1) "1"
  ["c"]=>
  string(1) "a"
}

array(2) {
  ["i"]=>
  string(1) "2"
  ["c"]=>
  NULL
}

array(2) {
  ["a"]=>
  NULL
  ["c"]=>
  string(1) "c"
}

Actual result:
--
array(2) {
  ["i"]=>
  string(1) "1"
  ["c"]=>
  string(1) "a"
}

array(1) {
  ["i"]=>
  string(1) "2"
}

array(1) {
  ["c"]=>
  string(1) "c"
}





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


#31977 [NEW]: count() doesnt count class members properly

2005-02-14 Thread jmarbas at hotmail dot com
From: jmarbas at hotmail dot com
Operating system: Windows XP
PHP version:  5.0.3
PHP Bug Type: Class/Object related
Bug description:  count() doesnt count class members properly

Description:

When I try to count the number of non-static members of an object with the
count() function, I always get a count of 1. The code below shows both a
user defined class and the standard class(StdClass) instances with more
than 1 member variable each but the count() still comes out to 1.



Reproduce code:
---
  class jerry{
public $foo='A property';
public $bar='Another property';
  }
  $obj1 = new jerry();
  echo $obj1->foo."\n";
  echo $obj1->bar."\n";
printf("The count is %d\n",count($obj1));

  $obj = new StdClass;
  $obj->foo='A property';
  $obj->bar='Another property';
  $obj->bleh='asdf';
  echo $obj->foo."\n";
  echo $obj->bar."\n";
  echo $obj->bleh."\n";
  printf("The count is %d\n",count($obj));

Expected result:

I expect the count() function to count all non-static member variables
just like it says in the count() description on php.net

Actual result:
--
The actual count() is 1 for both objects in the code pasted above.

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


#31979 [NEW]: msql_fetch_field() not reporting unique keys

2005-02-14 Thread danielc at analysisandsolutions dot com
From: danielc at analysisandsolutions dot com
Operating system: NetBSD 2.0
PHP version:  5CVS-2005-02-15 (dev)
PHP Bug Type: mSQL related
Bug description:  msql_fetch_field() not reporting unique keys

Description:

One of the properties returned by msql_fetch_field() is "unique".  It is
supposed to contain 1 if the column in question is part of a unique key
and 0 if it's not.  But it always returns 0.

Reproduce code:
---
$con = msql_connect();
$db  = msql_select_db('ptdb', $con);
msql_query('CREATE TABLE blah (i INT)', $con);
msql_query('CREATE UNIQUE INDEX bi ON blah (i)', $con);
$result = msql_query('SELECT * FROM blah', $con);
$info = msql_fetch_field($result);
print_r($info);
msql_query('DROP TABLE blah', $con);

Expected result:

stdClass Object
(
[name] => i
[table] => blah
[not_null] => 0
[unique] => 1
[type] => int
)

Actual result:
--
stdClass Object
(
[name] => i
[table] => blah
[not_null] => 0
[unique] => 0
[type] => int
)

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


#31968 [Asn]: PDO getcolumnmeta returns no value when select returns not data

2005-02-14 Thread jlim at natsoft dot com
 ID:   31968
 User updated by:  jlim at natsoft dot com
 Reported By:  jlim at natsoft dot com
 Status:   Assigned
 Bug Type: *Database Functions
 Operating System: WinXP SP2
 PHP Version:  5CVS-2005-02-14 (dev)
 Assigned To:  wez
 New Comment:

Hi

This is probably a problem with sqlite. I just tested with pdo's pgsql
extension and getcolumnmeta worked fine under both cases.

John


Previous Comments:


[2005-02-14 16:34:22] [EMAIL PROTECTED]

I'll look into it.

PS: John, can you submit PDO bugs via PECL instead in the future.  I'd
love to find out more about the OCI problems you mentioned.

http://pecl.php.net/bugs/report.php?package=PDO
http://pecl.php.net/bugs/report.php?package=PDO_OCI
etc.

thanks!



[2005-02-14 12:09:33] jlim at natsoft dot com

Description:

Hi,

I think PDO should return the getColumnMeta info even if no data is
returned, so long as SQL parses correctly and table exists. I believe
that all of the non-PDO database extensions work like this.

I don't know whether this is an SQLite issue or PDO issue.

Thanks, John Lim

Reproduce code:
---
prepare("select * from hash ");
$ok = $st2->execute();
echo "GetColumnMeta";
for ($i=0; $i<2; $i++) {
$col = $st2->getColumnMeta($i);
var_dump($col);echo "";
}
}

$db = new PDO('sqlite:' . getenv('HOME') . "/.web-watch.sql3");
$db->query('create table hash(url primary key, hash)');
$db->query('delete from hash');
GetColumnMeta($db);

$db->query("insert into hash (url, hash) values
('http://yahoo.com/','100')");
GetColumnMeta($db);  
?> 

Expected result:

GetColumnMeta
array(6) { ["native_type"]=> string(6) "string" ["flags"]=> array(0) {
} ["name"]=> string(3) "url" ["len"]=> int(-1) ["precision"]=> int(0)
["pdo_type"]=> int(2) }
array(6) { ["native_type"]=> string(6) "string" ["flags"]=> array(0) {
} ["name"]=> string(4) "hash" ["len"]=> int(-1) ["precision"]=> int(0)
["pdo_type"]=> int(2) } 

GetColumnMeta
array(6) { ["native_type"]=> string(6) "string" ["flags"]=> array(0) {
} ["name"]=> string(3) "url" ["len"]=> int(-1) ["precision"]=> int(0)
["pdo_type"]=> int(2) }
array(6) { ["native_type"]=> string(6) "string" ["flags"]=> array(0) {
} ["name"]=> string(4) "hash" ["len"]=> int(-1) ["precision"]=> int(0)
["pdo_type"]=> int(2) } 

Actual result:
--
GetColumnMeta
bool(false)
bool(false)

GetColumnMeta
array(6) { ["native_type"]=> string(6) "string" ["flags"]=> array(0) {
} ["name"]=> string(3) "url" ["len"]=> int(-1) ["precision"]=> int(0)
["pdo_type"]=> int(2) }
array(6) { ["native_type"]=> string(6) "string" ["flags"]=> array(0) {
} ["name"]=> string(4) "hash" ["len"]=> int(-1) ["precision"]=> int(0)
["pdo_type"]=> int(2) }






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


#31980 [NEW]: Unable to Extract Windows XP EXIF Information

2005-02-14 Thread sdteffen at gmail dot com
From: sdteffen at gmail dot com
Operating system: Windows XP
PHP version:  4.3.10
PHP Bug Type: EXIF related
Bug description:  Unable to Extract Windows XP EXIF Information

Description:

I'm trying to extract EXIF information created by the Windows XP Explorer
(In particular the Comments field).

Dumping the array created by

exif_read_data('c:\test.jpg','WINXP',true);

includes the following result:

["WINXP"]=>
  array(1) {
["Comments"]=>
string(1) "G"
  }

The problem is that the comment is not only the letter "G",
but a full sentence (starting with G).

Apparently, the comment is UNICODE (UCS-2?). I tried to
use mb_string (Loading php_mbstring.dll before php_exif.dll
like outlined in the PHP manual) without success.

The constant EXIF_USE_MBSTRING is 0 - isn't this a contradiction with the
PHP Manual that says 
"Windows users must also have the  mbstring  extension enabled"?

If this is not a bug, please consider it as a request to
enhance the PHP Manual with a small example showing the
necessary php.ini configurations to use in conjuction with
Windows XP Explorer EXIF comments. Windows Explorer is the
most convenient application for our users to add EXIF comments.

PHP 4.3.10 Zipfile distribution, using the CGI (php.exe).

Reproduce code:
---
exif_read_data('c:\test.jpg','WINXP',true);

Expected result:

["WINXP"]=>
  array(1) {
["Comments"]=>
string(1) "G"
  }

Actual result:
--
["WINXP"]=>
  array(1) {
["Comments"]=>
string(1) "Generator and pump"
  }

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


#31910 [Opn]: A special string containing "E" causes an Unhandled Exception

2005-02-14 Thread jakub at icewarp dot com
 ID:   31910
 User updated by:  jakub at icewarp dot com
 Reported By:  jakub at icewarp dot com
 Status:   Open
 Bug Type: Scripting Engine problem
 Operating System: win32 / ISAPI
 PHP Version:  4CVS-2005-02-10
 New Comment:

Yes it might be that... I can reproduce it since 4.3.10.


Previous Comments:


[2005-02-14 21:48:19] plyrvt at mail dot ru

Maybe this is related somehow to 
4.3.10 Changelog: "Added the %F modifier to *printf to render a
non-locale-aware representation of a float with the . as decimal
separator."
and is locale-dependent?



[2005-02-14 21:17:17] plyrvt at mail dot ru

"PHP has encountered an Unhandled Exception Code %d at %p"
it's a part of php4isapi.dll file, but I cannot reproduce this bug
neither under 4.3.8 nor 4.3.9 nor 5.0.2 (winxp-sp1-iis5.1)



[2005-02-14 18:44:45] jakub at icewarp dot com

Any news on the issue?



[2005-02-11 10:13:33] jakub at icewarp dot com

I did some more tests and it is true I could not reproduce it in
command line using php.exe (CGI). It is a subject of the ISAPI
interface only then. Did you test ISAPI?



[2005-02-11 03:40:37] [EMAIL PROTECTED]

And I can not reproduce this with Apache2 SAPI either..
So please tell me HOW to reproduce this?




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

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