Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial


Sublime Text 2: PHP Saving errror

Inside Sublime Text 2, whenever I save my .php file and Sublime gives me this error:

Execute error 'php' is not recognized as an internal or external command, operatable program or batch file.

In case you need to know, I am running Windows 8.1 and do have the full version of Sublime Text 2.

Thanks, Max

1 Answer

Sean T. Unwin
Sean T. Unwin
28,690 Points

Is php in your PATH? It sounds like you have a PHP Linting or similar plugin that is trying to run php from the command line when you save the file.

Well PHP is not yet installed in my PATH, but if you could provide a link to where I can download PHP to add it to my PATH I will try.

Sean T. Unwin
Sean T. Unwin
28,690 Points

If you have a server installed with a package such as Xampp you will have PHP installed.

To test if PHP is in your PATH open a terminal and type (Windows O/S only): where php

First, I suggest you see what plugins for Sublime you have installed and disable any that have to do with PHP then see if you can save the file without issues.

Yes, I am using Xampp to run my server. I will also try that!

Thanks you SOOOOO much!! I fixed it by disabling a package!! Thanks!!