FAQ
Edit report at https://pear.php.net/bugs/bug.php?id=19706&edit=1

  ID: 19706
  Comment by: typo3-community@gmx.de
  Reported By: dprevite@gmail.com
  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
  1 | WARNING | No PHP code was found in this file and short
open tags are not
allowed by this install of PHP. This file may be using
short
open tags but PHP does not allow them.
------------------------------------------------------------------------
--------


Time: 0 seconds, Memory: 3.00Mb

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

Search Discussions

  • Gsherwood at May 7, 2013 at 10:43 pm
    Edit report at https://pear.php.net/bugs/bug.php?id=19706&edit=1

      ID: 19706
      Updated by: gsherwood@squiz.net
      Reported By: dprevite@gmail.com
      Summary: Incorrect file doesn't exist error on mapped network
                         drives
    -Status: Open
    +Status: Feedback
      Type: Bug
      Package: PHP_CodeSniffer
      Operating System: Windows
      Package Version: 1.4.2
      PHP Version: 5.4.3
    -Assigned To:
    +Assigned To: squiz
      Roadmap Versions:
      New Comment:

    -Status: Open
    +Status: Feedback
    -Assigned To:
    +Assigned To: squiz
    I've actually had this report sitting in my inbox for a while because I
    don't currently
    have access to any Windows machines. I need to try and run up the
    correct VM
    configuration to do the testing.

    So thank you Daniela for testing this out and providing feedback. That
    has saved me
    a lot of time.


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

    [2013-05-07 21:21:31] daniela_waranie

    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

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

    [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
      1 | WARNING | No PHP code was found in this file and short
    open tags are not
    allowed by this install of PHP. This file may be using
    short
    open tags but PHP does not allow them.
    ------------------------------------------------------------------------
    --------


    Time: 0 seconds, Memory: 3.00Mb

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

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouppear-bugs @
categoriesphp
postedMay 7, '13 at 7:19p
activeMay 7, '13 at 10:43p
posts2
users2
websitepear.php.net

2 users in discussion

Typo3-Community: 1 post Gsherwood: 1 post

People

Translate

site design / logo © 2022 Grokbase