ID: 19706
Comment by: [email protected]
Reported By: [email protected]
Summary: Incorrect file doesn't exist error on mapped network
drives
Status: Open
Type: Bug
Package: PHP_CodeSniffer
Operating System: Windows
Package Version: 1.4.2
PHP Version: 5.4.3
Roadmap Versions:
New Comment:
Can not reproduce this bug. Maybe we should close this old issue.
(Looks like a permission problem - not like a php / phpcs problem).
@Reporter: If you do not agree please provide more details.
windows version, service pack, OS update level, UAC on/off?, personal
firewall version/settings, virus scanner version/settings, PHPCS
version, network share on a windows host or on a unix with samba, samba
version, permissions on server, permissions on windows, user that
executes php/phpcs
Previous Comments:
------------------------------------------------------------------------
[2013-01-10 13:34:32] niko2342
i can reproduce the issue. i figured out that the exception is thrown in
File.php (detectLineEndings) if the file is not readable. but, i have
read and write access to the file. if i add read access to all users
(chmod a+r *.php) all works fine.
------------------------------------------------------------------------
[2012-11-15 10:45:46] dprevite
Description:
------------
phpcs does not work when run against a network path that has
been mapped to a drive letter on Windows.
phpcs says the file doesn't exist, even when it does.
Test script:
---------------
C:\wamp\bin\php\php5.4.3>phpcs w:\test.php
(fails)
type w:\test.php
(displays contents of the test script)
Actual result:
--------------
C:\wamp\bin\php\php5.4.3>phpcs w:\test.php
FILE: W:\test.php
------------------------------------------------------------------------
--------
FOUND 0 ERROR(S) AND 2 WARNING(S) AFFECTING 1 LINE(S)
------------------------------------------------------------------------
--------
1 | WARNING | Error opening file; file no longer exists or you
do not have
access to read the file
open tags are not
allowed by this install of PHP. This file may be using
open tags but PHP does not allow them.
--------
Time: 0 seconds, Memory: 3.00Mb
------------------------------------------------------------------------