Search code examples
sublimetext3sublimelinter

Windows 10 sublimelinter-php


I just upgraded to windows 10 and I cannot get my sublimelinter-php. I have sublimelinter-css and sublimelinter-jshist working fine.

My php file is located in. C:\xampp\php\php.exe

My paths look like this atm:

        "paths": {
        "linux": [],
        "osx": [],
        "windows": [
            "C:\\xampp\\php\\"
        ]
    },

I have tried using the path C:/xampp/php/

I have checked that sublimelinter-php is enabled.

I have succesfully been able to use the path C:\\xampp\\php\\ on my Windows 7 laptop, but can't seem to figure out what I am doing wrong now on my Windows 10 version. Any help would be much appreciated.


Solution

  • I ended up finding the solution by taking a different approach, but before that try running Sublime as admin.

    I added the file path C:\xampp\php to my computers PATH environment variable.

    This is done by:
    1) Going to your PC's Control Panel.
    2) Select System.
    3) Select Advanced system settings.
    4) From System Properties, select Environment Variables.
    5) Under System Variables find the variable Path. Select it and click edit.
    6) At the end of the Variable Value add your PHP's path location. In my case it was C:\xampp\php. All paths are separated by a ; so be sure to add one, if there isn't already, followed by your PHP's file path.
    7) Restart your Sublime Text editor and your sublimelinter-php should be working.

    Hopefully that might help someone in the future.