#9331 [Com]: No operator overloading available

2007-08-11 Thread nibujoshua at gmail dot com
 ID:   9331
 Comment by:   nibujoshua at gmail dot com
 Reported By:  jgsmith at tamu dot edu
 Status:   Suspended
 Bug Type: Feature/Change Request
 Operating System: Irix 6, Solaris 7, OpenBSD 2.8
 PHP Version:  4.0.4pl1
 New Comment:

it is very bad, that there is no operator overloding capability for PHP


Previous Comments:


[2007-04-21 16:49:14] dionyziz at deviantart dot com

I think there are many other people who would like to see this feature
implemented. Is there any chance it could be made available in PHP6?



[2001-02-20 01:00:44] [EMAIL PROTECTED]

I hardly believe this will be implemented anytime soon or
accepted at all,
suspending (for the records)



[2001-02-19 02:07:25] jgsmith at tamu dot edu

It would be nice to have operator overloading available for 
classes.  Something along the lines of Perl and C++.  I'm 
sure there are other OO languages that provide similar 
functionality.  This would go a long way to allowing the 
creation of object classes that are similar to those built 
into the language.

At least one class I'm wanting to create that could use this 
is an ordered set -- use +,-,*,/ for set union, asymmetric 
difference, intersection, and difference, for example.

Perhaps borrowing the C++ syntax wouldn't be a great burden. 

function operator+(objectClass,objectClass) { ... }

Unfortunately, this would require prototyping of class 
methods, but this is already implicately done for the 
operators (as far as the coder is concerned, even if not in 
fact).

Perhaps one way around the need for an explicit prototype is 
to consider the first argument of the binary operation (the 
left operand) as the governing class for finding the method.  
Then $A+$B == $A->operator+($B) and the function declaration 
is reduced to 

class A {
  function operator+($B) { ... }
}

I think this is important enough to the development of the 
language, and I didn't find mention of it in any of the 
documentation or archives I searched, that I am submitting 
it as a bug report for t




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


#42271 [NEW]: extract EXTR_REFS and/or references

2007-08-11 Thread rodji at tut dot by
From: rodji at tut dot by
Operating system: Win32 XP sp2.2600
PHP version:  4.4.7
PHP Bug Type: Scripting Engine problem
Bug description:  extract  EXTR_REFS and/or references

Description:

Tested on:
Apache/1.3.33 (Win32)
PHP/4.4.7 and 5.2.3

trouble with references in functions

Reproduce code:
---
function args_select($args, $args_list, $def_val) {
$r = array();
foreach ($args_list as $key) {
if (array_key_exists($key, $args)){
$r[$key] = $args[$key];
}else{
$r[$key] = $def_val;//equal $r[$key] =& $def_val   
why???
//$r[$key] = (string)$def_val;  //solution#1
}
}
return $r;
}

$argums = array('action'=>'edit', 'id'=>1);
$select = array('action','to_do','back');

//debug_zval_dump(args_select($argums, $select, ''));

extract(args_select($argums, $select, ''), EXTR_OVERWRITE | EXTR_REFS);
//solution#2   why???
/*$m = args_select($argums, $select, '');
//OR //$m =& args_select($argums, $select, '');
extract($m, EXTR_OVERWRITE | EXTR_REFS);
*/

$to_do = 'new';
debug_zval_dump (&$back);
?>

Expected result:

&string(0) "" refcount(2)

Actual result:
--
&string(3) "new" refcount(3)

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


#42257 [Opn->Asn]: Cannot uninstall 5.2.3

2007-08-11 Thread jani
 ID:   42257
 Updated by:   [EMAIL PROTECTED]
 Reported By:  ravendon69 at charter dot net
-Status:   Open
+Status:   Assigned
 Bug Type: *General Issues
 Operating System: Windows XP
 PHP Version:  5CVS-2007-08-09 (CVS)
 Assigned To:  jmertic
 New Comment:

John, shouldn't you rather fix the installer for it to be able to
uninstall properly? :)


Previous Comments:


[2007-08-11 05:27:04] ravendon69 at charter dot net

What would I do with msizap_exe? 

What command should I enter?



[2007-08-10 15:20:20] [EMAIL PROTECTED]

Try this

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/msi/setup/msizap_exe.asp



[2007-08-10 12:59:53] [EMAIL PROTECTED]

Assigned to the installer maintainer.



[2007-08-09 15:29:40] ravendon69 at charter dot net

Description:

PHP 5.2.3, Windows XP SP2, Intel Celeron

I'm trying to uninstall php 5.2.3. I get the following. This occurs if
I try to install over, uninstall or change. 

"Error, trying to access the local web service: GetObject Failed. You
will need to manually configure the web server."

Hit Ok. 

"Error trying access httpd.conf file. You will need to manually
configure the web server."

Hit OK.

"The installer has encountered an unexpected error installing this
package. This may indicate a problem with this package. The error code
is 2343."

It is impossible for me to remove this software. I can't use your .msi
installer to overwrite it or repair it. 

How do I get rid of it? 






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


#42218 [Opn->Fbk]: ImageTTFBBox & any2eucjp

2007-08-11 Thread jani
 ID:   42218
 Updated by:   [EMAIL PROTECTED]
 Reported By:  fernando at barnatech dot com
-Status:   Open
+Status:   Feedback
 Bug Type: GD related
 Operating System: Suse 10.2
 PHP Version:  5.2.4RC1
 Assigned To:  pajoye


Previous Comments:


[2007-08-09 07:59:47] fernando at barnatech dot com

I'll ask to the sysadmin team for a recompilation without japanese
support and then for a test repetition. It can last for days, I think.
I'll tell you the progress, if there's some.



[2007-08-09 07:47:24] [EMAIL PROTECTED]

About the install, on windows you don't have to install anything. You
can run php directly from the uncompressed directory, using the console
(cmd).

"By the way, may he bug disappear if PHP-GD is recompiled without
japanese support? The "any2eucjp()" in the error suggests it."

Yes, if you don't need japanese, disable it. I suspect a conflict
between the encoding.



[2007-08-09 07:42:48] fernando at barnatech dot com

The code encoding is UTF-8 as I told. We carefully use UTF-8 for code
in the IDE, for data in the DBMS and for output in the webserver.

I think a test is not so easy to perform in my job environment. Usually
I have no direct access to installation privileges, further than limited
ones in the development servers. No access to clients administration, no
PHP installation, recompilation or direct reconfiguration without an
administrative permission, etc. I promise you it's not so easy.

Working with PHP 5.2.0 right now. The bug is there too, of course.

By the way, may he bug disappear if PHP-GD is recompiled without
japanese support? The "any2eucjp()" in the error suggests it.



[2007-08-08 13:36:21] [EMAIL PROTECTED]

"I have no spare machines right now (resources fly here)."

Fetch a snapshot (windows for example), uncompress it and execute your
script using it. That's all I need :)

"I think I don't understand exactly what are you asking about
encoding.
For me, encoding is the charset used with data, or code, or HTML
output.
But it seems it's not what you're asking."

Which enconding do you use in your script files, iso-, UTF-8, etc.
Your editor should be able to tell you that. That determines what you
actually pass to the imagettf function (UTF-8 is the safest way).



[2007-08-08 08:02:32] fernando at barnatech dot com

Strange, as I pasted directly that phpinfo() output. I had installed
the 5.2.4RC1 version on a dev webserver over a previously PHP version
test, but I'm afraid I can't do it again. It was a development
environment I set up when I found this bug in our stable dev version
5.2.0, just to test if it had been corrected in 5.2.4RC1, as a prior
step before reporting it here. But since yesterday that server doesn't
exist anymore, and I have no spare machines right now (resources fly
here).

I think I don't understand exactly what are you asking about encoding.
For me, encoding is the charset used with data, or code, or HTML output.
But it seems it's not what you're asking. I don't manage font charsets,
if it helps.



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

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


#42270 [Opn->Fbk]: stdClass could not be converted to string

2007-08-11 Thread jani
 ID:   42270
 Updated by:   [EMAIL PROTECTED]
 Reported By:  steven dot mccoy at miru dot hk
-Status:   Open
+Status:   Feedback
 Bug Type: Class/Object related
 Operating System: Ubuntu 7.04
-PHP Version:  5.2.4RC1
+PHP Version:  5.2.1
 New Comment:

Please try using this CVS snapshot:

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

For Windows (installer):

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




Previous Comments:


[2007-08-11 06:13:57] steven dot mccoy at miru dot hk

Description:

This might be related to bug 41221, upgrading from PHP 5.1.6-1 (Debian)
to 5.2.1 (Ubuntu) created a regression in handling output of JSON
decoding.

Does this mean that I can only use arrays ( json_decode($json, true) ),
and have to update all code appropriately?

Reproduce code:
---
 array(array("second" => 2), "two",
"three"),
);
$json = json_encode($array);
$obj = json_decode($json);
var_dump(array_diff($array,$obj->first));
?>


Expected result:

array(1) {
  ["first"]=>
  array(3) {
[0]=>
array(1) {
  ["second"]=>
  int(2)
}
[1]=>
string(3) "two"
[2]=>
string(5) "three"
  }
}


Actual result:
--
Catchable fatal error: Object of class stdClass could not be converted
to string in /tmp/- on line 7






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


#42265 [Opn->Bgs]: preg match error ()

2007-08-11 Thread jani
 ID:   42265
 Updated by:   [EMAIL PROTECTED]
 Reported By:  ben at crabb dot com
-Status:   Open
+Status:   Bogus
 Bug Type: Apache2 related
 Operating System: FreeBSD6.1
 PHP Version:  5CVS-2007-08-10 (snap)
 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:


[2007-08-10 14:46:06] ben at crabb dot com

Description:

I have installed apache22 and php5.2.3 / mod_php5 but I cannot get
apache to render php on this box. I have checked that the module is
called in httpd.conf and also that I have extension=pcre.so in the
php.ini but I'm still getting 
Fatal error: Call to undefined function preg_match() in
/usr/home/www/phpadmin/phpMyAdmin-2.6.1/libraries/defines.lib.php on
line 36
Whenever I try to load phpMyAdmin

I haven't tried rendering other php files yet as I've been trying to
iron this one out for the past few hours.

Help?






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


#42226 [Opn->Bgs]: microtime is not save under windows

2007-08-11 Thread jani
 ID:   42226
 Updated by:   [EMAIL PROTECTED]
 Reported By:  bjoern at xrow dot de
-Status:   Open
+Status:   Bogus
 Bug Type: Date/time related
 Operating System: Windows
 PHP Version:  5.2.4RC1 & 4.4.7
 New Comment:

Floating point values have a limited precision. Hence a value might 
not have the same string representation after any processing. That also
includes writing a floating point value in your script and directly 
printing it without any mathematical operations.

If you would like to know more about "floats" and what IEEE
754 is read this:
http://docs.sun.com/source/806-3568/ncg_goldberg.html
 
Thank you for your interest in PHP.

As you get correct results when using the optional parameter to
microtime() this isn't really bug but just normal floating point issue.
And we don't add features in PHP 4 anymore..


Previous Comments:


[2007-08-08 08:24:50] bjoern at xrow dot de

Well no sorry,

it is a php4 and php5 problem. What would I write down in the version
field if it applies both verions? "5.2.4RC1 & 4.4.7"?

To explain again:

microtime(): doesn`t work right under php4 and php5 under windows
microtime(1): does work right under php5, it was added as a feature to
php4 so it doesn`t exists in php4



[2007-08-08 08:17:30] [EMAIL PROTECTED]

So this is PHP 4 only issue? Adjust the version field accordinly then.



[2007-08-07 13:04:35] bjoern at xrow dot de

Here is the script with the additional param. It works as expected.
Unfortunatelly php4 doesn`t have this param so this seems to be only a
workaround for php5.





[2007-08-07 12:51:49] [EMAIL PROTECTED]

Have you tried calling microtime(1) <-- this returns you a floating 
point number directly.



[2007-08-06 22:04:47] bjoern at xrow dot de

Description:

This bug occurs under php4 and php5.

It might occur that the micro time might output a date older then the
date it had output before.

php5 does worse then php4.

Reproduce code:
---


Expected result:

C:\workspace>php microtimebug.php
(nothing)
C:\workspace>C:\php5\php.exe microtimebug.php
(nothing)

Actual result:
--
C:\workspace>php microtimebug.php
Run 2690 Last:1186437375.2899 -Current:1186437374.2495
Run 23377 Last:1186437375.4714 -Current:1186437374.437
Run 30341 Last:1186437375.534 -Current:1186437374.4995
Run 36083 Last:1186437375.5787 -Current:1186437374.5464
Run 49990 Last:1186437375.6881 -Current:1186437374.6557
Run 62669 Last:1186437375.7984 -Current:1186437374.7651
Run 68143 Last:1186437375.8433 -Current:1186437374.7964
Run 75918 Last:1186437375.8971 -Current:1186437374.8745
Run 82398 Last:1186437375.9586 -Current:1186437374.9214
Run 90123 Last:1186437376.0163 -Current:1186437374.9839
Run 99605 Last:1186437376.0827 -Current:1186437375.062

C:\workspace>C:\php5\php.exe microtimebug.php
Run 11 Last:1186436769.93 -Current:1186436768.89
Run 260 Last:1186436769.96 -Current:1186436768.92
Run 998 Last:1186436770.04 -Current:1186436769
Run 1392 Last:1186436770.08 -Current:1186436769.05
Run 2180 Last:1186436770.17 -Current:1186436769.14
Run 3123 Last:1186436770.27 -Current:1186436769.25
Run 3657 Last:1186436770.34 -Current:1186436769.31
Run 4137 Last:1186436770.4 -Current:1186436769.36
Run 4514 Last:1186436770.44 -Current:1186436769.41
Run 4900 Last:1186436770.47 -Current:1186436769.45
Run 5317 Last:1186436770.53 -Current:1186436769.5
Run 5639 Last:1186436770.56 -Current:1186436769.53
Run 6138 Last:1186436770.62 -Current:1186436769.59
Run 6299 Last:1186436770.63 -Current:1186436769.61
Run 7112 Last:1186436770.73 -Current:1186436769.7
Run 7402 Last:1186436770.77 -Current:1186436769.73
Run 8066 Last:1186436770.85 -Current:1186436769.81
Run 8496 Last:1186436770.9 -Current:1186436769.86
Run 8904 Last:1186436770.94 -Current:1186436769.91
Run 9161 Last:1186436770.97 -Current:1186436769.94
Run 9971 Last:1186436771.07 -Current:1186436770.03
Run 10375 Last:1186436771.12 -Current:1186436770.08
Run 10738 Last:1186436771.16 -Current:1186436770.12
Run 10950 Last:1186436771.18 -Current:1186436770.14
Run 11612 Last:1186436771.26 -Current:1186436770.22
Run 11819 Last:1186436771.27 -Current:1186436770.25
Run 12361 Last:1186436771.33 -Current:1186436770.31
Run 12690 Last:1186436771.38 -Current:1186436770.34
Run 13394 Last:1186436771.46 -Current:1186436770.42
Run 13677 Last:1186436771.49 -Current:1186436770.45
Run 13728 Last:1186436771.5 -Current:1186436770.47
Run 14085 Last:1186436771.53 -Current:1186436770.5
Run 14553 Last:1186436771.58 -Current:1186436770.56
Run 14636 Last:1186436771.6 -Current:1186436770.56
Run 14978 Last:1186436771.65 -Current

#42235 [Opn->Asn]: Overloaded properties not allowing modification

2007-08-11 Thread jani
 ID:   42235
 Updated by:   [EMAIL PROTECTED]
 Reported By:  stephen dot cuppett at webmastersinc dot net
-Status:   Open
+Status:   Assigned
 Bug Type: Class/Object related
-Operating System: Windows and Linux
+Operating System: *
 PHP Version:  5.2.4RC1
-Assigned To:  
+Assigned To:  dmitry
 New Comment:

Dmitry, check this out please.


Previous Comments:


[2007-08-07 16:35:29] stephen dot cuppett at webmastersinc dot net

It should be noted that the supposed congruent case works:

test_var = array();
$myvar->test_var['tester'] = 3;
$myvar->test_var['tester2'] = 5;

var_dump($myvar->test_var);
?>

C:\temp\dataobject_test>php simpletest.php
array(2) {
  ["tester"]=>
  int(3)
  ["tester2"]=>
  int(5)
}



[2007-08-07 16:27:23] stephen dot cuppett at webmastersinc dot net

Description:

Also documented in: http://pear.php.net/bugs/bug.php?id=11775

There appears to be a regression as to Bug #39449:
http://bugs.php.net/bug.php?id=39449

On 5.2.4RC1, I'm getting the immutable overloaded properties problem
with DB_DataObject and in the simple test below.

Also bugs:
   41116, 40828, 40823, 39990

Reproduce code:
---
map = array();
}
public function __set($vn, $value) {
$this->map[$vn] = $value;
}
public function __get($vn) {
return $this->map[$vn];
}
}
$myvar = new MyObj();
$myvar->test_var = array();
$myvar->test_var['tester'] = 3;
$myvar->test_var['tester2'] = 5;

var_dump($myvar->test_var);
?>

Expected result:

C:\temp\dataobject_test>php simpletest.php
array(2) {
  ["tester"]=>
  int(3)
  ["tester2"]=>
  int(5)
}

Actual result:
--
C:\temp\dataobject_test>php simpletest.php
PHP Notice:  Indirect modification of overloaded property
MyObj::$test_var has no effect in C:\temp\dataobject_test\simpletest.php
on line 16

Notice: Indirect modification of overloaded property MyObj::$test_var
has no effect in C:\temp\dataobject_test\simpletest.php on line 16
PHP Notice:  Indirect modification of overloaded property
MyObj::$test_var has no effect in C:\temp\dataobject_test\simpletest.php
on line 17

Notice: Indirect modification of overloaded property MyObj::$test_var
has no effect in C:\temp\dataobject_test\simpletest.php on line 17
array(0) {
}






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


#42236 [Opn->Fbk]: unwanted array reset within recursive call

2007-08-11 Thread jani
 ID:   42236
 Updated by:   [EMAIL PROTECTED]
 Reported By:  remy215 at laposte dot net
-Status:   Open
+Status:   Feedback
 Bug Type: Arrays related
 Operating System: debian
 PHP Version:  5.2.4RC1
 New Comment:

Please try using this CVS snapshot:

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

For Windows (installer):

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




Previous Comments:


[2007-08-07 17:21:17] remy215 at laposte dot net

Description:

I have an array of nested arrays (ie. each id can have nested
children). The function returns the parent of the provided id but end in
an infinite loop when the id does not exists !
Parent array at the top of the hierarchy seems to undergo an unwanted
reset();


Reproduce code:
---
array('a1'=>array('a2'=>array(),'b2'=>array()),'b1'=>array()),'b0'=>array());
$searched=array(); // to avoid infinite loop
function getParent($id,$_subtree=null) {
if(!$_subtree) { // if first call
global $array;
$_subtree=$array; // entire tree
}
global $searched; // to avoid infinite loop
$found_parent=null;
foreach($_subtree as $parent=>$children) {
if(in_array($parent,$searched)) { // if already looped => stop 
(ie.
infinite loop)
die('Infinite loop: '.$parent);
}
array_push($searched,$parent); // to avoid infinite loop
if(in_array($id,array_keys($children))) {
$found_parent=$parent;
break;
} elseif($found_parent=getParent($id,$children)) {
break;
}
}
return $found_parent;
}
$search='a0';
echo 'parent of '.$search.' is: '.getParent($search);
?>

Expected result:

When you provide as argument a nested id, the function works ('b2'
returns 'a1').
When you provide a non-existing id, or one of the top parent ids ('a0'
or 'b0') the function should return null.

Actual result:
--
When you provide a non-existing id, or one of the top parent ids ('a0'
or 'b0') the function end up in an infinite loop.
Parent array at the top of the hierarchy seems to undergo an unwanted
reset();






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


#42102 [Opn->Fbk]: Cannot access/unlink Symlinks if target does not exists

2007-08-11 Thread jani
 ID:   42102
 Updated by:   [EMAIL PROTECTED]
 Reported By:  tom at ideaweb dot de
-Status:   Open
+Status:   Feedback
 Bug Type: Safe Mode/open_basedir
 Operating System: Linux Debian 4.0 Etch
 PHP Version:  5.2.3
 New Comment:

Please try using this CVS snapshot:

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

For Windows (installer):

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




Previous Comments:


[2007-07-25 13:13:53] tom at ideaweb dot de

Description:

If i have a symlink with a deleted target in the same directory (like 
vmware.pdf -> 118536740980919500.file), i cannot access the symlink 
anymore and get an error that open_basedir restriction in effect.

I followed the instruction of closed bug #41847. i downloaded the 
latest php snapshot, but it doesnt help, same issue and now i get new 
strange thing (but only with >5.2.3):

Warning: session_start() [function.session-start]: open_basedir 
restriction in effect. File(/www/tmp) is not within the allowed path
(s): (/var/www/ideaweb.de/) in /var/www/ideaweb.de/ideacms/admin/
cms_log.php on line 1

/www/tmp is the session.save_path in php.ini

Is it a good idea, that i have to put the session files in the webroot

with upcoming php versions (>5.2.3)? It means more overhead to 
protocet files from public if basedir is webroot.

Reproduce code:
---


Expected result:

/var/www/ideaweb.de/ideacms/admin

Actual result:
--
/var/www/ideaweb.de/ideacms/admin
Warning: file_exists() [function.file-exists]: open_basedir restriction

in effect. File(../media/db/test.pdf) is not within the allowed
path(s): 
(/var/www/ideaweb.de/) in /var/www/ideaweb.de/ideacms/admin/
mdb_editor.php on line 697





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


#42271 [Opn]: extract EXTR_REFS and/or references

2007-08-11 Thread rodji at tut dot by
 ID:   42271
 User updated by:  rodji at tut dot by
 Reported By:  rodji at tut dot by
 Status:   Open
 Bug Type: Scripting Engine problem
 Operating System: Win32 XP sp2.2600
-PHP Version:  4.4.7
+PHP Version:  5.2.3
 New Comment:

(added php version)


Previous Comments:


[2007-08-11 09:29:05] rodji at tut dot by

Description:

Tested on:
Apache/1.3.33 (Win32)
PHP/4.4.7 and 5.2.3

trouble with references in functions

Reproduce code:
---
function args_select($args, $args_list, $def_val) {
$r = array();
foreach ($args_list as $key) {
if (array_key_exists($key, $args)){
$r[$key] = $args[$key];
}else{
$r[$key] = $def_val;//equal $r[$key] =& $def_val   
why???
//$r[$key] = (string)$def_val;  //solution#1
}
}
return $r;
}

$argums = array('action'=>'edit', 'id'=>1);
$select = array('action','to_do','back');

//debug_zval_dump(args_select($argums, $select, ''));

extract(args_select($argums, $select, ''), EXTR_OVERWRITE |
EXTR_REFS);
//solution#2   why???
/*$m = args_select($argums, $select, '');
//OR //$m =& args_select($argums, $select, '');
extract($m, EXTR_OVERWRITE | EXTR_REFS);
*/

$to_do = 'new';
debug_zval_dump (&$back);
?>

Expected result:

&string(0) "" refcount(2)

Actual result:
--
&string(3) "new" refcount(3)





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


#42272 [NEW]: var_export() incorrectly escapes char(0)

2007-08-11 Thread pilots at rambler dot ru
From: pilots at rambler dot ru
Operating system: WindowsXP
PHP version:  5.2.4RC1
PHP Bug Type: Variables related
Bug description:  var_export() incorrectly escapes char(0)

Description:

var_export() incorrectly escapes char(0) in strings. It returns '\000' in
single quotes, therefore then this string can not be imported correctly.


Reproduce code:
---
eval('echo '.var_export("\0",true).';');

Expected result:

// chr(0)

Actual result:
--
\000

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


#42272 [Opn->Asn]: var_export() incorrectly escapes char(0)

2007-08-11 Thread derick
 ID:   42272
 Updated by:   [EMAIL PROTECTED]
 Reported By:  pilots at rambler dot ru
-Status:   Open
+Status:   Assigned
 Bug Type: Variables related
 Operating System: WindowsXP
 PHP Version:  5.2.4RC1
-Assigned To:  
+Assigned To:  derick


Previous Comments:


[2007-08-11 15:50:22] pilots at rambler dot ru

Description:

var_export() incorrectly escapes char(0) in strings. It returns '\000'
in single quotes, therefore then this string can not be imported
correctly.


Reproduce code:
---
eval('echo '.var_export("\0",true).';');

Expected result:

// chr(0)

Actual result:
--
\000





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


#42214 [Opn->Asn]: SoapServer sends clients internal PHP errors

2007-08-11 Thread iliaa
 ID:   42214
 Updated by:   [EMAIL PROTECTED]
 Reported By:  stuart dot caie at gmail dot com
-Status:   Open
+Status:   Assigned
 Bug Type: SOAP related
 Operating System: Ubuntu
 PHP Version:  5.2.4RC1
-Assigned To:  
+Assigned To:  dmitry


Previous Comments:


[2007-08-05 21:58:46] stuart dot caie at gmail dot com

Description:

When presenting a SOAP API to the general public, I do not want the
text of PHP errors to be send down the wire as "SOAP-ENV;Server" faults.
It's just as embarrassing and as much of a security risk as having the
display_errors INI option turned on - it could reveal exploitable
private implementation details to hostile users.

I would like to catch all PHP errors, log them and instead send the
user a custom SOAP fault which gives them a unique error ID to report
(which matches with my log), but does not reveal the actual PHP error
message.

However,

1. use_soap_error_handler() does nothing. Set it to true, it sends out
SOAP-ENV:Server faults with the PHP error message. Set it to false, it
still sends out SOAP-ENV:Server faults with the PHP error message.


2. User-defined error handlers can't catch E_ERROR, E_PARSE,
E_CORE_ERROR, E_CORE_WARNING, E_COMPILE_ERROR, E_COMPILE_WARNING, and
most of E_STRICT. Other scripting languages such as Perl (via
$SIG{__DIE__}) or Ruby (via begin/rescue) let user code catch fatal
errors, PHP comes up short.

I'd like you to allow PHP to catch fatal errors in the user defined
error handler. If you won't fix that, please add some kind of kludge to
SoapServer so that it doesn't reveal the text of PHP errors to clients.

Reproduce code:
---
fault('error', "report \"$ticket\" to
support");
}
set_error_handler('error_handler');
use_soap_error_handler(false);
$server = new SoapServer(NULL, array('uri' =>
'http://localhost/server.php'));
$server->setClass('test');
$server->handle();
?>


'http://localhost/server.php', 'location' =>
'http://localhost/server.php'));
$client ->test();
?>



Expected result:

client.php: Uncaught SoapFault exception: [error] report ""
to support

server.php: entry in /tmp/soap_error_log reading:
[] 1: Call to undefined function obvious_error() in
server.php line 4


Actual result:
--
client.php: Uncaught SoapFault exception: [SOAP-ENV:Server] Call to
undefined function obvious_error()

server.php: no entry in /tmp/soap_error_log.






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


#42223 [Opn->Asn]: SoapServer truncates XML document if Server Class includes UTF8 file

2007-08-11 Thread iliaa
 ID:   42223
 Updated by:   [EMAIL PROTECTED]
 Reported By:  j8859 at clix dot pt
-Status:   Open
+Status:   Assigned
 Bug Type: SOAP related
 Operating System: Linux
 PHP Version:  5.2.4RC1
-Assigned To:  
+Assigned To:  dmitry


Previous Comments:


[2007-08-06 19:33:52] j8859 at clix dot pt

Description:

SoapServer truncates XML document if the Server Class includes a UTF8
file.
The error only occurs if the XML document returned is larger than 8000
bytes. In this case, tha XML document is truncated in the last 3 bytes.

The BOM [Byte-Order Mark] also is 3 bytes long, could it be related
with the bug?


Reproduce code:
---
There are a lot of files involved.
Download them from: http://web.ioio.info/wstest/wstest.zip
You can see the bug here: http://web.ioio.info/wstest/client.php

You can download the ZIP file, extract it to an Apache directory,
correct all addresses: change "web.ioio.info/wstest" for your own
address in all files, and try the following in the TestWS.php file:

1)
uncomment [require_once "util-ANSI.php";]
comment [require_once "util-UTF8.php";]
-> The error doesn't occur

2)
On line 14, replace "800" by "700" (the XML document will be smaller
than 8000 bytes)
-> The error doesn't occur


Expected result:


http://schemas.xmlsoap.org/soap/envelope/";
xmlns:xsd="http://www.w3.org/2001/XMLSchema";
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/";
SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/";>0123456789
...(800 times: 0123456789)...
0123456789


Actual result:
--

http://schemas.xmlsoap.org/soap/envelope/";
xmlns:xsd="http://www.w3.org/2001/XMLSchema";
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/";
SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/";>0123456789
...(800 times: 0123456789)... 
0123456789 Misses the last 3 chars: "e>\n"





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


#42184 [Opn->Asn]: Object Type mismatch using classmap in WSDL mode

2007-08-11 Thread iliaa
 ID:   42184
 Updated by:   [EMAIL PROTECTED]
 Reported By:  heitor dot m at gmail dot com
-Status:   Open
+Status:   Assigned
 Bug Type: SOAP related
 Operating System: Linux RedHat Enterprise V4
 PHP Version:  5.2.3
-Assigned To:  
+Assigned To:  dmitry


Previous Comments:


[2007-08-02 17:27:35] heitor dot m at gmail dot com

Description:

tryning to get the object type that i was specified in classmap option.
i ever get a object of the type stdClass.

I'm expecting to get in this case a instance of the Class PHPObject
previusly declared by me.

I already search for related bug reports and just has found this:
http://bugs.php.net/bug.php?id=42157
thats already closed.

Reproduce code:
---
SERVER(teste_ser.php):
prop1 = $a;
$this->prop2 = $b;
$this->propc = $c;
}
}

function send($arg_obj)
{
$obj = new PHPObject("SERVER_1", "SERVER_2", "SERVER_3");
return $obj;
}

$classmap = array('WSDLObject' => 'PHPObject');

$server = new SoapServer("teste.wsdl", array('classmap' =>
$classmap));

$server->addFunction(array("send"));

$server->handle();

?>
=
CLIENT(teste_cli.php):
prop1 = $a;
$this->prop2 = $b;
$this->propc = $c;
}
}

try {

$classmap = array('WSDLObject' => 'PHPObject');

$client = new SoapClient("teste.wsdl", array("classmap"  => $classmap,
'trace' => 1));

$arg_obj = new PHPObject("ARG_1", "ARG_2", "ARG_3");

$res = $client->send($arg_obj);

echo "RESPONSE FROM SERVER";
var_dump($res);
echo "";

echo "SOAP RESPONSE";
echo htmlspecialchars(str_replace("><", ">\n<",
$client->__getLastResponse()));
echo "";

} catch (SoapFault $sf) {

echo "";
print_r("(" . $sf->faultcode . ") " . $sf->faultstring);
echo "";

} catch (Exception  $e) { 

echo "";
print_r($e);
echo "";

} 

?>
==
WSDL(teste.wsdl):


http://schemas.xmlsoap.org/wsdl/"; 
xmlns:xsd="http://www.w3.org/2001/XMLSchema"; 
xmlns:tns="http://www.sit.com.br/wsdl"; 
xmlns:soap-env="http://schemas.xmlsoap.org/wsdl/soap/"; 
xmlns:wsdl="http://www.w3.org/2003/06/wsdl"; 
xmlns:soapenc="http://www.w3.org/2003/05/soap-encoding"; 
targetNamespace="http://www.sit.com.br/wsdl";>



 















 


  









  



















http://schemas.xmlsoap.org/soap/http"/>



http://schemas.xmlsoap.org/soap/encoding/";
namespace="urn:Types" use="literal" />


http://schemas.xmlsoap.org/soap/encoding/";
namespace="urn:Types" use="literal" />








Web-Services para operaes matematicas

http://10.11.40.177/developers/heitor/ws/teste/teste_ser.php"/>






Expected result:

RESPONSE FROM SERVER

object(PHPObject)[3]
  public 'prop1' => string 'SERVER_1' (length=8)
  public 'prop2' => string 'SERVER_2' (length=8)
  public 'propc' => string 'SERVER_3' (length=8)
  [methods list]

SOAP RESPONSE


http://schemas.xmlsoap.org/soap/envelope/";
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";>


SERVER_1
SERVER_2
SERVER_3






Actual result:
--
RESPONSE FROM SERVER

object(stdClass)[3]
  public 'prop1' => string 'SERVER_1' (length=8)
  public 'prop2' => string 'SERVER_2' (length=8)
  public 'propc' => string 'SERVER_3' (length=8)

SOAP RESPONSE


http://schemas.xmlsoap.org/soap/envelope/";
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";>


SERVER_1
SERVER_2
SERVER_3










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


#42191 [Opn->Asn]: Multiple SOAP Calls Fail in WSDL Mode

2007-08-11 Thread iliaa
 ID:   42191
 Updated by:   [EMAIL PROTECTED]
 Reported By:  jsinglet at gmail dot com
-Status:   Open
+Status:   Assigned
 Bug Type: SOAP related
 Operating System: Mac OS X 10.4.10
 PHP Version:  5.2.3
-Assigned To:  
+Assigned To:  dmitry


Previous Comments:


[2007-08-02 22:36:26] jsinglet at gmail dot com

Description:

Multiple calls from a PHP-based SOAPClient to a PHP-based SOAPServer 
fail. When you make even two using the same client handle, the call 
fails with the error: 

PHP Warning:  SoapClient::__doRequest(): 7168 bytes of buffered data 
lost during stream conversion! 




Reproduce code:
---
THE SERVER CODE

$GLOBALS['HTTP_RAW_POST_DATA'] = file_get_contents("php://input");
ini_set("soap.wsdl_cache_enabled", 0);

$s = new SoapServer('MyWS.wsdl');
$s->setClass('ClientService');
$s->handle();

CLIENT CLODE

ini_set("soap.wsdl_cache_enabled", 0);

$client = new SoapClient('MyWS.wsdl',
array("classmap"=>array("NewClient"=>"NewClient")));

$result = $client->getNewClient();
//SECOND CALL CREATES WARNING
$result = $client->getNewClient();




Expected result:

The script should run with no errors or warnings.

Actual result:
--
PHP Warning:  SoapClient::__doRequest(): 7168 bytes of buffered data 
lost during stream conversion! in /Users/../test.php





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


#42183 [Opn->Asn]: classmap cause error in non-wsdl mode

2007-08-11 Thread iliaa
 ID:   42183
 Updated by:   [EMAIL PROTECTED]
 Reported By:  heitor dot m at gmail dot com
-Status:   Open
+Status:   Assigned
 Bug Type: SOAP related
 Operating System: Linux RedHat Enterprise V4
 PHP Version:  5.2.3
-Assigned To:  
+Assigned To:  dmitry


Previous Comments:


[2007-08-02 14:57:19] heitor dot m at gmail dot com

Description:

Hi,

I was tryning to implement a soap server-cliint in non-wsdl mode but i
get some strange errors. This set o tests is about the class option.
I try to use this option in non-wsdl mode. Like i don't find any
explicity explanatin about the possibility of this use, i has been maked
some tests, and i think tath i found a bug.

When i put the classmap option in the server i have the follow
response:

(HTTP) Error Fetching http headers


And when i put the classmap in the client i have no response. The
server offer to me download the called file, but this is a blank
archive.


I hav been reported the documentation leak here:
http://bugs.php.net/bug.php?id=42182

i already serach to related bug reports and don't find nothing.

Reproduce code:
---
SERVER:
prop1 = $a;
$this->prop2 = $b;
$this->propc = $c;
}

}

function send($client_builded) 
{

$server_builded = new PHPObject("server_sttuf", 0.3, false);

$arr_params['server_builded'] = $server_builded;
$arr_params['client_builded'] = $client_builded;

return $arr_params;
}

$classmap = array('Object' => 'PHPObject');

$server = new SoapServer(NULL, array('uri' => 'http://ws.sit.com',
'classmap' => $classmap));

$server->addFunction(array("send"));
$server->handle();  

?>

=
Client:
prop1 = $a;
$this->prop2 = $b;
$this->propc = $c;
}

}

try {

$classmap = array('Object' => 'PHPObject');

$client = new SoapClient(NULL, 
array(
'uri' => 'http://ws.sit.com', 
'location' =>
'http://10.11.40.177/developers/heitor/ws/teste2/teste2_ser.php',
'trace' => 1
)
);

$obj = new PHPObject("things", 3.14, TRUE);
$res = $client->__call('send', array(new SoapParam($obj, 'Object')));

echo "SEND";
var_dump($res);
echo "";

echo "RESPONSE";
echo htmlspecialchars(str_replace("><", ">\n<",
$client->__getLastResponse()));
echo "";

} catch (SoapFault $sf) {

echo "";
print_r("(" . $sf->faultcode . ") " . $sf->faultstring);
echo "";

} catch (Exception  $e) { 

echo "";
print_r($e);
echo "";

}

?>

Expected result:

the print of the obects

Actual result:
--
described errors





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


#42273 [NEW]: Unable to set multiple cookies with a web page

2007-08-11 Thread dancega at comcast dot net
From: dancega at comcast dot net
Operating system: Vista Business
PHP version:  5.2.4RC1
PHP Bug Type: Output Control
Bug description:  Unable to set multiple cookies with a web page

Description:

This problem was encountered with php 5.2.3.3

When using setcookie, only the last cookie is output from the server. 
Cookies preceeding the last cookie are never sent.

This seems to have been an issue with 4.X but seems to have reoccured.

Reproduce code:
---



Expected result:

When loading the subsequent page in the same browser session I expect to
see 

$_COOKIE['firstcookie']
$_COOKIE['secondcookie']

Actual result:
--
I see only $_COOKIE['secondcookie']

I never see $_COOKIE['firstcookie']

Note : this is verified in a utility which allows me to examin http
headers.

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


#42274 [NEW]: Error with libphp5.so

2007-08-11 Thread hsilamot at tomalish dot net
From: hsilamot at tomalish dot net
Operating system: fedora 5
PHP version:  5.2.4RC1
PHP Bug Type: Apache2 related
Bug description:  Error with libphp5.so

Description:

after compiling and make i get this error on the Apache

Starting httpd: httpd: Syntax error on line 76 of
/etc/httpd/conf/httpd.conf: Cannot load /etc/httpd/modules/libphp5.so into
server: /etc/httpd/modules/libphp5.so: undefined symbol:
sqlite3SrcListShiftJoinType



Reproduce code:
---
just compiling the apsx module

Expected result:

hmmm, to load the module ?

Actual result:
--
module not loaded

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


#42274 [Opn->Fbk]: Error with libphp5.so

2007-08-11 Thread jani
 ID:   42274
 Updated by:   [EMAIL PROTECTED]
 Reported By:  hsilamot at tomalish dot net
-Status:   Open
+Status:   Feedback
 Bug Type: Apache2 related
 Operating System: fedora 5
 PHP Version:  5.2.4RC1
 New Comment:

Not enough information was provided for us to be able
to handle this bug. Please re-read the instructions at
http://bugs.php.net/how-to-report.php

If you can provide more information, feel free to add it
to this bug and change the status back to "Open".

Thank you for your interest in PHP.





Previous Comments:


[2007-08-11 21:30:18] hsilamot at tomalish dot net

Description:

after compiling and make i get this error on the Apache

Starting httpd: httpd: Syntax error on line 76 of
/etc/httpd/conf/httpd.conf: Cannot load /etc/httpd/modules/libphp5.so
into server: /etc/httpd/modules/libphp5.so: undefined symbol:
sqlite3SrcListShiftJoinType



Reproduce code:
---
just compiling the apsx module

Expected result:

hmmm, to load the module ?

Actual result:
--
module not loaded





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


#42273 [Opn->Fbk]: Unable to set multiple cookies with a web page

2007-08-11 Thread jani
 ID:   42273
 Updated by:   [EMAIL PROTECTED]
 Reported By:  dancega at comcast dot net
-Status:   Open
+Status:   Feedback
 Bug Type: Output Control
 Operating System: Vista Business
 PHP Version:  5.2.3
 New Comment:

Not enough information was provided for us to be able
to handle this bug. Please re-read the instructions at
http://bugs.php.net/how-to-report.php

If you can provide more information, feel free to add it
to this bug and change the status back to "Open".

Thank you for your interest in PHP.





Previous Comments:


[2007-08-11 19:10:22] dancega at comcast dot net

Description:

This problem was encountered with php 5.2.3.3

When using setcookie, only the last cookie is output from the server. 
Cookies preceeding the last cookie are never sent.

This seems to have been an issue with 4.X but seems to have reoccured.

Reproduce code:
---



Expected result:

When loading the subsequent page in the same browser session I expect
to see 

$_COOKIE['firstcookie']
$_COOKIE['secondcookie']

Actual result:
--
I see only $_COOKIE['secondcookie']

I never see $_COOKIE['firstcookie']

Note : this is verified in a utility which allows me to examin http
headers.





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


#42271 [Opn->Fbk]: extract EXTR_REFS and/or references

2007-08-11 Thread jani
 ID:   42271
 Updated by:   [EMAIL PROTECTED]
 Reported By:  rodji at tut dot by
-Status:   Open
+Status:   Feedback
 Bug Type: Scripting Engine problem
 Operating System: Win32 XP sp2.2600
 PHP Version:  5.2.3
 New Comment:

Can you provide some simpler example which makes a bit more sense..?


Previous Comments:


[2007-08-11 09:29:05] rodji at tut dot by

Description:

Tested on:
Apache/1.3.33 (Win32)
PHP/4.4.7 and 5.2.3

trouble with references in functions

Reproduce code:
---
function args_select($args, $args_list, $def_val) {
$r = array();
foreach ($args_list as $key) {
if (array_key_exists($key, $args)){
$r[$key] = $args[$key];
}else{
$r[$key] = $def_val;//equal $r[$key] =& $def_val   
why???
//$r[$key] = (string)$def_val;  //solution#1
}
}
return $r;
}

$argums = array('action'=>'edit', 'id'=>1);
$select = array('action','to_do','back');

//debug_zval_dump(args_select($argums, $select, ''));

extract(args_select($argums, $select, ''), EXTR_OVERWRITE |
EXTR_REFS);
//solution#2   why???
/*$m = args_select($argums, $select, '');
//OR //$m =& args_select($argums, $select, '');
extract($m, EXTR_OVERWRITE | EXTR_REFS);
*/

$to_do = 'new';
debug_zval_dump (&$back);
?>

Expected result:

&string(0) "" refcount(2)

Actual result:
--
&string(3) "new" refcount(3)





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


#42271 [Fbk->Opn]: extract EXTR_REFS and/or references

2007-08-11 Thread rodji at tut dot by
 ID:   42271
 User updated by:  rodji at tut dot by
 Reported By:  rodji at tut dot by
-Status:   Feedback
+Status:   Open
 Bug Type: Scripting Engine problem
 Operating System: Win32 XP sp2.2600
 PHP Version:  5.2.3
 New Comment:

Reproduce code:
---
function /*&*/f($val) { //eq&f
$r['a'] = $val; //equal =&
$r['b'] = $val; //equal =&
return $r;
}

//debug_zval_dump(f('old'));

extract(f('old_value'), EXTR_REFS);
//$t =& f('old_value'); extract($t, EXTR_REFS); unset($t);

$a = 'new_value';
debug_zval_dump (&$b);

Expected result:

&string(9) "old_value" refcount(2)

Actual result:
--
&string(9) "new_value" refcount(3)


Previous Comments:


[2007-08-11 22:32:01] [EMAIL PROTECTED]

Can you provide some simpler example which makes a bit more sense..?



[2007-08-11 09:29:05] rodji at tut dot by

Description:

Tested on:
Apache/1.3.33 (Win32)
PHP/4.4.7 and 5.2.3

trouble with references in functions

Reproduce code:
---
function args_select($args, $args_list, $def_val) {
$r = array();
foreach ($args_list as $key) {
if (array_key_exists($key, $args)){
$r[$key] = $args[$key];
}else{
$r[$key] = $def_val;//equal $r[$key] =& $def_val   
why???
//$r[$key] = (string)$def_val;  //solution#1
}
}
return $r;
}

$argums = array('action'=>'edit', 'id'=>1);
$select = array('action','to_do','back');

//debug_zval_dump(args_select($argums, $select, ''));

extract(args_select($argums, $select, ''), EXTR_OVERWRITE |
EXTR_REFS);
//solution#2   why???
/*$m = args_select($argums, $select, '');
//OR //$m =& args_select($argums, $select, '');
extract($m, EXTR_OVERWRITE | EXTR_REFS);
*/

$to_do = 'new';
debug_zval_dump (&$back);
?>

Expected result:

&string(0) "" refcount(2)

Actual result:
--
&string(3) "new" refcount(3)





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


#42268 [Bgs]: assignment in reference parameter doesn't resolve properly

2007-08-11 Thread donauinsel at hotmail dot com
 ID:   42268
 User updated by:  donauinsel at hotmail dot com
 Reported By:  donauinsel at hotmail dot com
 Status:   Bogus
 Bug Type: *General Issues
 Operating System: W32
 PHP Version:  5.2.4RC1
 New Comment:

This works by example also when using references. So there is going
something wrong with php.

$prevmonth = ($month - 1);
$prevyear = ($year + 0);
$nextmonth = ($month + 1);
$nextyear = ($year + 0);

fixdate($prevmonth, $prevyear);
fixdate($nextmonth, $nextyear);


Previous Comments:


[2007-08-11 04:21:34] donauinsel at hotmail dot com

Sorry i don't understand what you mean. I use the pass-by-reference
function with global variable.



[2007-08-10 21:43:28] [EMAIL PROTECTED]

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

.



[2007-08-10 20:48:53] donauinsel at hotmail dot com

Description:

Try first $month = 11,$year = 2007 then $month =12, $year = 2007
Function returns correct value which seems not to be passed correctly.

Reproduce code:
---
function fixdate(&$month, &$year) {
if ($month < 1) {
$month = 12;
$year--;
} elseif ($month > 12) {
$month = 1;
$year++;
}
}

fixdate($nextmonth = ($month + 1), $nextyear = ($year + 0));



Expected result:

12 / 2007 or 01 / 2008 

Actual result:
--
you will get 13 / 2007 instead.





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


#42276 [NEW]: number_format returns wrong values for big numbers

2007-08-11 Thread eb1024 at gmail dot com
From: eb1024 at gmail dot com
Operating system: Windows XP / Fedora / (Others?)
PHP version:  4.4.7
PHP Bug Type: Strings related
Bug description:  number_format returns wrong values for big numbers

Description:

Hello, I've used the number_format function to add a thousands separator
to a very large number (the 1000th Fibonacci number), the thing is that
after using the number_format function the number which originally was

43466557686937456435688527675040625802564660517371780402481729089536555417949051890403879840079255169295922593080322634775209689623239873322471161642996440906533187938298969649928516003704476137795166849228875

becomes,

43466557686937454881639861284285048836044564808501085299792936936934507578446811952241727283693776165701110466238201810459653426841499747856972973922645842460198740218733277412586280377875508003628944833118208

(or better yet):

43 466 557 686 937 454 881 639 861 284 285 048 836 044 564 808 501 085 299
792 936 936 934 507 578 446 811 952 241 727 283 693 776 165 701 110 466 238
201 810 459 653 426 841 499 747 856 972 973 922 645 842 460 198 740 218 733
277 412 586 280 377 875 508 003 628 944 833 118 208

As you can see the difference is huge! I tried it under PHP 5.2.1 and PHP
4.4 under Windows XP and Fedora Core 6.

More info @ http://www.alixaxel.com/wordpress/2007/05/19/php-math-library/
if you need it!

Reproduce code:
---
$fibonacci_1000 =
'43466557686937456435688527675040625802564660517371780402481729089536555417949051890403879840079255169295922593080322634775209689623239873322471161642996440906533187938298969649928516003704476137795166849228875';

echo number_format($fibonacci_1000, 0, '', ' ');

Expected result:

43 466 557 686 937 456 435 688 527 675 040 625 802 564 660 517 371 780 402
481 729 089 536 555 417 949 051 890 403 879 840 079 255 169 295 922 593 080
322 634 775 209 689 623 239 873 322 471 161 642 996 440 906 533 187 938 298
969 649 928 516 003 704 476 137 795 166 849 228 875

Actual result:
--
43 466 557 686 937 454 881 639 861 284 285 048 836 044 564 808 501 085 299
792 936 936 934 507 578 446 811 952 241 727 283 693 776 165 701 110 466 238
201 810 459 653 426 841 499 747 856 972 973 922 645 842 460 198 740 218 733
277 412 586 280 377 875 508 003 628 944 833 118 208

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


#42270 [Fbk->Opn]: stdClass could not be converted to string

2007-08-11 Thread steven dot mccoy at miru dot hk
 ID:   42270
 User updated by:  steven dot mccoy at miru dot hk
 Reported By:  steven dot mccoy at miru dot hk
-Status:   Feedback
+Status:   Open
 Bug Type: Class/Object related
 Operating System: Ubuntu 7.04
-PHP Version:  5.2.1
+PHP Version:  5.2.4RC1-dev
 New Comment:

Reproduced with the Win32 CVS build:

PHP 5.2.4RC1-dev (cli) (built: Aug 12 2007 00:04:25)
Copyright (c) 1997-2007 The PHP Group
Zend Engine v2.2.0, Copyright (c) 1998-2007 Zend Technologies


Previous Comments:


[2007-08-11 11:52:08] [EMAIL PROTECTED]

Please try using this CVS snapshot:

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

For Windows (installer):

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





[2007-08-11 06:13:57] steven dot mccoy at miru dot hk

Description:

This might be related to bug 41221, upgrading from PHP 5.1.6-1 (Debian)
to 5.2.1 (Ubuntu) created a regression in handling output of JSON
decoding.

Does this mean that I can only use arrays ( json_decode($json, true) ),
and have to update all code appropriately?

Reproduce code:
---
 array(array("second" => 2), "two",
"three"),
);
$json = json_encode($array);
$obj = json_decode($json);
var_dump(array_diff($array,$obj->first));
?>


Expected result:

array(1) {
  ["first"]=>
  array(3) {
[0]=>
array(1) {
  ["second"]=>
  int(2)
}
[1]=>
string(3) "two"
[2]=>
string(5) "three"
  }
}


Actual result:
--
Catchable fatal error: Object of class stdClass could not be converted
to string in /tmp/- on line 7






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