#48323 [Com]: files load at command line, but not through apache.

2009-05-18 Thread carsten_sttgt at gmx dot de
 ID:   48323
 Comment by:   carsten_sttgt at gmx dot de
 Reported By:  davebastow at yahoo dot com dot au
 Status:   Open
 Bug Type: Dynamic loading
 Operating System: Win32 (XP SP3)
 PHP Version:  5.2.9
 New Comment:

> but if I try to load any of "php_mysql.dll", 
> "php_mysqli.dll" or "php_mcrypt.dll"
> 
> "PHP Startup: Unable to load dynamic library

All of these extensions needs additional dlls. They are usual in the
PHP directory.
--> add the PHP directory to the (system) PATH environment variable.
(Maybe a restart is required).

See:
http://de.php.net/manual/en/install.windows.extensions.php


Previous Comments:


[2009-05-18 23:21:12] davebastow at yahoo dot com dot au

Description:

I can repeat the behaviour reported by "usai roberto" in bug #5764 
(http://bugs.php.net/bug.php?id=5764) but this bug is closed so I 
cannot add to it.

It relates to loading extension dll files.  I can load the extension 
"php_gd2.dll", but if I try to load any of "php_mysql.dll", 
"php_mysqli.dll" or "php_mcrypt.dll"

When I start apache (which attempts to load php as a module) I get a 
pop-up saying:

"PHP Startup: Unable to load dynamic library 
'c:\server\php\ext\php_mcrypt.dll' - The specified module could not be

found"

Similar messages appear for the other two mysql dll files also.  Then 
a second series of three identical popups is displayed.  Apache still 
runs, and php is available, but as soon as, for example mysql is 
accessed in a script I get the familiar "Fatal error: Call to 
undefined function mysql_connect()..." 

Importantly, all four of these files are within the same directory 
which I can guarantee is that referred to by my php.ini file.  And 
seeing as php_gd2.dll is accessed, one would assume that the 
extension_dir value is correctly set.

Interestingly these errors only occur when using php via apache.  

That is, if I run "php -i" from the command line, no such error 
occurs.  Comparing the output from php -i to that of the  command (accessed via apache) I can see that the value 
of "extension_dir" and "Loaded configuration File" show exactly the 
same values in both.  However the "php -i" version contains a mysql 
and mysqli section whereas the webpage version does not.

I've been playing with this for literally days now, and would REALLY 
love a solution.

My software versions are as follows:

PHP 5.2.9-2 (cli) (built: Apr  9 2009 08:23:19)
Copyright (c) 1997-2009 The PHP Group
Zend Engine v2.2.0, Copyright (c) 1998-2009 Zend Technologies

Apache
Server version: Apache/2.2.11 (Win32)
Server built:   Dec 10 2008 00:10:06

Mysql (not that I think it matters)
mysqld  Ver 5.1.34-community for Win32 on ia32 (MySQL Community Server

(GPL))

Windows XP
Home Edition
Version 2002
Service Pack 3


Will be happy to provide any further information.

Kind Regards,

David Bastow






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



#48240 [Csd->Opn]: DBA Segmentation fault dba_nextkey

2009-05-18 Thread VJTD3 at VJTD3 dot com
 ID:   48240
 User updated by:  VJTD3 at VJTD3 dot com
 Reported By:  VJTD3 at VJTD3 dot com
-Status:   Closed
+Status:   Open
 Bug Type: DBM/DBA related
 Operating System: linux redhat fedora 10
 PHP Version:  5.2.9
 Assigned To:  felipe
 New Comment:

i didn't see a reply, changed it to open in case that's needed for
devs.


Previous Comments:


[2009-05-13 07:16:08] VJTD3 at VJTD3 dot com

can this be changed to return the first result if there is one and
false if there are none?

db_firstkey is a rewind, db_nextkey is a iterator. starting from the
beginning makes sense.



[2009-05-13 02:17:19] fel...@php.net

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.

Fixed in 5.2, 5.3 and HEAD.

FALSE is returned now.



[2009-05-12 14:31:58] VJTD3 at VJTD3 dot com

[New Thread 0xb7ff56c0 (LWP 10754)]

Program received signal SIGSEGV, Segmentation fault.
0x080d0c66 in dba_nextkey_db4 (info=0x84d75f0, newlen=0xbfffb360)
at php-5.2.9/ext/dba/dba_db4.c:222
222 if (dba->cursor->c_get(dba->cursor, &gkey, &gval,
DB_NEXT) == 0)  
   {
(gdb) bt
#0  0x080d0c66 in dba_nextkey_db4 (info=0x84d75f0, newlen=0xbfffb360)
at php-5.2.9/ext/dba/dba_db4.c:222
#1  0x080cf3cc in zif_dba_nextkey (ht=1, return_value=0x84d6e78,
return_value_ptr=0x0, this_ptr=0x0, return_value_used=1)
at php-5.2.9/ext/dba/dba.c:1101
#2  0x08304280 in zend_do_fcall_common_helper_SPEC
(execute_data=0xbfffb548)
at php-5.2.9/Zend/zend_vm_execute.h:200
#3  0x08309bba in ZEND_DO_FCALL_SPEC_CONST_HANDLER
(execute_data=0xbfffb548)
at php-5.2.9/Zend/zend_vm_execute.h:1729
#4  0x08303dfd in execute (op_array=0x84d7538)
at php-5.2.9/Zend/zend_vm_execute.h:92
#5  0x082df04e in zend_execute_scripts (type=8, retval=0x0,
file_count=3)
at php-5.2.9/Zend/zend.c:1134
#6  0x0828dd81 in php_execute_script (primary_file=0xbfffd8c4)
at php-5.2.9/main/main.c:2023
#7  0x0835a851 in main (argc=2, argv=0xbfffda04)
at php-5.2.9/sapi/cli/php_cli.c:1133
(gdb) frame 0
#0  0x080d0c66 in dba_nextkey_db4 (info=0x84d75f0, newlen=0xbfffb360)
at php-5.2.9/ext/dba/dba_db4.c:222
222 if (dba->cursor->c_get(dba->cursor, &gkey, &gval,
DB_NEXT) == 0)  
   {
(gdb) frame 1
#1  0x080cf3cc in zif_dba_nextkey (ht=1, return_value=0x84d6e78,
return_value_ptr=0x0, this_ptr=0x0, return_value_used=1)
at php-5.2.9/ext/dba/dba.c:1101
1101nkey = info->hnd->nextkey(info, &len TSRMLS_CC);
(gdb) frame 2
#2  0x08304280 in zend_do_fcall_common_helper_SPEC
(execute_data=0xbfffb548)
at php-5.2.9/Zend/zend_vm_execute.h:200
200 ((zend_internal_function *)
EX(function_state).f
unction)->handler(opline->extended_value,
EX_T(opline->result.u.var).var.ptr, EX  
 
(function_state).function->common.return_reference?&EX_T(opline->result.u.var).v

   ar.ptr:NULL, EX(object), return_value_used TSRMLS_CC);
(gdb) frame 3
#3  0x08309bba in ZEND_DO_FCALL_SPEC_CONST_HANDLER
(execute_data=0xbfffb548)
at php-5.2.9/Zend/zend_vm_execute.h:1729
1729return
zend_do_fcall_common_helper_SPEC(ZEND_OPCODE_HANDLER_ARGS   

_PASSTHRU);
(gdb) frame 4
#4  0x08303dfd in execute (op_array=0x84d7538)
at php-5.2.9/Zend/zend_vm_execute.h:92
92  if (EX(opline)->handler(&execute_data
TSRMLS_CC) > 0) {
(gdb) frame 5
#5  0x082df04e in zend_execute_scripts (type=8, retval=0x0,
file_count=3)
at php-5.2.9/Zend/zend.c:1134
1134zend_execute(EG(active_op_array)
TSRMLS_CC);
(gdb) frame 6
#6  0x0828dd81 in php_execute_script (primary_file=0xbfffd8c4)
at php-5.2.9/main/main.c:2023
2023retval = (zend_execute_scripts(ZEND_REQUIRE
TSRMLS_CC, N
ULL, 3, prepend_file_p, primary_file, append_file_p) ==
SUCCESS);
(gdb) frame 7
#7  0x0835a851 in main (argc=2, argv=0xbfffda04)
at php-5.2.9/sapi/cli/php_cli.c:1133
1133php_execute_script(&file_handle
TSRMLS_CC);
(gdb)


if you need me to go into more i can. it looks like it's just
referencing a value not set till dba_firstk

#48326 [Opn]: socket_recvfrom and socket_recv constant MSG_DONTWAIT not defined

2009-05-18 Thread VJTD3 at VJTD3 dot com
 ID:   48326
 User updated by:  VJTD3 at VJTD3 dot com
 Reported By:  VJTD3 at VJTD3 dot com
 Status:   Open
 Bug Type: Sockets related
 Operating System: windows vista
 PHP Version:  5.2.9
 New Comment:

print (defined('MSG_DONTWAIT') ? 'defined:'.constant('MSG_DONTWAIT') :
'not defined');

just a typo fix in the example, missed the ', it's a bug just a typo in
my example.


Previous Comments:


[2009-05-19 04:56:58] VJTD3 at VJTD3 dot com

Description:

socket_recvfrom and socket_recv function flag of the constant
MSG_DONTWAIT are not defined.



Reproduce code:
---
print (defined(MSG_DONTWAIT) ? 'defined:'.constant(MSG_DONTWAIT) : 'not
defined');

Expected result:

'defined:' and the value of the constant MSG_DONTWAIT

Actual result:
--
not defined





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



#48326 [NEW]: socket_recvfrom and socket_recv constant MSG_DONTWAIT not defined

2009-05-18 Thread VJTD3 at VJTD3 dot com
From: VJTD3 at VJTD3 dot com
Operating system: windows vista
PHP version:  5.2.9
PHP Bug Type: Sockets related
Bug description:  socket_recvfrom and socket_recv constant MSG_DONTWAIT not 
defined

Description:

socket_recvfrom and socket_recv function flag of the constant MSG_DONTWAIT
are not defined.



Reproduce code:
---
print (defined(MSG_DONTWAIT) ? 'defined:'.constant(MSG_DONTWAIT) : 'not
defined');

Expected result:

'defined:' and the value of the constant MSG_DONTWAIT

Actual result:
--
not defined

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



#21696 [Com]: Checkbox is strange in POST event

2009-05-18 Thread mj at ungesundleben dot org
 ID:   21696
 Comment by:   mj at ungesundleben dot org
 Reported By:  ivanpisa at dfm dot ffclrp dot usp dot br
 Status:   No Feedback
 Bug Type: *General Issues
 Operating System: Windows 2000
 PHP Version:  4.3.0
 New Comment:

Same problem with PHP 5.1.4, Windows XP and Xampp 1.5.3a.

The problem is especially: How to create a CSV file from post data
without explicitely handling checkbox fields by their names if some
checkbox fields "vanish"? You will get an unusable CSV file, because the
order of the fields gets mismatched.

Workaround:

Inside the form, create checkboxes, which always are checked, but
hidden for the user (using CSS), like this:




Within a loop “foreach ($_POST as $key=>$value)” through the post data,
you then can do sth. like this:

if (strpos($key,"_chk")) {
if (isset($_POST[$key][1])) {$v='TRUE';} else {$v='FALSE';};
}

Regards,
Maike


Previous Comments:


[2008-09-21 11:12:33] jeff at powerupmobile dot com

Same problem with me:
Solaris 10
PHP 5.2.5
Apache 2.2.8

Seems like a simple problem to me, PHP doesn't seem to recognise when a
form checkbox is submitted with no value. I guess there are several ways
to work around it but would be nice if it recognised it like it
recognises and empty text field.



[2003-01-31 13:50:10] sni...@php.net

No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Open". Thank you.





[2003-01-17 20:17:34] sni...@php.net

If you're really using Apache2, consider moving to Apache 1.3.27 which
actually works.




[2003-01-17 09:10:07] hholz...@php.net

are you sure that your error_reporting settings are really the same on
both boxes? (pleas check in phpinfo() output)

the message you see is only produced if E_NOTICE reporting is enabled
...



[2003-01-17 05:18:53] ivanpisa at dfm dot ffclrp dot usp dot br

First, thanks for your attention.

a) I'm running the same script in other machine, and it's passing NULL
("") string. I suppose the other machine, with the same configuration,
should have the same behavior.

b) Do I have to create the variable? Again, it's running in other
machine with no problems. And all of my variables are created in the
moment I need them. Did I miss something about PHP?

c) I'll test.

d) You are right, sorry, I mean register_globals is off

e) I'll read.



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

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



#48317 [NEW]: Cross compiling php.5.3.RC2 for mipsel fails

2009-05-18 Thread jf at netmadeira dot com
From: jf at netmadeira dot com
Operating system: linux
PHP version:  5.3CVS-2009-05-18 (snap)
PHP Bug Type: Compile Failure
Bug description:  Cross compiling php.5.3.RC2 for mipsel fails

Description:

Cross compiling php for mipsel fails in 5.3 RC2 while in 5.2.9 compiles
fine. 
Configure went fine, fails when making with this error:
/wdtv/wip/php-5.3.0/php5.3-snap/ext/standard/basic_functions.c:3007:
error: 'zif_dns_check_record' undeclared here (not in a function)
make: *** [ext/standard/basic_functions.lo] Error 1


Reproduce code:
---
./configure \
--target=mipsel-linux \
--host=mipsel-linux \
--build=i386 \
--prefix=${install} \
--bindir=${install}/bin \
--sbindir=${install}/bin \
--mandir=${install}/share/man \
--enable-sockets \
--with-config-file-path=${install0}/conf \
--without-pear \
--without-mysql \
--without-mysql \
--without-apxs \
--without-apxs2 \
--disable-cli \
--with-zlib=$wdtvpath \
--with-zlib-dir=$wdtvpath \
--enable-pdo=shared \
--with-pdo-sqlite=shared \
--with-sqlite=shared \
--with-sqlite3=shared \
--enable-sqlite-utf8 \
--with-libxml-dir=$wdtvpath \
--with-curl=$wdtvpath \
--enable-shared \
--enable-exif \
--with-gd=shared \
--with-jpeg-dir=$wdtvpath \
--with-png-dir=$wdtvpath \
--with-freetype-dir=$wdtvpath \
--with-openssl=$wdtvpath \
--with-openssl-dir=$wdtvpath \
--enable-gd-native-ttf \
--with-xsl=$wdtvpath \
--with-iconv=$wdtvpath \
--with-bz2=$wdtvpath \
--enable-calendar \
--with-ldap=$wdtvpath \
--enable-zip \
--with-readline=$wdtvpath \
--with-pcre-regex \
--enable-ftp \
--with-mcrypt=$wdtvpath \


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



#48325 [NEW]: IIS7 isapi - cannot enable curl extension

2009-05-18 Thread jpgorton at gmail dot com
From: jpgorton at gmail dot com
Operating system: windows server 2008 64bit
PHP version:  5.2.9
PHP Bug Type: IIS related
Bug description:  IIS7 isapi - cannot enable curl extension

Description:

I have windows server 2008 64bit.. with IIS7. If I run PHP via 
FastCGI the curl extension will load, but if I run PHP via isapi the 
curl extension will not load and does not appear in phpinfo(). Other 
extensions (ie sqlite) will load both ways.





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



#48324 [NEW]: oci_bind_by_name returning wrong id value

2009-05-18 Thread roger dot robins at det dot nsw dot edu dot au
From: roger dot robins at det dot nsw dot edu dot au
Operating system: Linux Redhat ES 3.0
PHP version:  5.2.9
PHP Bug Type: OCI8 related
Bug description:  oci_bind_by_name returning wrong id value

Description:

When INSERTing a record into a table that has a database sequence for
calculating the table id (unique identifier) and that sequence's next_val
has reached double figures; and you use oci_bind_by_name to return the id
of the inserted row; then only the first digit of the two digit row id is
returned.

Code:
 $sql = "INSERT INTO {$this->prefix}$table ($fields) VALUES($values)
$returning";
$id = null;

$this->query_start($sql, $params, SQL_QUERY_INSERT);
$stmt = $this->parse_query($sql);
$descriptors = $this->bind_params($stmt, $params, $table);
if ($returning) {
  oci_bind_by_name($stmt, ":oracle_id", $id, -1, SQLT_LNG);
}
$result = oci_execute($stmt);
$this->free_descriptors($descriptors);
$this->query_end($result, $stmt);
oci_free_statement($stmt);


Reproduce code:
---
Environment:
PHP 5.2.9 compiled again Oracle 10.2 or 11.1 client, connecting to Oracle
10.2 database.

'./configure' '--with-apxs2=/usr/local/apache/bin/apxs'
'--with-mysql=/usr/bin' '--enable-soap' '--with-curl' '--with-xmlrpc'
'--enable-mbstring' '--with-openssl' '--enable-zip' '--with-ldap'
'--with-oci8=/apps/oraoid/app/oraoid/product/11.1.0/client_1' 

Expected result:

When the database table sequence reaches double figures, the correct table
(seed) id should be returned as a result of sql INSERT command and calling
oci_bind_by_name. 

Actual result:
--
The id returned is only the first digit of the real row id.

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



#48323 [NEW]: files load at command line, but not through apache.

2009-05-18 Thread davebastow at yahoo dot com dot au
From: davebastow at yahoo dot com dot au
Operating system: Win32 (XP SP3)
PHP version:  5.2.9
PHP Bug Type: Dynamic loading
Bug description:  files load at command line, but not through apache.

Description:

I can repeat the behaviour reported by "usai roberto" in bug #5764 
(http://bugs.php.net/bug.php?id=5764) but this bug is closed so I 
cannot add to it.

It relates to loading extension dll files.  I can load the extension 
"php_gd2.dll", but if I try to load any of "php_mysql.dll", 
"php_mysqli.dll" or "php_mcrypt.dll"

When I start apache (which attempts to load php as a module) I get a 
pop-up saying:

"PHP Startup: Unable to load dynamic library 
'c:\server\php\ext\php_mcrypt.dll' - The specified module could not be 
found"

Similar messages appear for the other two mysql dll files also.  Then 
a second series of three identical popups is displayed.  Apache still 
runs, and php is available, but as soon as, for example mysql is 
accessed in a script I get the familiar "Fatal error: Call to 
undefined function mysql_connect()..." 

Importantly, all four of these files are within the same directory 
which I can guarantee is that referred to by my php.ini file.  And 
seeing as php_gd2.dll is accessed, one would assume that the 
extension_dir value is correctly set.

Interestingly these errors only occur when using php via apache.  

That is, if I run "php -i" from the command line, no such error 
occurs.  Comparing the output from php -i to that of the  command (accessed via apache) I can see that the value 
of "extension_dir" and "Loaded configuration File" show exactly the 
same values in both.  However the "php -i" version contains a mysql 
and mysqli section whereas the webpage version does not.

I've been playing with this for literally days now, and would REALLY 
love a solution.

My software versions are as follows:

PHP 5.2.9-2 (cli) (built: Apr  9 2009 08:23:19)
Copyright (c) 1997-2009 The PHP Group
Zend Engine v2.2.0, Copyright (c) 1998-2009 Zend Technologies

Apache
Server version: Apache/2.2.11 (Win32)
Server built:   Dec 10 2008 00:10:06

Mysql (not that I think it matters)
mysqld  Ver 5.1.34-community for Win32 on ia32 (MySQL Community Server 
(GPL))

Windows XP
Home Edition
Version 2002
Service Pack 3


Will be happy to provide any further information.

Kind Regards,

David Bastow


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



#48322 [NEW]: strcoll() does not work with UTF-8 strings on Mac OS X

2009-05-18 Thread netspy at me dot com
From: netspy at me dot com
Operating system: Mac OS X
PHP version:  5.2.9
PHP Bug Type: Unknown/Other Function
Bug description:  strcoll() does not work with UTF-8 strings on Mac OS X

Description:

strcoll() does not sort UTF-8 strings correctly on Mac OS X.

Reproduce code:
---
$locale = 'de_DE.UTF-8'; 
$string = "abcdefghijklmnopqrstuvwxyzäöüß"; 

$array = array(); 

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



#48317 [Opn]: Spoted error in dns.h

2009-05-18 Thread jf at netmadeira dot com
 ID:   48317
 User updated by:  jf at netmadeira dot com
 Reported By:  jf at netmadeira dot com
 Status:   Open
 Bug Type: Compile Failure
 Operating System: linux
 PHP Version:  5.3CVS-2009-05-18 (snap)
 New Comment:

Ok, cvs is not the best help here, because for fix this bug I would
need to study lots of code to now what is really breaking here, so, I'll
point what I think its bad, and what I done to fix the error to
myself!!

The rules to define the PHP_FUNCTION(dns_check_record) are:

header: dns.h
#if defined(PHP_WIN32) || (HAVE_RES_SEARCH && !(defined(__BEOS__) ||
defined(NETWARE)))
# if defined(PHP_WIN32) || (HAVE_DN_SKIPNAME && HAVE_DN_EXPAND)
PHP_FUNCTION(dns_check_record);
(...)

function code: dns.c
#if HAVE_RES_SEARCH && !(defined(__BEOS__)||defined(PHP_WIN32) ||
defined(NETWARE))
(...)
PHP_FUNCTION(dns_check_record)
{
(...)



Adding the function to php functions list: basic_functions.c
#if defined(PHP_WIN32) || (HAVE_RES_SEARCH && !(defined(__BEOS__) ||
defined(NETWARE)))
PHP_FE(dns_check_record,arginfo_dns_check_record)
PHP_FALIAS(checkdnsrr,dns_check_record,arginfo_dns_check_record)
#endif

What I see is that in three cases, the rules are different in all, so
sometimes the header can be defines and the function not, or like in
mine, the function is defined but header not!!

Clearly are some conflicts of rules here, but can't really tell what,
without studing the code.

What I made to fix for myself was:
diff -u -p -r1.1.1.1 dns.h
--- standard/dns.h  18 May 2009 21:39:19 -  1.1.1.1
+++ standard/dns.h  18 May 2009 22:14:09 -
@@ -49,9 +49,9 @@ PHP_FUNCTION(gethostname);
 
 #if defined(PHP_WIN32) || (HAVE_RES_SEARCH && !(defined(__BEOS__) ||
defined(NETWARE)))
 
+PHP_FUNCTION(dns_check_record);
 # if defined(PHP_WIN32) || (HAVE_DN_SKIPNAME && HAVE_DN_EXPAND)
 PHP_FUNCTION(dns_get_mx);
-PHP_FUNCTION(dns_check_record);
 # endif
 
 #if defined(PHP_WIN32) || HAVE_DNS_FUNCS


Hope some developer could fix the mess with those rules...


Previous Comments:


[2009-05-18 21:22:19] jf at netmadeira dot com

well, I'm trying to do that, but its first time working with cvs..



[2009-05-18 20:28:36] paj...@php.net

Feel free to send a patch (cvs diff -up :)





[2009-05-18 20:25:13] jf at netmadeira dot com

Sorry to post again, but checked 5.2.9 basic_functions.h

and the rule was:
#if HAVE_RES_SEARCH && !(defined(__BEOS__) || defined(PHP_WIN32) ||
defined(NETWARE))

in 5.3.0 bracket was added before HAVE_RES_SEARCH, think its that what
is triggering this.



[2009-05-18 20:16:41] jf at netmadeira dot com

Whele, it seems its not cross-compiling fault!
ext/standard/dns.h has this rule for dns_get_record fucntion:

#if defined(PHP_WIN32) || (HAVE_RES_SEARCH && !(defined(__BEOS__) ||
defined(NETWARE)))

# if defined(PHP_WIN32) || (HAVE_DN_SKIPNAME && HAVE_DN_EXPAND)
PHP_FUNCTION(dns_get_mx);
PHP_FUNCTION(dns_check_record);
# endif

#if defined(PHP_WIN32) || HAVE_DNS_FUNCS
PHP_FUNCTION(dns_get_record);
PHP_MINIT_FUNCTION(dns);
# endif

in ext/standard/basic_functions.c the prepocessor rule to define(/or
not) php dns_get_record function is:
#if defined(PHP_WIN32) || (HAVE_RES_SEARCH && !(defined(__BEOS__) ||
defined(NETWARE)))

so, something is triggering the defenition of this function somewhere
else, think that this rule must be revised..



[2009-05-18 18:49:20] jf at netmadeira dot com

Ok, I understand..
Do you have at least an ideia of what is causing it?? Maybe I can try
to fix it myself..

Best regards



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

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



#48321 [NEW]: flock blocks within function regardless of operation

2009-05-18 Thread php at alishabeth dot com
From: php at alishabeth dot com
Operating system: Ubuntu 9.04
PHP version:  5.2.9
PHP Bug Type: Filesystem function related
Bug description:  flock blocks within function regardless of operation

Description:

Placing flock() calls within a function seems to result in blocking
regardless of the operations specified.  The same exact code outside a
function behaves correctly.

This bug report wouldn't let me select the PHP version I'm running. 
Wasn't an option

Reproduce code:
---
http://alishabeth.com/lock-test.php.txt

Reproduced in the following builds:
$ php -v
PHP 5.1.6 (cli) (built: Apr  7 2009 08:00:18) 
Copyright (c) 1997-2006 The PHP Group
Zend Engine v2.1.0, Copyright (c) 1998-2006 Zend Technologies
with eAccelerator v0.9.5.2, Copyright (c) 2004-2006 eAccelerator, by
eAccelerator


$ php -v
PHP 5.2.6-3ubuntu4.1 with Suhosin-Patch 0.9.6.2 (cli) (built: Apr 23 2009
14:37:14) 
Copyright (c) 1997-2008 The PHP Group
Zend Engine v2.2.0, Copyright (c) 1998-2008 Zend Technologies
with Xdebug v2.0.3, Copyright (c) 2002-2007, by Derick Rethans


Expected result:

Using the function always blocks

Actual result:
--
Flock should behave correctly within the function

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



#48311 [Opn]: Controlable object diposing

2009-05-18 Thread av3ng3r at gmail dot com
 ID:   48311
 User updated by:  av3ng3r at gmail dot com
 Reported By:  av3ng3r at gmail dot com
 Status:   Open
 Bug Type: Feature/Change Request
 Operating System: -
 PHP Version:  6CVS-2009-05-17 (CVS)
 New Comment:

I know that's a solution to cope with this. However code-wise it will
be cleaner to let only live the reader variable of a certain scope.


Previous Comments:


[2009-05-18 12:25:35] a at b dot c dot de

Your example would be handled by

$reader = new StreamReader($stream);
$reader->write('blahblahblah');
$reader = null; // $reader->__destruct() called

Objects and values are destroyed as soon as the last reference to them
goes away. Remove those references, destroy the object.


$start = microtime(true);

class foo{
private $name;
function __construct($name) {
$this->name = $name;
}
function __destruct() {
echo $this->name." Destroyed at
".(microtime(true)-$GLOBALS['start'])." seconds\n";
}

}

$t1 = new foo('t1');
$t2 = new foo('t2');
$t3 = new foo('t3');

echo "Set \$t1 to null at ".(microtime(true)-$start)." seconds\n";
$t1 = null;
echo "Sleep 5 seconds\n";
sleep(5);
echo "Replace \$t2 with \$t3 at ".(microtime(true)-$start)."
seconds\n";
$t2 = $t3;
echo "Sleep 5 seconds\n";
sleep(5);



[2009-05-17 16:50:23] av3ng3r at gmail dot com

Description:

An implementation like C# (
http://www.coderjournal.com/2007/02/proper-use-idisposable/ ) would be
appreciated:

using(StreamReader reader = new StreamReader(stream))
{
   reader.write('blalblabab');
}

The class StreamReader implements an interface IDisposable, by
implementing this interface (creating a function in the class called;
Dispose) the user can use the statement `using` to control the disposal
of the object manually instead of waiting of the garbage collection of
PHP.

This would be usefull for controling database connections, socket
connections, simplexml?, etc.






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



#48320 [NEW]: assoc arrays with vsprintf

2009-05-18 Thread yasar dot oezdemir at web dot de
From: yasar dot oezdemir at web dot de
Operating system: irrelevant
PHP version:  5.2.9
PHP Bug Type: Feature/Change Request
Bug description:  assoc arrays with vsprintf

Description:

It would be VERY helpful if you could add the functionality of associated
arrays in vpsprintf. 

That would also make many view template scripts easier.

Reproduce code:
---
vsprintf("%2$s %1$s", array('bar','foo'))

Expected result:

vsprintf("%first$s %second$s", array('second'=>'bar','first'=>'foo'))

Actual result:
--
foo bar

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



#48317 [Fbk->Opn]: Spoted error in dns.h

2009-05-18 Thread jf at netmadeira dot com
 ID:   48317
 User updated by:  jf at netmadeira dot com
 Reported By:  jf at netmadeira dot com
-Status:   Feedback
+Status:   Open
 Bug Type: Compile Failure
 Operating System: linux
 PHP Version:  5.3CVS-2009-05-18 (snap)
 New Comment:

well, I'm trying to do that, but its first time working with cvs..


Previous Comments:


[2009-05-18 20:28:36] paj...@php.net

Feel free to send a patch (cvs diff -up :)





[2009-05-18 20:25:13] jf at netmadeira dot com

Sorry to post again, but checked 5.2.9 basic_functions.h

and the rule was:
#if HAVE_RES_SEARCH && !(defined(__BEOS__) || defined(PHP_WIN32) ||
defined(NETWARE))

in 5.3.0 bracket was added before HAVE_RES_SEARCH, think its that what
is triggering this.



[2009-05-18 20:16:41] jf at netmadeira dot com

Whele, it seems its not cross-compiling fault!
ext/standard/dns.h has this rule for dns_get_record fucntion:

#if defined(PHP_WIN32) || (HAVE_RES_SEARCH && !(defined(__BEOS__) ||
defined(NETWARE)))

# if defined(PHP_WIN32) || (HAVE_DN_SKIPNAME && HAVE_DN_EXPAND)
PHP_FUNCTION(dns_get_mx);
PHP_FUNCTION(dns_check_record);
# endif

#if defined(PHP_WIN32) || HAVE_DNS_FUNCS
PHP_FUNCTION(dns_get_record);
PHP_MINIT_FUNCTION(dns);
# endif

in ext/standard/basic_functions.c the prepocessor rule to define(/or
not) php dns_get_record function is:
#if defined(PHP_WIN32) || (HAVE_RES_SEARCH && !(defined(__BEOS__) ||
defined(NETWARE)))

so, something is triggering the defenition of this function somewhere
else, think that this rule must be revised..



[2009-05-18 18:49:20] jf at netmadeira dot com

Ok, I understand..
Do you have at least an ideia of what is causing it?? Maybe I can try
to fix it myself..

Best regards



[2009-05-18 18:28:37] j...@php.net

Sorry, cross-compiling is not supported. If it works, fine, if you can

provide patches to fix issues, even better, but we are not going to try

fix them ourselves. 



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

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



#48319 [Opn->Bgs]: getting Fatal errors member function

2009-05-18 Thread jani
 ID:   48319
 Updated by:   j...@php.net
 Reported By:  kustomjs at gmail dot com
-Status:   Open
+Status:   Bogus
 Bug Type: MySQLi related
 Operating System: Ubuntu 9.04
 PHP Version:  5.2.9
 New Comment:

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

Thank you for your interest in PHP.




Previous Comments:


[2009-05-18 19:31:33] kustomjs at gmail dot com

Description:

I am getting these errors:
Fatal error: Call to a member function bind_param() on a non-object in
/var/www/index.php on line 92
Fatal error: Call to a member function execute() on a non-object in
/var/www/index.php on line 122

Reproduce code:
---
with this code:
default :
// list operation
$stmt = $db->prepare('SELECT id, email, quota FROM users');
$stmt->execute();
$stmt->bind_result($id, $email, $quota);

// not good for large datasets
$results = array();
while ($stmt->fetch()) {
$results[] = array('id' => $id, 'email' => $email, 
'quota' =>
$quota);
}

$stmt->close();

include WORKING_DIR.'/list.inc.php';
}

$db->close();

Expected result:

I would like to get the page to work like this:
http://white-box.us/manage/index.php






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



#48317 [WFx->Fbk]: Spoted error in dns.h

2009-05-18 Thread pajoye
 ID:   48317
 Updated by:   paj...@php.net
 Reported By:  jf at netmadeira dot com
-Status:   Wont fix
+Status:   Feedback
 Bug Type: Compile Failure
 Operating System: linux
 PHP Version:  5.3CVS-2009-05-18 (snap)
 New Comment:

Feel free to send a patch (cvs diff -up :)




Previous Comments:


[2009-05-18 20:25:13] jf at netmadeira dot com

Sorry to post again, but checked 5.2.9 basic_functions.h

and the rule was:
#if HAVE_RES_SEARCH && !(defined(__BEOS__) || defined(PHP_WIN32) ||
defined(NETWARE))

in 5.3.0 bracket was added before HAVE_RES_SEARCH, think its that what
is triggering this.



[2009-05-18 20:16:41] jf at netmadeira dot com

Whele, it seems its not cross-compiling fault!
ext/standard/dns.h has this rule for dns_get_record fucntion:

#if defined(PHP_WIN32) || (HAVE_RES_SEARCH && !(defined(__BEOS__) ||
defined(NETWARE)))

# if defined(PHP_WIN32) || (HAVE_DN_SKIPNAME && HAVE_DN_EXPAND)
PHP_FUNCTION(dns_get_mx);
PHP_FUNCTION(dns_check_record);
# endif

#if defined(PHP_WIN32) || HAVE_DNS_FUNCS
PHP_FUNCTION(dns_get_record);
PHP_MINIT_FUNCTION(dns);
# endif

in ext/standard/basic_functions.c the prepocessor rule to define(/or
not) php dns_get_record function is:
#if defined(PHP_WIN32) || (HAVE_RES_SEARCH && !(defined(__BEOS__) ||
defined(NETWARE)))

so, something is triggering the defenition of this function somewhere
else, think that this rule must be revised..



[2009-05-18 18:49:20] jf at netmadeira dot com

Ok, I understand..
Do you have at least an ideia of what is causing it?? Maybe I can try
to fix it myself..

Best regards



[2009-05-18 18:28:37] j...@php.net

Sorry, cross-compiling is not supported. If it works, fine, if you can

provide patches to fix issues, even better, but we are not going to try

fix them ourselves. 



[2009-05-18 18:16:07] jf at netmadeira dot com

Just to add more info on the error:
/bin/sh /wdtv/wip/php-5.3.0/php5.3-snap/libtool --silent
--preserve-dup-deps --mode=compile mipsel-linux-gcc  -Iext/standard/
-I/wdtv/wip/php-5.3.0/php5.3-snap/ext/standard/ -DPHP_ATOM_INC
-I/wdtv/wip/php-5.3.0/php5.3-snap/include
-I/wdtv/wip/php-5.3.0/php5.3-snap/main -I/wdtv/wip/php-5.3.0/php5.3-snap
-I/wdtv/wip/php-5.3.0/php5.3-snap/ext/date/lib
-I/wdtv/wip/php-5.3.0/php5.3-snap/ext/ereg/regex
-I/usr/wdtvtool/include/libxml2 -I/tmp/.webspath/usr/include
-I/tmp/.webspath/usr/include/freetype2
-I/wdtv/wip/php-5.3.0/php5.3-snap/ext/sqlite3/libsqlite
-I/usr/wdtvtool/include -I/wdtv/wip/php-5.3.0/php5.3-snap/TSRM
-I/wdtv/wip/php-5.3.0/php5.3-snap/Zend  -I/usr/wdtvtool/include
-D_XPG_IV  -I/tmp/.webspath/usr/include -fvisibility=hidden  -c
/wdtv/wip/php-5.3.0/php5.3-snap/ext/standard/basic_functions.c -o
ext/standard/basic_functions.lo 
/wdtv/wip/php-5.3.0/php5.3-snap/ext/standard/basic_functions.c:3007:
error: 'zif_dns_check_record' undeclared here (not in a function)
make: *** [ext/standard/basic_functions.lo] Error 1



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

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



#48317 [WFx]: Spoted error in dns.h

2009-05-18 Thread jf at netmadeira dot com
 ID:   48317
 User updated by:  jf at netmadeira dot com
 Reported By:  jf at netmadeira dot com
 Status:   Wont fix
 Bug Type: Compile Failure
 Operating System: linux
 PHP Version:  5.3CVS-2009-05-18 (snap)
 New Comment:

Sorry to post again, but checked 5.2.9 basic_functions.h

and the rule was:
#if HAVE_RES_SEARCH && !(defined(__BEOS__) || defined(PHP_WIN32) ||
defined(NETWARE))

in 5.3.0 bracket was added before HAVE_RES_SEARCH, think its that what
is triggering this.


Previous Comments:


[2009-05-18 20:16:41] jf at netmadeira dot com

Whele, it seems its not cross-compiling fault!
ext/standard/dns.h has this rule for dns_get_record fucntion:

#if defined(PHP_WIN32) || (HAVE_RES_SEARCH && !(defined(__BEOS__) ||
defined(NETWARE)))

# if defined(PHP_WIN32) || (HAVE_DN_SKIPNAME && HAVE_DN_EXPAND)
PHP_FUNCTION(dns_get_mx);
PHP_FUNCTION(dns_check_record);
# endif

#if defined(PHP_WIN32) || HAVE_DNS_FUNCS
PHP_FUNCTION(dns_get_record);
PHP_MINIT_FUNCTION(dns);
# endif

in ext/standard/basic_functions.c the prepocessor rule to define(/or
not) php dns_get_record function is:
#if defined(PHP_WIN32) || (HAVE_RES_SEARCH && !(defined(__BEOS__) ||
defined(NETWARE)))

so, something is triggering the defenition of this function somewhere
else, think that this rule must be revised..



[2009-05-18 18:49:20] jf at netmadeira dot com

Ok, I understand..
Do you have at least an ideia of what is causing it?? Maybe I can try
to fix it myself..

Best regards



[2009-05-18 18:28:37] j...@php.net

Sorry, cross-compiling is not supported. If it works, fine, if you can

provide patches to fix issues, even better, but we are not going to try

fix them ourselves. 



[2009-05-18 18:16:07] jf at netmadeira dot com

Just to add more info on the error:
/bin/sh /wdtv/wip/php-5.3.0/php5.3-snap/libtool --silent
--preserve-dup-deps --mode=compile mipsel-linux-gcc  -Iext/standard/
-I/wdtv/wip/php-5.3.0/php5.3-snap/ext/standard/ -DPHP_ATOM_INC
-I/wdtv/wip/php-5.3.0/php5.3-snap/include
-I/wdtv/wip/php-5.3.0/php5.3-snap/main -I/wdtv/wip/php-5.3.0/php5.3-snap
-I/wdtv/wip/php-5.3.0/php5.3-snap/ext/date/lib
-I/wdtv/wip/php-5.3.0/php5.3-snap/ext/ereg/regex
-I/usr/wdtvtool/include/libxml2 -I/tmp/.webspath/usr/include
-I/tmp/.webspath/usr/include/freetype2
-I/wdtv/wip/php-5.3.0/php5.3-snap/ext/sqlite3/libsqlite
-I/usr/wdtvtool/include -I/wdtv/wip/php-5.3.0/php5.3-snap/TSRM
-I/wdtv/wip/php-5.3.0/php5.3-snap/Zend  -I/usr/wdtvtool/include
-D_XPG_IV  -I/tmp/.webspath/usr/include -fvisibility=hidden  -c
/wdtv/wip/php-5.3.0/php5.3-snap/ext/standard/basic_functions.c -o
ext/standard/basic_functions.lo 
/wdtv/wip/php-5.3.0/php5.3-snap/ext/standard/basic_functions.c:3007:
error: 'zif_dns_check_record' undeclared here (not in a function)
make: *** [ext/standard/basic_functions.lo] Error 1



[2009-05-18 17:54:41] jf at netmadeira dot com

Description:

Cross compiling php for mipsel fails in 5.3 RC2 while in 5.2.9 compiles
fine. 
Configure went fine, fails when making with this error:
/wdtv/wip/php-5.3.0/php5.3-snap/ext/standard/basic_functions.c:3007:
error: 'zif_dns_check_record' undeclared here (not in a function)
make: *** [ext/standard/basic_functions.lo] Error 1


Reproduce code:
---
./configure \
--target=mipsel-linux \
--host=mipsel-linux \
--build=i386 \
--prefix=${install} \
--bindir=${install}/bin \
--sbindir=${install}/bin \
--mandir=${install}/share/man \
--enable-sockets \
--with-config-file-path=${install0}/conf \
--without-pear \
--without-mysql \
--without-mysql \
--without-apxs \
--without-apxs2 \
--disable-cli \
--with-zlib=$wdtvpath \
--with-zlib-dir=$wdtvpath \
--enable-pdo=shared \
--with-pdo-sqlite=shared \
--with-sqlite=shared \
--with-sqlite3=shared \
--enable-sqlite-utf8 \
--with-libxml-dir=$wdtvpath \
--with-curl=$wdtvpath \
--enable-shared \
--enable-exif \
--with-gd=shared \
--with-jpeg-dir=$wdtvpath \
--with-png-dir=$wdtvpath \
--with-freetype-dir=$wdtvpath \
--with-openssl=$wdtvpath \
--with-openssl-dir=$wdtvpath \
--enable-gd-native-ttf \
--with-xsl=$wdtvpath \
--with-iconv=$wdtvpath \
--with-bz2=$wdtvpath \
--enable-calendar \
--with-ldap=$wdtvpath \
--enable-zip \
--with-readline=$wdtvpath \
--with-pcre-regex \
--enable-ftp \
--with-mcrypt=$wdtvpath \






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



#48317 [WFx]: Spoted error in dns.h

2009-05-18 Thread jf at netmadeira dot com
 ID:   48317
 User updated by:  jf at netmadeira dot com
-Summary:  Cross compiling php.5.3.RC2 for mipsel fails
 Reported By:  jf at netmadeira dot com
 Status:   Wont fix
 Bug Type: Compile Failure
 Operating System: linux
 PHP Version:  5.3CVS-2009-05-18 (snap)
 New Comment:

Whele, it seems its not cross-compiling fault!
ext/standard/dns.h has this rule for dns_get_record fucntion:

#if defined(PHP_WIN32) || (HAVE_RES_SEARCH && !(defined(__BEOS__) ||
defined(NETWARE)))

# if defined(PHP_WIN32) || (HAVE_DN_SKIPNAME && HAVE_DN_EXPAND)
PHP_FUNCTION(dns_get_mx);
PHP_FUNCTION(dns_check_record);
# endif

#if defined(PHP_WIN32) || HAVE_DNS_FUNCS
PHP_FUNCTION(dns_get_record);
PHP_MINIT_FUNCTION(dns);
# endif

in ext/standard/basic_functions.c the prepocessor rule to define(/or
not) php dns_get_record function is:
#if defined(PHP_WIN32) || (HAVE_RES_SEARCH && !(defined(__BEOS__) ||
defined(NETWARE)))

so, something is triggering the defenition of this function somewhere
else, think that this rule must be revised..


Previous Comments:


[2009-05-18 18:49:20] jf at netmadeira dot com

Ok, I understand..
Do you have at least an ideia of what is causing it?? Maybe I can try
to fix it myself..

Best regards



[2009-05-18 18:28:37] j...@php.net

Sorry, cross-compiling is not supported. If it works, fine, if you can

provide patches to fix issues, even better, but we are not going to try

fix them ourselves. 



[2009-05-18 18:16:07] jf at netmadeira dot com

Just to add more info on the error:
/bin/sh /wdtv/wip/php-5.3.0/php5.3-snap/libtool --silent
--preserve-dup-deps --mode=compile mipsel-linux-gcc  -Iext/standard/
-I/wdtv/wip/php-5.3.0/php5.3-snap/ext/standard/ -DPHP_ATOM_INC
-I/wdtv/wip/php-5.3.0/php5.3-snap/include
-I/wdtv/wip/php-5.3.0/php5.3-snap/main -I/wdtv/wip/php-5.3.0/php5.3-snap
-I/wdtv/wip/php-5.3.0/php5.3-snap/ext/date/lib
-I/wdtv/wip/php-5.3.0/php5.3-snap/ext/ereg/regex
-I/usr/wdtvtool/include/libxml2 -I/tmp/.webspath/usr/include
-I/tmp/.webspath/usr/include/freetype2
-I/wdtv/wip/php-5.3.0/php5.3-snap/ext/sqlite3/libsqlite
-I/usr/wdtvtool/include -I/wdtv/wip/php-5.3.0/php5.3-snap/TSRM
-I/wdtv/wip/php-5.3.0/php5.3-snap/Zend  -I/usr/wdtvtool/include
-D_XPG_IV  -I/tmp/.webspath/usr/include -fvisibility=hidden  -c
/wdtv/wip/php-5.3.0/php5.3-snap/ext/standard/basic_functions.c -o
ext/standard/basic_functions.lo 
/wdtv/wip/php-5.3.0/php5.3-snap/ext/standard/basic_functions.c:3007:
error: 'zif_dns_check_record' undeclared here (not in a function)
make: *** [ext/standard/basic_functions.lo] Error 1



[2009-05-18 17:54:41] jf at netmadeira dot com

Description:

Cross compiling php for mipsel fails in 5.3 RC2 while in 5.2.9 compiles
fine. 
Configure went fine, fails when making with this error:
/wdtv/wip/php-5.3.0/php5.3-snap/ext/standard/basic_functions.c:3007:
error: 'zif_dns_check_record' undeclared here (not in a function)
make: *** [ext/standard/basic_functions.lo] Error 1


Reproduce code:
---
./configure \
--target=mipsel-linux \
--host=mipsel-linux \
--build=i386 \
--prefix=${install} \
--bindir=${install}/bin \
--sbindir=${install}/bin \
--mandir=${install}/share/man \
--enable-sockets \
--with-config-file-path=${install0}/conf \
--without-pear \
--without-mysql \
--without-mysql \
--without-apxs \
--without-apxs2 \
--disable-cli \
--with-zlib=$wdtvpath \
--with-zlib-dir=$wdtvpath \
--enable-pdo=shared \
--with-pdo-sqlite=shared \
--with-sqlite=shared \
--with-sqlite3=shared \
--enable-sqlite-utf8 \
--with-libxml-dir=$wdtvpath \
--with-curl=$wdtvpath \
--enable-shared \
--enable-exif \
--with-gd=shared \
--with-jpeg-dir=$wdtvpath \
--with-png-dir=$wdtvpath \
--with-freetype-dir=$wdtvpath \
--with-openssl=$wdtvpath \
--with-openssl-dir=$wdtvpath \
--enable-gd-native-ttf \
--with-xsl=$wdtvpath \
--with-iconv=$wdtvpath \
--with-bz2=$wdtvpath \
--enable-calendar \
--with-ldap=$wdtvpath \
--enable-zip \
--with-readline=$wdtvpath \
--with-pcre-regex \
--enable-ftp \
--with-mcrypt=$wdtvpath \






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



#48318 [Fbk->Opn]: CLI doesn't build and embed SAPI doesn't load on OS X 10.5.6

2009-05-18 Thread valeriy dot zamarayev at gmail dot com
 ID:   48318
 User updated by:  valeriy dot zamarayev at gmail dot com
 Reported By:  valeriy dot zamarayev at gmail dot com
-Status:   Feedback
+Status:   Open
 Bug Type: Compile Failure
 Operating System: OS X 10.5.6
 PHP Version:  5.3CVS-2009-05-18 (CVS)
 New Comment:

The patch fixes three problems:

1. Missing 'extern's (the only change which will be noticeable on
platforms other than 
Darwin, and looking at the code I think they were just forgotten, most
variables have 
it, but these few ones don't. Just to make sure it doesn't break
anything with ELF I 
tried this on Centos 5.2 - all ok).

2. Some 'special' configuration for darwin, which prevented it from
using GNU libtool 
(no effect on other platforms)

3. 'environ' variable. (no effect on other platforms either, as it only
works if 
crt_externs.h is present - the fix taken from GCC source)

Maybe I should have submitted them all separately, so they don't look
that awful to 
you? Anyway the patch is intended to show exact locations of the
problems and 
suggested fixes, for the interested in OS X support in the upcoming
5.3, probably not 
for an immediate commit. Please treat it as an enhanced problem
description.

As for 5.2.9, I stumbled across the unresolved #44462 issue, among the
others, so I 
moved to 5.3, and I didn't try to load the .so but basically the
environ issue is 
there anyway, as is the 'special' darwin build case, which breaks
linking (looks like 
it was made long ago to avoid accidentally using the Darwin specific
'libtool' 
program.


Previous Comments:


[2009-05-18 18:47:37] j...@php.net

Does this happen with PHP 5.2.9 ? That patch looks really awful. 
Something I'd never would want to commit since this all works
absolutely 
fine on every other platform..



[2009-05-18 18:34:42] valeriy dot zamarayev at gmail dot com

Description:

Attempting to configure and build PHP with ./configure --enable-
maintainer-ztc --enable-debug --enable-embed
1) fails to build CLI
2) the resulting libphp.so cannot be loaded in Darwin due to missing 
'environ' global variable.

Reproduce code:
---
Try to build on OS X 10.5.6 using

# ./buildconf
# ./configure --enable-maintainer-ztc --enable-debug --enable-embed
# make


Expected result:

The CLI binary is built successfully.
The libphp5.so library can be loaded using dlopen().

Actual result:
--
At the library link stage, multiple symbols are in conflict which
have to be declared 'extern' in their '*.h' files. Unlike ELF, with 
Darwin's Mach-O format, common symbols are not allowed by default. So 
ELF is forgiving but Mach-O is not with regard to missing 'extern' 
specifier on global variables. This happens in multiple places in PHP 
code.

At the CLI link stage, an attempt is made to link .o files using CC, 
though during the compilation libtool is used, so the .o files are 
hidden in .libs subdirectires, and .lo files should be used.

If I correct this and do link successfully, the resulting CLI is fine,

but the libphp5.so cannot be loaded on darwin because the symbol 
environ doesn't exist. (There is a function _NSGetEnviron() which 
returns it).


See the patch below for more details:

Index: configure.in
===
RCS file: /repository/php-src/configure.in,v
retrieving revision 1.579.2.52.2.77.2.51
diff -u -u -r1.579.2.52.2.77.2.51 configure.in
--- configure.in6 May 2009 18:57:45 -   
1.579.2.52.2.77.2.51
+++ configure.in18 May 2009 18:21:14 -
@@ -464,7 +464,8 @@
 sys/utsname.h \
 sys/ipc.h \
 dlfcn.h \
-assert.h
+assert.h \
+crt_externs.h
 ],[],[],[
 #ifdef HAVE_SYS_PARAM_H
 #include 
Index: ext/spl/spl_dllist.h
===
RCS file: /repository/php-src/ext/spl/spl_dllist.h,v
retrieving revision 1.1.2.4
diff -u -u -r1.1.2.4 spl_dllist.h
--- ext/spl/spl_dllist.h31 Dec 2008 11:15:43 -  
1.1.2.4
+++ ext/spl/spl_dllist.h18 May 2009 18:21:15 -
@@ -24,9 +24,9 @@
 #include "php.h"
 #include "php_spl.h"
 
-PHPAPI zend_class_entry *spl_ce_SplDoublyLinkedList;
-PHPAPI zend_class_entry *spl_ce_SplQueue;
-PHPAPI zend_class_entry *spl_ce_SplStack;
+extern PHPAPI zend_class_entry *spl_ce_SplDoublyLinkedList;
+extern PHPAPI zend_class_entry *spl_ce_SplQueue;
+extern PHPAPI zend_class_entry *spl_ce_SplStack;
 
 PHP_MINIT_FUNCTION(spl_dllist);
 
Index: ext/spl/spl_fixedarray.h
===
RCS file: /repository/php-src/ext/spl/spl_fixedarray.h,v
retrieving revision 1.1.2.3
diff -u -u -r1.1.2.3 spl_fixedarray.h
--- ext/spl/spl_fixedarray.h31 Dec 2008 11:15:43 -  
1.1.2.3
+++ ext/spl/spl_fixedarray.h18 May 2009 18:21:15 -
@@ -22,

#48319 [NEW]: getting Fatal errors member function

2009-05-18 Thread kustomjs at gmail dot com
From: kustomjs at gmail dot com
Operating system: Ubuntu 9.04
PHP version:  5.2.9
PHP Bug Type: MySQLi related
Bug description:  getting Fatal errors member function

Description:

I am getting these errors:
Fatal error: Call to a member function bind_param() on a non-object in
/var/www/index.php on line 92
Fatal error: Call to a member function execute() on a non-object in
/var/www/index.php on line 122

Reproduce code:
---
with this code:
default :
// list operation
$stmt = $db->prepare('SELECT id, email, quota FROM users');
$stmt->execute();
$stmt->bind_result($id, $email, $quota);

// not good for large datasets
$results = array();
while ($stmt->fetch()) {
$results[] = array('id' => $id, 'email' => $email, 
'quota' => $quota);
}

$stmt->close();

include WORKING_DIR.'/list.inc.php';
}

$db->close();

Expected result:

I would like to get the page to work like this:
http://white-box.us/manage/index.php


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



#48249 [Com]: socket_read() not returning on no more data to read

2009-05-18 Thread z4ns4tsu at gmail dot com
 ID:   48249
 Comment by:   z4ns4tsu at gmail dot com
 Reported By:  z4ns4tsu at gmail dot com
 Status:   Feedback
 Bug Type: Sockets related
 Operating System: Windows XP
 PHP Version:  5.2.9
 New Comment:

string(133) "250-nameofdomain.com [192.168.10.100], this server offers
4 extensions
250-AUTH LOGIN
250-SIZE 30485760
250-HELP
250 AUTH=LOGIN
"

And then it hangs.


Previous Comments:


[2009-05-14 21:58:20] j...@php.net

What DOES it return? Put 'var_dump($out);' inside the loop.



[2009-05-12 19:54:08] z4ns4tsu at gmail dot com

Description:

I am initiating a socket to an SMTP server to send a message. After
transmitting the EHLO, I need to wait for a variable number of lines to
be returned, so I am using a do{..}while() loop to check if there is
nothing more to be read from the socket before sending the next command.
 The program, however, falls into an endless wait because socket_read()
is never returning an empty string (like the documentation says it will)
or FALSE (like some other bug reports say it will).

I have tried with both the PHP_BINARY_READ and PHP_NORMAL_READ flags
set as well as with no flags set at all.

Reproduce code:
---
foreach($mail_head as $in) {
  $output = "";
  $in .= "\r\n";
  echo $in;
  @socket_write($socket, $in, strlen($in)) or die("Error writing to
socket: " . socket_strerror(socket_last_error()));
  do {
$out = false;
$out = socket_read($socket, 1024);
$output .= $out;
  } while($out !== false && $out !== '');
  if(!preg_match('/^[23]/', $output)) {
die("Error: Mail server did not return the expected response.");
  }
}

Expected result:

EHLO fake.domain
250-this server offers 4 extensions
250-AUTH LOGIN
250-SIZE 30485760
250-HELP
250 AUTH=LOGIN
MAIL FROM:
250 Requested mail action okay, completed
...

Actual result:
--
EHLO fake.domain






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



#48317 [WFx]: Cross compiling php.5.3.RC2 for mipsel fails

2009-05-18 Thread jf at netmadeira dot com
 ID:   48317
 User updated by:  jf at netmadeira dot com
 Reported By:  jf at netmadeira dot com
 Status:   Wont fix
 Bug Type: Compile Failure
 Operating System: linux
 PHP Version:  5.3CVS-2009-05-18 (snap)
 New Comment:

Ok, I understand..
Do you have at least an ideia of what is causing it?? Maybe I can try
to fix it myself..

Best regards


Previous Comments:


[2009-05-18 18:28:37] j...@php.net

Sorry, cross-compiling is not supported. If it works, fine, if you can

provide patches to fix issues, even better, but we are not going to try

fix them ourselves. 



[2009-05-18 18:16:07] jf at netmadeira dot com

Just to add more info on the error:
/bin/sh /wdtv/wip/php-5.3.0/php5.3-snap/libtool --silent
--preserve-dup-deps --mode=compile mipsel-linux-gcc  -Iext/standard/
-I/wdtv/wip/php-5.3.0/php5.3-snap/ext/standard/ -DPHP_ATOM_INC
-I/wdtv/wip/php-5.3.0/php5.3-snap/include
-I/wdtv/wip/php-5.3.0/php5.3-snap/main -I/wdtv/wip/php-5.3.0/php5.3-snap
-I/wdtv/wip/php-5.3.0/php5.3-snap/ext/date/lib
-I/wdtv/wip/php-5.3.0/php5.3-snap/ext/ereg/regex
-I/usr/wdtvtool/include/libxml2 -I/tmp/.webspath/usr/include
-I/tmp/.webspath/usr/include/freetype2
-I/wdtv/wip/php-5.3.0/php5.3-snap/ext/sqlite3/libsqlite
-I/usr/wdtvtool/include -I/wdtv/wip/php-5.3.0/php5.3-snap/TSRM
-I/wdtv/wip/php-5.3.0/php5.3-snap/Zend  -I/usr/wdtvtool/include
-D_XPG_IV  -I/tmp/.webspath/usr/include -fvisibility=hidden  -c
/wdtv/wip/php-5.3.0/php5.3-snap/ext/standard/basic_functions.c -o
ext/standard/basic_functions.lo 
/wdtv/wip/php-5.3.0/php5.3-snap/ext/standard/basic_functions.c:3007:
error: 'zif_dns_check_record' undeclared here (not in a function)
make: *** [ext/standard/basic_functions.lo] Error 1



[2009-05-18 17:54:41] jf at netmadeira dot com

Description:

Cross compiling php for mipsel fails in 5.3 RC2 while in 5.2.9 compiles
fine. 
Configure went fine, fails when making with this error:
/wdtv/wip/php-5.3.0/php5.3-snap/ext/standard/basic_functions.c:3007:
error: 'zif_dns_check_record' undeclared here (not in a function)
make: *** [ext/standard/basic_functions.lo] Error 1


Reproduce code:
---
./configure \
--target=mipsel-linux \
--host=mipsel-linux \
--build=i386 \
--prefix=${install} \
--bindir=${install}/bin \
--sbindir=${install}/bin \
--mandir=${install}/share/man \
--enable-sockets \
--with-config-file-path=${install0}/conf \
--without-pear \
--without-mysql \
--without-mysql \
--without-apxs \
--without-apxs2 \
--disable-cli \
--with-zlib=$wdtvpath \
--with-zlib-dir=$wdtvpath \
--enable-pdo=shared \
--with-pdo-sqlite=shared \
--with-sqlite=shared \
--with-sqlite3=shared \
--enable-sqlite-utf8 \
--with-libxml-dir=$wdtvpath \
--with-curl=$wdtvpath \
--enable-shared \
--enable-exif \
--with-gd=shared \
--with-jpeg-dir=$wdtvpath \
--with-png-dir=$wdtvpath \
--with-freetype-dir=$wdtvpath \
--with-openssl=$wdtvpath \
--with-openssl-dir=$wdtvpath \
--enable-gd-native-ttf \
--with-xsl=$wdtvpath \
--with-iconv=$wdtvpath \
--with-bz2=$wdtvpath \
--enable-calendar \
--with-ldap=$wdtvpath \
--enable-zip \
--with-readline=$wdtvpath \
--with-pcre-regex \
--enable-ftp \
--with-mcrypt=$wdtvpath \






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



#48313 [Opn->Csd]: fgetcsv() does not report empty row as documented

2009-05-18 Thread iliaa
 ID:   48313
 Updated by:   il...@php.net
 Reported By:  bitworks at web dot de
-Status:   Open
+Status:   Closed
 Bug Type: Filesystem function related
 Operating System: Windows XP SP3
 PHP Version:  5.2.9
 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:


[2009-05-17 20:34:44] bitworks at web dot de

\r\n";
var_dump($_file);
echo "\r\n";

?> 

You will need a csv-file with some data and also an empty line in it.


nr;betreff;anzahl;beschreibung
"1";"Erste Zeile";"0";"Text"
"2";"Zeite Zeile";"0.11";"mehr Text"
"3";"Dritte Zeile";"";"kein Eintrag vorhanden"

"5";"nach der Leerzeile";"22";"letzter Eintrag"



[2009-05-17 20:16:07] bitworks at web dot de

Description:

reading data with fgetcsv() an empty row wil not be returned as one
array element pointing to NULL, as it is described in documentation

the result for the record will be

array(1) {
  [0]=>
  string(0) ""
}

instead of

array(1) {
  [0]=>
  NULL
}




Expected result:

array(1) {
  [0]=>
  NULL
}

Actual result:
--
array(1) {
  [0]=>
  string(0) ""
}





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



#48318 [Opn->Fbk]: CLI doesn't build and embed SAPI doesn't load on OS X 10.5.6

2009-05-18 Thread jani
 ID:   48318
 Updated by:   j...@php.net
 Reported By:  valeriy dot zamarayev at gmail dot com
-Status:   Open
+Status:   Feedback
-Bug Type: *Compile Issues
+Bug Type: Compile Failure
 Operating System: OS X 10.5.6
 PHP Version:  5.3CVS-2009-05-18 (CVS)
 New Comment:

Does this happen with PHP 5.2.9 ? That patch looks really awful. 
Something I'd never would want to commit since this all works
absolutely 
fine on every other platform..


Previous Comments:


[2009-05-18 18:34:42] valeriy dot zamarayev at gmail dot com

Description:

Attempting to configure and build PHP with ./configure --enable-
maintainer-ztc --enable-debug --enable-embed
1) fails to build CLI
2) the resulting libphp.so cannot be loaded in Darwin due to missing 
'environ' global variable.

Reproduce code:
---
Try to build on OS X 10.5.6 using

# ./buildconf
# ./configure --enable-maintainer-ztc --enable-debug --enable-embed
# make


Expected result:

The CLI binary is built successfully.
The libphp5.so library can be loaded using dlopen().

Actual result:
--
At the library link stage, multiple symbols are in conflict which
have to be declared 'extern' in their '*.h' files. Unlike ELF, with 
Darwin's Mach-O format, common symbols are not allowed by default. So 
ELF is forgiving but Mach-O is not with regard to missing 'extern' 
specifier on global variables. This happens in multiple places in PHP 
code.

At the CLI link stage, an attempt is made to link .o files using CC, 
though during the compilation libtool is used, so the .o files are 
hidden in .libs subdirectires, and .lo files should be used.

If I correct this and do link successfully, the resulting CLI is fine,

but the libphp5.so cannot be loaded on darwin because the symbol 
environ doesn't exist. (There is a function _NSGetEnviron() which 
returns it).


See the patch below for more details:

Index: configure.in
===
RCS file: /repository/php-src/configure.in,v
retrieving revision 1.579.2.52.2.77.2.51
diff -u -u -r1.579.2.52.2.77.2.51 configure.in
--- configure.in6 May 2009 18:57:45 -   
1.579.2.52.2.77.2.51
+++ configure.in18 May 2009 18:21:14 -
@@ -464,7 +464,8 @@
 sys/utsname.h \
 sys/ipc.h \
 dlfcn.h \
-assert.h
+assert.h \
+crt_externs.h
 ],[],[],[
 #ifdef HAVE_SYS_PARAM_H
 #include 
Index: ext/spl/spl_dllist.h
===
RCS file: /repository/php-src/ext/spl/spl_dllist.h,v
retrieving revision 1.1.2.4
diff -u -u -r1.1.2.4 spl_dllist.h
--- ext/spl/spl_dllist.h31 Dec 2008 11:15:43 -  
1.1.2.4
+++ ext/spl/spl_dllist.h18 May 2009 18:21:15 -
@@ -24,9 +24,9 @@
 #include "php.h"
 #include "php_spl.h"
 
-PHPAPI zend_class_entry *spl_ce_SplDoublyLinkedList;
-PHPAPI zend_class_entry *spl_ce_SplQueue;
-PHPAPI zend_class_entry *spl_ce_SplStack;
+extern PHPAPI zend_class_entry *spl_ce_SplDoublyLinkedList;
+extern PHPAPI zend_class_entry *spl_ce_SplQueue;
+extern PHPAPI zend_class_entry *spl_ce_SplStack;
 
 PHP_MINIT_FUNCTION(spl_dllist);
 
Index: ext/spl/spl_fixedarray.h
===
RCS file: /repository/php-src/ext/spl/spl_fixedarray.h,v
retrieving revision 1.1.2.3
diff -u -u -r1.1.2.3 spl_fixedarray.h
--- ext/spl/spl_fixedarray.h31 Dec 2008 11:15:43 -  
1.1.2.3
+++ ext/spl/spl_fixedarray.h18 May 2009 18:21:15 -
@@ -22,7 +22,7 @@
 #ifndef SPL_FIXEDARRAY_H
 #define SPL_FIXEDARRAY_H
 
-PHPAPI zend_class_entry *spl_ce_SplFixedArray;
+extern PHPAPI zend_class_entry *spl_ce_SplFixedArray;
 
 PHP_MINIT_FUNCTION(spl_fixedarray);
 
Index: ext/spl/spl_heap.h
===
RCS file: /repository/php-src/ext/spl/spl_heap.h,v
retrieving revision 1.1.2.3
diff -u -u -r1.1.2.3 spl_heap.h
--- ext/spl/spl_heap.h  31 Dec 2008 11:15:44 -  1.1.2.3
+++ ext/spl/spl_heap.h  18 May 2009 18:21:15 -
@@ -24,11 +24,11 @@
 #include "php.h"
 #include "php_spl.h"
 
-PHPAPI zend_class_entry *spl_ce_SplHeap;
-PHPAPI zend_class_entry *spl_ce_SplMinHeap;
-PHPAPI zend_class_entry *spl_ce_SplMaxHeap;
+extern PHPAPI zend_class_entry *spl_ce_SplHeap;
+extern PHPAPI zend_class_entry *spl_ce_SplMinHeap;
+extern PHPAPI zend_class_entry *spl_ce_SplMaxHeap;
 
-PHPAPI zend_class_entry *spl_ce_SplPriorityQueue;
+extern PHPAPI zend_class_entry *spl_ce_SplPriorityQueue;
 
 PHP_MINIT_FUNCTION(spl_heap);
 
Index: main/php.h
===
RCS file: /repository/php-src/main/php.h,v
retrieving revision 1.221.2.4.2.8.2.12
diff -u -u -r1.221.2.4.2.8.2.12 php.h
--- main/php.h  31 Dec 2008 11:15:47 -  1.221.2.4.2.8.2.12
+++ main/php.h  18 May 2009 18:21:16 -
@@ -263,7 +263,13 @@
 #if !d

#48318 [NEW]: CLI doesn't build and embed SAPI doesn't load on OS X 10.5.6

2009-05-18 Thread valeriy dot zamarayev at gmail dot com
From: valeriy dot zamarayev at gmail dot com
Operating system: OS X 10.5.6
PHP version:  5.3CVS-2009-05-18 (CVS)
PHP Bug Type: *Compile Issues
Bug description:  CLI doesn't build and embed SAPI doesn't load on OS X 10.5.6

Description:

Attempting to configure and build PHP with ./configure --enable-
maintainer-ztc --enable-debug --enable-embed
1) fails to build CLI
2) the resulting libphp.so cannot be loaded in Darwin due to missing 
'environ' global variable.

Reproduce code:
---
Try to build on OS X 10.5.6 using

# ./buildconf
# ./configure --enable-maintainer-ztc --enable-debug --enable-embed
# make


Expected result:

The CLI binary is built successfully.
The libphp5.so library can be loaded using dlopen().

Actual result:
--
At the library link stage, multiple symbols are in conflict which
have to be declared 'extern' in their '*.h' files. Unlike ELF, with 
Darwin's Mach-O format, common symbols are not allowed by default. So 
ELF is forgiving but Mach-O is not with regard to missing 'extern' 
specifier on global variables. This happens in multiple places in PHP 
code.

At the CLI link stage, an attempt is made to link .o files using CC, 
though during the compilation libtool is used, so the .o files are 
hidden in .libs subdirectires, and .lo files should be used.

If I correct this and do link successfully, the resulting CLI is fine, 
but the libphp5.so cannot be loaded on darwin because the symbol 
environ doesn't exist. (There is a function _NSGetEnviron() which 
returns it).


See the patch below for more details:

Index: configure.in
===
RCS file: /repository/php-src/configure.in,v
retrieving revision 1.579.2.52.2.77.2.51
diff -u -u -r1.579.2.52.2.77.2.51 configure.in
--- configure.in6 May 2009 18:57:45 -   
1.579.2.52.2.77.2.51
+++ configure.in18 May 2009 18:21:14 -
@@ -464,7 +464,8 @@
 sys/utsname.h \
 sys/ipc.h \
 dlfcn.h \
-assert.h
+assert.h \
+crt_externs.h
 ],[],[],[
 #ifdef HAVE_SYS_PARAM_H
 #include 
Index: ext/spl/spl_dllist.h
===
RCS file: /repository/php-src/ext/spl/spl_dllist.h,v
retrieving revision 1.1.2.4
diff -u -u -r1.1.2.4 spl_dllist.h
--- ext/spl/spl_dllist.h31 Dec 2008 11:15:43 -  
1.1.2.4
+++ ext/spl/spl_dllist.h18 May 2009 18:21:15 -
@@ -24,9 +24,9 @@
 #include "php.h"
 #include "php_spl.h"
 
-PHPAPI zend_class_entry *spl_ce_SplDoublyLinkedList;
-PHPAPI zend_class_entry *spl_ce_SplQueue;
-PHPAPI zend_class_entry *spl_ce_SplStack;
+extern PHPAPI zend_class_entry *spl_ce_SplDoublyLinkedList;
+extern PHPAPI zend_class_entry *spl_ce_SplQueue;
+extern PHPAPI zend_class_entry *spl_ce_SplStack;
 
 PHP_MINIT_FUNCTION(spl_dllist);
 
Index: ext/spl/spl_fixedarray.h
===
RCS file: /repository/php-src/ext/spl/spl_fixedarray.h,v
retrieving revision 1.1.2.3
diff -u -u -r1.1.2.3 spl_fixedarray.h
--- ext/spl/spl_fixedarray.h31 Dec 2008 11:15:43 -  
1.1.2.3
+++ ext/spl/spl_fixedarray.h18 May 2009 18:21:15 -
@@ -22,7 +22,7 @@
 #ifndef SPL_FIXEDARRAY_H
 #define SPL_FIXEDARRAY_H
 
-PHPAPI zend_class_entry *spl_ce_SplFixedArray;
+extern PHPAPI zend_class_entry *spl_ce_SplFixedArray;
 
 PHP_MINIT_FUNCTION(spl_fixedarray);
 
Index: ext/spl/spl_heap.h
===
RCS file: /repository/php-src/ext/spl/spl_heap.h,v
retrieving revision 1.1.2.3
diff -u -u -r1.1.2.3 spl_heap.h
--- ext/spl/spl_heap.h  31 Dec 2008 11:15:44 -  1.1.2.3
+++ ext/spl/spl_heap.h  18 May 2009 18:21:15 -
@@ -24,11 +24,11 @@
 #include "php.h"
 #include "php_spl.h"
 
-PHPAPI zend_class_entry *spl_ce_SplHeap;
-PHPAPI zend_class_entry *spl_ce_SplMinHeap;
-PHPAPI zend_class_entry *spl_ce_SplMaxHeap;
+extern PHPAPI zend_class_entry *spl_ce_SplHeap;
+extern PHPAPI zend_class_entry *spl_ce_SplMinHeap;
+extern PHPAPI zend_class_entry *spl_ce_SplMaxHeap;
 
-PHPAPI zend_class_entry *spl_ce_SplPriorityQueue;
+extern PHPAPI zend_class_entry *spl_ce_SplPriorityQueue;
 
 PHP_MINIT_FUNCTION(spl_heap);
 
Index: main/php.h
===
RCS file: /repository/php-src/main/php.h,v
retrieving revision 1.221.2.4.2.8.2.12
diff -u -u -r1.221.2.4.2.8.2.12 php.h
--- main/php.h  31 Dec 2008 11:15:47 -  1.221.2.4.2.8.2.12
+++ main/php.h  18 May 2009 18:21:16 -
@@ -263,7 +263,13 @@
 #if !defined(PHP_WIN32)
 #define PHP_SLEEP_NON_VOID
 #define php_sleep sleep
+
+#if HAVE_CRT_EXTERNS_H
+#include 
+#define environ (*_NSGetEnviron())
+#else
 extern char **environ;
+#endif
 #endif /* !defined(PHP_WIN32) */
 
 #ifdef PHP_PWRITE_64
Index: main/php_getopt.h
===
RCS file: /repository/php-src/main/php_getopt.h,v
retrieving revision 1.1.2.4

#48315 [Opn->Bgs]: Type conversion into a float respects the numeric settings of the locale

2009-05-18 Thread jani
 ID:   48315
 Updated by:   j...@php.net
 Reported By:  alef0 at freenet dot de
-Status:   Open
+Status:   Bogus
 Bug Type: Math related
 Operating System: gentoo
 PHP Version:  5.2CVS-2009-05-18 (CVS)
 New Comment:

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




Previous Comments:


[2009-05-18 18:25:31] carsten_sttgt at gmx dot de

> $var = '122.34343The';  //expected float: 122.34343
> $float_value_of_var = floatval($var);
> 
> Conversion using floatval() or (float) respects the
> numeric settings of the locale.

No, just make a:
| var_dump($float_value_of_var);

> print ' or floatval(' . $var . ') =  ' . $float_value_of_var
."\n\n";

You are casting  a float to a string, and that's where locale comes in
place. See [1]. And is this not the reason for setlocale: to output
dates/currencies/numbers/... according to a language setting?

If you want output the float value locale aware in a string, you can
use printf() with the "%F" modifier.

Regards,
Carsten

[1]
http://de.php.net/manual/en/language.types.string.php#language.types.string.casting



[2009-05-18 15:41:31] alef0 at freenet dot de

At [27 Feb 2007 12:27pm UTC] tony2...@php.net wrote:
( ... ) we DON'T want scripts to depend on locale or we may end up
with
scripts working/not working with particular locales. (See Bug #40653)



[2009-05-18 15:26:02] alef0 at freenet dot de

Description:

PHP version: 5.2.6RC4-pl0-gentoo

Conversion using floatval() or (float) respects the numeric settings of
the locale.

THIS IS VERY DANGEROUS CAUSE YOU WILL GET WRONG RESULTS BY APPLYING ANY
MATH METHODE ON CONVERTED FLOATS!

Reproduce code:
---
$var = '122.34343The';  //expected float: 122.34343

setlocale(LC_NUMERIC, 'en_US.utf8');
$float_value_of_var = (float) $var;
print 'Locale dec sep point: (float) ' . $var . ' =  ' .
$float_value_of_var;
$float_value_of_var = floatval($var);
print ' or floatval(' . $var . ') =  ' . $float_value_of_var . "\n\n";

setlocale(LC_NUMERIC, 'de_DE.utf8');
$float_value_of_var = (float) $var;
print 'Locale dec sep comma: (float) ' . $var . ' =  ' .
$float_value_of_var;
$float_value_of_var = floatval($var);
print ' or floatval(' . $var . ') =  ' . $float_value_of_var . "\n\n";

Expected result:

Locale dec sep point: (float) 122.34343The = 122.34343 or
floatval(122.34343The) = 122.34343

Locale dec sep comma: (float) 122.34343The = 122.34343 or
floatval(122.34343The) = 122.34343


Actual result:
--
Locale dec sep point: (float) 122.34343The = 122.34343 or
floatval(122.34343The) = 122.34343

Locale dec sep comma: (float) 122.34343The = 122,34343 or
floatval(122.34343The) = 122,34343





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



#48317 [Opn->WFx]: Cross compiling php.5.3.RC2 for mipsel fails

2009-05-18 Thread jani
 ID:   48317
 Updated by:   j...@php.net
 Reported By:  jf at netmadeira dot com
-Status:   Open
+Status:   Wont fix
 Bug Type: Compile Failure
 Operating System: linux
 PHP Version:  5.3CVS-2009-05-18 (snap)
 New Comment:

Sorry, cross-compiling is not supported. If it works, fine, if you can

provide patches to fix issues, even better, but we are not going to try

fix them ourselves. 


Previous Comments:


[2009-05-18 18:16:07] jf at netmadeira dot com

Just to add more info on the error:
/bin/sh /wdtv/wip/php-5.3.0/php5.3-snap/libtool --silent
--preserve-dup-deps --mode=compile mipsel-linux-gcc  -Iext/standard/
-I/wdtv/wip/php-5.3.0/php5.3-snap/ext/standard/ -DPHP_ATOM_INC
-I/wdtv/wip/php-5.3.0/php5.3-snap/include
-I/wdtv/wip/php-5.3.0/php5.3-snap/main -I/wdtv/wip/php-5.3.0/php5.3-snap
-I/wdtv/wip/php-5.3.0/php5.3-snap/ext/date/lib
-I/wdtv/wip/php-5.3.0/php5.3-snap/ext/ereg/regex
-I/usr/wdtvtool/include/libxml2 -I/tmp/.webspath/usr/include
-I/tmp/.webspath/usr/include/freetype2
-I/wdtv/wip/php-5.3.0/php5.3-snap/ext/sqlite3/libsqlite
-I/usr/wdtvtool/include -I/wdtv/wip/php-5.3.0/php5.3-snap/TSRM
-I/wdtv/wip/php-5.3.0/php5.3-snap/Zend  -I/usr/wdtvtool/include
-D_XPG_IV  -I/tmp/.webspath/usr/include -fvisibility=hidden  -c
/wdtv/wip/php-5.3.0/php5.3-snap/ext/standard/basic_functions.c -o
ext/standard/basic_functions.lo 
/wdtv/wip/php-5.3.0/php5.3-snap/ext/standard/basic_functions.c:3007:
error: 'zif_dns_check_record' undeclared here (not in a function)
make: *** [ext/standard/basic_functions.lo] Error 1



[2009-05-18 17:54:41] jf at netmadeira dot com

Description:

Cross compiling php for mipsel fails in 5.3 RC2 while in 5.2.9 compiles
fine. 
Configure went fine, fails when making with this error:
/wdtv/wip/php-5.3.0/php5.3-snap/ext/standard/basic_functions.c:3007:
error: 'zif_dns_check_record' undeclared here (not in a function)
make: *** [ext/standard/basic_functions.lo] Error 1


Reproduce code:
---
./configure \
--target=mipsel-linux \
--host=mipsel-linux \
--build=i386 \
--prefix=${install} \
--bindir=${install}/bin \
--sbindir=${install}/bin \
--mandir=${install}/share/man \
--enable-sockets \
--with-config-file-path=${install0}/conf \
--without-pear \
--without-mysql \
--without-mysql \
--without-apxs \
--without-apxs2 \
--disable-cli \
--with-zlib=$wdtvpath \
--with-zlib-dir=$wdtvpath \
--enable-pdo=shared \
--with-pdo-sqlite=shared \
--with-sqlite=shared \
--with-sqlite3=shared \
--enable-sqlite-utf8 \
--with-libxml-dir=$wdtvpath \
--with-curl=$wdtvpath \
--enable-shared \
--enable-exif \
--with-gd=shared \
--with-jpeg-dir=$wdtvpath \
--with-png-dir=$wdtvpath \
--with-freetype-dir=$wdtvpath \
--with-openssl=$wdtvpath \
--with-openssl-dir=$wdtvpath \
--enable-gd-native-ttf \
--with-xsl=$wdtvpath \
--with-iconv=$wdtvpath \
--with-bz2=$wdtvpath \
--enable-calendar \
--with-ldap=$wdtvpath \
--enable-zip \
--with-readline=$wdtvpath \
--with-pcre-regex \
--enable-ftp \
--with-mcrypt=$wdtvpath \






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



#48315 [Com]: Type conversion into a float respects the numeric settings of the locale

2009-05-18 Thread carsten_sttgt at gmx dot de
 ID:   48315
 Comment by:   carsten_sttgt at gmx dot de
 Reported By:  alef0 at freenet dot de
 Status:   Open
 Bug Type: Math related
 Operating System: gentoo
 PHP Version:  5.2CVS-2009-05-18 (CVS)
 New Comment:

> $var = '122.34343The';  //expected float: 122.34343
> $float_value_of_var = floatval($var);
> 
> Conversion using floatval() or (float) respects the
> numeric settings of the locale.

No, just make a:
| var_dump($float_value_of_var);

> print ' or floatval(' . $var . ') =  ' . $float_value_of_var
."\n\n";

You are casting  a float to a string, and that's where locale comes in
place. See [1]. And is this not the reason for setlocale: to output
dates/currencies/numbers/... according to a language setting?

If you want output the float value locale aware in a string, you can
use printf() with the "%F" modifier.

Regards,
Carsten

[1]
http://de.php.net/manual/en/language.types.string.php#language.types.string.casting


Previous Comments:


[2009-05-18 15:41:31] alef0 at freenet dot de

At [27 Feb 2007 12:27pm UTC] tony2...@php.net wrote:
( ... ) we DON'T want scripts to depend on locale or we may end up
with
scripts working/not working with particular locales. (See Bug #40653)



[2009-05-18 15:26:02] alef0 at freenet dot de

Description:

PHP version: 5.2.6RC4-pl0-gentoo

Conversion using floatval() or (float) respects the numeric settings of
the locale.

THIS IS VERY DANGEROUS CAUSE YOU WILL GET WRONG RESULTS BY APPLYING ANY
MATH METHODE ON CONVERTED FLOATS!

Reproduce code:
---
$var = '122.34343The';  //expected float: 122.34343

setlocale(LC_NUMERIC, 'en_US.utf8');
$float_value_of_var = (float) $var;
print 'Locale dec sep point: (float) ' . $var . ' =  ' .
$float_value_of_var;
$float_value_of_var = floatval($var);
print ' or floatval(' . $var . ') =  ' . $float_value_of_var . "\n\n";

setlocale(LC_NUMERIC, 'de_DE.utf8');
$float_value_of_var = (float) $var;
print 'Locale dec sep comma: (float) ' . $var . ' =  ' .
$float_value_of_var;
$float_value_of_var = floatval($var);
print ' or floatval(' . $var . ') =  ' . $float_value_of_var . "\n\n";

Expected result:

Locale dec sep point: (float) 122.34343The = 122.34343 or
floatval(122.34343The) = 122.34343

Locale dec sep comma: (float) 122.34343The = 122.34343 or
floatval(122.34343The) = 122.34343


Actual result:
--
Locale dec sep point: (float) 122.34343The = 122.34343 or
floatval(122.34343The) = 122.34343

Locale dec sep comma: (float) 122.34343The = 122,34343 or
floatval(122.34343The) = 122,34343





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



#48317 [Opn]: Cross compiling php.5.3.RC2 for mipsel fails

2009-05-18 Thread jf at netmadeira dot com
 ID:   48317
 User updated by:  jf at netmadeira dot com
 Reported By:  jf at netmadeira dot com
 Status:   Open
 Bug Type: Compile Failure
 Operating System: linux
 PHP Version:  5.3CVS-2009-05-18 (snap)
 New Comment:

Just to add more info on the error:
/bin/sh /wdtv/wip/php-5.3.0/php5.3-snap/libtool --silent
--preserve-dup-deps --mode=compile mipsel-linux-gcc  -Iext/standard/
-I/wdtv/wip/php-5.3.0/php5.3-snap/ext/standard/ -DPHP_ATOM_INC
-I/wdtv/wip/php-5.3.0/php5.3-snap/include
-I/wdtv/wip/php-5.3.0/php5.3-snap/main -I/wdtv/wip/php-5.3.0/php5.3-snap
-I/wdtv/wip/php-5.3.0/php5.3-snap/ext/date/lib
-I/wdtv/wip/php-5.3.0/php5.3-snap/ext/ereg/regex
-I/usr/wdtvtool/include/libxml2 -I/tmp/.webspath/usr/include
-I/tmp/.webspath/usr/include/freetype2
-I/wdtv/wip/php-5.3.0/php5.3-snap/ext/sqlite3/libsqlite
-I/usr/wdtvtool/include -I/wdtv/wip/php-5.3.0/php5.3-snap/TSRM
-I/wdtv/wip/php-5.3.0/php5.3-snap/Zend  -I/usr/wdtvtool/include
-D_XPG_IV  -I/tmp/.webspath/usr/include -fvisibility=hidden  -c
/wdtv/wip/php-5.3.0/php5.3-snap/ext/standard/basic_functions.c -o
ext/standard/basic_functions.lo 
/wdtv/wip/php-5.3.0/php5.3-snap/ext/standard/basic_functions.c:3007:
error: 'zif_dns_check_record' undeclared here (not in a function)
make: *** [ext/standard/basic_functions.lo] Error 1


Previous Comments:


[2009-05-18 17:54:41] jf at netmadeira dot com

Description:

Cross compiling php for mipsel fails in 5.3 RC2 while in 5.2.9 compiles
fine. 
Configure went fine, fails when making with this error:
/wdtv/wip/php-5.3.0/php5.3-snap/ext/standard/basic_functions.c:3007:
error: 'zif_dns_check_record' undeclared here (not in a function)
make: *** [ext/standard/basic_functions.lo] Error 1


Reproduce code:
---
./configure \
--target=mipsel-linux \
--host=mipsel-linux \
--build=i386 \
--prefix=${install} \
--bindir=${install}/bin \
--sbindir=${install}/bin \
--mandir=${install}/share/man \
--enable-sockets \
--with-config-file-path=${install0}/conf \
--without-pear \
--without-mysql \
--without-mysql \
--without-apxs \
--without-apxs2 \
--disable-cli \
--with-zlib=$wdtvpath \
--with-zlib-dir=$wdtvpath \
--enable-pdo=shared \
--with-pdo-sqlite=shared \
--with-sqlite=shared \
--with-sqlite3=shared \
--enable-sqlite-utf8 \
--with-libxml-dir=$wdtvpath \
--with-curl=$wdtvpath \
--enable-shared \
--enable-exif \
--with-gd=shared \
--with-jpeg-dir=$wdtvpath \
--with-png-dir=$wdtvpath \
--with-freetype-dir=$wdtvpath \
--with-openssl=$wdtvpath \
--with-openssl-dir=$wdtvpath \
--enable-gd-native-ttf \
--with-xsl=$wdtvpath \
--with-iconv=$wdtvpath \
--with-bz2=$wdtvpath \
--enable-calendar \
--with-ldap=$wdtvpath \
--enable-zip \
--with-readline=$wdtvpath \
--with-pcre-regex \
--enable-ftp \
--with-mcrypt=$wdtvpath \






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



#47318 [Asn->Fbk]: UMR when trying to activate user config

2009-05-18 Thread pajoye
 ID:   47318
 Updated by:   paj...@php.net
 Reported By:  stas at zend dot com
-Status:   Assigned
+Status:   Feedback
 Bug Type: PHP options/info functions
 Operating System: *
 PHP Version:  5.3CVS-2009-02-05 (CVS)
 Assigned To:  pajoye
 New Comment:

Patch proposal: http://pastebin.com/m55fa609d

It also slightly changes the behaviors:
- if the current script is not inside the DOCUMENT_ROOT, the path is
not processed
- it also checks if the path is an absolute path and get the real path
if not (to test against the doc_root)

Stas, Jani: can you test it please before I commit it?


Previous Comments:


[2009-02-05 18:45:37] stas at zend dot com

Description:

In function sapi_cgi_activate, php_cgi_ini_activate_user_config is
called with path of the current script and third parameter 'start' which
is document_root length - 1. Then, the following code is used:

ptr = path + start; /* start is the point where doc_root ends! 
*/
while ((ptr = strchr(ptr, DEFAULT_SLASH)) != NULL) {


However, in general, path is not guaranteed to be residing in
DOCUMENT_ROOT. While usually it is the case, there could be
rewriting/aliasing scenarios that would call PHP on files outside
document root. Or the user can invoke PHP binary by himself too (having
DOCUMENT_ROOT set independently, but not intending to use it). 
In such cases, DOCUMENT_ROOT length has no relation to path length,
which makes ptr point either to random place inside string if
DOCUMENT_ROOT is short, or to random unallocated place in memory if it
is longer than current path. 

Reproduce code:
---
One can easily reproduce it by setting DOCUMENT_ROOT to very long
string and running PHP CGI under valgrind with parameter being some
short script path. 

Actual result:
--
==15115== Invalid read of size 1
==15115==at 0x400609A: index (mc_replace_strmem.c:164)
==15115==by 0x84CE159: php_cgi_ini_activate_user_config
(cgi_main.c:716)
==15115==by 0x84CE40D: sapi_cgi_activate (cgi_main.c:778)
==15115==by 0x83DA5C1: sapi_activate (SAPI.c:392)
==15115==by 0x83D08AC: php_request_startup (main.c:1342)
==15115==by 0x84D04C1: main (cgi_main.c:1961)
==15115==  Address 0x4A65693 is 5 bytes before a block of size 50
alloc'd
==15115==at 0x4005400: malloc (vg_replace_malloc.c:149)
==15115==by 0x844B09C: __zend_malloc (zend_alloc.h:81)
==15115==by 0x844ADC2: _zend_hash_add_or_update (zend_hash.c:247)
==15115==by 0x84CE0E9: php_cgi_ini_activate_user_config
(cgi_main.c:704)
==15115==by 0x84CE40D: sapi_cgi_activate (cgi_main.c:778)
==15115==by 0x83DA5C1: sapi_activate (SAPI.c:392)
==15115==by 0x83D08AC: php_request_startup (main.c:1342)
==15115==by 0x84D04C1: main (cgi_main.c:1961)






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



#48293 [Fbk]: user name send to mysql server in an incorrect encoding (PHP_5_3 and above only)

2009-05-18 Thread andrey
 ID:   48293
 Updated by:   and...@php.net
 Reported By:  aaa_whoknows_me at list dot ru
 Status:   Feedback
 Bug Type: MySQL related
 Operating System: Windows
 PHP Version:  5.3.0RC2
 New Comment:

mysqlnd doesn't read the configuration files of MySQL. Calling these
doesn't result in an error but it is a no-op.
Please file a documentation bug!

Thanks


Previous Comments:


[2009-05-18 15:27:36] carsten_sttgt at gmx dot de

Just a question:

> mysqlnd (5.3.0) doesn't read the my.ini/my.cnf at all,
> thus also not the [mysql] section.
>
> You can overcome mysql's behavior by doing something like
> $conn->options(MYSQLI_SET_CHARSET_NAME, "yourcharset");

The Options "MYSQLI_READ_DEFAULT_FILE" and "MYSQLI_READ_DEFAULT_GROUP"
are still available with mysqlnd?

If yes, you should also change the description at [1].
--> "instead of my.cnf" += " or none as of 5.3.10 with mysqlnd"

If no:
--> "only available with libmysql"

(IMHO there is an other place in the docu, which also describe these
options.)
 
Regards,
Carsten

[1] http://de.php.net/manual/en/mysqli.options.php



[2009-05-18 14:57:04] and...@php.net

mysqlnd (5.3.0) doesn't read the my.ini/my.cnf at all, thus also not
the [mysql] section. Yes, mysqlnd set the charset of the connection to
be the charset of the server sent during the handshake. In the greeting
packet the server says which its default charset is. The server
interprets the username in the the charset sent by the client.
Libmysql doesn't look at what the server advertises but uses its own
charset, sometimes pulled from the config, sometimes what is set through
mysql_options - depends how used.
You can overcome mysql's behavior by doing something like
$conn = new mysqli(); // no params, no connection
$conn->options(MYSQLI_SET_CHARSET_NAME, "yourcharset");
$conn->connect("host", "user", "pass"...);

HTH,
Andrey



[2009-05-16 15:14:52] aaa_whoknows_me at list dot ru

It applies only to PHP 5.3.0 and higher. Now I'm using PHP 5.2.9-2 for
Windows and it is able to connect to the same MySQL server.



[2009-05-15 17:26:34] j...@php.net

Just to make sure: This does not happen with PHP 5.2.9 ??



[2009-05-15 12:16:27] aaa_whoknows_me at list dot ru

Description:

PHP >= 5.3.0 sends user name to mysql server in an incorrect encoding
in some cases.
---
In this case PHP uses UTF-8 as its default encoding. PHP sends user
name in mysql server default encoding. But in some cases mysql uses
different encodings for data storing and sql queries. Consider a
following situation:
my.ini
[mysql]
default-character-set=utf8
 [mysqld]
default-character-set=ucs2
So, 'user' in UTF-8 == 'ôÈ' in UTF-16BE

Reproduce code:
---
$link = mysql_connect('user', 'password', 'database');
if (!$link) {
die('Could not connect: ' . mysql_error());
}
echo 'Connected successfully';
mysql_close($link);
---
try {
$dbh = new PDO('mysql:host=localhost;dbname=database', 'user',
'password');
foreach($dbh->query('SELECT id FROM users;') as $row) {
print_r($row);
}
$dbh = null;
} catch (PDOException $e) {
print "Error!: " . $e->getMessage() . "";
}
---
$mysqli = new mysqli('localhost', 'user', 'password', 'database');

/* check connection */
if (mysqli_connect_errno()) {
printf("Connect failed: %s\n", mysqli_connect_error());
exit();
}

/* Select queries return a resultset */
if ($result = $mysqli->query("SELECT id FROM users;")) {
printf("Select returned %d rows.\n", $result->num_rows);

/* free result set */
$result->close();
}

$mysqli->close();

Expected result:

A successful connection to the mysql database.

Actual result:
--
Access denied for user 'ôÈ'@'localhost' (using password: YES)





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



#48315 [Opn]: Type conversion into a float respects the numeric settings of the locale

2009-05-18 Thread alef0 at freenet dot de
 ID:   48315
 User updated by:  alef0 at freenet dot de
 Reported By:  alef0 at freenet dot de
 Status:   Open
 Bug Type: Math related
 Operating System: gentoo
 PHP Version:  5.2CVS-2009-05-18 (CVS)
 New Comment:

At [27 Feb 2007 12:27pm UTC] tony2...@php.net wrote:
( ... ) we DON'T want scripts to depend on locale or we may end up
with
scripts working/not working with particular locales. (See Bug #40653)


Previous Comments:


[2009-05-18 15:26:02] alef0 at freenet dot de

Description:

PHP version: 5.2.6RC4-pl0-gentoo

Conversion using floatval() or (float) respects the numeric settings of
the locale.

THIS IS VERY DANGEROUS CAUSE YOU WILL GET WRONG RESULTS BY APPLYING ANY
MATH METHODE ON CONVERTED FLOATS!

Reproduce code:
---
$var = '122.34343The';  //expected float: 122.34343

setlocale(LC_NUMERIC, 'en_US.utf8');
$float_value_of_var = (float) $var;
print 'Locale dec sep point: (float) ' . $var . ' =  ' .
$float_value_of_var;
$float_value_of_var = floatval($var);
print ' or floatval(' . $var . ') =  ' . $float_value_of_var . "\n\n";

setlocale(LC_NUMERIC, 'de_DE.utf8');
$float_value_of_var = (float) $var;
print 'Locale dec sep comma: (float) ' . $var . ' =  ' .
$float_value_of_var;
$float_value_of_var = floatval($var);
print ' or floatval(' . $var . ') =  ' . $float_value_of_var . "\n\n";

Expected result:

Locale dec sep point: (float) 122.34343The = 122.34343 or
floatval(122.34343The) = 122.34343

Locale dec sep comma: (float) 122.34343The = 122.34343 or
floatval(122.34343The) = 122.34343


Actual result:
--
Locale dec sep point: (float) 122.34343The = 122.34343 or
floatval(122.34343The) = 122.34343

Locale dec sep comma: (float) 122.34343The = 122,34343 or
floatval(122.34343The) = 122,34343





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



#48293 [Com]: user name send to mysql server in an incorrect encoding (PHP_5_3 and above only)

2009-05-18 Thread carsten_sttgt at gmx dot de
 ID:   48293
 Comment by:   carsten_sttgt at gmx dot de
 Reported By:  aaa_whoknows_me at list dot ru
 Status:   Feedback
 Bug Type: MySQL related
 Operating System: Windows
 PHP Version:  5.3.0RC2
 New Comment:

Just a question:

> mysqlnd (5.3.0) doesn't read the my.ini/my.cnf at all,
> thus also not the [mysql] section.
>
> You can overcome mysql's behavior by doing something like
> $conn->options(MYSQLI_SET_CHARSET_NAME, "yourcharset");

The Options "MYSQLI_READ_DEFAULT_FILE" and "MYSQLI_READ_DEFAULT_GROUP"
are still available with mysqlnd?

If yes, you should also change the description at [1].
--> "instead of my.cnf" += " or none as of 5.3.10 with mysqlnd"

If no:
--> "only available with libmysql"

(IMHO there is an other place in the docu, which also describe these
options.)
 
Regards,
Carsten

[1] http://de.php.net/manual/en/mysqli.options.php


Previous Comments:


[2009-05-18 14:57:04] and...@php.net

mysqlnd (5.3.0) doesn't read the my.ini/my.cnf at all, thus also not
the [mysql] section. Yes, mysqlnd set the charset of the connection to
be the charset of the server sent during the handshake. In the greeting
packet the server says which its default charset is. The server
interprets the username in the the charset sent by the client.
Libmysql doesn't look at what the server advertises but uses its own
charset, sometimes pulled from the config, sometimes what is set through
mysql_options - depends how used.
You can overcome mysql's behavior by doing something like
$conn = new mysqli(); // no params, no connection
$conn->options(MYSQLI_SET_CHARSET_NAME, "yourcharset");
$conn->connect("host", "user", "pass"...);

HTH,
Andrey



[2009-05-16 15:14:52] aaa_whoknows_me at list dot ru

It applies only to PHP 5.3.0 and higher. Now I'm using PHP 5.2.9-2 for
Windows and it is able to connect to the same MySQL server.



[2009-05-15 17:26:34] j...@php.net

Just to make sure: This does not happen with PHP 5.2.9 ??



[2009-05-15 12:16:27] aaa_whoknows_me at list dot ru

Description:

PHP >= 5.3.0 sends user name to mysql server in an incorrect encoding
in some cases.
---
In this case PHP uses UTF-8 as its default encoding. PHP sends user
name in mysql server default encoding. But in some cases mysql uses
different encodings for data storing and sql queries. Consider a
following situation:
my.ini
[mysql]
default-character-set=utf8
 [mysqld]
default-character-set=ucs2
So, 'user' in UTF-8 == 'ôÈ' in UTF-16BE

Reproduce code:
---
$link = mysql_connect('user', 'password', 'database');
if (!$link) {
die('Could not connect: ' . mysql_error());
}
echo 'Connected successfully';
mysql_close($link);
---
try {
$dbh = new PDO('mysql:host=localhost;dbname=database', 'user',
'password');
foreach($dbh->query('SELECT id FROM users;') as $row) {
print_r($row);
}
$dbh = null;
} catch (PDOException $e) {
print "Error!: " . $e->getMessage() . "";
}
---
$mysqli = new mysqli('localhost', 'user', 'password', 'database');

/* check connection */
if (mysqli_connect_errno()) {
printf("Connect failed: %s\n", mysqli_connect_error());
exit();
}

/* Select queries return a resultset */
if ($result = $mysqli->query("SELECT id FROM users;")) {
printf("Select returned %d rows.\n", $result->num_rows);

/* free result set */
$result->close();
}

$mysqli->close();

Expected result:

A successful connection to the mysql database.

Actual result:
--
Access denied for user 'ôÈ'@'localhost' (using password: YES)





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



#48315 [NEW]: Type conversion into a float respects the numeric settings of the locale

2009-05-18 Thread alef0 at freenet dot de
From: alef0 at freenet dot de
Operating system: gentoo
PHP version:  5.2CVS-2009-05-18 (CVS)
PHP Bug Type: Math related
Bug description:  Type conversion into a float respects the numeric settings of 
the locale

Description:

PHP version: 5.2.6RC4-pl0-gentoo

Conversion using floatval() or (float) respects the numeric settings of
the locale.

THIS IS VERY DANGEROUS CAUSE YOU WILL GET WRONG RESULTS BY APPLYING ANY
MATH METHODE ON CONVERTED FLOATS!

Reproduce code:
---
$var = '122.34343The';  //expected float: 122.34343

setlocale(LC_NUMERIC, 'en_US.utf8');
$float_value_of_var = (float) $var;
print 'Locale dec sep point: (float) ' . $var . ' =  ' .
$float_value_of_var;
$float_value_of_var = floatval($var);
print ' or floatval(' . $var . ') =  ' . $float_value_of_var . "\n\n";

setlocale(LC_NUMERIC, 'de_DE.utf8');
$float_value_of_var = (float) $var;
print 'Locale dec sep comma: (float) ' . $var . ' =  ' .
$float_value_of_var;
$float_value_of_var = floatval($var);
print ' or floatval(' . $var . ') =  ' . $float_value_of_var . "\n\n";

Expected result:

Locale dec sep point: (float) 122.34343The = 122.34343 or
floatval(122.34343The) = 122.34343

Locale dec sep comma: (float) 122.34343The = 122.34343 or
floatval(122.34343The) = 122.34343


Actual result:
--
Locale dec sep point: (float) 122.34343The = 122.34343 or
floatval(122.34343The) = 122.34343

Locale dec sep comma: (float) 122.34343The = 122,34343 or
floatval(122.34343The) = 122,34343

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



#48293 [Opn->Fbk]: user name send to mysql server in an incorrect encoding (PHP_5_3 and above only)

2009-05-18 Thread andrey
 ID:   48293
 Updated by:   and...@php.net
 Reported By:  aaa_whoknows_me at list dot ru
-Status:   Open
+Status:   Feedback
 Bug Type: MySQL related
 Operating System: Windows
 PHP Version:  5.3.0RC2
 New Comment:

mysqlnd (5.3.0) doesn't read the my.ini/my.cnf at all, thus also not
the [mysql] section. Yes, mysqlnd set the charset of the connection to
be the charset of the server sent during the handshake. In the greeting
packet the server says which its default charset is. The server
interprets the username in the the charset sent by the client.
Libmysql doesn't look at what the server advertises but uses its own
charset, sometimes pulled from the config, sometimes what is set through
mysql_options - depends how used.
You can overcome mysql's behavior by doing something like
$conn = new mysqli(); // no params, no connection
$conn->options(MYSQLI_SET_CHARSET_NAME, "yourcharset");
$conn->connect("host", "user", "pass"...);

HTH,
Andrey


Previous Comments:


[2009-05-16 15:14:52] aaa_whoknows_me at list dot ru

It applies only to PHP 5.3.0 and higher. Now I'm using PHP 5.2.9-2 for
Windows and it is able to connect to the same MySQL server.



[2009-05-15 17:26:34] j...@php.net

Just to make sure: This does not happen with PHP 5.2.9 ??



[2009-05-15 12:16:27] aaa_whoknows_me at list dot ru

Description:

PHP >= 5.3.0 sends user name to mysql server in an incorrect encoding
in some cases.
---
In this case PHP uses UTF-8 as its default encoding. PHP sends user
name in mysql server default encoding. But in some cases mysql uses
different encodings for data storing and sql queries. Consider a
following situation:
my.ini
[mysql]
default-character-set=utf8
 [mysqld]
default-character-set=ucs2
So, 'user' in UTF-8 == 'ôÈ' in UTF-16BE

Reproduce code:
---
$link = mysql_connect('user', 'password', 'database');
if (!$link) {
die('Could not connect: ' . mysql_error());
}
echo 'Connected successfully';
mysql_close($link);
---
try {
$dbh = new PDO('mysql:host=localhost;dbname=database', 'user',
'password');
foreach($dbh->query('SELECT id FROM users;') as $row) {
print_r($row);
}
$dbh = null;
} catch (PDOException $e) {
print "Error!: " . $e->getMessage() . "";
}
---
$mysqli = new mysqli('localhost', 'user', 'password', 'database');

/* check connection */
if (mysqli_connect_errno()) {
printf("Connect failed: %s\n", mysqli_connect_error());
exit();
}

/* Select queries return a resultset */
if ($result = $mysqli->query("SELECT id FROM users;")) {
printf("Select returned %d rows.\n", $result->num_rows);

/* free result set */
$result->close();
}

$mysqli->close();

Expected result:

A successful connection to the mysql database.

Actual result:
--
Access denied for user 'ôÈ'@'localhost' (using password: YES)





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



#46144 [Com]: failed prepare() does not fill error and errno fields

2009-05-18 Thread Progman2002 at gmx dot de
 ID:   46144
 Comment by:   Progman2002 at gmx dot de
 Reported By:  Progman2002 at gmx dot de
 Status:   Open
 Bug Type: MySQLi related
 Operating System: Linux
 PHP Version:  5.2CVS-2009-01-25 (snap)
 New Comment:

Sure I can call close() by myself (which I normally do), but it doesn't
solve the bug itself. The point is you get an error situation and don't
know why.


Previous Comments:


[2009-05-18 02:17:56] felix9x at yahoo dot com

It's because the first $stmt object is destroyed by the second
assignment (which clears the last error message).

$sql = 'INSERT INTO
SomeTest(UserID, RechtID)
WHERE
(?,?)';
if (!$stmt = $db->prepare($sql)) {
die($db->error."-".$db->errno."-".$db->info);
}


Its equivalent to doing this: $stmt = false;
The destructor of the Mysqli_stmt class resets the Last error.

Its possible to call $stmt->close() explicitly. Probably best to use
this syntax:

$sql = 'INSERT INTO
t(i)
WHERE
(?)';
$stmt = $db->stmt_init();
if(!$stmt->prepare($sql) ){
  die( $stmt->error );
}



[2009-01-25 10:50:41] Progman2002 at gmx dot de

The bug is still not fixed. Maybe it has something to do with an
uncalled destructor since I use the same variable $stmt.

Actual result:
--
PHP-Version: 5.2.9-dev
MySQL-Server-Version: 50060
MySQL-Protocol: 10
-0-

Expected result:

PHP-Version: 5.2.9-dev
MySQL-Server-Version: 50060
MySQL-Protocol: 10
(Showing a MySQL error which says "Syntax error near WHERE (?,?)" or
says sth. like "unfinished prepare statement before")



[2008-11-29 10:59:24] Progman2002 at gmx dot de

As the paste on the pasteboard is gone I'll add the code here.
---

server_version."\n";
echo 'MySQL-Protocol: '.$db->protocol_version."\n";
$sql = 'CREATE TEMPORARY TABLE SomeTest(UserID INT NOT NULL, RechtID
INT NOT NULL)';
if (!$db->query($sql)) {
die($db->error);
}
$sql = 'DELETE FROM
SomeTest
WHERE
UserID = ?';
if (!$stmt = $db->prepare($sql)) {
die($db->error);
}
// note the missing $stmt->close() here
$sql = 'INSERT INTO
SomeTest(UserID, RechtID)
WHERE
(?,?)';
if (!$stmt = $db->prepare($sql)) {
die($db->error."-".$db->errno."-".$db->info);
}
echo "done";
?>



[2008-09-21 13:49:28] Progman2002 at gmx dot de

Description:

If you create a prepared statement with a DELETE query and tries to
create a second prepared statement with an INSERT query on the same
table without closing the first one the MySQLi::prepare() method failed,
but the fields $error and $errno (and all other related to them) aren't
filled with the error message. This is strange as the prepare() failed
but you dont know why.

The mysql error is shown if I save the second statement into another
variable (like if (!$stmt2 = $db->prepare($sql))) (maybe its related to
bug #44766)

Reproduce code:
---
Code is at http://nopaste.php-quake.net/51976

Expected result:

PHP-Version: 5.2.6-pl7-gentoo
MySQL-Server-Version: 50042
MySQL-Protocol: 10
{Showing a MySQL error which says "Syntax error near WHERE (?,?)" or
says sth. like "unfinished prepare statement before")

Actual result:
--
PHP-Version: 5.2.6-pl7-gentoo
MySQL-Server-Version: 50042
MySQL-Protocol: 10
-0-

(so the values are all empty strings or zero)





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



#48314 [Fbk->Opn]: PDO_MySQL doesn't use prepared statements

2009-05-18 Thread vrana
 ID:   48314
 Updated by:   vr...@php.net
 Reported By:  vr...@php.net
-Status:   Feedback
+Status:   Open
 Bug Type: PDO related
 Operating System: Windows
 PHP Version:  5.2.9
 New Comment:

Same result.


Previous Comments:


[2009-05-18 13:43:31] johan...@php.net

Try also disabling PDO::ATTR_EMULATE_PREPARES. PHP 5.3 got some
improvements/fixes with PDO_mysql (due to mysqlnd work) not sure if some
parts can be backported.



[2009-05-18 13:25:17] vr...@php.net

Description:

It seems that PDO_MySQL doesn't use prepared statements even with
disabled PDO::MYSQL_ATTR_DIRECT_QUERY. If the prepared statements would
by used then the binary data passed in the example wouldn't cause a
parse error.

MySQL version: 5.1.26

Reproduce code:
---
setAttribute(PDO::MYSQL_ATTR_DIRECT_QUERY, false);
$pdo->exec("SET NAMES gbk");
$stmt = $pdo->prepare("SELECT ?");
$stmt->execute(array(chr(0xbf) . chr(0x27)));
print_r($stmt->errorInfo());
?>


Expected result:

Array
(
[0] => 0
)


Actual result:
--
Array
(
[0] => 42000
[1] => 1064
[2] => You have an error in your SQL syntax; check the manual that
corresponds to your MySQL server version for the right syntax to use
near ''¿\''' at line 1
)






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



#48314 [Opn->Fbk]: PDO_MySQL doesn't use prepared statements

2009-05-18 Thread johannes
 ID:   48314
 Updated by:   johan...@php.net
 Reported By:  vr...@php.net
-Status:   Open
+Status:   Feedback
 Bug Type: PDO related
 Operating System: Windows
 PHP Version:  5.2.9
 New Comment:

Try also disabling PDO::ATTR_EMULATE_PREPARES. PHP 5.3 got some
improvements/fixes with PDO_mysql (due to mysqlnd work) not sure if some
parts can be backported.


Previous Comments:


[2009-05-18 13:25:17] vr...@php.net

Description:

It seems that PDO_MySQL doesn't use prepared statements even with
disabled PDO::MYSQL_ATTR_DIRECT_QUERY. If the prepared statements would
by used then the binary data passed in the example wouldn't cause a
parse error.

MySQL version: 5.1.26

Reproduce code:
---
setAttribute(PDO::MYSQL_ATTR_DIRECT_QUERY, false);
$pdo->exec("SET NAMES gbk");
$stmt = $pdo->prepare("SELECT ?");
$stmt->execute(array(chr(0xbf) . chr(0x27)));
print_r($stmt->errorInfo());
?>


Expected result:

Array
(
[0] => 0
)


Actual result:
--
Array
(
[0] => 42000
[1] => 1064
[2] => You have an error in your SQL syntax; check the manual that
corresponds to your MySQL server version for the right syntax to use
near ''¿\''' at line 1
)






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



#48314 [NEW]: PDO_MySQL doesn't use prepared statements

2009-05-18 Thread vr...@php.net
From: vr...@php.net
Operating system: Windows
PHP version:  5.2.9
PHP Bug Type: PDO related
Bug description:  PDO_MySQL doesn't use prepared statements

Description:

It seems that PDO_MySQL doesn't use prepared statements even with disabled
PDO::MYSQL_ATTR_DIRECT_QUERY. If the prepared statements would by used then
the binary data passed in the example wouldn't cause a parse error.

MySQL version: 5.1.26

Reproduce code:
---
setAttribute(PDO::MYSQL_ATTR_DIRECT_QUERY, false);
$pdo->exec("SET NAMES gbk");
$stmt = $pdo->prepare("SELECT ?");
$stmt->execute(array(chr(0xbf) . chr(0x27)));
print_r($stmt->errorInfo());
?>


Expected result:

Array
(
[0] => 0
)


Actual result:
--
Array
(
[0] => 42000
[1] => 1064
[2] => You have an error in your SQL syntax; check the manual that
corresponds to your MySQL server version for the right syntax to use near
''¿\''' at line 1
)


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



#48134 [Opn]: crash after a few days (backtrace attached) with worker MPM

2009-05-18 Thread jimbobpalmer at gmail dot com
 ID:   48134
 User updated by:  jimbobpalmer at gmail dot com
 Reported By:  jimbobpalmer at gmail dot com
 Status:   Open
 Bug Type: Apache2 related
 Operating System: * (ZTS only)
 PHP Version:  5.2.9
 New Comment:

Still no segfaults. What do you want me to do next?


Previous Comments:


[2009-05-13 09:38:34] jimbobpalmer at gmail dot com

> Can you just try with prefork MPM so we can make the list of
> possible issues a bit shorter..? 

Prefork has had no segfaults in more than two days, versus 10 hours for
the first segfault with the worker mpm (then a mass of segfaults a day
or two later).



[2009-05-07 22:42:58] j...@php.net

Can you just try with prefork MPM so we can make the list of possible 
issues a bit shorter..? 

And yes, supposedly PHP is thread safe, just some libraries might not
be 
and of course there might be bugs in PHP. 



[2009-05-07 19:08:55] jimbobpalmer at gmail dot com

Is php not thread safe?



[2009-05-07 14:00:49] j...@php.net

That explains it. You propably wouldn't have any problems if you didn't

use threaded MPM. Try the more stable prefork MPM instead.



[2009-05-07 13:44:47] jimbobpalmer at gmail dot com

Worker MPM + apache2handler



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

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



#48311 [Com]: Controlable object diposing

2009-05-18 Thread a at b dot c dot de
 ID:   48311
 Comment by:   a at b dot c dot de
 Reported By:  av3ng3r at gmail dot com
 Status:   Open
 Bug Type: Feature/Change Request
 Operating System: -
 PHP Version:  6CVS-2009-05-17 (CVS)
 New Comment:

Your example would be handled by

$reader = new StreamReader($stream);
$reader->write('blahblahblah');
$reader = null; // $reader->__destruct() called

Objects and values are destroyed as soon as the last reference to them
goes away. Remove those references, destroy the object.


$start = microtime(true);

class foo{
private $name;
function __construct($name) {
$this->name = $name;
}
function __destruct() {
echo $this->name." Destroyed at
".(microtime(true)-$GLOBALS['start'])." seconds\n";
}

}

$t1 = new foo('t1');
$t2 = new foo('t2');
$t3 = new foo('t3');

echo "Set \$t1 to null at ".(microtime(true)-$start)." seconds\n";
$t1 = null;
echo "Sleep 5 seconds\n";
sleep(5);
echo "Replace \$t2 with \$t3 at ".(microtime(true)-$start)."
seconds\n";
$t2 = $t3;
echo "Sleep 5 seconds\n";
sleep(5);


Previous Comments:


[2009-05-17 16:50:23] av3ng3r at gmail dot com

Description:

An implementation like C# (
http://www.coderjournal.com/2007/02/proper-use-idisposable/ ) would be
appreciated:

using(StreamReader reader = new StreamReader(stream))
{
   reader.write('blalblabab');
}

The class StreamReader implements an interface IDisposable, by
implementing this interface (creating a function in the class called;
Dispose) the user can use the statement `using` to control the disposal
of the object manually instead of waiting of the garbage collection of
PHP.

This would be usefull for controling database connections, socket
connections, simplexml?, etc.






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



#48305 [Com]: SORT_VERSION for sort functions

2009-05-18 Thread a at b dot c dot de
 ID:   48305
 Comment by:   a at b dot c dot de
 Reported By:  sean at wdsolutions dot com
 Status:   Open
 Bug Type: Feature/Change Request
 Operating System: Linux
 PHP Version:  5.2.9
 New Comment:

You could use the existing "version_compare" function instead of
writing your own. That would cover the PHP version-numbering convention.
Other conventions could be addressed by hand-written functions, but
given the existence of those other conventions a single "SORT_VERSION"
flag wouldn't be sufficient.


Previous Comments:


[2009-05-16 18:49:07] sean at wdsolutions dot com

Description:

It would be awesome to have a SORT_VERSION flag for the sort family of
functions, whose behavior would be to sort most common multi-number
version strings (with possible support for detecting -cvs, -rc, -svn,
and other suffixes).

For example, SORT_NUMERIC and SORT_STRING both fail to properly sort
the following version numbers:

1.2.1
1.2.2
1.2.10
1.20.5
1.22.50

They get sorted as:

1.20.5
1.2.1
1.2.10
1.2.2
1.22.50

Code I used to work around it is below:

Reproduce code:
---
function vercmp($a, $b) {
  $as = explode('.', $a);
  $bs = explode('.', $b);
  for ($i = 0, $e = max(count($as), count($bs)); $i != $e; ++$i) {
if ($as[$i] < $bs[$i])
  return -1;
elseif ($as[$i] > $bs[$i])
  return 1;
  }
  return 0;
}







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



#48304 [Com]: curl_errno return 0 on error

2009-05-18 Thread dypa at bk dot ru
 ID:   48304
 Comment by:   dypa at bk dot ru
 Reported By:  dypa at bk dot ru
 Status:   Feedback
 Bug Type: cURL related
 Operating System: linux
 PHP Version:  5.2.9
 New Comment:

C:\php>php test.php
resource(4) of type (curl)
resource(5) of type (curl)
int(0)
int(0)
string(51) "Could not resolve host: 404.php.net; Host not found"
string(0) ""

C:\php>php -v
PHP 5.2.10-dev (cli) (built: May 18 2009 11:46:45)
Copyright (c) 1997-2009 The PHP Group
Zend Engine v2.2.0, Copyright (c) 1998-2009 Zend Technologies


Previous Comments:


[2009-05-16 23:04:23] j...@php.net

Please try using this CVS snapshot:

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

  http://windows.php.net/snapshots/





[2009-05-16 19:27:34] knockk at mail dot ru

same problem on windows xp php 5.2.9-1



[2009-05-16 17:07:30] dypa at bk dot ru

Description:

when i use curl_multi curl_errno returns 0 on errors
see:
u...@localhost:/$php code.php

this bug related to: http://bugs.php.net/bug.php?id=33570

Reproduce code:
---
http://404.php.net";);
curl_setopt($ch1, CURLOPT_HEADER, 0);
curl_setopt($ch1, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch2, CURLOPT_URL, "http://www.php.net/";);
curl_setopt($ch2, CURLOPT_HEADER, 0);
curl_setopt($ch2, CURLOPT_RETURNTRANSFER, 1);

//create the multiple cURL handle
$mh = curl_multi_init();

//add the two handles
curl_multi_add_handle($mh,$ch1);
curl_multi_add_handle($mh,$ch2);

$running=null;
//execute the handles
do {
curl_multi_exec($mh,$running);
} while ($running > 0);

var_dump($ch1);
var_dump($ch2);

var_dump(curl_errno($ch1));
var_dump(curl_errno($ch2));

var_dump(curl_error($ch1));
var_dump(curl_error($ch2));

//close the handles
curl_multi_remove_handle($mh, $ch1);
curl_multi_remove_handle($mh, $ch2);
curl_multi_close($mh);


Expected result:

resource(4) of type (curl)
resource(5) of type (curl)
int(6) //CURLE_COULDNT_RESOLVE_HOST (6)
int(0)
string(35) "Couldn't resolve host '404.php.net'"
string(0) ""


Actual result:
--
resource(4) of type (curl)
resource(5) of type (curl)
int(0)
int(0)
string(35) "Couldn't resolve host '404.php.net'"
string(0) ""






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



#47812 [Asn]: undefined symbol: gdJpegGetVersionInt

2009-05-18 Thread oeriksson at mandriva dot com
 ID:   47812
 User updated by:  oeriksson at mandriva dot com
 Reported By:  oeriksson at mandriva dot com
 Status:   Assigned
 Bug Type: GD related
 Operating System: Mandriva Linux
 PHP Version:  5.3.0RC1
 Assigned To:  pajoye
 New Comment:

Seems OK with 5.3.0RC2 that now also is in Mandriva Cooker. Thanks
Pierre.


Previous Comments:


[2009-05-03 22:15:16] paj...@php.net

For your information, the gdJpegGetVersionInt error is fixed in CVS, I
keep this bug open as it reflects what I'm working on: allows to use
either the bundled library or a decent external version without loosing
features.



[2009-04-15 01:00:00] php-bugs at lists dot php dot net

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



[2009-04-07 09:27:23] paj...@php.net

Please try using this CVS snapshot:

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

  http://windows.php.net/snapshots/





[2009-03-30 17:45:13] paj...@php.net

"The private changes in the bundled libmagic library (file-5.x) is
also
quite annoying."

It will end like mod_mime, to only use the DB. 



[2009-03-30 17:38:58] oeriksson at mandriva dot com

Thanks Pierre,

I'm looking forward to a gd with all the bling-bling that's in the
bundled gd in php, as well as with libzip.

The private changes in the bundled libmagic library (file-5.x) is also
quite annoying.



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

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



#45188 [Opn]: Crash during request shutdown if mail server shuts down

2009-05-18 Thread thomas dot jarosch at intra2net dot com
 ID:   45188
 User updated by:  thomas dot jarosch at intra2net dot com
 Reported By:  thomas dot jarosch at intra2net dot com
 Status:   Open
 Bug Type: IMAP related
 Operating System: linux
 PHP Version:  5.2.6
 Assigned To:  fb-req-jani
 New Comment:

Is it just me or this some information go missing
while posting in the bug tracker??

Anyway, the error message is:
"/tmp/php-5.2.10/Zend/zend_alloc.h:34: error: expected
specifier-qualifier-list before 'uint'


Previous Comments:


[2009-05-18 09:23:24] thomas dot jarosch at intra2net dot com

Hi,

I can compile the snapshot on my Fedora 9 workstation using gcc
4.3.0. The build of the snapshot fails on my devel box using gcc
4.3.2 + ancient glibc version. Here's the error message I get:
In file included from /tmp/php-5.2.10/Zend/zend.h:236, 


 from /tmp/php-5.2.10/main/php.h:34,   


 from /tmp/php-5.2.10/ext/date/php_date.c:23:  


/tmp/php-5.2.10/Zend/zend_alloc.h:34: error: expected specifier-

I tracked it down to this code snippet:

[r...@intradev /tmp]# cat main.c
#define _ISOC9X_SOURCE

#include 

typedef struct _zend_leak_info {
//  void *addr;
//  size_t size;
//  char *filename;
uint lineno;
//  char *orig_filename;
//  uint orig_lineno;
} zend_leak_info;

int main(void)
{
return 0;
}
[r...@intradev /tmp]# gcc main.c
main.c:9: error: expected specifier-qualifier-list before 'uint'
[r...@intradev /tmp]# gcc --version
gcc (GCC) 4.3.2 20081007 (Red Hat 4.3.2-6)


If I remove the "#define _ISOC9X_SOURCE", it compiles fine,
same thing for ext/date/php_date.c.

The corresponding commit is here:
http://cvs.php.net:80/viewvc.cgi/php-

and

http://cvs.php.net:80/viewvc.cgi/php-

Is the "_ISOC9X_SOURCE" define really needed?



[2009-05-12 01:00:02] 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".



[2009-05-04 13:24:46] thomas dot jarosch at intra2net dot com

Thanks for checking. I'll test again this week and report back.



[2009-04-30 09:40:13] j...@php.net

Compiles fine for me. Try again with latest snapshot. (make sure to 
unpack and build in clean dirs..)



[2009-04-29 14:27:02] thomas dot jarosch at intra2net dot com

Is the latest snapshot compilable?

I get this:

/usr/src/redhat/BUILD/php5.2-200904291230/main/streams/cast.c:129:
error: expected '=', ',', ';', 'asm' or '__attribute__' before
'stream_cookie_functions'
/usr/src/redhat/BUILD/php5.2-200904291230/main/streams/cast.c: In
function '_php_stream_cast':
/usr/src/redhat/BUILD/php5.2-200904291230/main/streams/cast.c:181:
error: 'stream_cookie_functions' undeclared (first use in this
function)
/usr/src/redhat/BUILD/php5.2-200904291230/main/streams/cast.c:181:
error: (Each undeclared identifier is reported only once
/usr/src/redhat/BUILD/php5.2-200904291230/main/streams/cast.c:181:
error: for each function it appears in.)
/usr/src/redhat/BUILD/php5.2-200904291230/main/streams/cast.c:181:
warning: assignment makes pointer from integer without a cast
/usr/src/redhat/BUILD/php5.2-200904291230/main/streams/cast.c:221:
warning: passing argument 3 of '_php_stream_cast' makes pointer from
integer without a cast



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

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



#45188 [NoF->Opn]: Crash during request shutdown if mail server shuts down

2009-05-18 Thread thomas dot jarosch at intra2net dot com
 ID:   45188
 User updated by:  thomas dot jarosch at intra2net dot com
 Reported By:  thomas dot jarosch at intra2net dot com
-Status:   No Feedback
+Status:   Open
 Bug Type: IMAP related
 Operating System: linux
 PHP Version:  5.2.6
 Assigned To:  fb-req-jani
 New Comment:

Hi,

I can compile the snapshot on my Fedora 9 workstation using gcc
4.3.0. The build of the snapshot fails on my devel box using gcc
4.3.2 + ancient glibc version. Here's the error message I get:
In file included from /tmp/php-5.2.10/Zend/zend.h:236, 


 from /tmp/php-5.2.10/main/php.h:34,   


 from /tmp/php-5.2.10/ext/date/php_date.c:23:  


/tmp/php-5.2.10/Zend/zend_alloc.h:34: error: expected specifier-

I tracked it down to this code snippet:

[r...@intradev /tmp]# cat main.c
#define _ISOC9X_SOURCE

#include 

typedef struct _zend_leak_info {
//  void *addr;
//  size_t size;
//  char *filename;
uint lineno;
//  char *orig_filename;
//  uint orig_lineno;
} zend_leak_info;

int main(void)
{
return 0;
}
[r...@intradev /tmp]# gcc main.c
main.c:9: error: expected specifier-qualifier-list before 'uint'
[r...@intradev /tmp]# gcc --version
gcc (GCC) 4.3.2 20081007 (Red Hat 4.3.2-6)


If I remove the "#define _ISOC9X_SOURCE", it compiles fine,
same thing for ext/date/php_date.c.

The corresponding commit is here:
http://cvs.php.net:80/viewvc.cgi/php-

and

http://cvs.php.net:80/viewvc.cgi/php-

Is the "_ISOC9X_SOURCE" define really needed?


Previous Comments:


[2009-05-12 01:00:02] 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".



[2009-05-04 13:24:46] thomas dot jarosch at intra2net dot com

Thanks for checking. I'll test again this week and report back.



[2009-04-30 09:40:13] j...@php.net

Compiles fine for me. Try again with latest snapshot. (make sure to 
unpack and build in clean dirs..)



[2009-04-29 14:27:02] thomas dot jarosch at intra2net dot com

Is the latest snapshot compilable?

I get this:

/usr/src/redhat/BUILD/php5.2-200904291230/main/streams/cast.c:129:
error: expected '=', ',', ';', 'asm' or '__attribute__' before
'stream_cookie_functions'
/usr/src/redhat/BUILD/php5.2-200904291230/main/streams/cast.c: In
function '_php_stream_cast':
/usr/src/redhat/BUILD/php5.2-200904291230/main/streams/cast.c:181:
error: 'stream_cookie_functions' undeclared (first use in this
function)
/usr/src/redhat/BUILD/php5.2-200904291230/main/streams/cast.c:181:
error: (Each undeclared identifier is reported only once
/usr/src/redhat/BUILD/php5.2-200904291230/main/streams/cast.c:181:
error: for each function it appears in.)
/usr/src/redhat/BUILD/php5.2-200904291230/main/streams/cast.c:181:
warning: assignment makes pointer from integer without a cast
/usr/src/redhat/BUILD/php5.2-200904291230/main/streams/cast.c:221:
warning: passing argument 3 of '_php_stream_cast' makes pointer from
integer without a cast



[2009-04-27 19:14:40] j...@php.net

Please try using this CVS snapshot:

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

  http://windows.php.net/snapshots/





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

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



#47766 [Asn->Fbk]: php-cgi.exe crashes

2009-05-18 Thread pajoye
 ID:   47766
 Updated by:   paj...@php.net
 Reported By:  ipseno at yahoo dot com
-Status:   Assigned
+Status:   Feedback
 Bug Type: CGI related
 Operating System: win32 only - Win XP SP3
 PHP Version:  5.3CVS-2009-03-24 (snap)
 Assigned To:  pajoye
 New Comment:

No, I can't reproduce it. Without the script you are using, there is
also no chance to actually reproduce your problem. Btw, out of
curiosity, how large are the files used by the script? and the script
itself?


Previous Comments:


[2009-04-07 23:53:14] ipseno at yahoo dot com

Done. Restarted. And same crash occurs.

Listen...
Can you confirm that bug.php crashed yours php-cgi.exe?
And after editing file by means of removing any symbol or adding one,
"fixes" it?



[2009-04-07 23:00:45] paj...@php.net

Be sure to use the libmysql.dll from the PHP releases and not the
5.1.30 DLL. Check your PATH environment, the php directory must be first
in the list.




[2009-04-07 22:51:04] ipseno at yahoo dot com

MySQL server is: 5.1.33, but 2 dayys ago it was 5.1.30
I tested script with both versions and crash occured.

I am confused, with your questions about phar and mysql.

I've told you, that on a new box with fresh WinXP SP3, and all updates.
I've installed Apache 2.2.11 and PHP 5.3.0RC2-dev

Then parsed it(bug.php->which was the ONLY .php file on that server, so
there was nothing to include() || require() or load in any way) by
typing it's location in URL of browser which depends on apaches config:
Ie: https://127.0.0.15/bug.php

IMPORTANT!!!
Do not parse it by means of mod_php! But as fcgid! -> Server API
CGI/FastCGI 

I use in apache's config:
LoadModule fcgid_module modules/mod_fcgid.so

ScriptAlias /php5 "D:/Program Files/php/php-cgi.exe"
Action application/x-httpd-php /php5

AddType application/x-httpd-php .php5 .php4 .php .php3 .php2 .phtml
.png

DirectoryIndex index.php index.html index.htm


You must receive:
CGI / FastCGI has encountered a problem and needs to close.  We are
sorry for the inconvenience.
An then:
500
Internal Server Error

The server encountered an internal error or misconfiguration and was
unable to complete your request.

Please contact the server administrator, webmas...@exchanger.com and
inform them of the time the error occurred, and anything you might have
done that may have caused the error.

More information about this error may be available in the server error
log.



[2009-04-07 09:20:12] paj...@php.net

Sorry, but the script you sent me does not help. It still requires
other files and is not really small.

For what I can see the DB connection is done at this stage as well.
That brings me to one common problem:

- Which mysql version do you use? (server)



[2009-04-07 09:14:45] j...@php.net

Perhaps if that PHAR thing is removed it works fine?



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

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