welovewordpress / SublimePhpTidy

Plugin for Sublime Text 2 to format PHP code to meet the WordPress Coding Standards using a modified version of phptidy
GNU General Public License v2.0
109 stars 30 forks source link

Install Tip for WAMP, XAMP users #31

Open r-kevin opened 10 years ago

r-kevin commented 10 years ago

You need to set the PATH oh php.exe in your Windows Environment Variables to allow SublimePhpTidy to work.

If in the Sublime console (view>view console) you see a : PhpTidy: calling php.exe -v returned: 1 PATH had not been written.

Update your PATH variable fowwlong the php faq there : http://php.net/manual/en/faq.installation.php#faq.installation.addtopath

How do I add my PHP directory to the PATH on Windows?
On Windows NT+ and Windows Server 2000+:
    Go to Control Panel and open the System icon (Start -> Settings -> Control Panel -> System, or just Start -> Control Panel -> System for Windows XP/2003+)
    Go to the Advanced tab
    Click on the 'Environment Variables' button
    Look into the 'System Variables' pane
    Find the Path entry (you may need to scroll to find it)
    Double click on the Path entry
    Enter your PHP directory at the end, including ';' before (e.g. ";C:\php")
    Press OK
On Windows 98/Me you need to edit the autoexec.bat file:
    Open the Notepad (Start -> Run and enter notepad)
    Open the C:\autoexec.bat file
    Locate the line with PATH=C:\WINDOWS;C:\WINDOWS\COMMAND;..... and add: ";C:\php" to the end of the line
    Save the file and restart your computer
    Note: Be sure to reboot after following the steps above to ensure that the PATH "changes are applied"

Didn't need to reboot for me Launch cmd and see if "php.exe -v" or "php -v" is correctly working. Relaunch Sublime

Its should be OK.