#36529 [NEW]: ob_start with getcwd() problem
| From: | lunter at interia dot pl | Date: | Sat, 25 Feb 2006 19:41:34 +0000 |
| Subject: | #36529 [NEW]: ob_start with getcwd() problem | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-93666@lists.php.net to get a copy of this message | ||
From: lunter at interia dot pl
Operating system: winXP
PHP version: 5.1.2
PHP Bug Type: Output Control
Bug description: ob_start with getcwd() problem
Description:
------------
One script but two value from getcwd()
Reproduce code:
---------------
Note that both script are placed in dir:
C:\Apache2\htdocs\script
// index1.php (script with bug):
<?
function a($i){
$i.='func getcwd(): '.getcwd();
return($i);
}
ob_start('a');
print('main getcwd(): '.getcwd().'<br>');
?>
// index2.php (to clarificate):
<?
function a($i){
print('func getcwd(): '.getcwd());
return($i);
}
print('main getcwd(): '.getcwd().'<br>');
$a=array('');
$a=array_map('a',$a);
?>
Expected result:
----------------
// index1.php return:
main getcwd(): C:\Apache2\htdocs\script
func getcwd(): C:\Apache2\htdocs\script
// index2.php return:
main getcwd(): C:\Apache2\htdocs\script
func getcwd(): C:\Apache2\htdocs\script
Actual result:
--------------
// index1.php return:
main getcwd(): C:\Apache2\htdocs\script
func getcwd(): C:\Apache2
// index2.php return:
main getcwd(): C:\Apache2\htdocs\script
func getcwd(): C:\Apache2\htdocs\script
--
Edit bug report at http://bugs.php.net/?id=36529&edit=1
--
Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=36529&r=trysnapshot44
Try a CVS snapshot (PHP 5.1): http://bugs.php.net/fix.php?id=36529&r=trysnapshot51
Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=36529&r=trysnapshot60
Fixed in CVS: http://bugs.php.net/fix.php?id=36529&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=36529&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=36529&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=36529&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=36529&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=36529&r=support
Expected behavior: http://bugs.php.net/fix.php?id=36529&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=36529&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=36529&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=36529&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=36529&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=36529&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=36529&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=36529&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=36529&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=36529&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=36529&r=mysqlcfg