Req #41856 [Com]: support for anonymous classes

2012-03-15 Thread david71rj at gmail dot com
Edit report at https://bugs.php.net/bug.php?id=41856edit=1

 ID: 41856
 Comment by: david71rj at gmail dot com
 Reported by:mbaynton at gmail dot com
 Summary:support for anonymous classes
 Status: Open
 Type:   Feature/Change Request
 Package:Feature/Change Request
 PHP Version:5.2.3
 Block user comment: N
 Private report: N

 New Comment:

+1


Previous Comments:

[2011-11-09 11:34:50] antoniocs at gmail dot com

Would be nice to have this in Php 5.4 (or a latter version)


[2011-05-25 19:02:47] urkle at outoforder dot cc

David,  I do not believe you are understanding the request here.

I believe this is more what is being requested.

class Base {
   private $name;
   public function __construct($name) {
  $this-name = $name;
   }
   public function test() {
  return $this-name;
   }
}

$obj = new class extends Base {
 public function test() {
return ''.$this-name.'';
 }
};

echo $obj-test();

Basically similar to that of anonymous functions introduced in PHP 5.3


[2010-09-26 19:41:30] david dot o dot greenberg at gmail dot com

The benefits of anonymous classes are twofold:

a) efficiency of code
b) efficiency of use of resources

consider:

$Div = new DivElement($InnerHTML = 'hello');
$Div-display();

versus:

(new DivElement( $InnerHTML = 'hello'))-display();

Lines of unnecessary code are saved, plus memory is allocated more efficiently.

This is especially useful for objects that merely appear for a single purpose 
and then vanish.


[2010-05-07 02:10:11] jevon at jevon dot org

Another request for anonymous classes. Without support for anonymous classes, 
it can sometimes be necessary to create hundreds of named, and rarely used, 
classes. Anonymous classes are often used for quick instances that are created 
and destroyed quickly, so a performance hit is reasonable.


[2008-11-11 06:24:37] igorsf at yahoo dot com

+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

https://bugs.php.net/bug.php?id=41856


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


Bug #53227 [Com]: PHP Warning: mysql_pconnect(): MySQL server has gone away

2012-01-25 Thread david71rj at gmail dot com
Edit report at https://bugs.php.net/bug.php?id=53227edit=1

 ID: 53227
 Comment by: david71rj at gmail dot com
 Reported by:tyra3l at gmail dot com
 Summary:PHP Warning:  mysql_pconnect(): MySQL server has
 gone away
 Status: Feedback
 Type:   Bug
 Package:MySQL related
 PHP Version:5.3.3
 Block user comment: N
 Private report: N

 New Comment:

No solution? I'm using PHP 5.3.8.


Previous Comments:

[2011-08-11 23:41:12] php at accounts dot brycedrennan dot com

I experience the same thing. 

PHP 5.3.2, Apache 2.2.17, Windows 7 64bit


[2010-12-25 13:50:57] ka...@php.net

Afair, we already have some checking code in the common connector function for 
ext/mysql to check for server has gone away when attempting to re-use a 
persistent connection. But it is hard to reproduce if the result isn't 
consistent.

I tried to reproduce it a few times, but without luck. Any specific MySQL 
Server versions, or other data that could provide useful?


[2010-12-20 14:34:06] tyra3l at gmail dot com

mysqlnd

Tyrael


[2010-12-20 14:22:52] and...@php.net

do you use libmysql or mysqlnd?


[2010-11-02 12:13:04] tyra3l at gmail dot com

Description:

On of my co-worker experienced, that some of the mysql_pconnect calls are 
returning this error.
The exact same symptoms are described in the manual:
http://php.net/manual/en/function.mysql-pconnect.php#99380
the code which produce this was working fine before migrating to 5.3

Test script:
---
?php
mysql_pconnect();

Expected result:

successful connection every time

Actual result:
--
sometimes we get the PHP warning, and we had to retry the connection






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


Bug #51176 [Com]: Static calling in non-static method behaves like $this-

2011-05-30 Thread david71rj at gmail dot com
Edit report at http://bugs.php.net/bug.php?id=51176edit=1

 ID: 51176
 Comment by: david71rj at gmail dot com
 Reported by:majkl578 at gmail dot com
 Summary:Static calling in non-static method behaves like
 $this-
 Status: Bogus
 Type:   Bug
 Package:Scripting Engine problem
 Operating System:   Irrelevant
 PHP Version:5.3.2RC3
 Assigned To:felipe
 Block user comment: N
 Private report: N

 New Comment:

Sorry by realive this topic, but I really think that it is a bug.



If I want call bar with context, the correct mean is $this-bar().
Else, the 

static sounds for me like call without context. I'm wrong?



Please, read this topic to understand what I'm saying: 

http://stackoverflow.com/questions/6181603/php-is-handling-incorrectly-my-static-

call


Previous Comments:

[2010-11-03 12:03:17] majkl578 at gmail dot com

You cannot call foo::start(), because the method is non-static and
therefore it does not make sense.



Also, self, static and class name are used to call methods statically,
not in a object context.

For calling method bar in object context, I think '$this-' should be
used instead.



Obviously parent should not behave this way and respect context, but I
think it should be the only exception (as shown in #52713).


[2010-11-03 02:45:23] fel...@php.net

Hello, I've reverted the wrong changes introduced by trying to fix the
issue reported, but actually there is no bug at all. self::bar(),
static::bar() and foo::bar() are being called in an object context,
hence the __call() is called.



I.e.

$foo-start(); // invoke the __call method

foo::start(); // invoke the __callStatic method



Thanks.


[2010-11-03 02:35:28] fel...@php.net

Automatic comment from SVN on behalf of felipe
Revision: http://svn.php.net/viewvc/?view=revisionamp;revision=305043
Log: - Reverted fix for bug #51176


[2010-03-04 14:27:55] fel...@php.net

Hello!

This isn't my decision, but the release manager.



Thanks.


[2010-03-04 12:33:59] majkl578 at gmail dot com

Can you explain me, please, why this is not fixed in 5.3.2 stable?



Thank you for the report, and for helping us make PHP better.

You are intentionally making PHP worse!




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/bug.php?id=51176


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


[PHP-BUG] Req #53896 [NEW]: return/break types if

2011-01-31 Thread david71rj at gmail dot com
From: 
Operating system: All
PHP version:  5.3.5
Package:  Scripting Engine problem
Bug Type: Feature/Change Request
Bug description:return/break types if

Description:

It's a simple feature that PHP can have, if just substitute if+return, for


instance to return+if. It's, change to one-line script.



See test script and read more...



Well, sometimes we need to break function, or while, or foreach, or maybe
force 

continue case somethink occur, a condition.



My idea is make this more readable, in an one line script.



Instead of:

if($a  $b) return;



We do:

return if $a  $b;



Or:

return if($a  $b);



Maybe only accept a boolean on return:

return $a  $b;



Then:

return true; // do return

return false; // not do



Same to continue:

for($i=0; $i10; $i++){

  continue $i === 5;

  echo $i . \n;

}



It's a valid idea? ^o)

Bye.

Test script:
---
http://pastebin.com/fEB8eGxf


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



[PHP-BUG] Req #52129 [NEW]: Easy substr/array_splice method

2010-06-20 Thread david71rj at gmail dot com
From: 
Operating system: *
PHP version:  5.3.2
Package:  Strings related
Bug Type: Feature/Change Request
Bug description:Easy substr/array_splice method

Description:

In python exists a easy method for substr, and I suggest this for PHP. I
think 

that not will do incompatible nothing because is a new method.



$test = Hello;

echo $test[0]; // Exists: H

echo $test[0, 1; // New: H (too)

echo $test[-1]; // New: o

echo $test[-3]; // New: llo



$test = array(0, 1, 2);

echo $test[0]; // 0

echo $test[0, 2]; // array(0, 1, 2)



In python is [x:y], but in PHP I thinkg think that is better ',' to don't 

complicate.



Bye.


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



[PHP-BUG] Req #51554 [NEW]: Identifies if a call is static ou 'objective'

2010-04-13 Thread david71rj at gmail dot com
From: 
Operating system: 
PHP version:  Irrelevant
Package:  Class/Object related
Bug Type: Feature/Change Request
Bug description:Identifies if a call is static ou 'objective'

Description:

If a call a method as static, how I can test if is a static call or
objective?



Well, I think about is_static_call(), example:



class A {

  public function test(){

if(is_static_call()){

  echo 'Static method';

}

else {

  echo 'Objective method';

}

  }

}



A::test(); // Static method

$a = new A;

$a-test(); // Objective method



Currently I use a 'workarround' for this problem:



if($this  get_class($this) === get_class()){

  // Objective method

}



This is my sugestion.

Bye.


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



Req #51469 [Com]: why not Inner Classes?

2010-04-13 Thread david71rj at gmail dot com
Edit report at http://bugs.php.net/bug.php?id=51469edit=1

 ID:   51469
 Comment by:   david71rj at gmail dot com
 Reported by:  giorgio dot liscio at email dot it
 Summary:  why not Inner Classes?
 Status:   Open
 Type: Feature/Change Request
 Package:  Class/Object related
 Operating System: irrelevant
 PHP Version:  5.3.2

 New Comment:

You can use namespaces from PHP 5.3, is basically this. See doc.


Previous Comments:

[2010-04-03 07:55:22] giorgio dot liscio at email dot it

Description:

hi, some object oriented architectures requires inner classes

i'm not good with english language so i write some examples:



in a library like PDO, now we can do some like this:



class Database

{

public function prepareSql($sql){ return new Sql($sql)}

}



class Sql

{

public function setValue($search, $replace){}

public function executeQuery(){return new ExecutedQuery();}

}



class ExecutedQuery

{

function fetch()

function numRows()

// etc

}



this api allows the developer to instantiate an ExecutedQuery with no
Sql parameters escaping (class Sql)



so inner classes are useful to make visible classes in some trusted
environment:



class Database

{

public function prepareSql($sql){ return new Sql($sql)}



class Sql

{

public function setValue($search, $replace){}

public function executeQuery(){return new ExecutedQuery();}

class ExecutedQuery

{

function fetch()

function numRows()

// etc

}

}

}



i've read a lot of rfc on php's wiki but no one talks about inner
classes (useful like traits and others new work in progress features)



what do you think about this?







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


Bug #51524 [Com]: Class static method confusion

2010-04-12 Thread david71rj at gmail dot com
Edit report at http://bugs.php.net/bug.php?id=51524edit=1

 ID:   51524
 Comment by:   david71rj at gmail dot com
 Reported by:  david71rj at gmail dot com
 Summary:  Class static method confusion
 Status:   Bogus
 Type: Bug
 Package:  Scripting Engine problem
 Operating System: Windows 7/64
 PHP Version:  5.3.2

 New Comment:

But how this not is a bug?



What I don't understand is: if I call a method as static, $this cannot
exists, one 

time that $this, for me is 'object of same class' and not 'object of any
class'.



As example, how useful it (use $this as secondary object) can be?



Bye.


Previous Comments:

[2010-04-12 11:48:46] paj...@php.net

My comment was supposed to land in #51527, this one is obviously not a
bug (bogus).


[2010-04-10 19:27:14] david71rj at gmail dot com

Not make sense, a call static is call static, don't can exist $this. In


counterpart, if the user need pass a object reference, he must be to
specific 

how a parameter.



public function x($object = null){

  if($object

   get_class($object) == 'B') {

// Now make sense, but not is $this

  }

}



Bye.


[2010-04-10 18:06:02] paj...@php.net

Not sure you can simply bogus it because that's the way php4 works :)



Should we not fix it in trunk instead? Or at least leave that request
open until we have a decision.


[2010-04-10 17:49:31] johan...@php.net

If a static method is called from an object context the callers $this is
sent. This i due to compatibility with the way PHP 4 worked.


[2010-04-10 03:37:23] david71rj at gmail dot com

Description:

If I use public method as static in a method of a second function, this
send $this 

from second class, don't of the first.

Test script:
---
http://codepad.org/8hW4Qtbo

Expected result:

array

  0 = string 'static' (length=6)

  1 = int 1

array

  0 = string 'object' (length=6)

  1 = 

object(test)[2]

  2 = int 1

array

  0 = string 'static' (length=6)

  1 = int 1

array

  0 = string 'object' (length=6)

  1 = 

object(test)[3]  OKAY

  2 = int 1

Actual result:
--
array

  0 = string 'static' (length=6)

  1 = int 1

array

  0 = string 'object' (length=6)

  1 = 

object(test)[2]

  2 = int 1

array

  0 = string 'static' (length=6)

  1 = int 1

array

  0 = string 'object' (length=6)

  1 = 

object(test2)[3]  WHY test2 IF DON'T?

  2 = int 1






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


Bug #51524 [Com]: Class static method confusion

2010-04-10 Thread david71rj at gmail dot com
Edit report at http://bugs.php.net/bug.php?id=51524edit=1

 ID:   51524
 Comment by:   david71rj at gmail dot com
 Reported by:  david71rj at gmail dot com
 Summary:  Class static method confusion
 Status:   Open
 Type: Bug
 Package:  Scripting Engine problem
 Operating System: Windows 7/64
 PHP Version:  5.3.2

 New Comment:

Not make sense, a call static is call static, don't can exist $this. In


counterpart, if the user need pass a object reference, he must be to
specific 

how a parameter.



public function x($object = null){

  if($object

   get_class($object) == 'B') {

// Now make sense, but not is $this

  }

}



Bye.


Previous Comments:

[2010-04-10 18:06:02] paj...@php.net

Not sure you can simply bogus it because that's the way php4 works :)



Should we not fix it in trunk instead? Or at least leave that request
open until we have a decision.


[2010-04-10 17:49:31] johan...@php.net

If a static method is called from an object context the callers $this is
sent. This i due to compatibility with the way PHP 4 worked.


[2010-04-10 03:37:23] david71rj at gmail dot com

Description:

If I use public method as static in a method of a second function, this
send $this 

from second class, don't of the first.

Test script:
---
http://codepad.org/8hW4Qtbo

Expected result:

array

  0 = string 'static' (length=6)

  1 = int 1

array

  0 = string 'object' (length=6)

  1 = 

object(test)[2]

  2 = int 1

array

  0 = string 'static' (length=6)

  1 = int 1

array

  0 = string 'object' (length=6)

  1 = 

object(test)[3]  OKAY

  2 = int 1

Actual result:
--
array

  0 = string 'static' (length=6)

  1 = int 1

array

  0 = string 'object' (length=6)

  1 = 

object(test)[2]

  2 = int 1

array

  0 = string 'static' (length=6)

  1 = int 1

array

  0 = string 'object' (length=6)

  1 = 

object(test2)[3]  WHY test2 IF DON'T?

  2 = int 1






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


[PHP-BUG] Bug #51524 [NEW]: Class static method confusion

2010-04-09 Thread david71rj at gmail dot com
From: 
Operating system: Windows 7/64
PHP version:  5.3.2
Package:  Scripting Engine problem
Bug Type: Bug
Bug description:Class static method confusion

Description:

If I use public method as static in a method of a second function, this
send $this 

from second class, don't of the first.

Test script:
---
http://codepad.org/8hW4Qtbo

Expected result:

array

  0 = string 'static' (length=6)

  1 = int 1

array

  0 = string 'object' (length=6)

  1 = 

object(test)[2]

  2 = int 1

array

  0 = string 'static' (length=6)

  1 = int 1

array

  0 = string 'object' (length=6)

  1 = 

object(test)[3]  OKAY

  2 = int 1

Actual result:
--
array

  0 = string 'static' (length=6)

  1 = int 1

array

  0 = string 'object' (length=6)

  1 = 

object(test)[2]

  2 = int 1

array

  0 = string 'static' (length=6)

  1 = int 1

array

  0 = string 'object' (length=6)

  1 = 

object(test2)[3]  WHY test2 IF DON'T?

  2 = int 1

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



#45362 [NEW]: High! Direct access to Apache folder

2008-06-25 Thread david71rj at gmail dot com
From: david71rj at gmail dot com
Operating system: Windows Vista SP1
PHP version:  5.2.6
PHP Bug Type: Directory function related
Bug description:  High! Direct access to Apache folder

Description:

- See Reproduce code -

Reproduce code:
---
class Name
{
 function __descruct()
 {
  $this-Save();
 }

 function Save()
 {
  echo realpath(./);
 }
}

echo realpath(./).\n;
$test = new Name();

Expected result:

C:/project/test
C:/wampserver/bin/apache/apache2.2.8 -- (o.O)

Actual result:
--
C:/project/test
C:/project/test

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



#45362 [Com]: High! Direct access to Apache folder

2008-06-25 Thread david71rj at gmail dot com
 ID:   45362
 Comment by:   david71rj at gmail dot com
 Reported By:  david71rj at gmail dot com
 Status:   Open
 Bug Type: Directory function related
 Operating System: Windows Vista SP1
 PHP Version:  5.2.6
 New Comment:

The bug occur only if you don't unset variable-class ($test).
If use unset($test) work perfectly.

But, I still feel a bug.
It can be very serious.


Previous Comments:


[2008-06-26 03:48:31] david71rj at gmaill dot com

Too works with:

class Name
{
 function __destruct()
 {
  echo realpath(./);
 }
}

Don't is needly call a function.



[2008-06-26 03:43:56] david71rj at gmail dot com

Description:

- See Reproduce code -

Reproduce code:
---
class Name
{
 function __descruct()
 {
  $this-Save();
 }

 function Save()
 {
  echo realpath(./);
 }
}

echo realpath(./).\n;
$test = new Name();

Expected result:

C:/project/test
C:/wampserver/bin/apache/apache2.2.8 -- (o.O)

Actual result:
--
C:/project/test
C:/project/test





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



#45362 [Opn-Csd]: High! Direct access to Apache folder

2008-06-25 Thread david71rj at gmail dot com
 ID:   45362
 User updated by:  david71rj at gmail dot com
 Reported By:  david71rj at gmail dot com
-Status:   Open
+Status:   Closed
 Bug Type: Directory function related
 Operating System: Windows Vista SP1
 PHP Version:  5.2.6
 New Comment:

-Don't disponible to public-


Previous Comments:


[2008-06-26 03:54:19] david71rj at gmail dot com

The bug occur only if you don't unset variable-class ($test).
If use unset($test) work perfectly.

But, I still feel a bug.
It can be very serious.



[2008-06-26 03:48:31] david71rj at gmaill dot com

Too works with:

class Name
{
 function __destruct()
 {
  echo realpath(./);
 }
}

Don't is needly call a function.



[2008-06-26 03:43:56] david71rj at gmail dot com

Description:

- See Reproduce code -

Reproduce code:
---
class Name
{
 function __descruct()
 {
  $this-Save();
 }

 function Save()
 {
  echo realpath(./);
 }
}

echo realpath(./).\n;
$test = new Name();

Expected result:

C:/project/test
C:/wampserver/bin/apache/apache2.2.8 -- (o.O)

Actual result:
--
C:/project/test
C:/project/test





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



#45362 [Csd-Bgs]: Apache folder

2008-06-25 Thread david71rj at gmail dot com
 ID:   45362
 User updated by:  david71rj at gmail dot com
-Summary:  High! Direct access to Apache folder
 Reported By:  david71rj at gmail dot com
-Status:   Closed
+Status:   Bogus
 Bug Type: Directory function related
 Operating System: Windows Vista SP1
 PHP Version:  5.2.6
 New Comment:

My fault. Bad configuration.


Previous Comments:


[2008-06-26 04:00:47] david71rj at gmail dot com

-Don't disponible to public-



[2008-06-26 03:54:19] david71rj at gmail dot com

The bug occur only if you don't unset variable-class ($test).
If use unset($test) work perfectly.

But, I still feel a bug.
It can be very serious.



[2008-06-26 03:48:31] david71rj at gmaill dot com

Too works with:

class Name
{
 function __destruct()
 {
  echo realpath(./);
 }
}

Don't is needly call a function.



[2008-06-26 03:43:56] david71rj at gmail dot com

Description:

- See Reproduce code -

Reproduce code:
---
class Name
{
 function __descruct()
 {
  $this-Save();
 }

 function Save()
 {
  echo realpath(./);
 }
}

echo realpath(./).\n;
$test = new Name();

Expected result:

C:/project/test
C:/wampserver/bin/apache/apache2.2.8 -- (o.O)

Actual result:
--
C:/project/test
C:/project/test





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