Mombu the Php Forum sponsored links

Go Back   Mombu the Php Forum > Php > #29690 : pathinfo() reports wrong directory name
User Name
Password
REGISTER NOW! Mark Forums Read

sponsored links


Reply
 
1 31st July 10:53
php-bugs
External User
 
Posts: 1
Default #29690 : pathinfo() reports wrong directory name



From: ressourceweb at hotmail dot com
Operating system: Windows XP Home Edition
PHP version: 5.0.0
PHP Bug Type: Apache2 related
Bug description: pathinfo() reports wrong directory name

Description:
------------
Steps to reproduce the problem :
- Apache HTTPd Server 2.0.50
- PHP 5.0.0
- MultiViews ENABLED

Trying to use the pathinfo($SCRIPT_FILENAME); command on a script called
using double slashes in the URL (like
http://localhost/php/test/pathinfo/argument/http//url) will return wrong
directory information

Reproduce code:
---------------
<?php
/*
* File name : pathinfo.php
* Directory : /php/test/
* Script filename : /php/test/pathinfo.php
* Called in browser the following way :
* http://localhost/php/test/pathinfo/argument/http//url
*/

$pathdata=pathinfo($SCRIPT_FILENAME);
echo $pathdata["dirname"];
?>

Expected result:
----------------
/php/test/

Actual result:
--------------
/php/test/argument/http//

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


  sponsored links


2 31st July 20:44
php-bugs
External User
 
Posts: 1
Default #29690 : pathinfo() reports wrong directory name



ID: 29690
User updated by: ressourceweb at hotmail dot com
Reported By: ressourceweb at hotmail dot com
Status: Open
Bug Type: Apache2 related
Operating System: Windows XP Home Edition
PHP Version: 5.0.0
New Comment:

First of all, my bug report example should have been
<?php
$pathdata=pathinfo($SCRIPT_NAME);
echo $pathdata["dirname"];
?>
instead of
<?php
$pathdata=pathinfo($SCRIPT_FILENAME);
echo $pathdata["dirname"];
?>

also, i noticed that the pathinfo() function behaves correctly. it is
the variable SCRIPT_NAME that contains wrong information


Previous Comments:
------------------------------------------------------------------------

[2004-08-15 22:54:23] ressourceweb at hotmail dot com

Description:
------------
Steps to reproduce the problem :
- Apache HTTPd Server 2.0.50
- PHP 5.0.0
- MultiViews ENABLED

Trying to use the pathinfo($SCRIPT_FILENAME); command on a script
called using double slashes in the URL (like
http://localhost/php/test/pathinfo/argument/http//url) will return
wrong directory information

Reproduce code:
---------------
<?php
/*
* File name : pathinfo.php
* Directory : /php/test/
* Script filename : /php/test/pathinfo.php
* Called in browser the following way :
* http://localhost/php/test/pathinfo/argument/http//url
*/

$pathdata=pathinfo($SCRIPT_FILENAME);
echo $pathdata["dirname"];
?>

Expected result:
----------------
/php/test/

Actual result:
--------------
/php/test/argument/http//


------------------------------------------------------------------------


--
Edit this bug report at http://bugs.php.net/?id=29690&edit=1
  Reply With Quote
3 19th August 02:18
External User
 
Posts: 1
Default #29690 : pathinfo() reports wrong directory name


ID: 29690
Updated by: jorton@php.net
Reported By: ressourceweb at hotmail dot com
-Status: Open
+Status: Bogus
Bug Type: Apache2 related
Operating System: Windows XP Home Edition
PHP Version: 5.0.0
New Comment:

This is not a PHP issue, see:
http://issues.apache.org/bugzilla/show_bug.cgi?id=10775


Previous Comments:
------------------------------------------------------------------------

[2004-08-16 17:09:05] ressourceweb at hotmail dot com

First of all, my bug report example should have been
<?php
$pathdata=pathinfo($SCRIPT_NAME);
echo $pathdata["dirname"];
?>
instead of
<?php
$pathdata=pathinfo($SCRIPT_FILENAME);
echo $pathdata["dirname"];
?>

also, i noticed that the pathinfo() function behaves correctly. it is
the variable SCRIPT_NAME that contains wrong information

------------------------------------------------------------------------

[2004-08-15 22:54:23] ressourceweb at hotmail dot com

Description:
------------
Steps to reproduce the problem :
- Apache HTTPd Server 2.0.50
- PHP 5.0.0
- MultiViews ENABLED

Trying to use the pathinfo($SCRIPT_FILENAME); command on a script
called using double slashes in the URL (like
http://localhost/php/test/pathinfo/argument/http//url) will return
wrong directory information

Reproduce code:
---------------
<?php
/*
* File name : pathinfo.php
* Directory : /php/test/
* Script filename : /php/test/pathinfo.php
* Called in browser the following way :
* http://localhost/php/test/pathinfo/argument/http//url
*/

$pathdata=pathinfo($SCRIPT_FILENAME);
echo $pathdata["dirname"];
?>

Expected result:
----------------
/php/test/

Actual result:
--------------
/php/test/argument/http//


------------------------------------------------------------------------


--
Edit this bug report at http://bugs.php.net/?id=29690&edit=1
  Reply With Quote


  sponsored links


Reply


Thread Tools
Display Modes




Copyright © 2006 SmartyDevil.com - Dies Mies Jeschet Boenedoesef Douvema Enitemaus -
666