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!
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
Max Ungless
8,838 PointsSublime 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
28,688 PointsIs 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.
Max Ungless
8,838 PointsMax Ungless
8,838 PointsWell 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
28,688 PointsSean T. Unwin
28,688 PointsIf 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.
Max Ungless
8,838 PointsMax Ungless
8,838 PointsYes, I am using Xampp to run my server. I will also try that!
Max Ungless
8,838 PointsMax Ungless
8,838 PointsThanks you SOOOOO much!! I fixed it by disabling a package!! Thanks!!
Sean T. Unwin
28,688 PointsSean T. Unwin
28,688 Points:-)