I made one change in my composer.json including Facebook SDK package (http://packagist.org/packages/facebook/php-sdk).
So during the composer update I got this error
$ php artisan optimize
PHP Fatal error: Interface 'SessionHandlerInterface' not found in
/Users/Leandro/www/bootstrap/compiled.php on line 2644
After this, I can't run artisan or composer commands. Always get the same error.
I tried to remove Facebook SDK from composer json but not works.
Some help? Using --no-scripts the command works fine:
composer update --no-scripts
try to do this :
composer dump-autload
composer update
i think this may or may not solve it for you ..
you may need to delete the .json file which can be found on app\storage\meta, not 100% sure but it might work ..
Check out this troubleshooting checklist, sounds like you need to do a php artisan dump-autoload though.
Related
I run php artisan tinker but it didn't work it just show a message like this
c:\xampp\htdocs\app_tpa>php artisan tinker
[ErrorException]
rmdir(C:\Users\KIMUNG~1\AppData\Local\Temp\php-xdg-runtime-dir-fallback-): Directory not empty
I tried to run composer require laravel/tinker, but it doesn't fix my problem
This issue is now resolved as per these github issues:
laravel/tinker#29
bobthecow/psysh#430
The proper solution now is to do composer update
I have installed laravel 5.4 multiple times.
Now I'm trying to install laravel 5.5 using same command And it doesn't work.
composer create-project --prefer-dist laravel/laravel blog dev-develop
It doesn't seem to have any errors on installation, only lot of suggestions.
But no key is generated and no .env file is created.
When I try to make php artisan key:generate
/public_html/blog/.env): failed to open stream: No such file or directory
Got the same problem days a go, the problem was because composer was not updated, solved it updating composer, you can run:
composer self-update
Or you can download the latest version there, then you can create the project again and the .env file will be automatically created.
I have this version
Composer version #package_branch_alias_version# (1.0.0-beta2) 2016-03-27 16:00:34
When I run composer self-update I get
[InvalidArgumentException]
Command "self-update" is not defined.
shell command: cp .env.example .env
If you just want to make current setup work, just try doing the following:
cp .env.example .env
php artisan key:generate
But as suggested by one of the answers here, you should update your composer if you have an old version. To check your installed version, do so with composer -v
This is happening because of your Laravel Installer or Composer version. I have faced the same problem and found following 2 different solutions:
Generally, you can solve with by running composer global update command and then run composer update command from your project directory. This solution basically updates your installer and then your project.
If still, you have this problem, then you need to run composer self-update command first and then run composer update command from your project directory. It will update your composer version and then your project.
Hope this information will help you to fix.
I was create latest laravel project using
composer create-project --prefer-dist laravel/laravel test
After when i run php artisan serv then give me error like:
failed to open stream: No such file or directory in
/var/www/html/test/bootstrap/autoload.php on line 17
After i was run composer dumpauto and solved my problem and after i run php artisan serv then still get error as:
Class 'Illuminate\Foundation\Application' not found in
/var/www/html/sample-project/bootstrap/app.php on line 14
Please help me and solve my issue
Thanks in advance
You should try this:
Please run below command:
composer install --no-scripts
In my case it worked removing "vendor" folder and "composer.lock" and then run:
composer install
Watch step wise step in video tutorial for your problem
Expert Suggestion
then after delete your vendor folder and then hit compser install
I am facing fatal errors regarding Artisan. I think I couldn't install laravel complete due to slow internet. Now I want to remove Laravel from root and want to have fresh installation.
Can anyone help me?
if you have installed it globally you can simply remove it by composer global remove laravel/installer
If you have installed it via composer project you simply remove the directory.
Since I was looking all around how to uninstall packages and after reading tones
of documentations here's the short how-to uninstall a workbench package in Laravel
Remove package service provider from 'providers' array in app/config/app.php
Remove the package folder in workbench/
Run:
php composer.phar dump-autoload
php artisan clear-compiled
php artisan optimize
(optional) remove all related code using the package (you'll get errors about that)
or use composer global remove laravel/installer
For me, the command that actually did the trick was: composer global remove laravel/installer
I have created a new branch using Git, applied some updates to my code, checked out that branch on my staging server and I now can't run anything composer related.
I've added some new packages to composer.json which work on my development environment, but as soon as I try composer update on the staging environment I get class not found errors relating to the classes it's not yet downloaded.
I've tried
composer update
composer dump-autoload
php artisan clear-compiled
php artisan dump-autoload
php artisan optimize
But all result in the following error
PHP Fatal error: Class 'Artdarek\OAuth\OAuthServiceProvider' not found in
/var/www/sites/x/bootstrap/compiled.php on line 4321
Script php artisan clear-compiled handling the
pre-update-cmd event returned with an error
[RuntimeException]
Error Output: PHP Fatal error: Class 'Artdarek\OAuth\OAuthServiceProvider'
not found in /var/www/sites/x/bootstrap/compiled.php
on line 4321
What else can I try in order to get composer to download new files?
php artisan optimize --force
That command will re-generate /bootstrap/compiled.php
The --force arg is needed to re-generate the file when your environment is in debug mode.
I'm sure there is a more elegant way of dealing with this (and please accept any answer that provides that over this one) but this can probably be solved by deleting the entire vendor directory and running composer install again.
I know its not pretty but sometimes it's easier and quicker.
I had the exact same issue, which I solved by uploading the project again through filezilla to my server.
That doesn't solve the issues you are having with composer, however. Which begs the question: Assuming that you are working on a dedicated server, do you have composer installed globally in your server? If not you should still be able to do a php composer.phar update or just create an alias.
I might have misunderstood your question, and I realize that your question was asked a while back, but hopefully it will be helpful for someone else.