On the linux(Pop_OS) when I created a new laravel project, I tried to run php artisan and I get the following error:
PHP Warning: require(/home/dusan/freeCodeGram/vendor/autoload.php): Failed to open stream: No such file or directory in /home/dusan/freeCodeGram/artisan on line 18
PHP Fatal error: Uncaught Error: Failed opening required '/home/dusan/freeCodeGram/vendor/autoload.php' (include_path='.:/usr/share/php') in /home/dusan/freeCodeGram/artisan:18
Stack trace:
#0 {main}
thrown in /home/dusan/freeCodeGram/artisan on line 18
I am new to php and laravel and only just starting to learn it, and also note I have installed laravel using composer.
Try this command in your project
composer update --ignore-platform-req=ext-fileinfo
i hope it was useful !
Related
I'm new using PHP Framework, I got a problem with Laravel PHP artisan serve
php artisan serve
PHP Warning: require(D:\LARAVEL\Login\login3-app/vendor/autoload.php): Failed t
o open stream: No such file or directory in D:\LARAVEL\Login\login3-app\artisan
on line 18
PHP Fatal error: Uncaught Error: Failed opening required 'D:\LARAVEL\Login\logi
n3-app/vendor/autoload.php' (include_path='.;C:\php\pear') in D:\LARAVEL\Login\l
ogin3-app\artisan:18
Stack trace:
#0 {main}
thrown in D:\LARAVEL\Login\login3-app\artisan on line 18
Please help me
You have to run composer install or composer update to install dependencies and create vendor folder inside your app
I'm trying to learn Laravel-The PHP Framework and wanted to use artisan.
I already installed Laravel globally and also created my first project but every time I run php artisan it doesnt recognize the command. I opened git on my project directory and sill not recognized.
It gives me this error:
$ php artisan
PHP Warning: require(C:\Users\--------\Desktop\Project\Laravel\firstProject/vendor/autoload.php): Failed to open stream: No such file or directory in C:\Users\--------\Desktop\Project\Laravel\firstProject\artisan on line 18
Warning: require(C:\Users\--------\Desktop\Project\Laravel\firstProject/vendor/autoload.php): Failed to open stream: No such file or directory in C:\Users\--------\Desktop\Project\Laravel\firstProject\artisan on line 18
PHP Fatal error: Uncaught Error: Failed opening required 'C:\Users\--------\Desktop\Project\Laravel\firstProject/vendor/autoload.php' (include_path='C:\xampp\php\PEAR') in C:\Users\--------\Desktop\Project\Laravel\firstProject\artisan:18
Stack trace:
#0 {main}
thrown in C:\Users\--------\Desktop\Project\Laravel\firstProject\artisan on line 18
Fatal error: Uncaught Error: Failed opening required 'C:\Users\--------\Desktop\Project\Laravel\firstProject/vendor/autoload.php' (include_path='C:\xampp\php\PEAR') in C:\Users\--------\Desktop\Project\Laravel\firstProject\artisan:18
Stack trace:
#0 {main}
thrown in C:\Users\--------\Desktop\Project\Laravel\firstProject\artisan on line 18
I tried downloading PHP manually or use the PHP from XAMPP but no changes.
I used php v8.0.2 and composer v2.0.11
You shouldn't install Laravel globally.
Go through this link:
How to Install Laravel on Ubuntu 20.04
I wanted to create a new project in Laravel yesterday but I have a problem. If i put "laravel new project", it will display this error
[UnexpectedValueException]
Could not parse version constraint project: Invalid version string
"project"
If I want create a new project via composer "composer create-project --prefer-dist laravel/laravel project", it will return this error
[ErrorException]
"continue" targeting switch is equivalent to "break". Did you mean to
use " continue 2"?
But in this situation project will be create but I have w problem with run it,
I write "php artisan serv" and it return this
PHP Warning: require(/home/michal/project/vendor/autoload.php):
failed to open stream: No such file or directory in
/home/michal/project/artisan on line 18 PHP Stack trace: PHP 1.
{main}() /home/michal/project/artisan:0 PHP Fatal error: require():
Failed opening required '/home/michal/project/vendor/autoload.php'
(include_path='.:/usr/share/php') in /home/michal/project/artisan on
line 18 PHP Stack trace: PHP 1. {main}()
/home/michal/project/artisan:0
How I can solve my problem?
PS. My composer version is 1.5.6
I just downloaded a Laravel script
then I used from it in my local host (wamp) without any problem but now when I want to use from it in my host, it shows: 500 error
error_log file
[12-Feb-2019 16:59:48 Asia/Tehran] PHP Warning: include(/home/grammer/public_html/test/core/vendor/composer/../laravel/framework/src/Illuminate/Filesystem/Filesystem.php):
failed to open stream: No such file or directory in
/home/grammer/public_html/test/core/vendor/composer/ClassLoader.php on
line 444 [12-Feb-2019 16:59:48 Asia/Tehran] PHP Warning: include():
Failed opening
'/home/grammer/public_html/test/core/vendor/composer/../laravel/framework/src/Illuminate/Filesystem/Filesystem.php'
for inclusion
(include_path='.:/opt/cpanel/ea-php72/root/usr/share/pear') in
/home/grammer/public_html/test/core/vendor/composer/ClassLoader.php on
line 444 [12-Feb-2019 16:59:48 Asia/Tehran] PHP Fatal error: Uncaught
Error: Class 'Illuminate\Filesystem\Filesystem' not found in
/home/grammer/public_html/test/core/vendor/laravel/framework/src/Illuminate/Foundation/Application.php:175
Stack trace:
0 /home/grammer/public_html/test/core/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(144):
Illuminate\Foundation\Application->registerBaseBindings()
1 /home/grammer/public_html/test/core/bootstrap/app.php(15): Illuminate\Foundation\Application->__construct('/home/grammer/p...')
2 /home/grammer/public_html/test/index.php(38): require_once('/home/grammer/p...')
3 {main} thrown in /home/grammer/public_html/test/core/vendor/laravel/framework/src/Illuminate/Foundation/Application.php
on line 175
composer install
The error is telling you clearly, missing basically not find vendor which is the base larvel and run the command in the folder of your laravel project and do not forget to configure your .env file eventually
I have installed Symfony 3.3.2 on a server in production. I can run command from console
$ ./bin/console --version
Symfony 3.3.2 (kernel: app, env: dev, debug: true)
When I want to check the config on my server with the url, http://example.com/config.php, I have a 500 error "HTTP ERROR 500"
When I try to run the command for symfony_requirements, I have fatal error :
$ php ./bin/symfony_requirements
PHP Warning: require_once(/var/www/symfony/bin/./SymfonyRequirements.php): failed to open stream: No such file or directory in /var/www/symfony/bin/symfony_requirements on line 4
PHP Stack trace:
PHP 1. {main}() /var/www/symfony/bin/symfony_requirements:0
PHP Fatal error: require_once(): Failed opening required '/var/www/symfony/bin/./SymfonyRequirements.php' (include_path='.:/usr/share/php') in /var/www/symfony/bin/symfony_requirements on line 4
PHP Stack trace:
PHP 1. {main}() /var/www/symfony/bin/symfony_requirements:0
How can I check the configuration of my server ?
This is an issue on github https://github.com/sensiolabs/SensioDistributionBundle/issues/324
If you can not upgrade your version of symfony, I suggest you to edit the file web/config.php, and replace
require_once dirname(__FILE__).'/./SymfonyRequirements.php';
by
require_once dirname(__FILE__).'/../var/SymfonyRequirements.php';
Edit bin/symfony_requirements and do exactly the same replacement.
If you can upgrade your version to 3.3.9, I should not have this issue