php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #24318 basename failing on UNC paths
Submitted: 2003-06-24 12:32 UTC Modified: 2003-06-26 12:24 UTC
From: axelr3 at btinternet dot com Assigned:
Status: Not a bug Package: Filesystem function related
PHP Version: 4.3.2 OS: Windows 2k
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: axelr3 at btinternet dot com
New email:
PHP Version: OS:

 

 [2003-06-24 12:32 UTC] axelr3 at btinternet dot com
Description:
------------
All running on Windows 2k with Apache 1.3.27 where DocumentRoot in Apache configuration was set to '//w2kserver/data/website/root'

<?php
  $file = basename(__FILE__);
  echo $file;
?>

$file was being set to '\\w2kserver\data\website\root\test.php'

Mapped the drive to N: so it now looks like 'n:/website/root' and update the Apache config and $file is now 'test.php'




Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2003-06-26 12:02 UTC] sniper@php.net
\ is the real directory separator in windows. Not bug.
(And apache config has nothing to do with this)


 [2003-06-26 12:24 UTC] axelr3 at btinternet dot com
I realise Apache has nothing to do with it, I was just trying to give as much helpful information as I could.

Unfortunately, Apache will not accept \ as the directory separator (I've tried) and I had to use /.

Also, the PHP documentation for basename states that both slash (/) and backslash (\) are used as path separator character.
 
PHP Copyright © 2001-2020 The PHP Group
All rights reserved.
Last updated: Sat Jul 04 15:01:26 2020 UTC