#29421 [NEW]: array_search confusions

2004-07-27 Thread redeye at erisx dot de
From: redeye at erisx dot de
Operating system: *
PHP version:  5.0.0
PHP Bug Type: Arrays related
Bug description:  array_search confusions

Description:

When using array_search with strict set to FALSE will allways return the
first matching element of an array, which is absolutly correct, but will
also match every (boolean) TRUE value of an array (which is bad). This
way, you could either hope no value is set to (boolean) TRUE or are forced
to enable strict, which is not allways desired.

This behavoir should either be better documented ( as is the behavior of
FALSE ( "" , 0 , -1 , FALSE ) or changed to only match against ( "1" , 1 ,
"TRUE" , TRUE ).

Reproduce code:
---
$array = array ( 'foo' , TRUE , 'bar' ) ;
$search = array_search ( 'baz' , $array ) ;

var_dump ( $search ) ;

Expected result:

bool(false)

Actual result:
--
int(1) 

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


#26286 [Com]: Parent: child process exited with status 3221225477 -- Restarting

2004-03-05 Thread redeye at erisx dot de
 ID:   26286
 Comment by:   redeye at erisx dot de
 Reported By:  igg10 at alu dot ua dot es
 Status:   No Feedback
 Bug Type: Apache2 related
 Operating System: Windows 2000
 PHP Version:  4.3.4
 New Comment:

Same here using PHP 5.0.0 beta 4 on Apache 2.0.48 (Win2K)


Previous Comments:


[2004-02-23 20:19:00] efesar at efesar dot com

I was running a production website with Apache 2.0.47 -- medium volume
-- and PHP 5 beta 1 without any known problems.



I installed beta 4 and I started get random Apache crashes, and this
exact error conmes up in the Apache logs. Windows XP.  The PHP code has
not changed (at all) so it's in the installation. 



I switched back to Beta 1, and the problem has gone away.  



[Mon Feb 23 16:55:28 2004] [notice] Parent: child process exited with
status 3221225477 -- Restarting.



I am running Win XP Pro SP1 ... When it crashes, this comes up in the
Windows application log:



===



(comes up first)



Faulting application Apache.exe, version 2.0.47.0, faulting module
php5ts.dll, version 5.0.0.0, fault address 0xa964.



For more information, see Help and Support Center at
http://go.microsoft.com/fwlink/events.asp.



=



(comes up second)



Faulting application Apache.exe, version 2.0.47.0, faulting module
php5ts.dll, version 5.0.0.0, fault address 0x0003c44d.



For more information, see Help and Support Center at
http://go.microsoft.com/fwlink/events.asp.



===



this is what comes up in the system log



===



The Apache2 service terminated unexpectedly.  It has done this 11
time(s).



For more information, see Help and Support Center at
http://go.microsoft.com/fwlink/events.asp.



[2004-02-20 07:35:51] dev0 at panzerliga dot de

i have the sam probelm...

you can solve it by setting the register_globals variable to
ON...but i still searching for a "real" solution 

greetings 

dev0



[2004-02-03 06:15:51] jose dot luis at tugamail dot com

Reversed the installed version of php to php-4.3.4-Win32 and with the
same MySQL and Apache2 config/versions and worked just Great



Just to let you know... i will stay with the 4.3.4



[2004-02-02 11:35:15] jose dot luis at tugamail dot com

Apache2 version: apache_2.0.48-win32-x86-no_ssl

php version: php-5.0.0b3-Win32

MySQL version: mysql-4.0.17-win



MySQL runs fine.

Apache2 with php as a module also works fine.

I can execute  phpinfo();  without any kind of probs.



Installed Postnuke, with installer included and once installed when i
try to go to the "postnuke site" webserver stops responding with:



[Mon Feb 02 16:24:45 2004] [notice] Parent: Created child process 2448

[Mon Feb 02 16:24:45 2004] [notice] Child 2448: Child process is
running

[Mon Feb 02 16:24:45 2004] [notice] Child 2448: Acquired the start
mutex.

[Mon Feb 02 16:24:45 2004] [notice] Child 2448: Starting 250 worker
threads.

[Mon Feb 02 16:25:21 2004] [notice] Parent: child process exited with
status 3221225477 -- Restarting.



[2003-11-25 15:34:54] [EMAIL PROTECTED]

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





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

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


#27504 [Fbk->Opn]: call_user_func_array allows calling of private/protected methods

2004-03-05 Thread redeye at erisx dot de
 ID:   27504
 User updated by:  redeye at erisx dot de
 Reported By:  redeye at erisx dot de
-Status:   Feedback
+Status:   Open
 Bug Type: Zend Engine 2 problem
 Operating System: Windows, Linux
-PHP Version:  5.0.0b4 (beta4)
+PHP Version:  5.0.0rc1-dev
 New Comment:

Still the same results ( using the latest snapshot )


Previous Comments:


[2004-03-05 03:37:25] [EMAIL PROTECTED]

Please try using this CVS snapshot:

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



[2004-03-05 03:21:36] redeye at erisx dot de

Description:

Using call_user_func_array you are able to call a private or protected
method of any object. I think this should not be allowed as it will
lead to bad programming style as you could use this bug to access
methods which should be hidden.

Reproduce code:
---
bar('1');

}

private function bar ( $param ) {

echo 'Called function foo:bar('.$param.');';

}

}



$foo = new foo();



call_user_func_array( array( $foo , 'bar' ) , array( '2' ) );



$foo->bar('3');



?>

Expected result:

Called function foo:bar(1);



Fatal error: Call to private method foo::bar() from context '' in
/www/htdocs/bug.php on line 14

Actual result:
--
Called function foo:bar(1);

Called function foo:bar(2);



Fatal error: Call to private method foo::bar() from context '' in
/www/htdocs/bug.php on line 17





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


#27504 [NEW]: call_user_func_array allows calling of private/protected methods

2004-03-05 Thread redeye at erisx dot de
From: redeye at erisx dot de
Operating system: Windows, Linux
PHP version:  5.0.0b4 (beta4)
PHP Bug Type: Zend Engine 2 problem
Bug description:  call_user_func_array allows calling of private/protected methods

Description:

Using call_user_func_array you are able to call a private or protected
method of any object. I think this should not be allowed as it will lead
to bad programming style as you could use this bug to access methods which
should be hidden.

Reproduce code:
---
bar('1');

}

private function bar ( $param ) {

echo 'Called function foo:bar('.$param.');';

}

}



$foo = new foo();



call_user_func_array( array( $foo , 'bar' ) , array( '2' ) );



$foo->bar('3');



?>

Expected result:

Called function foo:bar(1);



Fatal error: Call to private method foo::bar() from context '' in
/www/htdocs/bug.php on line 14

Actual result:
--
Called function foo:bar(1);

Called function foo:bar(2);



Fatal error: Call to private method foo::bar() from context '' in
/www/htdocs/bug.php on line 17

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


#26448 [Com]: Unable to define a variable in a class

2004-02-03 Thread redeye at erisx dot de
 ID:   26448
 Comment by:   redeye at erisx dot de
 Reported By:  hervecaussinus at yahoo dot ca
 Status:   Bogus
 Bug Type: Zend Engine 2 problem
 Operating System: Windows 2000
 PHP Version:  5.0.0b2 (beta2)
 New Comment:

Remove the Backslashes ( your string wasn't enclosed )




Previous Comments:


[2003-11-28 12:01:07] hervecaussinus at yahoo dot ca

I test the syntax:



and it does not work. Once again I am very sorry if I am doing
something wrong (that is possible due to my short experience) but I
think it is a bug (that looks strange I must admit).



[2003-11-28 11:31:21] [EMAIL PROTECTED]

Sorry, but your problem does not imply a bug in PHP itself.  For a
list of more appropriate places to ask for help using PHP, please
visit http://www.php.net/support.php as this bug system is not the
appropriate forum for asking support questions. 

Thank you for your interest in PHP.

You need to define class variables like this:

class MyClass {
  public $Hello = \"Hello, World\\n\";
}

no bug here.



[2003-11-28 10:54:47] hervecaussinus at yahoo dot ca

Description:

I am not able to use the class examples in your Web site. In fact it
seems that it is impossible to declare a variable when defining a
class.

I am very new to PHP (3 days). Sorry if I am doing something wrong.

I look at the bug database and I also download and install the last
binary (php5-win32-200311281530.zip).


Reproduce code:
---



Expected result:

Should parse and display 1 .

Actual result:
--
Gives this error:

Parse error: parse error, unexpected T_VARIABLE, expecting
T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}' in
c:\inetpub\wwwroot\CorePHP\6-1.php on line 3






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


#26691 [NEW]: Incorrect behaviour of PPP using get_class_methods([obj]);

2003-12-22 Thread redeye at erisx dot de
From: redeye at erisx dot de
Operating system: *
PHP version:  5.0.0b2 (beta2)
PHP Bug Type: Zend Engine 2 problem
Bug description:  Incorrect behaviour of PPP using get_class_methods([obj]);

Description:

Calling get_class_methods([obj]); on an object returns next to public
methods it's private and protected methods. I guess those methods should
only be returned when calling get_class_methods($this); within an object.

Reproduce code:
---
 $method_name ) {
echo $n." -> ".$method_name."\n";
}
?>

Expected result:

empty page :-)

Actual result:
--
0 -> pub_function
1 -> priv_function

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


#24837 [Csd->Opn]: Incorrect behaviour of PPP using foreach

2003-12-22 Thread redeye at erisx dot de
 ID:   24837
 User updated by:  redeye at erisx dot de
 Reported By:  redeye at erisx dot de
-Status:   Closed
+Status:   Open
 Bug Type: Zend Engine 2 problem
 Operating System: *
 PHP Version:  5CVS-2003-11-29
 Assigned To:  helly
 New Comment:

Also variables are hidden now, methods are still visible
using the function get_class_methods([obj]);


Previous Comments:


[2003-12-18 17:01:31] [EMAIL PROTECTED]

This bug has been fixed in CVS.

In case this was a PHP problem, 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/.
 
In case this was a documentation problem, the fix will show up soon at
http://www.php.net/manual/.

In case this was a PHP.net website problem, the change will show
up on the PHP.net site and on the mirror sites in short time.
 
Thank you for the report, and for helping us make PHP better.





[2003-07-28 02:39:49] redeye at erisx dot de

Description:

Using a foreach ( or while ) loop to print the
content of an object should to my understanding
skip private and protected values ( or methods ).

Actually these values are returned but missing
their respective keys, so at least their source
is hidden.

Reproduce code:
---
 $val ){
echo $key." => ".$val."\r\n";
}

?>

Expected result:

empty page :)

Actual result:
--
 => test foo
 => test bar
 => test foobar





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


#24837 [NEW]: Incorrect behaviour of PPP using foreach

2003-07-28 Thread redeye at erisx dot de
From: redeye at erisx dot de
Operating system: Linux, Windows
PHP version:  5.0.0b1 (beta1)
PHP Bug Type: Zend Engine 2 problem
Bug description:  Incorrect behaviour of PPP using foreach

Description:

Using a foreach ( or while ) loop to print the
content of an object should to my understanding
skip private and protected values ( or methods ).

Actually these values are returned but missing
their respective keys, so at least their source
is hidden.

Reproduce code:
---
 $val ){
echo $key." => ".$val."\r\n";
}

?>

Expected result:

empty page :)

Actual result:
--
 => test foo
 => test bar
 => test foobar

-- 
Edit bug report at http://bugs.php.net/?id=24837&edit=1
-- 
Try a CVS snapshot (php4):  http://bugs.php.net/fix.php?id=24837&r=trysnapshot4
Try a CVS snapshot (php5):  http://bugs.php.net/fix.php?id=24837&r=trysnapshot5
Fixed in CVS:   http://bugs.php.net/fix.php?id=24837&r=fixedcvs
Fixed in release:   http://bugs.php.net/fix.php?id=24837&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=24837&r=needtrace
Try newer version:  http://bugs.php.net/fix.php?id=24837&r=oldversion
Not developer issue:http://bugs.php.net/fix.php?id=24837&r=support
Expected behavior:  http://bugs.php.net/fix.php?id=24837&r=notwrong
Not enough info:http://bugs.php.net/fix.php?id=24837&r=notenoughinfo
Submitted twice:http://bugs.php.net/fix.php?id=24837&r=submittedtwice
register_globals:   http://bugs.php.net/fix.php?id=24837&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=24837&r=php3
Daylight Savings:   http://bugs.php.net/fix.php?id=24837&r=dst
IIS Stability:  http://bugs.php.net/fix.php?id=24837&r=isapi
Install GNU Sed:http://bugs.php.net/fix.php?id=24837&r=gnused



#24216 [NEW]: set_error_handler without effect in some situations

2003-06-16 Thread redeye at erisx dot de
From: redeye at erisx dot de
Operating system: Linux / Windows
PHP version:  4.3.2
PHP Bug Type: Scripting Engine problem
Bug description:  set_error_handler without effect in some situations

Description:

It seams like PHP doesn't keep the error_handler when a function is called
which contains another trigger_error. This can lead to a quite unwanted
behaviour on scripts that require an own error_handler.

Reproduce code:
---
';

if ( $error_number == E_USER_NOTICE ){
call_error();
}
}
function call_error(){
trigger_error('From call_error()', E_USER_WARNING);
}

set_error_handler('my_error_handler');

trigger_error('test', E_USER_NOTICE);
trigger_error('another test', E_USER_NOTICE);

?>

Expected result:

Using my_error_handler: test
Using my_error_handler: From call_error()
Using my_error_handler: another test
Using my_error_handler: From call_error()

Actual result:
--
Using my_error_handler: test
Warning: From call_error() in /www/test.php on line 11
Using my_error_handler: another test
Warning: From call_error() in /www/test.php on line 11


-- 
Edit bug report at http://bugs.php.net/?id=24216&edit=1
-- 
Try a CVS snapshot: http://bugs.php.net/fix.php?id=24216&r=trysnapshot
Fixed in CVS:   http://bugs.php.net/fix.php?id=24216&r=fixedcvs
Fixed in release:   http://bugs.php.net/fix.php?id=24216&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=24216&r=needtrace
Try newer version:  http://bugs.php.net/fix.php?id=24216&r=oldversion
Not developer issue:http://bugs.php.net/fix.php?id=24216&r=support
Expected behavior:  http://bugs.php.net/fix.php?id=24216&r=notwrong
Not enough info:http://bugs.php.net/fix.php?id=24216&r=notenoughinfo
Submitted twice:http://bugs.php.net/fix.php?id=24216&r=submittedtwice
register_globals:   http://bugs.php.net/fix.php?id=24216&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=24216&r=php3
Daylight Savings:   http://bugs.php.net/fix.php?id=24216&r=dst
IIS Stability:  http://bugs.php.net/fix.php?id=24216&r=isapi
Install GNU Sed:http://bugs.php.net/fix.php?id=24216&r=gnused