-2

Only php path is not enough.......... Sublime Text3 error:PHP Screenshot

How can solve this problem?

Bapy
  • 111
  • 1
  • 5
  • Search this site for what you wrote as a title, without the *sublime text error*. There are many existing questions (and answers) that provide a solution. – Ken White Mar 28 '17 at 19:03
  • thanks, but I can't find this in detail! – Bapy Mar 28 '17 at 21:26
  • 1
    Possible duplicate of ['"php.exe"' is not recognized as an internal or external command, operable program or batch file](http://stackoverflow.com/questions/18781997/php-exe-is-not-recognized-as-an-internal-or-external-command-operable-progr) Strange how I found one in less than 3 minutes. – Ken White Mar 28 '17 at 21:29
  • thank u I solved this. It's similar to "http://www.php.net/manual/en/faq.installation.php#faq.installation.addtopath" – Bapy Mar 28 '17 at 21:38

3 Answers3

8

To add php & Sublime to the PATH: 1. Right click Computer -> Properties -> Advanced System Settings -> Environment Variable; 2. Under 'System Variables' select variable: Path and hit 'Edit'; 3. At the 'Edit environment variable' hit 'New'; 4. hit 'Browse'; 5. find PHP folder (for me it was "H:\xampp\php") & add (hit 'Ok'); 6. Go rule no.3 and no.4 add 'Sublime Text 3'(for me it was "C:\Program Files\Sublime Text 3") 4. OK, OK, OK

It's work also for CMD. Blockquote Thanks

Bapy
  • 111
  • 1
  • 5
3

I fixed this problem by disabling the PHP syntax checker plugin in sublimetext. CTRL + SHIFT + P >> package control disable package >> php syntax checker.

Rheo
  • 165
  • 1
  • 2
  • 11
0

Add PHP and Sublime Text to Path under system variables

Go to properties of Computer(ThisPC/MyComputer) whatever the name is in your case. All the steps BAPY has mentioned follow those but for some there might be somthing in the path added already, Just make sure you separate multiple PATHS with a semicolon ;. You are good to go then. It will work.

Wahab Shah
  • 2,066
  • 1
  • 14
  • 19