Bug #19402 [Com]: syntax error when executing phpcs
| From: | AWTrost@gmail.com | Date: | Sat, 12 May 2012 20:19:10 +0000 |
| Subject: | Bug #19402 [Com]: syntax error when executing phpcs | ||
| References: | 1 | Groups: | php.pear.bugs |
| Request: | Send a blank email to pear-bugs+get-8654@lists.php.net to get a copy of this message | ||
Edit report at https://pear.php.net/bugs/bug.php?id=19402&edit=1
ID: 19402
Comment by: AWTrost@gmail.com
Reported By: brandon dot mull at solohealth dot com
Summary: syntax error when executing phpcs
Status: Assigned
Type: Bug
Package: PHP_CodeSniffer
Operating System: Windows 7
Package Version: 1.3.3
PHP Version: 5.3.9
Assigned To: squiz
Roadmap Versions:
New Comment:
I ran the following:
php -n -d include_path="c:\Programs(x86)\PHP\pear"
"c:\Programs(x86)\PHP\phpcs"
-h
and it runs phpcs and gives the same popup error
alert box
----------------------------
title - PHP Error
message - syntax error, unexpected '(' in Unknown on line 9
Previous Comments:
------------------------------------------------------------------------
[2012-05-12 21:16:29] tkli
Can you start phpcs with disabling your php.ini? That is the -n switch,
e.g.:
php -n -d include_path="c:\Programme\PHP\pear" "c:\Programme\PHP\phpcs"
-h
------------------------------------------------------------------------
[2012-05-12 20:50:04] awtrost
this was what my phpcs.bat file had at the beginning of the last line:
F:\Programs(x86)\PHP\php.exe
ran it in a shell and it doesn't cause the same issue.
------------------------------------------------------------------------
[2012-05-12 20:41:37] tkli
Please locate the file phpcs.bat inside the PHP installation folder.
Open it with a text viewer / editor.
There is one line at the end that invokes PHP and PHP_CodeSniffer CLI.
Extract only the PHP command (on front) from it, e.g. this is what I
have with WindowsXP SP3:
"c:\Programme\PHP\.\php.exe"
Open a shell (cmd) and execute it bare. Does this trigger your error as
well?
------------------------------------------------------------------------
[2012-05-12 19:14:30] awtrost
PHP 5.3.8 (cli) (built: Aug 23 2011 11:50:20)
Copyright (c) 1997-2011 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2011 Zend Technologies
Windows 7 Professional Service pack 1
------------------------------------------------------------------------
[2012-05-12 18:48:17] tkli
Which windows and which PHP version are you running?
------------------------------------------------------------------------
The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
http://pear.php.net/bugs/bug.php?id=19402
--
Edit this bug report at https://pear.php.net/bugs/bug.php?id=19402&edit=1