#46662 [NEW]: hkh

2008-11-24 Thread vgr at yhaoo dot com
From: vgr at yhaoo dot com
Operating system: jgytkjh
PHP version:  5.3.0alpha2
PHP Bug Type: Output Control
Bug description:  hkh

Description:

jg

Reproduce code:
---
,khkjgyjgjgh

Expected result:

hkjhkjhkjh

Actual result:
--
,hkjhjh

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



#46644 [Fbk->Opn]: https cURL failure

2008-11-24 Thread brian dot bream at comcast dot net
 ID:   46644
 User updated by:  brian dot bream at comcast dot net
 Reported By:  brian dot bream at comcast dot net
-Status:   Feedback
+Status:   Open
 Bug Type: cURL related
 Operating System: Solaris 10 08/07 x86
 PHP Version:  5.2CVS-2008-11-24
 Assigned To:  jani
 New Comment:

# rm config.cache ; ./configure --disable-all --disable-cgi
--with-curl=/usr/local/
# make clean && make
# sapi/cli/php your_test_script_here.php

Works as expected, the CLI has always worked.

Added basic functionality to support web server ops.

'./configure' '--with-apxs2=/usr/apache2/bin/apxs'
'--with-config-file-path=/etc/apache2' '--with-openssl=shared,/usr/sfw/'
'--with-curl=/usr/sfw/bin/' '--with-pdo-mysql=shared,/opt/csw/mysql5/'

Same issue.

Rebuilt openssl, same issue.

Sent config.log


Previous Comments:


[2008-11-24 13:29:57] [EMAIL PROTECTED]

I can not reproduce this on any of my servers. I have Curl 7.18.2 and
openssl 0.9.8g. I don't have any shared extensions messing things up so
can you try first with the simplest possible configure line:

# rm config.cache ; ./configure --disable-all --disable-cgi
--with-curl=/usr/local/
# make clean && make
# sapi/cli/php your_test_script_here.php




[2008-11-24 12:44:06] brian dot bream at comcast dot net

sent to [EMAIL PROTECTED]



[2008-11-24 12:23:57] [EMAIL PROTECTED]

Can you send that script to me so I can test myself?



[2008-11-24 11:14:58] brian dot bream at comcast dot net

bash-3.00# php -f curl_test.php
* About to connect() to secure.authorize.net port 443 (#0)
*   Trying 64.94.118.33... * connected
* Connected to secure.authorize.net (64.94.118.33) port 443 (#0)
* successfully set certificate verify locations:
*   CAfile: /var/tmp/cacert.pem
  CApath: none
* SSL connection using RC4-MD5
* Server certificate:
*subject: C=US, ST=Utah, L=American Fork, O=Authorize.Net
Corp., OU=Authorize.Net Corp., CN=secure.authorize.net
*start date: 2007-04-06 00:00:00 GMT
*expire date: 2009-04-11 23:59:59 GMT
*common name: secure.authorize.net (matched)
*issuer: C=ZA, O=Thawte Consulting (Pty) Ltd., CN=Thawte SGC
CA
*SSL certificate verify ok.
> GET / HTTP/1.1
Host: secure.authorize.net
Accept: */*

< HTTP/1.1 200 OK
< Server: Microsoft-IIS/5.0
< Content-Location: https://secure.authorize.net/index.htm
< Date: Mon, 24 Nov 2008 11:11:57 GMT
< Content-Type: text/html
< Accept-Ranges: bytes
< Last-Modified: Wed, 05 May 2004 10:32:44 GMT
< ETag: "06ee34c8c32c41:2c4c"
< Content-Length: 320
<
* Connection #0 to host secure.authorize.net left intact
Array
(
[url] => https://secure.authorize.net
[content_type] => text/html
[http_code] => 200
[header_size] => 284
[request_size] => 59
[filetime] => -1
[ssl_verify_result] => 0
[redirect_count] => 0
[total_time] => 0.412856
[namelookup_time] => 0.059205
[connect_time] => 0.114765
[pretransfer_time] => 0.257572
[size_upload] => 0
[size_download] => 320
[speed_download] => 775
[speed_upload] => 0
[download_content_length] => 320
[upload_content_length] => 0
[starttransfer_time] => 0.412811
[redirect_time] => 0
)
Errors: 0 * Closing connection #0
HTTP/1.1 200 OK
Server: Microsoft-IIS/5.0
Content-Location: https://secure.authorize.net/index.htm
Date: Mon, 24 Nov 2008 11:11:57 GMT
Content-Type: text/html
Accept-Ranges: bytes
Last-Modified: Wed, 05 May 2004 10:32:44 GMT
ETag: "06ee34c8c32c41:2c4c"
Content-Length: 320


 Authorize.Net
 


https://Account.authorize.net/ui/themes/anet/merch.app"; NORESIZE>



>From  Browser
Array
(
[url] => https://secure.authorize.net
[http_code] => 0
[header_size] => 0
[request_size] => 0
[filetime] => -1
[ssl_verify_result] => 0
[redirect_count] => 0
[total_time] => 0
[namelookup_time] => 0.036851
[connect_time] => 0.092135
[pretransfer_time] => 0
[size_upload] => 0
[size_download] => 0
[speed_download] => 0
[speed_upload] => 0
[download_content_length] => 0
[upload_content_length] => 0
[starttransfer_time] => 0
[redirect_time] => 0
)

Errors: 35 error:80089077:lib(128):func(137):reason(119)

EOF



[2008-11-24 09:26:50] [EMAIL PROTECTED]

Does it work using the PHP CLI binary?



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

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



#23022 [Com]: Supported dereferencing array indeces on arbitrary expressions

2008-11-24 Thread showmethemoney at google dot com
 ID:   23022
 Comment by:   showmethemoney at google dot com
 Reported By:  [EMAIL PROTECTED]
 Status:   Open
 Bug Type: Feature/Change Request
 Operating System: Any
 PHP Version:  5CVS-2003-04-02 (dev)
 New Comment:

Guys, we really need this feature to make our code beautiful.

Now:
function get2nd(){
$tempArray = explode(',', array('a','b','c'));
return $tempArray[1];
}
Better:
return explode(',', array('a','b','c'))[1];
or:
return array_get(explode(',', array('a','b','c')), '1');

Thanks.


Previous Comments:


[2008-11-25 03:28:59] kexianbin at diyism dot com

Developer guys, we php programmers indeed need this function 
to direct access element of the function/method returned array.

Sometimes i work around this so:
echo ${!${''}=&explode(',','a,b,c')}[1];

maybe it's the shortest hack code to mimic direct access,
but it's ugly, we really need to realize it in the php build-in syntax
supporting.



[2007-02-23 22:15:16] m_rayman at bigfoot dot com

doesn't fix the bug, but a workaround:

function array_val($array, $key) {
return $array[$key];
}

then you can do things like:

var_dump(array_val(array('a', 'b'), 1));



[2003-04-02 10:30:35] [EMAIL PROTECTED]

Supported dereferencing array indeces on arbitrary expressions.

Currently you can only dereference array indeces on variables
directly:

$a = array('a', 'b');
var_dump($a[1]);

but this does not work

var_dump(array('a', 'b')[1]);

neither does this:

function returnArray() {
return array('a', 'b');
}
var_dump(returnArray()[1]);

or this:

$value = ($ns == 'foo' ? $thisArray : $thatArray)[0];




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



#44908 [Opn->Fbk]: stream_select on pipes returned by proc_open returns streams that are not ready

2008-11-24 Thread lbarnaud
 ID:   44908
 Updated by:   [EMAIL PROTECTED]
 Reported By:  mike at silverorange dot com
-Status:   Open
+Status:   Feedback
 Bug Type: Streams related
 Operating System: *
 PHP Version:  5.2CVS-2008-09-08
 New Comment:

Please try using this CVS snapshot:

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

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




Previous Comments:


[2008-09-08 14:51:00] [EMAIL PROTECTED]

Jani,

I tried the posted development snapshot and the test still fails. The
stream_select() call still returns stdout and stderr streams  in the
read array and reading from either will block indefinitely (because
they're not ready).

Please reopen this bug.



[2008-05-27 15:51:00] ciocan at gmail dot com

Sorry i forgot to mention that for me it happens in Linux: CentOS 5,
php 5.2.6 (and also tried on CentoOS 5, php 5.2.1)

Thank you,
Pavel



[2008-05-27 15:46:52] pciocan at gmail dot com

I encountered the same problem with stream_select but when using named
pipes (created with posix_mkfifo and opened using fopen). Is there a
workaround for this problem?

Thank you,
Pavel



[2008-05-04 23:31:35] mike at silverorange dot com

Jani,

I'm using the MSI install of PHP 5.2.6 (cli) (built Apr 30 2008
16:19:00) on Windows XP Home with Service Pack 2.



[2008-05-04 21:50:20] [EMAIL PROTECTED]

Please check the used PHP version. (phpinfo(); usually is the best way)



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

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



#46207 [Com]: Compile Mysqli Failed

2008-11-24 Thread jwhitman at jwnetsource dot com
 ID:   46207
 Comment by:   jwhitman at jwnetsource dot com
 Reported By:  freed1985 at 126 dot com
 Status:   No Feedback
 Bug Type: MySQLi related
 Operating System: Ubuntu 8.04
 PHP Version:  5.2.6
 New Comment:

/usr/ports/databases/php5-mysqli/work/php-5.2.6/ext/mysqli/mysqli.c:643:
error: (Each undeclared identifier is reported only once
/usr/ports/databases/php5-mysqli/work/php-5.2.6/ext/mysqli/mysqli.c:643:
error: for each function it appears in.)
/usr/ports/databases/php5-mysqli/work/php-5.2.6/ext/mysqli/mysqli.c:644:
error: 'MYSQL_RPL_SLAVE' undeclared (first use in this function)
/usr/ports/databases/php5-mysqli/work/php-5.2.6/ext/mysqli/mysqli.c:645:
error: 'MYSQL_RPL_ADMIN' undeclared (first use in this function)
*** Error code 1

Stop in /usr/ports/databases/php5-mysqli/work/php-5.2.6/ext/mysqli.
*** Error code 1

Stop in /usr/ports/databases/php5-mysqli.
*** Error code 1

Stop in /usr/ports/databases/phpmyadmin.
*** Error code 1

Stop in /usr/ports/databases/phpmyadmin.


Previous Comments:


[2008-10-09 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".



[2008-10-01 20:13:51] [EMAIL PROTECTED]

What's your configure line and which version of libmysql do you have
installed?



[2008-10-01 04:04:52] freed1985 at 126 dot com

Description:

Extension compile failed

Reproduce code:
---
[EMAIL PROTECTED]:/home/otaku/php-5.2.6/ext/mysqli# sudo make


Actual result:
--
/bin/bash /home/otaku/php-5.2.6/ext/mysqli/libtool --mode=compile gcc 
-I. -I/home/otaku/php-5.2.6/ext/mysqli -DPHP_ATOM_INC
-I/home/otaku/php-5.2.6/ext/mysqli/include
-I/home/otaku/php-5.2.6/ext/mysqli/main
-I/home/otaku/php-5.2.6/ext/mysqli -I/usr/local/php/include/php
-I/usr/local/php/include/php/main -I/usr/local/php/include/php/TSRM
-I/usr/local/php/include/php/Zend -I/usr/local/php/include/php/ext
-I/usr/local/php/include/php/ext/date/lib
-I/usr/local/mysql/include/mysql  -DHAVE_CONFIG_H  -g -O2   -c
/home/otaku/php-5.2.6/ext/mysqli/mysqli.c -o mysqli.lo 
mkdir .libs
 gcc -I. -I/home/otaku/php-5.2.6/ext/mysqli -DPHP_ATOM_INC
-I/home/otaku/php-5.2.6/ext/mysqli/include
-I/home/otaku/php-5.2.6/ext/mysqli/main
-I/home/otaku/php-5.2.6/ext/mysqli -I/usr/local/php/include/php
-I/usr/local/php/include/php/main -I/usr/local/php/include/php/TSRM
-I/usr/local/php/include/php/Zend -I/usr/local/php/include/php/ext
-I/usr/local/php/include/php/ext/date/lib
-I/usr/local/mysql/include/mysql -DHAVE_CONFIG_H -g -O2 -c
/home/otaku/php-5.2.6/ext/mysqli/mysqli.c  -fPIC -DPIC -o
.libs/mysqli.o
/home/otaku/php-5.2.6/ext/mysqli/mysqli.c: In function
'zm_startup_mysqli':
/home/otaku/php-5.2.6/ext/mysqli/mysqli.c:643: error:
'MYSQL_RPL_MASTER' undeclared (first use in this function)
/home/otaku/php-5.2.6/ext/mysqli/mysqli.c:643: error: (Each undeclared
identifier is reported only once
/home/otaku/php-5.2.6/ext/mysqli/mysqli.c:643: error: for each function
it appears in.)
/home/otaku/php-5.2.6/ext/mysqli/mysqli.c:644: error: 'MYSQL_RPL_SLAVE'
undeclared (first use in this function)
/home/otaku/php-5.2.6/ext/mysqli/mysqli.c:645: error: 'MYSQL_RPL_ADMIN'
undeclared (first use in this function)
make: *** [mysqli.lo] ´íÎó 1






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



#45002 [Com]: __get() and __set() don't work for static variable calls

2008-11-24 Thread cleeder at gmail dot com
 ID:   45002
 Comment by:   cleeder at gmail dot com
 Reported By:  jb2386 at hotmail dot com
 Status:   Open
 Bug Type: Feature/Change Request
 Operating System: Any
 PHP Version:  5.2.6
 New Comment:

How long until we can expect to see this patch in the production
version of PHP?


Previous Comments:


[2008-09-13 14:42:23] [EMAIL PROTECTED]

There is a patch available at 

  http://sitten-polizei.de/php/getstatic.diff



[2008-05-15 08:42:05] jb2386 at hotmail dot com

Description:

As per bug report: http://bugs.php.net/bug.php?id=39678

"Static class attributes cannot be accessed using __get and 
__set methods."

Also, for reference to "__callStatic" see:
http://bugs.php.net/bug.php?id=26739

With the implementation of __callStatic in PHP 5.3, will there be an
implementation of similar functions __getStatic() and __setStatic()?

For example, so replacing __get and __set with __getStatic() and
__setStatic() respectively will produce the "Expected Output" below?

Reproduce code:
---
class myClass {

public function __set($name,$value) {
echo "Setting: " . $name . " to " . $value."\n";
self::$$name = $value;
}

public function __get($name) {
echo "Getting: " . $name . "\n";
}
}

myClass::$myStaticVar = "test";
echo myClass::$myStaticVar;

Expected result:

Setting: myStaticVar to test
Getting: myStaticVar

Actual result:
--
Fatal error: Access to undeclared static property:  
myClass::$myStaticVar





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



#23022 [Com]: Supported dereferencing array indeces on arbitrary expressions

2008-11-24 Thread kexianbin at diyism dot com
 ID:   23022
 Comment by:   kexianbin at diyism dot com
 Reported By:  [EMAIL PROTECTED]
 Status:   Open
 Bug Type: Feature/Change Request
 Operating System: Any
 PHP Version:  5CVS-2003-04-02 (dev)
 New Comment:

Developer guys, we php programmers indeed need this function 
to direct access element of the function/method returned array.

Sometimes i work around this so:
echo ${!${''}=&explode(',','a,b,c')}[1];

maybe it's the shortest hack code to mimic direct access,
but it's ugly, we really need to realize it in the php build-in syntax
supporting.


Previous Comments:


[2007-02-23 22:15:16] m_rayman at bigfoot dot com

doesn't fix the bug, but a workaround:

function array_val($array, $key) {
return $array[$key];
}

then you can do things like:

var_dump(array_val(array('a', 'b'), 1));



[2003-04-02 10:30:35] [EMAIL PROTECTED]

Supported dereferencing array indeces on arbitrary expressions.

Currently you can only dereference array indeces on variables
directly:

$a = array('a', 'b');
var_dump($a[1]);

but this does not work

var_dump(array('a', 'b')[1]);

neither does this:

function returnArray() {
return array('a', 'b');
}
var_dump(returnArray()[1]);

or this:

$value = ($ns == 'foo' ? $thisArray : $thatArray)[0];




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



#46427 [Opn->Ver]: SoapClient() stumbles over its "stream_context" parameter

2008-11-24 Thread hradtke
 ID:   46427
 Updated by:   [EMAIL PROTECTED]
 Reported By:  daniel dot gorski at develnet dot org
-Status:   Open
+Status:   Verified
 Bug Type: SOAP related
 Operating System: Linux
 PHP Version:  5.3.0alpha2
 New Comment:

In example 1, the $ctx variable is declared within the scope of the
getSoapClient_1() function.  The SoapClient constructor does not make a
copy of the stream context.  That stream context resource is destroyed
when the function returns.

Patch that copies the stream context if someone wants to review and
commit:
http://www.hermanradtke.com/soap_client_stream_context.patch

Since you are using PHP 5.3 you can use a closure.  The syntax is a
little different than something like JavaScript.  Try the following in
the meantime:
function getSoapClient_1() {
$ctx = stream_context_create();
return function() use ($ctx) {
return new SoapClient(URI, array('stream_context' => $ctx));
};
}

$client = getSoapClient_1();
$client()->__soapCall('Help', array());


Previous Comments:


[2008-10-30 11:05:16] daniel dot gorski at develnet dot org

Description:

SoapClient()'s "stream_context" parameter gets mangled if used in a
function. The stream context becomes disfunctional.

Below are two examples listed of which one does not work. Although not
quite sure, this might be also related to #46096.

Reproduce code:
---
error_reporting(E_ALL|E_STRICT);

define(
  'URI',
 
'http://webservices.amazon.com/AWSECommerceService/AWSECommerceService.wsdl'
);

// Example 1, emits a warning, mangles value of $ctx.

function getSoapClient_1() {
$ctx = stream_context_create();
return new SoapClient(URI, array('stream_context' => $ctx));
}

// Explicit output not required to see the error/warning.
getSoapClient_1()->__soapCall('Help', array());

// ---

// Example 2, works as far I can see.

$ctx = stream_context_create();

function getSoapClient_2($ctx) {
return new SoapClient(URI, array('stream_context' => $ctx));
}

// No output, no warning, seems OK.
getSoapClient_2($ctx)->__soapCall('Help', array());

Expected result:

At least no output as not output is triggered.

Actual result:
--
"Warning: SoapClient::__doRequest(): XX is not a valid Stream-Context
resource in [...]"

Where the XX is the resource number id. Interestingly the output is not
"Resource #XX .." but just the number "XX" without the leading hash.





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



#46661 [NEW]: filesize() fails on files with name containing "┴" sign

2008-11-24 Thread hellsing at index dot hu
From: hellsing at index dot hu
Operating system: Vista x64
PHP version:  5.2.6
PHP Bug Type: Filesystem function related
Bug description:  filesize() fails on files with name containing "┴" sign

Description:

When I check file sizes in a loop with filesize($filename), everything is
OK until it reaches files with the "┴" (like a T, but upside down)
character in its name. Then this error message appears:

Warning: filesize() [function.filesize]: stat failed for
/AppServ/www/kraftwerk/store47-115/+NTSZ_2008-01-27.DAT in
D:\AppServ\www\dir2array.php on line 37

Please note that the filename contains "┴" but PHP is looking for
"+".

I know this is crazy to use this kind of characters in filenames, but they
are coming from an old system that can't use letters with accents. Some two
thousand files are affected. I'm not able to replace nor to modify that
app.

(char-to-code conversion is made by php.net/report.php - I wrote the
actual characters)

Reproduce code:
---
$fsize = filesize("/AppServ/www/kraftwerk/store47-115/" . $filename);

Expected result:

The size of the file in bytes.

Actual result:
--
Warning: filesize() [function.filesize]: stat failed for
/AppServ/www/kraftwerk/store47-115/+NTSZ_2008-01-27.DAT in
D:\AppServ\www\dir2array.php on line 37

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



#42547 [Com]: ext/iconv/iconv.c:2426: undefined reference to `libiconv_open'

2008-11-24 Thread justincase at mailcatch dot com
 ID:   42547
 Comment by:   justincase at mailcatch dot com
 Reported By:  dawidpachla at gmail dot com
 Status:   No Feedback
 Bug Type: Compile Failure
 Operating System: CentOS 5 with DirectAdmin
 PHP Version:  5.2.4
 New Comment:

To fix the error:
undefined reference to `libiconv_open'

Run configure like this:
[EMAIL PROTECTED] php-5.2.4]# ./configure CFLAGS=-liconv


Previous Comments:


[2008-11-16 14:53:51] milind dot koyande at gmail dot com

I have used --without-iconv with ./configure and make worked fine.

Hope it will work for you too.

-Milind ( http://trulymanaged.com )



[2008-06-27 14:39:58] ranrig at gmail dot com

Whenever you see "undefined reference to `libiconv_open'", try

make CFLAGS=-liconv



[2007-10-19 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".



[2007-10-11 14:06:27] [EMAIL PROTECTED]

Is there some reason you have libiconv installed in /usr/local when
your glibc provides the same stuff? Did something else require it? As
the fix is to simply uninstall libiconv..



[2007-10-08 10:36:29] dawidpachla at gmail dot com

Here's the output of # grep ICONV main/php_config.h after
'compilation':

[EMAIL PROTECTED] php-5.2.4]# grep ICONV main/php_config.h
/* #undef HAVE_LIBICONV */
/* #undef HAVE_GICONV_H */
/* #undef HAVE_LIBICONV */
#define HAVE_ICONV 1
#define PHP_ICONV_IMPL "glibc"
/* #undef HAVE_BSD_ICONV */
#define PHP_ICONV_IMPL "glibc"
#define HAVE_GLIBC_ICONV 1
#define PHP_ICONV_IMPL "glibc"
#define ICONV_SUPPORTS_ERRNO 0
#define ICONV_SUPPORTS_ERRNO 0
#define ICONV_SUPPORTS_ERRNO 0
#define PHP_ICONV_H_PATH 
/* #undef COMPILE_DL_ICONV */
/* #undef HAVE_LIBICONV */
/* #undef HAVE_GICONV_H */
/* #undef HAVE_LIBICONV */
#define HAVE_ICONV 1
[EMAIL PROTECTED] php-5.2.4]#



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

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



#31193 [Com]: iconv.c:254 undefined reference to 'libiconv'

2008-11-24 Thread justincase at mailcatch dot com
 ID:   31193
 Comment by:   justincase at mailcatch dot com
 Reported By:  david at cubbieco dot com
 Status:   No Feedback
 Bug Type: Compile Failure
 Operating System: linux gcc-3.2
 PHP Version:  5.0.3
 New Comment:

Run configure like this:
[EMAIL PROTECTED] php-5.0.3]# ./configure CFLAGS=-liconv


Previous Comments:


[2008-06-12 14:01:06] spadefinger at hotmail dot com

PHP version 5.2.6 on VectorLinux 5.8 deault configure gives error as
earlier posts. Using ./configure --without-libiconv did not work, adding
-liconv to the EXTRA_LIBS did not work. Used ./configure --without-iconv
to get past the errors.



[2008-02-23 16:47:58] kspetter at curreyadkinscook dot com

What did you add in the EXTRA_LIBS variable?  I'm having the same issue
with version 5.2.5 as well and I can also tell that it's looking for a
different area for the libary even if I'm doing a --with-iconv=dirname

If someone can point out what they did I'll be glad to test out if it
resolves it for me as well.



[2008-02-18 14:55:47] bugs dot php dot net at michaelrack dot de

Same Problem here in v5.2.5. libiconv exists on my Gentoo Base 2007.1
System. PHP automaticly derminates the location of libiconv and compile
against this library. The Configure-Script have to add -liconv to the
EXTRA_LIBS variable.

After i've added this library to the EXTRA_LIBS variable, PHP compiles
without a error-message.

Another solution is --without-libiconv ... but there is still a bug in
the configure-script!

Kind regards,
Michael Rack
http://www.michaelrack.de



[2008-02-17 18:53:26] marrtins at hackers dot lv

undefined reference to `libiconv_open'

php 5.2.5, slackware 10



[2007-11-15 08:57:10] fr33z at inmail dot cz

I have the same problem with PHP 5.2.5 on Slackware 11, why it isn't
still fixed?



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

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



#46424 [Opn->Bgs]: Can't define a header without namespaces

2008-11-24 Thread hradtke
 ID:   46424
 Updated by:   [EMAIL PROTECTED]
 Reported By:  valer_crisan at yahoo dot com
-Status:   Open
+Status:   Bogus
 Bug Type: SOAP related
 Operating System: Linux/Windows
 PHP Version:  5.2.6
 New Comment:

Please see: http://bugs.php.net/bug.php?id=31755

dmitry: "SOAP specification doesn't allow non-namespace-qualified
headers."

In fact, this is a specific test case for SOAP conformance.  Refer to:
http://www.w3.org/2000/xp/Group/2/03/11/soap-1.2-conformance.html

Test:non-nsqualified-attr-test


Previous Comments:


[2008-10-29 21:55:01] valer_crisan at yahoo dot com

Description:

I am unable to create a header that doesn't have a namespace. I need to
create a header in the form:


   ... 


but the API forces me to specify a namespace for the header in the
SOAPHeader constructor and it doesn't accept null or empty string.

You can find the related WSDL here:
http://www2.openair.com/wsdl.pl?wsdl

Reproduce code:
---
$header = new SoapHeader('', 'SessionHeader', $sessVar);

Expected result:

The header  ... 
is created.

Actual result:
--
Error: "SoapHeader::SoapHeader(): Invalid parameters. Invalid
namespace" is thrown.





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



#46481 [NoF->Opn]: apache_lookup_uri() draws blank if Apache auth enabled

2008-11-24 Thread rosenfield dot albert at gmail dot com
 ID:   46481
 User updated by:  rosenfield dot albert at gmail dot com
 Reported By:  rosenfield dot albert at gmail dot com
-Status:   No Feedback
+Status:   Open
 Bug Type: Apache2 related
 Operating System: *
 PHP Version:  5.3.0alpha2
 New Comment:

The information requested has already been submitted.  Does this
tracker software lack the ability to see/flick on which end the next
action rests?


Previous Comments:


[2008-11-12 01:00:01] php-bugs at lists dot php dot net

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



[2008-11-05 11:13:31] rosenfield dot albert at gmail dot com

Yes sir!

Replaced PHP 5.2.6 with windows snapshot (5.2.7RC3-dev), but the
problem seems to persist.



[2008-11-04 22:30:29] [EMAIL PROTECTED]

Please try using this CVS snapshot:

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

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





[2008-11-04 13:45:49] rosenfield dot albert at gmail dot com

Description:

Using:
 $info = apache_lookup_uri($uri);

for a directory fx /test/, which happens to have an index.php file in
it.

Seems to work if there is no .htaccess file in the directory.

With this .htaccess file, apache_lookup_uri stops working:
=
# NT Domain Logins.
AuthType SSPI
SSPIAuth On
SSPIAuthoritative On
SSPIDomain 
SSPIOfferBasic On
SSPIOmitDomain On
AuthName "Webstatistics"
Require valid-user
=

Instead of an object, apache_lookup_uri just returns FALSE.


Reproduce code:
---
.htaccess:
# NT Domain Logins.
AuthType SSPI
SSPIAuth On
SSPIAuthoritative On
SSPIDomain 
SSPIOfferBasic On
SSPIOmitDomain On
AuthName "Webstatistics"
Require valid-user

index.php:
(anything)

PHP script to execute:
 $info = apache_lookup_uri($uri);

... where $uri is the virtual path where index.php and .htaccess
resides.


Expected result:

Object with information about the virtual path.


Actual result:
--
Nothing (FALSE).






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



#46629 [Opn->Fbk]: is_dir returns incorrect result

2008-11-24 Thread pajoye
 ID:   46629
 Updated by:   [EMAIL PROTECTED]
 Reported By:  j-e dot zwar at bigpond dot net dot au
-Status:   Open
+Status:   Feedback
 Bug Type: Directory function related
 Operating System: win32 only
 PHP Version:  5.2.6
 New Comment:

Not sure what's wrong with the installer on your box, but you can fetch
a zip, uncompress it and run your test script from the command line.
Please try it.


Previous Comments:


[2008-11-24 22:39:18] j-e dot zwar at bigpond dot net dot au

Thank you for your recommendation.
I tried to install PHP 5.3 (Windows x86 VC9 (thread safe)) installer
from windows.php.net/snapshots/ but get a setup error "there is a
problem with this Windows Installer package. A script required for this
install to complete could not be run. Contact your support personnel or
package vendor".
I did install the Microsoft 2008 C++ runtime first.



[2008-11-23 22:53:56] [EMAIL PROTECTED]

Please try using this CVS snapshot:

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

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





[2008-11-22 22:40:22] j-e dot zwar at bigpond dot net dot au

Thanks for the advice.  I changed the permissions and now the lowest
level returns TRUE but not the "My Documents" level??

I.e., "C:/Documents and Settings/Fred & Ginger/My Documents/AC Images
Test" returns TRUE but
"C:/Documents and Settings/Fred & Ginger/My Documents" still returns
FALSE.

I right-clicked on the directory in Windows Explorer and within the
Security tag entered IUSR_COMPUTERNAME (with my computer name) and then
ticked the 'full control' box.

Any other advice will be appreciated.



[2008-11-20 19:19:48] [EMAIL PROTECTED]

Check permissions.



[2008-11-20 11:26:55] j-e dot zwar at bigpond dot net dot au

Description:

PHP function is_dir does not recognise some of the directories in my PC
directory structure.
Environment is:
. Dell Core 2 Duo PC
. Windows XP Pro SP3
. PHP version 5.2.6
. IIS version 5.1
. MySQL version 5.0.51b-community-nt
. Dreamweaver MX2004 version 7 as the "text editor"
. Internet Explorer version 6.0.2900
. sendmail.exe
All running on the Dell PC - i.e., all executions are via 'localhost'


Reproduce code:
---
$dir1 = "C:/AAImages/";
$dir2 = "C:/Documents and Settings/";
$dir3 = "C:/Documents and Settings/Fred & Ginger/";
$dir4 = "C:/Documents and Settings/Fred & Ginger/My Documents/";
$dir5 = "C:/Documents and Settings/Fred & Ginger/My Documents/AC Images
Test/";

var_dump (is_dir($dir1));  // returns true (correctly)
var_dump (is_dir($dir2));  // returns true (correctly)
var_dump (is_dir($dir3));  // returns true (correctly)
var_dump (is_dir($dir4));  // returns false (incorrectly)
var_dump (is_dir($dir5));  // returns false (incorrectly)

But all these directories do exist on my PC and I have checked the
spelling carefully. Permissions seem to be OK as I can upload files from
the lower level directories via an HTML form OK.


Expected result:

var_dump (is_dir($dir4)) and var_dump(is_dir($dir5)) should both return
TRUE, i.e., all of the 5 var_dumps should return TRUE.

Have tried it inversely and the same error is apparent - i.e., tried
var_dump(!is_dir($dir4)) etc.  With the 'not' tests I get false, false,
false, true and true.

Have also tried it with double backslashes in the directory names
instead of the single forward slashes - same error apparent.

Have also tried it without the trailing forward slash at the end of
each directory name with the same erroneous result.

Actual result:
--
var_dump (is_dir($dir1));  // returns true (correctly)
var_dump (is_dir($dir2));  // returns true (correctly)
var_dump (is_dir($dir3));  // returns true (correctly)
var_dump (is_dir($dir4));  // returns false (incorrectly)
var_dump (is_dir($dir5));  // returns false (incorrectly)

Any help/advice will be very much appreciated.
Thank you in anticipation.





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



#46629 [Fbk->Opn]: is_dir returns incorrect result

2008-11-24 Thread j-e dot zwar at bigpond dot net dot au
 ID:   46629
 User updated by:  j-e dot zwar at bigpond dot net dot au
 Reported By:  j-e dot zwar at bigpond dot net dot au
-Status:   Feedback
+Status:   Open
 Bug Type: Directory function related
 Operating System: win32 only
 PHP Version:  5.2.6
 New Comment:

Thank you for your recommendation.
I tried to install PHP 5.3 (Windows x86 VC9 (thread safe)) installer
from windows.php.net/snapshots/ but get a setup error "there is a
problem with this Windows Installer package. A script required for this
install to complete could not be run. Contact your support personnel or
package vendor".
I did install the Microsoft 2008 C++ runtime first.


Previous Comments:


[2008-11-23 22:53:56] [EMAIL PROTECTED]

Please try using this CVS snapshot:

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

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





[2008-11-22 22:40:22] j-e dot zwar at bigpond dot net dot au

Thanks for the advice.  I changed the permissions and now the lowest
level returns TRUE but not the "My Documents" level??

I.e., "C:/Documents and Settings/Fred & Ginger/My Documents/AC Images
Test" returns TRUE but
"C:/Documents and Settings/Fred & Ginger/My Documents" still returns
FALSE.

I right-clicked on the directory in Windows Explorer and within the
Security tag entered IUSR_COMPUTERNAME (with my computer name) and then
ticked the 'full control' box.

Any other advice will be appreciated.



[2008-11-20 19:19:48] [EMAIL PROTECTED]

Check permissions.



[2008-11-20 11:26:55] j-e dot zwar at bigpond dot net dot au

Description:

PHP function is_dir does not recognise some of the directories in my PC
directory structure.
Environment is:
. Dell Core 2 Duo PC
. Windows XP Pro SP3
. PHP version 5.2.6
. IIS version 5.1
. MySQL version 5.0.51b-community-nt
. Dreamweaver MX2004 version 7 as the "text editor"
. Internet Explorer version 6.0.2900
. sendmail.exe
All running on the Dell PC - i.e., all executions are via 'localhost'


Reproduce code:
---
$dir1 = "C:/AAImages/";
$dir2 = "C:/Documents and Settings/";
$dir3 = "C:/Documents and Settings/Fred & Ginger/";
$dir4 = "C:/Documents and Settings/Fred & Ginger/My Documents/";
$dir5 = "C:/Documents and Settings/Fred & Ginger/My Documents/AC Images
Test/";

var_dump (is_dir($dir1));  // returns true (correctly)
var_dump (is_dir($dir2));  // returns true (correctly)
var_dump (is_dir($dir3));  // returns true (correctly)
var_dump (is_dir($dir4));  // returns false (incorrectly)
var_dump (is_dir($dir5));  // returns false (incorrectly)

But all these directories do exist on my PC and I have checked the
spelling carefully. Permissions seem to be OK as I can upload files from
the lower level directories via an HTML form OK.


Expected result:

var_dump (is_dir($dir4)) and var_dump(is_dir($dir5)) should both return
TRUE, i.e., all of the 5 var_dumps should return TRUE.

Have tried it inversely and the same error is apparent - i.e., tried
var_dump(!is_dir($dir4)) etc.  With the 'not' tests I get false, false,
false, true and true.

Have also tried it with double backslashes in the directory names
instead of the single forward slashes - same error apparent.

Have also tried it without the trailing forward slash at the end of
each directory name with the same erroneous result.

Actual result:
--
var_dump (is_dir($dir1));  // returns true (correctly)
var_dump (is_dir($dir2));  // returns true (correctly)
var_dump (is_dir($dir3));  // returns true (correctly)
var_dump (is_dir($dir4));  // returns false (incorrectly)
var_dump (is_dir($dir5));  // returns false (incorrectly)

Any help/advice will be very much appreciated.
Thank you in anticipation.





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



#46626 [Ver->Csd]: mb_convert_case does not handle apostrophe correctly

2008-11-24 Thread iliaa
 ID:   46626
 Updated by:   [EMAIL PROTECTED]
 Reported By:  tbartels at gmail dot com
-Status:   Verified
+Status:   Closed
 Bug Type: mbstring related
 Operating System: *
 PHP Version:  5CVS-2008-11-21
 New Comment:

This bug has been fixed in CVS.

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




Previous Comments:


[2008-11-20 01:38:12] tbartels at gmail dot com

Description:

The first letter after an apostrophe of a possessive or conjugated word
converted using MB_CASE_TITLE in mb_convert_case() get's capitalized
incorrectly.

Reproduce code:
---


Expected result:

I'll Never Believe You Couldn't See It!

Actual result:
--
I'Ll Never Believe You Couldn'T See It!





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



#46596 [Ver]: Setting an associative array $var with the key $var: $var[$var] = true

2008-11-24 Thread lbarnaud
 ID:   46596
 Updated by:   [EMAIL PROTECTED]
 Reported By:  benjaminNOpickSPAM at web dot de
 Status:   Verified
 Bug Type: Arrays related
 Operating System: *
 PHP Version:  5CVS, 6CVS (2008-11-24)
 New Comment:

Jani, this seems to be an expected behavior. The code basically does

$var[0] = "1";

And $var becomes "1".




Previous Comments:


[2008-11-18 23:31:33] [EMAIL PROTECTED]

This is just side-effect of the fact that [] is also used for 
strings. It's not just for arrays.



[2008-11-17 17:20:40] benjaminNOpickSPAM at web dot de

Description:

As the following lines are ok:

$var = $var + 1;
$var[trim($var2)] = '';

I expected PHP to first evaluate the $key-String ([$var]), then modify
$var. So a line like:

$var = 'a';
$var[$var] = 0;

should work. 

Reproduce code:
---


Expected result:

array(1) { ["x"]=>  bool(true) }

or a warning like:
Warning: Cannot use a scalar value as an array 

Actual result:
--
string(5) "1"

Depending on what code was before it, or what was in $var before, the
first character is not always '1'.





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



#44075 [Ver->Csd]: strtok misbehaving

2008-11-24 Thread lbarnaud
 ID:   44075
 Updated by:   [EMAIL PROTECTED]
 Reported By:  jeff76 at operamail dot com
-Status:   Verified
+Status:   Closed
 Bug Type: Strings related
 Operating System: *
 PHP Version:  6CVS-2008-02-08 (snap)
 New Comment:

This bug has been fixed in CVS.

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




Previous Comments:


[2008-02-08 17:27:54] [EMAIL PROTECTED]

This occur only in unicode.semantics=1;



[2008-02-08 06:24:02] jeff76 at operamail dot com

Description:

strtok is misbehaving in 6 snap., or at least not consistent with the
behavior in PHP version 5.

Reproduce code:
---
$chaine='1-2';
$a=strtok($chaine,'-');
$b=strtok(' ');
echo($a.' then '.$b);


Expected result:

1 then 2

Actual result:
--
1 then -2





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



#46653 [Opn]: mysqlnd: can't extend mysqli

2008-11-24 Thread s dot tretter at szene1 dot at
 ID:   46653
 User updated by:  s dot tretter at szene1 dot at
 Reported By:  s dot tretter at szene1 dot at
 Status:   Open
-Bug Type: MySQLi related
+Bug Type: Scripting Engine problem
 Operating System: linux
 PHP Version:  5.3CVS-2008-11-23 (CVS)
 New Comment:

i think this is a problem of the scirpting engine...


Previous Comments:


[2008-11-23 12:59:07] s dot tretter at szene1 dot at

Description:

If you extend a class with mysqli (using the mysqlnd driver) and try to
connect to the database, php produces strange error messages.
PHP 5.3.0alpha3-dev (cli) (built: Nov 23 2008 12:06:30) 
and --with-mysqli=mysqlnd

In php 5.2 and lower this test class works perfect.

Reproduce code:
---
 'localhost',
  'DB_USER' => 'db',
  'DB_PASS' => '',
  'DB_NAME' => 'test'
 );
$this->init();
$this->options(MYSQLI_OPT_CONNECT_TIMEOUT, 1);

$this->real_connect($dbParam['DB_HOST'],
   
$dbParam['DB_USER'],
   
$dbParam['DB_PASS'],
   
$dbParam['DB_NAME']);
}
}


$mysqli = new a();
printf ("Connection: %s\n.", $mysqli->host_info);
$mysqli->close();
?>

Expected result:

should work like in php5.2

Actual result:
--
Warning: mysqli::options() [mysqli.options]: Couldn't fetch a in
test.php on line 31
Warning: mysqli::real_connect() [mysqli.real-connect]: Couldn't fetch
test.php on line 41





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



#46660 [Opn->Fbk]: Calling mssql_next_result causes a coredump

2008-11-24 Thread iliaa
 ID:   46660
 Updated by:   [EMAIL PROTECTED]
 Reported By:  michael at laccetti dot com
-Status:   Open
+Status:   Feedback
 Bug Type: Reproducible crash
 Operating System: Solaris 10 (SPARC)
 PHP Version:  5.2.6
 New Comment:

Thank you for this bug report. To properly diagnose the problem, we
need a backtrace to see what is happening behind the scenes. To
find out how to generate a backtrace, please read
http://bugs.php.net/bugs-generating-backtrace.php for *NIX and
http://bugs.php.net/bugs-generating-backtrace-win32.php for Win32

Once you have generated a backtrace, please submit it to this bug
report and change the status back to "Open". Thank you for helping
us make PHP better.




Previous Comments:


[2008-11-24 16:35:38] michael at laccetti dot com

Description:

After calling a stored procedure that returns multiple resultsets,
trying to call mssql_next_result causes PHP to coredump.

Reproduce code:
---
$this->RecordSet = mssql_query($query, $this->DBConn );
if(mssql_next_result($this->RecordSet)) {
error_log("We got more results!");
} else {
error_log("No more results.  Waah.");
}

Expected result:

I expect to see either "We got more results" or "No more results. 
Waah." in the logs.

Actual result:
--
[Mon Nov 24 11:18:03 2008] [notice] child pid 5515 exit signal Bus
error (10), possible coredump in /usr/local/apache2





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



#46395 [Fbk->Opn]: Inconsistent behaviour of require_once

2008-11-24 Thread ebosman at gmail dot com
 ID:   46395
 User updated by:  ebosman at gmail dot com
 Reported By:  ebosman at gmail dot com
-Status:   Feedback
+Status:   Open
 Bug Type: Directory function related
 Operating System: Linux
 PHP Version:  5.2.6
 New Comment:

Same result:

subdir/sub.php:

/var/www/bug/subdir/sub.php /var/www/bug/subdir
/var/www/bug/subdir/sub.inc /var/www/bug/subdir
/var/www/bug/top1.inc /var/www/bug/subdir
/var/www/bug/top2.inc /var/www/bug/subdir

top.php:

Warning: require_once(../top1.inc) [function.require-once]: failed to
open stream: No such file or directory in /var/www/bug/subdir/sub.inc on
line 2

Fatal error: require_once() [function.require]: Failed opening required
'../top1.inc' (include_path='/usr/share/php:/usr/share/pear') in
/var/www/bug/subdir/sub.inc on line 2


Previous Comments:


[2008-11-24 09:52:56] [EMAIL PROTECTED]

Try removing the . from your include_path setting.



[2008-10-26 19:32:50] ebosman at gmail dot com

I added 'echo __FILE__," ",getcwd(), "\n";' to each line:

mkdir -p bug/subdir
echo '' > bug/subdir/sub.inc
echo '' > bug/subdir/sub.php
echo '' > bug/top.php
echo '' > bug/top1.inc
echo '' > bug/top2.inc

The output for subdir/sub.php:

/var/www/bug/subdir/sub.php /var/www/bug/subdir
/var/www/bug/subdir/sub.inc /var/www/bug/subdir
/var/www/bug/top1.inc /var/www/bug/subdir
/var/www/bug/top2.inc /var/www/bug/subdir

and for top.php:

/var/www/bug/top.php /var/www/bug
/var/www/bug/subdir/sub.inc /var/www/bug
(and htmlized:)
Warning: require_once(../top1.inc) [function.require-once]: failed to
open stream: No such file or directory in /var/www/bug/subdir/sub.inc on
line 1

Fatal error: require_once() [function.require]: Failed opening required
'../top1.inc' (include_path='.:/usr/share/php:/usr/share/pear') in
/var/www/bug/subdir/sub.inc on line 1

This would be consistent with the first include method
(relative to the original file.) But in that case including
top2.inc should fail, which it doesn't.



[2008-10-26 18:57:32] [EMAIL PROTECTED]

Put 'echo getcwd(), "\n";' to each file before the require line.



[2008-10-26 18:15:19] ebosman at gmail dot com

Description:

In the code pasted below:

- top.php fails on subdir/sub.inc including "../top1.inc"
- subdir/sub.php doesn't.

Either every include should be relative to the original php file
(which would be braindead, but consistent.) In that case both
php files should fail (for subdir/sub.php the include of top2.inc
by top1.inc should fail.)

Or (and this is what I expected) include files should be relative
to the file that is including. In which case both should succeed.

Probably the same bug as http://bugs.php.net/bug.php?id=38302 , which
is labeled bogus, so I had to create a new one.

Reproduce code:
---
mkdir -p bug/subdir
echo '' > bug/subdir/sub.inc
echo '' > bug/subdir/sub.php
echo '' > bug/top.php
echo '' > bug/top1.inc
touch bug/top2.inc

Expected result:

Neither top.php nor subdir/sub.php should generate errors (or both
should.)

Actual result:
--
Warning: require_once(../top1.inc) [function.require-once]: failed to
open stream: No such file or directory in /var/www/bug/subdir/sub.inc on
line 1

Fatal error: require_once() [function.require]: Failed opening required
'../top1.inc' (include_path='.:/usr/share/php:/usr/share/pear') in
/var/www/bug/subdir/sub.inc on line 1





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



#46395 [Opn]: Inconsistent behaviour of require_once

2008-11-24 Thread ebosman at gmail dot com
 ID:   46395
 User updated by:  ebosman at gmail dot com
 Reported By:  ebosman at gmail dot com
 Status:   Open
 Bug Type: Directory function related
 Operating System: Linux
 PHP Version:  5.2.6
 New Comment:

And then I forgot that I put the original include_path back, apologies

/var/www/bug/top.php /var/www/bug
/var/www/bug/subdir/sub.inc /var/www/bug
(and htmlized:)
Warning: require_once(../top1.inc) [function.require-once]: failed to
open stream: No such file or directory in /var/www/bug/subdir/sub.inc on
line 1

Fatal error: require_once() [function.require]: Failed opening required
'../top1.inc' (include_path='/usr/share/php:/usr/share/pear') in
/var/www/bug/subdir/sub.inc on line 1


Previous Comments:


[2008-11-24 17:30:28] ebosman at gmail dot com

correction, for top.php it should be (still no difference):

/var/www/bug/top.php /var/www/bug
/var/www/bug/subdir/sub.inc /var/www/bug
(and htmlized)
Warning: require_once(../top1.inc) [function.require-once]: failed to
open stream: No such file or directory in /var/www/bug/subdir/sub.inc on
line 1

Fatal error: require_once() [function.require]: Failed opening required
'../top1.inc' (include_path='.:/usr/share/php:/usr/share/pear') in
/var/www/bug/subdir/sub.inc on line 1

(line difference in the previous comment was because of copy-pasting)



[2008-11-24 17:15:22] ebosman at gmail dot com

Same result:

subdir/sub.php:

/var/www/bug/subdir/sub.php /var/www/bug/subdir
/var/www/bug/subdir/sub.inc /var/www/bug/subdir
/var/www/bug/top1.inc /var/www/bug/subdir
/var/www/bug/top2.inc /var/www/bug/subdir

top.php:

Warning: require_once(../top1.inc) [function.require-once]: failed to
open stream: No such file or directory in /var/www/bug/subdir/sub.inc on
line 2

Fatal error: require_once() [function.require]: Failed opening required
'../top1.inc' (include_path='/usr/share/php:/usr/share/pear') in
/var/www/bug/subdir/sub.inc on line 2



[2008-11-24 09:52:56] [EMAIL PROTECTED]

Try removing the . from your include_path setting.



[2008-10-26 19:32:50] ebosman at gmail dot com

I added 'echo __FILE__," ",getcwd(), "\n";' to each line:

mkdir -p bug/subdir
echo '' > bug/subdir/sub.inc
echo '' > bug/subdir/sub.php
echo '' > bug/top.php
echo '' > bug/top1.inc
echo '' > bug/top2.inc

The output for subdir/sub.php:

/var/www/bug/subdir/sub.php /var/www/bug/subdir
/var/www/bug/subdir/sub.inc /var/www/bug/subdir
/var/www/bug/top1.inc /var/www/bug/subdir
/var/www/bug/top2.inc /var/www/bug/subdir

and for top.php:

/var/www/bug/top.php /var/www/bug
/var/www/bug/subdir/sub.inc /var/www/bug
(and htmlized:)
Warning: require_once(../top1.inc) [function.require-once]: failed to
open stream: No such file or directory in /var/www/bug/subdir/sub.inc on
line 1

Fatal error: require_once() [function.require]: Failed opening required
'../top1.inc' (include_path='.:/usr/share/php:/usr/share/pear') in
/var/www/bug/subdir/sub.inc on line 1

This would be consistent with the first include method
(relative to the original file.) But in that case including
top2.inc should fail, which it doesn't.



[2008-10-26 18:57:32] [EMAIL PROTECTED]

Put 'echo getcwd(), "\n";' to each file before the require line.



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

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



#46395 [Opn]: Inconsistent behaviour of require_once

2008-11-24 Thread ebosman at gmail dot com
 ID:   46395
 User updated by:  ebosman at gmail dot com
 Reported By:  ebosman at gmail dot com
 Status:   Open
 Bug Type: Directory function related
 Operating System: Linux
 PHP Version:  5.2.6
 New Comment:

correction, for top.php it should be (still no difference):

/var/www/bug/top.php /var/www/bug
/var/www/bug/subdir/sub.inc /var/www/bug
(and htmlized)
Warning: require_once(../top1.inc) [function.require-once]: failed to
open stream: No such file or directory in /var/www/bug/subdir/sub.inc on
line 1

Fatal error: require_once() [function.require]: Failed opening required
'../top1.inc' (include_path='.:/usr/share/php:/usr/share/pear') in
/var/www/bug/subdir/sub.inc on line 1

(line difference in the previous comment was because of copy-pasting)


Previous Comments:


[2008-11-24 17:15:22] ebosman at gmail dot com

Same result:

subdir/sub.php:

/var/www/bug/subdir/sub.php /var/www/bug/subdir
/var/www/bug/subdir/sub.inc /var/www/bug/subdir
/var/www/bug/top1.inc /var/www/bug/subdir
/var/www/bug/top2.inc /var/www/bug/subdir

top.php:

Warning: require_once(../top1.inc) [function.require-once]: failed to
open stream: No such file or directory in /var/www/bug/subdir/sub.inc on
line 2

Fatal error: require_once() [function.require]: Failed opening required
'../top1.inc' (include_path='/usr/share/php:/usr/share/pear') in
/var/www/bug/subdir/sub.inc on line 2



[2008-11-24 09:52:56] [EMAIL PROTECTED]

Try removing the . from your include_path setting.



[2008-10-26 19:32:50] ebosman at gmail dot com

I added 'echo __FILE__," ",getcwd(), "\n";' to each line:

mkdir -p bug/subdir
echo '' > bug/subdir/sub.inc
echo '' > bug/subdir/sub.php
echo '' > bug/top.php
echo '' > bug/top1.inc
echo '' > bug/top2.inc

The output for subdir/sub.php:

/var/www/bug/subdir/sub.php /var/www/bug/subdir
/var/www/bug/subdir/sub.inc /var/www/bug/subdir
/var/www/bug/top1.inc /var/www/bug/subdir
/var/www/bug/top2.inc /var/www/bug/subdir

and for top.php:

/var/www/bug/top.php /var/www/bug
/var/www/bug/subdir/sub.inc /var/www/bug
(and htmlized:)
Warning: require_once(../top1.inc) [function.require-once]: failed to
open stream: No such file or directory in /var/www/bug/subdir/sub.inc on
line 1

Fatal error: require_once() [function.require]: Failed opening required
'../top1.inc' (include_path='.:/usr/share/php:/usr/share/pear') in
/var/www/bug/subdir/sub.inc on line 1

This would be consistent with the first include method
(relative to the original file.) But in that case including
top2.inc should fail, which it doesn't.



[2008-10-26 18:57:32] [EMAIL PROTECTED]

Put 'echo getcwd(), "\n";' to each file before the require line.



[2008-10-26 18:15:19] ebosman at gmail dot com

Description:

In the code pasted below:

- top.php fails on subdir/sub.inc including "../top1.inc"
- subdir/sub.php doesn't.

Either every include should be relative to the original php file
(which would be braindead, but consistent.) In that case both
php files should fail (for subdir/sub.php the include of top2.inc
by top1.inc should fail.)

Or (and this is what I expected) include files should be relative
to the file that is including. In which case both should succeed.

Probably the same bug as http://bugs.php.net/bug.php?id=38302 , which
is labeled bogus, so I had to create a new one.

Reproduce code:
---
mkdir -p bug/subdir
echo '' > bug/subdir/sub.inc
echo '' > bug/subdir/sub.php
echo '' > bug/top.php
echo '' > bug/top1.inc
touch bug/top2.inc

Expected result:

Neither top.php nor subdir/sub.php should generate errors (or both
should.)

Actual result:
--
Warning: require_once(../top1.inc) [function.require-once]: failed to
open stream: No such file or directory in /var/www/bug/subdir/sub.inc on
line 1

Fatal error: require_once() [function.require]: Failed opening required
'../top1.inc' (include_path='.:/usr/share/php:/usr/share/pear') in
/var/www/bug/subdir/sub.inc on line 1





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



#46660 [NEW]: Calling mssql_next_result causes a coredump

2008-11-24 Thread michael at laccetti dot com
From: michael at laccetti dot com
Operating system: Solaris 10 (SPARC)
PHP version:  5.2.6
PHP Bug Type: Reproducible crash
Bug description:  Calling mssql_next_result causes a coredump

Description:

After calling a stored procedure that returns multiple resultsets, trying
to call mssql_next_result causes PHP to coredump.

Reproduce code:
---
$this->RecordSet = mssql_query($query, $this->DBConn );
if(mssql_next_result($this->RecordSet)) {
error_log("We got more results!");
} else {
error_log("No more results.  Waah.");
}

Expected result:

I expect to see either "We got more results" or "No more results.  Waah."
in the logs.

Actual result:
--
[Mon Nov 24 11:18:03 2008] [notice] child pid 5515 exit signal Bus error
(10), possible coredump in /usr/local/apache2

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



#46636 [Asn->Fbk]: feof() blocking on non-blocking socket

2008-11-24 Thread dsp
 ID:   46636
 Updated by:   [EMAIL PROTECTED]
 Reported By:  aragon at phat dot za dot net
-Status:   Assigned
+Status:   Feedback
 Bug Type: Streams related
 Operating System: FreeBSD 7.0-STABLE
 PHP Version:  5.2.7RC4
 Assigned To:  dsp
 New Comment:

Please try using this CVS snapshot:

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

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




Previous Comments:


[2008-11-22 10:39:18] [EMAIL PROTECTED]

David, please check when checking #46049



[2008-11-21 13:31:18] [EMAIL PROTECTED]

I will, but it seems related to this one:
http://bugs.php.net/bug.php?id=46049



[2008-11-21 08:30:29] [EMAIL PROTECTED]

Arnaud, can you take a look please?

http://tinyurl.com/6g42xf



[2008-11-21 02:59:04] aragon at phat dot za dot net

Sorry, I pasted misleading reproduce code.  It should be:

 0) {
echo $i.':'.(time()-$start).chr(10);
if (feof($socket)) break;
echo $i++.':'.(time()-$start).chr(10);
switch ($state) {
case 1:
fwrite($socket, 'GET /blog HTTP/1.0' .
chr(13).chr(10).chr(13).chr(10));
$state = 2; break;
case 2:
if (fread($socket, 8192)) echo 'ooo'.chr(10); break;
}
}
}
echo (time()-$start).chr(10);
?>



[2008-11-21 02:56:54] aragon at phat dot za dot net

Description:

There was a change since 5.2.6 release that is causing feof() to block
when testing a non-blocking socket for EOF.  It happens if the socket
has no data waiting in its buffer and is open.

If I compare 5.2.6 and 5.2.7 code it looks like
main/streams/streams.c:642:

if (!stream->eof && PHP_STREAM_OPTION_RETURN_ERR ==
php_stream_set_option(stream,
PHP_STREAM_OPTION_CHECK_LIVENESS,
-1, NULL)) {
stream->eof = 1;
}

In 5.2.6 php_stream_set_option is called with a value of 0, not -1.

Reproduce code:
---
 0) {
echo $i.':'.time().chr(10);
if (feof($socket)) break;
echo $i++.':'.time().chr(10);
switch ($state) {
case 1:
fwrite($socket, 'GET /blog HTTP/1.0' .
chr(13).chr(10).chr(13).chr(10));
$state = 2; break;
case 2:
if (fread($socket, 8192)) echo 'ooo'.chr(10); break;
}
}
}
echo time().chr(10);
?>

Expected result:

1:0
1:0
1:0
2:0
2:0
2:0
ooo
3:0
3:0
0


Actual result:
--
1:0
1:0
1:5
2:5
2:5
2:5
ooo
3:5
3:5
5






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



#46049 [Fbk->Csd]: feof() hangs

2008-11-24 Thread dsp
 ID:   46049
 Updated by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
-Status:   Feedback
+Status:   Closed
 Bug Type: Streams related
 Operating System: Linux
 PHP Version:  5.3CVS-2008-09-11 (CVS)
 Assigned To:  dsp
 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.

Patch was reverted


Previous Comments:


[2008-11-24 02:19:44] [EMAIL PROTECTED]

If everybody is fine with that, I will revert the patch.



[2008-11-21 17:46:28] [EMAIL PROTECTED]


Shorter reproduce code:



The feof() will block until timeout is reached.

David, your fix correctly made feof() behave as documented (blocks
until timeout is reached if no data is available), but should feof()
really blocks here ? It seems it never behaved as documented (checked
php4.4, 5.1, 5.2.6).



[2008-11-18 23:46:15] [EMAIL PROTECTED]

Please try using this CVS snapshot:

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

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





[2008-11-05 13:43:24] [EMAIL PROTECTED]

Jani: I think it's an issue with the ssl socks, as my patch didn't
patch 
those. I try to have time to have a look on this, but I 
cannot reproduce the patch yet even though I sit down with sebstian and

try to figure out what's going wrong.



[2008-10-28 22:08:32] [EMAIL PROTECTED]

David, I guess we just have to revert that bad patch of yours then?



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

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



#43782 [Csd->Tbd]: feof() does not detect timeout on socket

2008-11-24 Thread dsp
 ID:   43782
 Updated by:   [EMAIL PROTECTED]
 Reported By:  ml at foofree dot sk
-Status:   Closed
+Status:   To be documented
 Bug Type: Streams related
 Operating System: *
 PHP Version:  5.2,5.3CVS (2008-07-15)
 Assigned To:  dsp
 New Comment:

The patch was reverted as it caused problems. We might want to edit the
documentation instead.


Previous Comments:


[2008-08-26 16:06:45] [EMAIL PROTECTED]

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.





[2008-01-08 01:19:23] ml at foofree dot sk

Description:

>From docs:

"Returns TRUE if the file pointer is at EOF or an error occurs
(including socket timeout); otherwise returns FALSE."

...

"If a connection opened by fsockopen() wasn't closed by the server,
feof() will wait until a timeout has been reached to return TRUE. The
default timeout value is 60 seconds. You may use stream_set_timeout() to
change this value."



feof() dows not wait and returns TRUE instead of FALSE if timeout
reached (server does not closed connection and there is no data in
timeout time slot).

* server does not closed connection,
* timeout wa reached

Reproduce code:
---
$s = stream_socket_client('tcp://www.php.net:80', $errno, $errstr, 10,
STREAM_CLIENT_CONNECT);

stream_set_timeout($s, 4);

$response = '';
while (feof($s) !== TRUE) {

   if (($foo = @fread($s, 1024 * 8)) === FALSE) return NULL;
   $response = $response . $foo;
};

print "OK";

Expected result:

prints "OK" approx. in 4 seconds

Actual result:
--
hangs forever





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



#46644 [Opn->Asn]: https cURL failure

2008-11-24 Thread jani
 ID:   46644
 Updated by:   [EMAIL PROTECTED]
 Reported By:  brian dot bream at comcast dot net
-Status:   Open
+Status:   Assigned
 Bug Type: cURL related
 Operating System: Solaris 10 08/07 x86
 PHP Version:  5.2CVS-2008-11-24
-Assigned To:  
+Assigned To:  jani


Previous Comments:


[2008-11-24 12:44:06] brian dot bream at comcast dot net

sent to [EMAIL PROTECTED]



[2008-11-24 12:23:57] [EMAIL PROTECTED]

Can you send that script to me so I can test myself?



[2008-11-24 11:14:58] brian dot bream at comcast dot net

bash-3.00# php -f curl_test.php
* About to connect() to secure.authorize.net port 443 (#0)
*   Trying 64.94.118.33... * connected
* Connected to secure.authorize.net (64.94.118.33) port 443 (#0)
* successfully set certificate verify locations:
*   CAfile: /var/tmp/cacert.pem
  CApath: none
* SSL connection using RC4-MD5
* Server certificate:
*subject: C=US, ST=Utah, L=American Fork, O=Authorize.Net
Corp., OU=Authorize.Net Corp., CN=secure.authorize.net
*start date: 2007-04-06 00:00:00 GMT
*expire date: 2009-04-11 23:59:59 GMT
*common name: secure.authorize.net (matched)
*issuer: C=ZA, O=Thawte Consulting (Pty) Ltd., CN=Thawte SGC
CA
*SSL certificate verify ok.
> GET / HTTP/1.1
Host: secure.authorize.net
Accept: */*

< HTTP/1.1 200 OK
< Server: Microsoft-IIS/5.0
< Content-Location: https://secure.authorize.net/index.htm
< Date: Mon, 24 Nov 2008 11:11:57 GMT
< Content-Type: text/html
< Accept-Ranges: bytes
< Last-Modified: Wed, 05 May 2004 10:32:44 GMT
< ETag: "06ee34c8c32c41:2c4c"
< Content-Length: 320
<
* Connection #0 to host secure.authorize.net left intact
Array
(
[url] => https://secure.authorize.net
[content_type] => text/html
[http_code] => 200
[header_size] => 284
[request_size] => 59
[filetime] => -1
[ssl_verify_result] => 0
[redirect_count] => 0
[total_time] => 0.412856
[namelookup_time] => 0.059205
[connect_time] => 0.114765
[pretransfer_time] => 0.257572
[size_upload] => 0
[size_download] => 320
[speed_download] => 775
[speed_upload] => 0
[download_content_length] => 320
[upload_content_length] => 0
[starttransfer_time] => 0.412811
[redirect_time] => 0
)
Errors: 0 * Closing connection #0
HTTP/1.1 200 OK
Server: Microsoft-IIS/5.0
Content-Location: https://secure.authorize.net/index.htm
Date: Mon, 24 Nov 2008 11:11:57 GMT
Content-Type: text/html
Accept-Ranges: bytes
Last-Modified: Wed, 05 May 2004 10:32:44 GMT
ETag: "06ee34c8c32c41:2c4c"
Content-Length: 320


 Authorize.Net
 


https://Account.authorize.net/ui/themes/anet/merch.app"; NORESIZE>



>From  Browser
Array
(
[url] => https://secure.authorize.net
[http_code] => 0
[header_size] => 0
[request_size] => 0
[filetime] => -1
[ssl_verify_result] => 0
[redirect_count] => 0
[total_time] => 0
[namelookup_time] => 0.036851
[connect_time] => 0.092135
[pretransfer_time] => 0
[size_upload] => 0
[size_download] => 0
[speed_download] => 0
[speed_upload] => 0
[download_content_length] => 0
[upload_content_length] => 0
[starttransfer_time] => 0
[redirect_time] => 0
)

Errors: 35 error:80089077:lib(128):func(137):reason(119)

EOF



[2008-11-24 09:26:50] [EMAIL PROTECTED]

Does it work using the PHP CLI binary?



[2008-11-24 04:21:59] brian dot bream at comcast dot net

checking for cURL support... yes
checking if we should use cURL for url streams... no
checking for cURL in default path... found in /usr/local
checking for cURL 7.10.5 or greater... libcurl 7.19.2
checking for SSL support in libcurl... yes
checking how to run the C preprocessor... gcc -E
checking for openssl support in libcurl... yes
checking for openssl/crypto.h... (cached) yes
checking for gnutls support in libcurl... no
checking for curl_easy_perform in -lcurl... (cached) yes
checking for curl_version_info in -lcurl... (cached) yes
checking for curl_easy_strerror in -lcurl... (cached) yes
checking for curl_multi_strerror in -lcurl... (cached) yes



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

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



#46644 [Asn->Fbk]: https cURL failure

2008-11-24 Thread jani
 ID:   46644
 Updated by:   [EMAIL PROTECTED]
 Reported By:  brian dot bream at comcast dot net
-Status:   Assigned
+Status:   Feedback
 Bug Type: cURL related
 Operating System: Solaris 10 08/07 x86
 PHP Version:  5.2CVS-2008-11-24
 Assigned To:  jani
 New Comment:

I can not reproduce this on any of my servers. I have Curl 7.18.2 and
openssl 0.9.8g. I don't have any shared extensions messing things up so
can you try first with the simplest possible configure line:

# rm config.cache ; ./configure --disable-all --disable-cgi
--with-curl=/usr/local/
# make clean && make
# sapi/cli/php your_test_script_here.php



Previous Comments:


[2008-11-24 12:44:06] brian dot bream at comcast dot net

sent to [EMAIL PROTECTED]



[2008-11-24 12:23:57] [EMAIL PROTECTED]

Can you send that script to me so I can test myself?



[2008-11-24 11:14:58] brian dot bream at comcast dot net

bash-3.00# php -f curl_test.php
* About to connect() to secure.authorize.net port 443 (#0)
*   Trying 64.94.118.33... * connected
* Connected to secure.authorize.net (64.94.118.33) port 443 (#0)
* successfully set certificate verify locations:
*   CAfile: /var/tmp/cacert.pem
  CApath: none
* SSL connection using RC4-MD5
* Server certificate:
*subject: C=US, ST=Utah, L=American Fork, O=Authorize.Net
Corp., OU=Authorize.Net Corp., CN=secure.authorize.net
*start date: 2007-04-06 00:00:00 GMT
*expire date: 2009-04-11 23:59:59 GMT
*common name: secure.authorize.net (matched)
*issuer: C=ZA, O=Thawte Consulting (Pty) Ltd., CN=Thawte SGC
CA
*SSL certificate verify ok.
> GET / HTTP/1.1
Host: secure.authorize.net
Accept: */*

< HTTP/1.1 200 OK
< Server: Microsoft-IIS/5.0
< Content-Location: https://secure.authorize.net/index.htm
< Date: Mon, 24 Nov 2008 11:11:57 GMT
< Content-Type: text/html
< Accept-Ranges: bytes
< Last-Modified: Wed, 05 May 2004 10:32:44 GMT
< ETag: "06ee34c8c32c41:2c4c"
< Content-Length: 320
<
* Connection #0 to host secure.authorize.net left intact
Array
(
[url] => https://secure.authorize.net
[content_type] => text/html
[http_code] => 200
[header_size] => 284
[request_size] => 59
[filetime] => -1
[ssl_verify_result] => 0
[redirect_count] => 0
[total_time] => 0.412856
[namelookup_time] => 0.059205
[connect_time] => 0.114765
[pretransfer_time] => 0.257572
[size_upload] => 0
[size_download] => 320
[speed_download] => 775
[speed_upload] => 0
[download_content_length] => 320
[upload_content_length] => 0
[starttransfer_time] => 0.412811
[redirect_time] => 0
)
Errors: 0 * Closing connection #0
HTTP/1.1 200 OK
Server: Microsoft-IIS/5.0
Content-Location: https://secure.authorize.net/index.htm
Date: Mon, 24 Nov 2008 11:11:57 GMT
Content-Type: text/html
Accept-Ranges: bytes
Last-Modified: Wed, 05 May 2004 10:32:44 GMT
ETag: "06ee34c8c32c41:2c4c"
Content-Length: 320


 Authorize.Net
 


https://Account.authorize.net/ui/themes/anet/merch.app"; NORESIZE>



>From  Browser
Array
(
[url] => https://secure.authorize.net
[http_code] => 0
[header_size] => 0
[request_size] => 0
[filetime] => -1
[ssl_verify_result] => 0
[redirect_count] => 0
[total_time] => 0
[namelookup_time] => 0.036851
[connect_time] => 0.092135
[pretransfer_time] => 0
[size_upload] => 0
[size_download] => 0
[speed_download] => 0
[speed_upload] => 0
[download_content_length] => 0
[upload_content_length] => 0
[starttransfer_time] => 0
[redirect_time] => 0
)

Errors: 35 error:80089077:lib(128):func(137):reason(119)

EOF



[2008-11-24 09:26:50] [EMAIL PROTECTED]

Does it work using the PHP CLI binary?



[2008-11-24 04:21:59] brian dot bream at comcast dot net

checking for cURL support... yes
checking if we should use cURL for url streams... no
checking for cURL in default path... found in /usr/local
checking for cURL 7.10.5 or greater... libcurl 7.19.2
checking for SSL support in libcurl... yes
checking how to run the C preprocessor... gcc -E
checking for openssl support in libcurl... yes
checking for openssl/crypto.h... (cached) yes
checking for gnutls support in libcurl... no
checking for curl_easy_perform in -lcurl... (cached) yes
checking for curl_version_info in -lcurl... (cached) yes
checking for curl_easy_strerror in -lcurl... (cached) yes
checking for curl_multi_strerror in -lcurl... (cached) yes



The remainder of the comments for this report are too long. To view
the rest of the comments, plea

#46640 [Bgs]: A bug then using equality operator ("==") to compare arrays

2008-11-24 Thread realbaziak at gmail dot com
 ID:   46640
 User updated by:  realbaziak at gmail dot com
 Reported By:  realbaziak at gmail dot com
 Status:   Bogus
 Bug Type: Arrays related
 Operating System: Gentoo Linux
 PHP Version:  5.2.6
 New Comment:

"===" works fine. The problem is with "==".
Sure I can use array_diff() instead, but this bug can produce very
strange errors.


Previous Comments:


[2008-11-21 17:35:50] [EMAIL PROTECTED]

Find out about ===



[2008-11-21 17:10:34] realbaziak at gmail dot com

Description:

Equality operator returns true, though arrays are different.
Is it a bug or feature? :)

Thanks.

Reproduce code:
---
$a =  array(0 => "something");
$b1 = array(0 => "another");
$b2 = array(0 => "0");
$b3 = array(0 => null);
$b4 = array(0 => 0);

$a2 = array(0 => "two", 1 => "elements");
$b5 = array(0 => 0, 1 => 0);

var_dump($a == $b1); // bool(false)
var_dump($a == $b2); // bool(false)
var_dump($a == $b3); // bool(false)
var_dump($a == $b4); // bool(true) -- why array(0 => "something") 
 // equals to array(0 => 0)?

var_dump($a2 == $b5); // bool(true) -- it seems there are some
regularity

Expected result:

always bool(false)

Actual result:
--
bool(true) on something like 
array(0 => "one", 1 => "two") == array(0 => 0, 1 => 0)





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



#46596 [Opn->Ver]: Setting an associative array $var with the key $var: $var[$var] = true

2008-11-24 Thread jani
 ID:   46596
 Updated by:   [EMAIL PROTECTED]
 Reported By:  benjaminNOpickSPAM at web dot de
-Status:   Open
+Status:   Verified
 Bug Type: Arrays related
 Operating System: *
 PHP Version:  5CVS, 6CVS (2008-11-24)


Previous Comments:


[2008-11-18 23:31:33] [EMAIL PROTECTED]

This is just side-effect of the fact that [] is also used for 
strings. It's not just for arrays.



[2008-11-17 17:20:40] benjaminNOpickSPAM at web dot de

Description:

As the following lines are ok:

$var = $var + 1;
$var[trim($var2)] = '';

I expected PHP to first evaluate the $key-String ([$var]), then modify
$var. So a line like:

$var = 'a';
$var[$var] = 0;

should work. 

Reproduce code:
---


Expected result:

array(1) { ["x"]=>  bool(true) }

or a warning like:
Warning: Cannot use a scalar value as an array 

Actual result:
--
string(5) "1"

Depending on what code was before it, or what was in $var before, the
first character is not always '1'.





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



#25475 [Com]: Direct IO access to raw file descriptor

2008-11-24 Thread rodrigo at fabricadeideias dot com
 ID:   25475
 Comment by:   rodrigo at fabricadeideias dot com
 Reported By:  mbostrom at syrah dot us
 Status:   Open
 Bug Type: Feature/Change Request
 Operating System: Unixes
 PHP Version:  Irrelevant
 New Comment:

How can this be done with fgets and fputs?


Previous Comments:


[2006-02-15 20:48:40] php at kanarpiet dot com

It would indeed be very nice to be able to use the extra file 
descriptors opened by the parents proc_open() call.

However, you should also be able to use the normal fgets() and 
fputs() functions, not just the Direct IO ones.



[2003-09-10 15:08:40] mbostrom at syrah dot us

Description:

The Direct IO functions are nice.

However, it is sometimes necessary to access file descriptors by their
number.  For instance, a parent process can set up file descriptors 3, 4
and 5 for communication with the a child process (in addition to file
descriptors 0, 1 and 2).  It would be nice if there were a way in PHP to
get access to to file descriptor 3, so that PHP could interoperate with
software that uses "extra" file descriptors.  (In particular, I am
writing a mail filter.  The mail server sets up fd 3).

Getting access to the "extra" file descriptors is not possible at
present, because the only way to get a file descriptor is to call
dio_open on a file.  What if the file descriptor already exists?  There
is currently no way to access it.

Perhaps a function such as dio_rawfd (int fdnum) could be added?  fdnum
is an integer - the number of the file descriptor you want.  dio_rawfd
returns a file descriptor resource for file descriptor number fdnum.






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



#46644 [Fbk->Opn]: https cURL failure

2008-11-24 Thread brian dot bream at comcast dot net
 ID:   46644
 User updated by:  brian dot bream at comcast dot net
 Reported By:  brian dot bream at comcast dot net
-Status:   Feedback
+Status:   Open
 Bug Type: cURL related
 Operating System: Solaris 10 08/07 x86
 PHP Version:  5.2CVS-2008-11-24
 New Comment:

sent to [EMAIL PROTECTED]


Previous Comments:


[2008-11-24 12:23:57] [EMAIL PROTECTED]

Can you send that script to me so I can test myself?



[2008-11-24 11:14:58] brian dot bream at comcast dot net

bash-3.00# php -f curl_test.php
* About to connect() to secure.authorize.net port 443 (#0)
*   Trying 64.94.118.33... * connected
* Connected to secure.authorize.net (64.94.118.33) port 443 (#0)
* successfully set certificate verify locations:
*   CAfile: /var/tmp/cacert.pem
  CApath: none
* SSL connection using RC4-MD5
* Server certificate:
*subject: C=US, ST=Utah, L=American Fork, O=Authorize.Net
Corp., OU=Authorize.Net Corp., CN=secure.authorize.net
*start date: 2007-04-06 00:00:00 GMT
*expire date: 2009-04-11 23:59:59 GMT
*common name: secure.authorize.net (matched)
*issuer: C=ZA, O=Thawte Consulting (Pty) Ltd., CN=Thawte SGC
CA
*SSL certificate verify ok.
> GET / HTTP/1.1
Host: secure.authorize.net
Accept: */*

< HTTP/1.1 200 OK
< Server: Microsoft-IIS/5.0
< Content-Location: https://secure.authorize.net/index.htm
< Date: Mon, 24 Nov 2008 11:11:57 GMT
< Content-Type: text/html
< Accept-Ranges: bytes
< Last-Modified: Wed, 05 May 2004 10:32:44 GMT
< ETag: "06ee34c8c32c41:2c4c"
< Content-Length: 320
<
* Connection #0 to host secure.authorize.net left intact
Array
(
[url] => https://secure.authorize.net
[content_type] => text/html
[http_code] => 200
[header_size] => 284
[request_size] => 59
[filetime] => -1
[ssl_verify_result] => 0
[redirect_count] => 0
[total_time] => 0.412856
[namelookup_time] => 0.059205
[connect_time] => 0.114765
[pretransfer_time] => 0.257572
[size_upload] => 0
[size_download] => 320
[speed_download] => 775
[speed_upload] => 0
[download_content_length] => 320
[upload_content_length] => 0
[starttransfer_time] => 0.412811
[redirect_time] => 0
)
Errors: 0 * Closing connection #0
HTTP/1.1 200 OK
Server: Microsoft-IIS/5.0
Content-Location: https://secure.authorize.net/index.htm
Date: Mon, 24 Nov 2008 11:11:57 GMT
Content-Type: text/html
Accept-Ranges: bytes
Last-Modified: Wed, 05 May 2004 10:32:44 GMT
ETag: "06ee34c8c32c41:2c4c"
Content-Length: 320


 Authorize.Net
 


https://Account.authorize.net/ui/themes/anet/merch.app"; NORESIZE>



>From  Browser
Array
(
[url] => https://secure.authorize.net
[http_code] => 0
[header_size] => 0
[request_size] => 0
[filetime] => -1
[ssl_verify_result] => 0
[redirect_count] => 0
[total_time] => 0
[namelookup_time] => 0.036851
[connect_time] => 0.092135
[pretransfer_time] => 0
[size_upload] => 0
[size_download] => 0
[speed_download] => 0
[speed_upload] => 0
[download_content_length] => 0
[upload_content_length] => 0
[starttransfer_time] => 0
[redirect_time] => 0
)

Errors: 35 error:80089077:lib(128):func(137):reason(119)

EOF



[2008-11-24 09:26:50] [EMAIL PROTECTED]

Does it work using the PHP CLI binary?



[2008-11-24 04:21:59] brian dot bream at comcast dot net

checking for cURL support... yes
checking if we should use cURL for url streams... no
checking for cURL in default path... found in /usr/local
checking for cURL 7.10.5 or greater... libcurl 7.19.2
checking for SSL support in libcurl... yes
checking how to run the C preprocessor... gcc -E
checking for openssl support in libcurl... yes
checking for openssl/crypto.h... (cached) yes
checking for gnutls support in libcurl... no
checking for curl_easy_perform in -lcurl... (cached) yes
checking for curl_version_info in -lcurl... (cached) yes
checking for curl_easy_strerror in -lcurl... (cached) yes
checking for curl_multi_strerror in -lcurl... (cached) yes



[2008-11-22 16:31:18] brian dot bream at comcast dot net

Description:

Attempts to use cURL to an https site fails from within php, functions
properly from the command line. cURL to an http site works in both
locations.

'./configure' '--with-apxs2=/usr/apache2/bin/apxs' '--enable-dbase'
'--with-libxml-dir=/usr/local' '--with-config-file-path=/etc/apache2'
'--with-mysql=shared,/opt/csw/mysql5'
'--with-mysqli=shared,/opt/csw/mysql5/bin/mysql_config'
'--with-xpm-dir=/usr' '--with-gd' '--with-bz2=/usr/lib'
'--with-jpeg-dir=/usr' '--with-png-dir=/usr' '--with-zlib'
'--enable-mb

#46644 [Opn->Fbk]: https cURL failure

2008-11-24 Thread jani
 ID:   46644
 Updated by:   [EMAIL PROTECTED]
 Reported By:  brian dot bream at comcast dot net
-Status:   Open
+Status:   Feedback
 Bug Type: cURL related
 Operating System: Solaris 10 08/07 x86
 PHP Version:  5.2CVS-2008-11-24
 New Comment:

Can you send that script to me so I can test myself?


Previous Comments:


[2008-11-24 11:14:58] brian dot bream at comcast dot net

bash-3.00# php -f curl_test.php
* About to connect() to secure.authorize.net port 443 (#0)
*   Trying 64.94.118.33... * connected
* Connected to secure.authorize.net (64.94.118.33) port 443 (#0)
* successfully set certificate verify locations:
*   CAfile: /var/tmp/cacert.pem
  CApath: none
* SSL connection using RC4-MD5
* Server certificate:
*subject: C=US, ST=Utah, L=American Fork, O=Authorize.Net
Corp., OU=Authorize.Net Corp., CN=secure.authorize.net
*start date: 2007-04-06 00:00:00 GMT
*expire date: 2009-04-11 23:59:59 GMT
*common name: secure.authorize.net (matched)
*issuer: C=ZA, O=Thawte Consulting (Pty) Ltd., CN=Thawte SGC
CA
*SSL certificate verify ok.
> GET / HTTP/1.1
Host: secure.authorize.net
Accept: */*

< HTTP/1.1 200 OK
< Server: Microsoft-IIS/5.0
< Content-Location: https://secure.authorize.net/index.htm
< Date: Mon, 24 Nov 2008 11:11:57 GMT
< Content-Type: text/html
< Accept-Ranges: bytes
< Last-Modified: Wed, 05 May 2004 10:32:44 GMT
< ETag: "06ee34c8c32c41:2c4c"
< Content-Length: 320
<
* Connection #0 to host secure.authorize.net left intact
Array
(
[url] => https://secure.authorize.net
[content_type] => text/html
[http_code] => 200
[header_size] => 284
[request_size] => 59
[filetime] => -1
[ssl_verify_result] => 0
[redirect_count] => 0
[total_time] => 0.412856
[namelookup_time] => 0.059205
[connect_time] => 0.114765
[pretransfer_time] => 0.257572
[size_upload] => 0
[size_download] => 320
[speed_download] => 775
[speed_upload] => 0
[download_content_length] => 320
[upload_content_length] => 0
[starttransfer_time] => 0.412811
[redirect_time] => 0
)
Errors: 0 * Closing connection #0
HTTP/1.1 200 OK
Server: Microsoft-IIS/5.0
Content-Location: https://secure.authorize.net/index.htm
Date: Mon, 24 Nov 2008 11:11:57 GMT
Content-Type: text/html
Accept-Ranges: bytes
Last-Modified: Wed, 05 May 2004 10:32:44 GMT
ETag: "06ee34c8c32c41:2c4c"
Content-Length: 320


 Authorize.Net
 


https://Account.authorize.net/ui/themes/anet/merch.app"; NORESIZE>



>From  Browser
Array
(
[url] => https://secure.authorize.net
[http_code] => 0
[header_size] => 0
[request_size] => 0
[filetime] => -1
[ssl_verify_result] => 0
[redirect_count] => 0
[total_time] => 0
[namelookup_time] => 0.036851
[connect_time] => 0.092135
[pretransfer_time] => 0
[size_upload] => 0
[size_download] => 0
[speed_download] => 0
[speed_upload] => 0
[download_content_length] => 0
[upload_content_length] => 0
[starttransfer_time] => 0
[redirect_time] => 0
)

Errors: 35 error:80089077:lib(128):func(137):reason(119)

EOF



[2008-11-24 09:26:50] [EMAIL PROTECTED]

Does it work using the PHP CLI binary?



[2008-11-24 04:21:59] brian dot bream at comcast dot net

checking for cURL support... yes
checking if we should use cURL for url streams... no
checking for cURL in default path... found in /usr/local
checking for cURL 7.10.5 or greater... libcurl 7.19.2
checking for SSL support in libcurl... yes
checking how to run the C preprocessor... gcc -E
checking for openssl support in libcurl... yes
checking for openssl/crypto.h... (cached) yes
checking for gnutls support in libcurl... no
checking for curl_easy_perform in -lcurl... (cached) yes
checking for curl_version_info in -lcurl... (cached) yes
checking for curl_easy_strerror in -lcurl... (cached) yes
checking for curl_multi_strerror in -lcurl... (cached) yes



[2008-11-22 16:31:18] brian dot bream at comcast dot net

Description:

Attempts to use cURL to an https site fails from within php, functions
properly from the command line. cURL to an http site works in both
locations.

'./configure' '--with-apxs2=/usr/apache2/bin/apxs' '--enable-dbase'
'--with-libxml-dir=/usr/local' '--with-config-file-path=/etc/apache2'
'--with-mysql=shared,/opt/csw/mysql5'
'--with-mysqli=shared,/opt/csw/mysql5/bin/mysql_config'
'--with-xpm-dir=/usr' '--with-gd' '--with-bz2=/usr/lib'
'--with-jpeg-dir=/usr' '--with-png-dir=/usr' '--with-zlib'
'--enable-mbstring' '--enable-calendar' '--enable-bcmath' '--enable-ftp'
'--enable-exif' '--with-openssl=shared,/usr/sfw'
'--with-curl=/usr/local/bin/'
'--with-pdo-mysql=s

#46644 [Fbk->Opn]: https cURL failure

2008-11-24 Thread brian dot bream at comcast dot net
 ID:   46644
 User updated by:  brian dot bream at comcast dot net
 Reported By:  brian dot bream at comcast dot net
-Status:   Feedback
+Status:   Open
 Bug Type: cURL related
 Operating System: Solaris 10 08/07 x86
 PHP Version:  5.2CVS-2008-11-24
 New Comment:

bash-3.00# php -f curl_test.php
* About to connect() to secure.authorize.net port 443 (#0)
*   Trying 64.94.118.33... * connected
* Connected to secure.authorize.net (64.94.118.33) port 443 (#0)
* successfully set certificate verify locations:
*   CAfile: /var/tmp/cacert.pem
  CApath: none
* SSL connection using RC4-MD5
* Server certificate:
*subject: C=US, ST=Utah, L=American Fork, O=Authorize.Net
Corp., OU=Authorize.Net Corp., CN=secure.authorize.net
*start date: 2007-04-06 00:00:00 GMT
*expire date: 2009-04-11 23:59:59 GMT
*common name: secure.authorize.net (matched)
*issuer: C=ZA, O=Thawte Consulting (Pty) Ltd., CN=Thawte SGC
CA
*SSL certificate verify ok.
> GET / HTTP/1.1
Host: secure.authorize.net
Accept: */*

< HTTP/1.1 200 OK
< Server: Microsoft-IIS/5.0
< Content-Location: https://secure.authorize.net/index.htm
< Date: Mon, 24 Nov 2008 11:11:57 GMT
< Content-Type: text/html
< Accept-Ranges: bytes
< Last-Modified: Wed, 05 May 2004 10:32:44 GMT
< ETag: "06ee34c8c32c41:2c4c"
< Content-Length: 320
<
* Connection #0 to host secure.authorize.net left intact
Array
(
[url] => https://secure.authorize.net
[content_type] => text/html
[http_code] => 200
[header_size] => 284
[request_size] => 59
[filetime] => -1
[ssl_verify_result] => 0
[redirect_count] => 0
[total_time] => 0.412856
[namelookup_time] => 0.059205
[connect_time] => 0.114765
[pretransfer_time] => 0.257572
[size_upload] => 0
[size_download] => 320
[speed_download] => 775
[speed_upload] => 0
[download_content_length] => 320
[upload_content_length] => 0
[starttransfer_time] => 0.412811
[redirect_time] => 0
)
Errors: 0 * Closing connection #0
HTTP/1.1 200 OK
Server: Microsoft-IIS/5.0
Content-Location: https://secure.authorize.net/index.htm
Date: Mon, 24 Nov 2008 11:11:57 GMT
Content-Type: text/html
Accept-Ranges: bytes
Last-Modified: Wed, 05 May 2004 10:32:44 GMT
ETag: "06ee34c8c32c41:2c4c"
Content-Length: 320


 Authorize.Net
 


https://Account.authorize.net/ui/themes/anet/merch.app"; NORESIZE>



>From  Browser
Array
(
[url] => https://secure.authorize.net
[http_code] => 0
[header_size] => 0
[request_size] => 0
[filetime] => -1
[ssl_verify_result] => 0
[redirect_count] => 0
[total_time] => 0
[namelookup_time] => 0.036851
[connect_time] => 0.092135
[pretransfer_time] => 0
[size_upload] => 0
[size_download] => 0
[speed_download] => 0
[speed_upload] => 0
[download_content_length] => 0
[upload_content_length] => 0
[starttransfer_time] => 0
[redirect_time] => 0
)

Errors: 35 error:80089077:lib(128):func(137):reason(119)

EOF


Previous Comments:


[2008-11-24 09:26:50] [EMAIL PROTECTED]

Does it work using the PHP CLI binary?



[2008-11-24 04:21:59] brian dot bream at comcast dot net

checking for cURL support... yes
checking if we should use cURL for url streams... no
checking for cURL in default path... found in /usr/local
checking for cURL 7.10.5 or greater... libcurl 7.19.2
checking for SSL support in libcurl... yes
checking how to run the C preprocessor... gcc -E
checking for openssl support in libcurl... yes
checking for openssl/crypto.h... (cached) yes
checking for gnutls support in libcurl... no
checking for curl_easy_perform in -lcurl... (cached) yes
checking for curl_version_info in -lcurl... (cached) yes
checking for curl_easy_strerror in -lcurl... (cached) yes
checking for curl_multi_strerror in -lcurl... (cached) yes



[2008-11-22 16:31:18] brian dot bream at comcast dot net

Description:

Attempts to use cURL to an https site fails from within php, functions
properly from the command line. cURL to an http site works in both
locations.

'./configure' '--with-apxs2=/usr/apache2/bin/apxs' '--enable-dbase'
'--with-libxml-dir=/usr/local' '--with-config-file-path=/etc/apache2'
'--with-mysql=shared,/opt/csw/mysql5'
'--with-mysqli=shared,/opt/csw/mysql5/bin/mysql_config'
'--with-xpm-dir=/usr' '--with-gd' '--with-bz2=/usr/lib'
'--with-jpeg-dir=/usr' '--with-png-dir=/usr' '--with-zlib'
'--enable-mbstring' '--enable-calendar' '--enable-bcmath' '--enable-ftp'
'--enable-exif' '--with-openssl=shared,/usr/sfw'
'--with-curl=/usr/local/bin/'
'--with-pdo-mysql=shared,/opt/csw/mysql5/'

phpinfo at http://preferredsystems.com/phpinfo.php



Expected result:

A successful https connection to any site.

Actual resul

#46611 [Asn->Bgs]: multi_query() does not handle ALTER TABLE... ADD CONSTRAINT...

2008-11-24 Thread andrey
 ID:   46611
 Updated by:   [EMAIL PROTECTED]
 Reported By:  fhardy at noparking dot net
-Status:   Assigned
+Status:   Bogus
 Bug Type: MySQLi related
 Operating System: FreeBSD 7.1-PRERELEASE
 PHP Version:  5.2.6
 Assigned To:  andrey
 New Comment:

A MySQL server bug 
http://bugs.mysql.com/bug.php?id=40877

Sorry to close it as bogus, it's not client related, thus not mysqli.


Previous Comments:


[2008-11-19 17:55:18] [EMAIL PROTECTED]

 Hi,
I have tried both 5.2.7RC4 and 5.3-dev (with libmysql and mysqlnd) and
can reproduce the problem. I have tracked the C/S traffic and there is
an error in the middle of the multi-statement, which cancels the whole
statement. I have added two var_dumps() to your example, like :

$sql = 'SET SQL_MODE=NO_AUTO_VALUE_ON_ZERO; DROP TABLE IF EXISTS
`bank_transactions`; CREATE TABLE `bank_transactions` ( `id` int(10)
unsigned NOT NULL AUTO_INCREMENT, `client_id` int(10) unsigned NOT NULL,
PRIMARY KEY (`id`), KEY `client` (`client_id`)) ENGINE=InnoDB  DEFAULT
CHARSET=utf8 ROW_FORMAT=DYNAMIC; DROP TABLE IF EXISTS `clients`; CREATE
TABLE `clients` ( `id` int(10) unsigned NOT NULL AUTO_INCREMENT, PRIMARY
KEY (`id`)) ENGINE=InnoDB  DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC;
ALTER TABLE `bank_transactions` ADD CONSTRAINT
`bank_transactions_ibfk_1` FOREIGN KEY (`client_id`) REFERENCES
`clients` (`id`) ON UPDATE CASCADE';

$mysqli = new mysqli('127.0.0.1', 'root', 'root', 'db');

if ($mysqli->connect_error) {
printf('Connect failed: %s\n', mysqli_connect_error());
} else {
if (!$mysqli->multi_query($sql)) {
printf('Unable to execute sql');
} else {
do {
if ($result = $mysqli->store_result()) {
var_dump($result);
$result->free();
} else {
var_dump(mysqli_error($mysqli));
}
} while ($mysqli->next_result());
var_dump(mysqli_error($mysqli));
}

$mysqli->close();
}

and the output is :
[EMAIL PROTECTED]:~/dev/tmp/php5.2-200811191530$ ./php
../../vanilla/php5_3/a.php
string(0) ""
string(0) ""
string(54) "Can't create table 'db.bank_transactions' (errno: 150)"
[EMAIL PROTECTED]:~/dev/tmp/php5.2-200811191530$ ./php -v
PHP 5.2.7RC4-dev (cli) (built: Nov 19 2008 18:49:58)
Copyright (c) 1997-2008 The PHP Group
Zend Engine v2.2.0, Copyright (c) 1998-2008 Zend Technologies

[EMAIL PROTECTED]:~/dev/tmp/php5.2-200811191530$
/work/mysql-server/mysql-5.1-binprot/extra/perror 150
MySQL error code 150: Foreign key constraint is incorrectly formed

--
So I don't know why from the CLI the problem doesn't happen, it needs
further analyse to see why the environment is different. Also probably
needs a test case in C using libmysql, which will probably exhibit the
same problems.



[2008-11-19 11:23:39] fhardy at noparking dot net

Table and constraint creation are ok with cli mysql client.
Table and constraint creation are ok with phpmyadmin with mysql php's
extension (i known that mysql php's extension has not multi_query()
equivalent method).
Removing "alter table... add constraint" from sql in php script resolve
the problem.
Execute several queries on mysql 5.1 RC server with
mysqli::multi_queries() without any "alter table... add constraint" is
ok.
In conclusion, All work fine between this mysql 5.1 RC version and
php's mysqli extension, except this.
So, I think that it must be interesting to check mysqli php's extension
compatibility with mysql 5.1, even if mysql version is a RC.



[2008-11-19 10:57:52] [EMAIL PROTECTED]

How is this _PHP_ bug? Since all that changed is mysql version (to a
_release candidate_!) I find it funny you report this here..



[2008-11-19 10:23:59] fhardy at noparking dot net

Description:

Using mysqli::multi_query() in order to create database table in innodb
format with foreign key failed with mysql 5.1 RC.
All is fine with mysql 5.0.67


Reproduce code:
---
connect_error) {
printf('Connect failed: %s\n', mysqli_connect_error());
} else {
if (!$mysqli->multi_query($sql)) {
printf('Unable to execute sql');
} else {
do {
if ($result = $mysqli->store_result()) {
$result->free();
}
} while ($mysqli->next_result());
}

$mysqli->close();
}

?>


Expected result:

Database "mydatabase" must contain two tables, clients and
bank_transactions, and one constraint between this ta

#46615 [Asn->Csd]: SplHeap->key() returns count() instead of count() - 1

2008-11-24 Thread davidc
 ID:   46615
 Updated by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
-Status:   Assigned
+Status:   Closed
 Bug Type: SPL related
 Operating System: *
 PHP Version:  5.2CVS-2008-11-19 (CVS)
 Assigned To:  davidc
 New Comment:

This bug has been fixed in CVS.

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




Previous Comments:


[2008-11-19 13:34:11] [EMAIL PROTECTED]

Description:

Discussed here http://news.php.net/php.internals/41994.






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



#46659 [NEW]: I suggest changing get_functions_defined() function function

2008-11-24 Thread Mike_G at ufamts dot ru
From: Mike_G at ufamts dot ru
Operating system: 
PHP version:  5.2.6
PHP Bug Type: Feature/Change Request
Bug description:  I suggest changing get_functions_defined() function function

Description:

I suggest changing get_functions_defined() function to have flag/option to
return user function by includes/requires.

Example:

#require1.php


#require2.php


#main code


Output result:

Array ( [internal] => Array (
   ...
),
[user] => Array (
[require1.php] => Array ([0] => 'one', [1] =>
'two'),
[require2.php] => Array ([0] => 'three', [1]
=> 'four'),
))


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



#46395 [Opn->Fbk]: Inconsistent behaviour of require_once

2008-11-24 Thread jani
 ID:   46395
 Updated by:   [EMAIL PROTECTED]
 Reported By:  ebosman at gmail dot com
-Status:   Open
+Status:   Feedback
 Bug Type: Directory function related
 Operating System: Linux
 PHP Version:  5.2.6
 New Comment:

Try removing the . from your include_path setting.


Previous Comments:


[2008-10-26 19:32:50] ebosman at gmail dot com

I added 'echo __FILE__," ",getcwd(), "\n";' to each line:

mkdir -p bug/subdir
echo '' > bug/subdir/sub.inc
echo '' > bug/subdir/sub.php
echo '' > bug/top.php
echo '' > bug/top1.inc
echo '' > bug/top2.inc

The output for subdir/sub.php:

/var/www/bug/subdir/sub.php /var/www/bug/subdir
/var/www/bug/subdir/sub.inc /var/www/bug/subdir
/var/www/bug/top1.inc /var/www/bug/subdir
/var/www/bug/top2.inc /var/www/bug/subdir

and for top.php:

/var/www/bug/top.php /var/www/bug
/var/www/bug/subdir/sub.inc /var/www/bug
(and htmlized:)
Warning: require_once(../top1.inc) [function.require-once]: failed to
open stream: No such file or directory in /var/www/bug/subdir/sub.inc on
line 1

Fatal error: require_once() [function.require]: Failed opening required
'../top1.inc' (include_path='.:/usr/share/php:/usr/share/pear') in
/var/www/bug/subdir/sub.inc on line 1

This would be consistent with the first include method
(relative to the original file.) But in that case including
top2.inc should fail, which it doesn't.



[2008-10-26 18:57:32] [EMAIL PROTECTED]

Put 'echo getcwd(), "\n";' to each file before the require line.



[2008-10-26 18:15:19] ebosman at gmail dot com

Description:

In the code pasted below:

- top.php fails on subdir/sub.inc including "../top1.inc"
- subdir/sub.php doesn't.

Either every include should be relative to the original php file
(which would be braindead, but consistent.) In that case both
php files should fail (for subdir/sub.php the include of top2.inc
by top1.inc should fail.)

Or (and this is what I expected) include files should be relative
to the file that is including. In which case both should succeed.

Probably the same bug as http://bugs.php.net/bug.php?id=38302 , which
is labeled bogus, so I had to create a new one.

Reproduce code:
---
mkdir -p bug/subdir
echo '' > bug/subdir/sub.inc
echo '' > bug/subdir/sub.php
echo '' > bug/top.php
echo '' > bug/top1.inc
touch bug/top2.inc

Expected result:

Neither top.php nor subdir/sub.php should generate errors (or both
should.)

Actual result:
--
Warning: require_once(../top1.inc) [function.require-once]: failed to
open stream: No such file or directory in /var/www/bug/subdir/sub.inc on
line 1

Fatal error: require_once() [function.require]: Failed opening required
'../top1.inc' (include_path='.:/usr/share/php:/usr/share/pear') in
/var/www/bug/subdir/sub.inc on line 1





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



#46644 [Opn->Fbk]: https cURL failure

2008-11-24 Thread jani
 ID:   46644
 Updated by:   [EMAIL PROTECTED]
 Reported By:  brian dot bream at comcast dot net
-Status:   Open
+Status:   Feedback
 Bug Type: cURL related
 Operating System: Solaris 10 08/07 x86
 PHP Version:  5.2CVS-2008-11-24
 New Comment:

Does it work using the PHP CLI binary?


Previous Comments:


[2008-11-24 04:21:59] brian dot bream at comcast dot net

checking for cURL support... yes
checking if we should use cURL for url streams... no
checking for cURL in default path... found in /usr/local
checking for cURL 7.10.5 or greater... libcurl 7.19.2
checking for SSL support in libcurl... yes
checking how to run the C preprocessor... gcc -E
checking for openssl support in libcurl... yes
checking for openssl/crypto.h... (cached) yes
checking for gnutls support in libcurl... no
checking for curl_easy_perform in -lcurl... (cached) yes
checking for curl_version_info in -lcurl... (cached) yes
checking for curl_easy_strerror in -lcurl... (cached) yes
checking for curl_multi_strerror in -lcurl... (cached) yes



[2008-11-22 16:31:18] brian dot bream at comcast dot net

Description:

Attempts to use cURL to an https site fails from within php, functions
properly from the command line. cURL to an http site works in both
locations.

'./configure' '--with-apxs2=/usr/apache2/bin/apxs' '--enable-dbase'
'--with-libxml-dir=/usr/local' '--with-config-file-path=/etc/apache2'
'--with-mysql=shared,/opt/csw/mysql5'
'--with-mysqli=shared,/opt/csw/mysql5/bin/mysql_config'
'--with-xpm-dir=/usr' '--with-gd' '--with-bz2=/usr/lib'
'--with-jpeg-dir=/usr' '--with-png-dir=/usr' '--with-zlib'
'--enable-mbstring' '--enable-calendar' '--enable-bcmath' '--enable-ftp'
'--enable-exif' '--with-openssl=shared,/usr/sfw'
'--with-curl=/usr/local/bin/'
'--with-pdo-mysql=shared,/opt/csw/mysql5/'

phpinfo at http://preferredsystems.com/phpinfo.php



Expected result:

A successful https connection to any site.

Actual result:
--
A curl test to an https site returns: Errors: 35
error:80089077:lib(128):func(137):reason(119)

This test was run at http://preferredsystems.com/curl_test.php making a
call to https:secure.authorize.net

>From the command line it works properly

bash-3.00# curl -v https://secure.authorize.net
* About to connect() to secure.authorize.net port 443 (#0)
*   Trying 64.94.118.32... connected
* Connected to secure.authorize.net (64.94.118.32) port 443 (#0)
* successfully set certificate verify locations:
*   CAfile: /var/tmp/cacert.pem
  CApath: none
* SSLv2, Client hello (1):
* SSLv3, TLS handshake, Server hello (2):
* SSLv3, TLS handshake, CERT (11):
* SSLv3, TLS handshake, Server finished (14):
.





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



#46556 [Com]: There is no good method to escape a string for use in a (mySQL) LIKE clause

2008-11-24 Thread taco at procurios dot nl
 ID:   46556
 Comment by:   taco at procurios dot nl
 Reported By:  taco at procurios dot nl
 Status:   Open
 Bug Type: PDO related
 Operating System: linux
 PHP Version:  5.2.6
 Assigned To:  johannes
 New Comment:

There is no need for such a method in mysqli because
mysqli_real_escape_string() does not add quotes to the resulting string.
Using mysqli you would be able to do this:

$q = "SELECT...WHERE `foo` LIKE '%" .
addcslashes($MySQLi->real_escape_string($evilVar), '%_') . "%'";

In PDO this is impossible because of the added quotes.


Previous Comments:


[2008-11-13 15:30:49] [EMAIL PROTECTED]

Maybe something for PDOv2 or mysqli?



[2008-11-12 15:56:53] taco at procurios dot nl

Description:

There is no good method to escape a string for use in a (mySQL) LIKE
clause. In a query like "SELECT `foo` FROM `bar` WHERE `baz` LIKE '%" .
$qux . "%'" the value of $qux should be escaped for both the query
itself (like PDO::quote() does) as the LIKE clause (i.e. escaping % and
_ characters.

Using PDO the only way to escape a variable is using either
PDOStatement::bindParam() or PDO::quote(). The first is not suitable for
two reasons:
1. Not every query is a prepared statement
2. There is no way to escape % and _ (escaping them first will result
in the \ being escaped: \% becomes \\%)

The latter is not suitable because it will add quotes to the string, so
you'll have to get rid of the quotes, escape % and _ and add the result
to the query.






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