Just playing with Laravel 4 for the first time after using version 3 for a few projects but can't seem to get Artisan to work at all. I've done a bunch of searching and followed the troubleshooting steps I could find but no luck.
When I try "composer update" I get this error:
Script php artisan optimize handling the post-update-cmd event returned with an error:
...with no extra information.
Trying to run "php artisan list" or any other artisan command just gives me no output at all.
Any ideas?
To summarise the discussion in the comments, we discovered that adding logging at the php.ini
level revealed a PHP error that was not reported by the Composer console interface. I wonder whether you had installed Composer as root, and so some critical files required by Laravel were effectively invisible for a non-privileged user.
After running phpinfo, I noticed "--disable-mbregex" was part of the PHP configuration, meaning PHP was not compiled with the mbregex extension. My error logs were showing "Call to undefined function mb_regex_encoding".
Once PHP was recompiled with mb_regex_encoding, the issue went away.
If you are missing the /bootstrap/start.php file, you don't get helpful error messages from artisan and composer responds the same way. I went around and around trying solutions I found online and ultimately discovered this file was missing. I was back online as soon as I replaced it. I discovered this file was missing in my PHP error logs and artisan wasn't generating logs since it was unable to run.
I had a similar problem. Even the command $ php artisan --verson
would not produce any output. Turned out, I had some code under app/start/global.php
which was breaking under the CLI execution (but not breaking on the web side).
So that's another place to check for stuff! ( app/start/global.php
)
I was getting this problem, and it was because the subdirectories of storage
did not yet exist.
Of course, these directories are created by the project-creating script, but they're quite easy to leave out of source control and so will be missing on a freshly cloned project. The .gitignore
files are in there for a reason it would seem!
This problem occurred for me when there were files in the storage
folder that were not writable for the current user. php artisan
silently failed, without output. Changing permissions helped.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.