Open ablankenship10 opened 11 years ago
I am experiencing same problem. But it used to work for me before.
what is php_path set as? Is the project you're working on, the first project (the topmost on the sidebar)?
I've tried just 'php' (its in my windows path), ive done 'D:\Program Files\wamp\bin\php\php5.4.3', the same thing with double \, both of those with php.exe on the end. Everything that should work.
The project I'm working in is the last project. I would hope its smart enough to know which project I want to be working in based on the file thats open and focused.
The full path (with php.exe) in the end should go in the php_path
And the project you're working on should be the first one (a limitation). This is because sublime text's API returns a list of project paths and the plugin selects the first project. To judge the laravel root folder from the file path isn't implemented. I thought about iterating over the project path list and select the one which matches the most but it's more of a workaround. For now, I hope the users can move the laravel folder to the top and use multiple windows if working on more than one project.
I'm getting this error:
Traceback (most recent call last): File ".\generate.py", line 51, in call_artisan File ".\subprocess.py", line 633, in __init__ File ".\subprocess.py", line 842, in _execute_child WindowsError: [Error 5] Access denied
I had set the full path to my PHP exec.
{ "php_path": "C:\xampp\php\php.exe" }
UPDATE: I ran ST2 as Administrator and work.
I have the same behaviour, with Windows 7 x64, also tried to run ST2 as administrator but nothing changed, that's my error log:
Traceback (most recent call last):
File ".\generate.py", line 51, in call_artisan
File ".\subprocess.py", line 633, in __init__
File ".\subprocess.py", line 842, in _execute_child
WindowsError: [Error 2] Unable to find the specified file
I am experiencing same problem. :(
@carlosalan you must set your path including php.exe, like this:
{
"php_path": "C:\\xampp\\php\\php.exe"
}
I also get the 'Acces denied" error while using generate in Sublime. "php_path": "C:\wamp\bin\php\php5.4.3\php.exe" Generate works in command line. The project is the first one.
--------> Solution: I always open Sublime from cmd. This is/was the problem! Because cmd is by default opend as a user, and not an admin, you will get 'acces denied' . Open cmd with admin-rights, and it will work (if you use the cmd line like me).
You can change the command line.exe in start->accessoires->right click , there you can set that you always want to open cmd with admin-rights.
Hmmm I still can't get it to work from sublime text, I'm still getting the error: Traceback (most recent call last): File ".\generate.py", line 51, in call_artisan File ".\subprocess.py", line 633, in init File ".\subprocess.py", line 842, in _execute_child WindowsError: [Error 5] Acceso denegado (access denied)
I'm running sublime text as admin and this is my path:
{ "php_path": "C:/wamp/bin/php/php5.4.3/php.exe" }
can anyone give me a hand to get this working please? :)
try this "C:\\wamp\\bin\\php\\php5.4.3\\php.exe"
@biker, thank you but it still isn't working... same error access denied, as if I didn't have admin permissions even tho I'm executing sublime as administrator.
In case you're still struggling, for me it works fine when setting it to just "php", and adding the php/bin directory to your Path environment variable. The plugin adds whatever you put there before "artisan" and then executes that command it seems.
@ingro
You have "Error 2" it's not related to access rights at all. What you need to do is to open Sublime Text 2, go to Preferences -> Browse Packages, and then find "Laravel Generator" folder. Here you can find "laravelgenerator.sublime-settings" file which you need to edit with exact path of your php.exe.
I'm using "Wamp Server" and I have my php.exe under "c:\wamp\bin\php\php5.4.3" folder, so, need to make it look like this:
{ "php_path": "c:\wamp\bin\php\php5.4.3\php.exe" }
Hope you will solve your problem this way, as I just did.
Yeah it just takes that string and uses it directly on the command line. Therefore, if you have php.exe in your Path variable (try running php -v in cmd to see if it is), just putting in "php" will do the job already, it's not necessary to put in the full path.
@xIIIm Thanks, it's working now!
Running any Laravel command gives the following errors in Sublime's console:
I've tried every possible format of escaped php_paths and what not, installed Python just to try that. The error isn't telling me what file is missing, at this point I'm assuming its artisan, but artisan is in the root of the project so the only thing I can think of is it's not detecting which project I'm working in or something. Any solutions to this?