PHP Warning: include - php

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

Related

php artisan throws an error: Failed opening required

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 !

PHP artisan is not recognized

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

laravel 5.6 give white page

my web site is https://antilicense.com/
and I give a white page
PHP Fatal error: require(): Failed opening required '.../vendor/composer/../symfony/polyfill-mbstring/bootstrap.php' (include_path='.:/opt/alt/php72/usr/share/pear') in .../vendor/composer/autoload_real.php on line 66
my error log:
[06-Mar-2018 10:31:34 UTC] PHP Warning: require(/home/antilic1/public_html/vendor/composer/../symfony/polyfill-mbstring/bootstrap.php): failed to open stream: No such file or directory in /home/antilic1/public_html/vendor/composer/autoload_real.php on line 66
[06-Mar-2018 10:31:34 UTC] PHP Fatal error: require(): Failed opening required '/home/antilic1/public_html/vendor/composer/../symfony/polyfill-mbstring/bootstrap.php' (include_path='.:/opt/alt/php72/usr/share/pear') in /home/antilic1/public_html/vendor/composer/autoload_real.php on line 66
[06-Mar-2018 10:31:53 UTC] PHP Warning: require(/home/antilic1/public_html/vendor/composer/../symfony/polyfill-mbstring/bootstrap.php): failed to open stream: No such file or directory in /home/antilic1/public_html/vendor/composer/autoload_real.php on line 66
[06-Mar-2018 10:31:53 UTC] PHP Fatal error: require(): Failed opening required '/home/antilic1/public_html/vendor/composer/../symfony/polyfill-mbstring/bootstrap.php' (include_path='.:/opt/alt/php72/usr/share/pear') in /home/antilic1/public_html/vendor/composer/autoload_real.php on line 66
[06-Mar-2018 10:35:49 UTC] PHP Warning: include(/home/antilic1/public_html/vendor/composer/../laravel/framework/src/Illuminate/Filesystem/Filesystem.php): failed to open stream: No such file or directory in /home/antilic1/public_html/vendor/composer/ClassLoader.php on line 444
[06-Mar-2018 10:35:49 UTC] PHP Warning: include(): Failed opening '/home/antilic1/public_html/vendor/composer/../laravel/framework/src/Illuminate/Filesystem/Filesystem.php' for inclusion (include_path='.:/opt/alt/php72/usr/share/pear') in /home/antilic1/public_html/vendor/composer/ClassLoader.php on line 444
[06-Mar-2018 10:35:49 UTC] PHP Fatal error: Uncaught Error: Class 'Illuminate\Filesystem\Filesystem' not found in /home/antilic1/public_html/vendor/laravel/framework/src/Illuminate/Foundation/Application.php:175
Stack trace:
#0 /home/antilic1/public_html/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(144): Illuminate\Foundation\Application->registerBaseBindings()
#1 /home/antilic1/public_html/bootstrap/app.php(15): Illuminate\Foundation\Application->__construct('/home/antilic1/...')
#2 /home/antilic1/public_html/public/index.php(38): require_once('/home/antilic1/...')
#3 {main}
thrown in /home/antilic1/public_html/vendor/laravel/framework/src/Illuminate/Foundation/Application.php on line 175
[06-Mar-2018 10:35:50 UTC] PHP Warning: include(/home/antilic1/public_html/vendor/composer/../laravel/framework/src/Illuminate/Filesystem/Filesystem.php): failed to open stream: No such file or directory in /home/antilic1/public_html/vendor/composer/ClassLoader.php on line 444
[06-Mar-2018 10:35:50 UTC] PHP Warning: include(): Failed opening '/home/antilic1/public_html/vendor/composer/../laravel/framework/src/Illuminate/Filesystem/Filesystem.php' for inclusion (include_path='.:/opt/alt/php72/usr/share/pear') in /home/antilic1/public_html/vendor/composer/ClassLoader.php on line 444
[06-Mar-2018 10:35:50 UTC] PHP Fatal error: Uncaught Error: Class 'Illuminate\Filesystem\Filesystem' not found in /home/antilic1/public_html/vendor/laravel/framework/src/Illuminate/Foundation/Application.php:175
Stack trace:
when I unzip files all things is fine
but after few minutes I see white page...
I try:
php artisan key:generate
composer update --no-scripts
composer update
composer install
composer dump-autoload
but I still have problem
please help me. tnx.
note1: I upgraded my laravel 5.5 to 5.6
note2: It works on local host fine... but when I move it to server I see error log
this is my php info https://antilicense.com/info.php
It seems the vendor files are not in the system. Can you do composer update and see ?
Also make sure to set the file folder permission properly. Change all the directories to 755 and all the files to 644.
To change all the directories to 755 (drwxr-xr-x):
find /home/antilic1/public_html -type d -exec chmod 755 {} \;
To change all the files to 644 (-rw-r--r--):
find /home/antilic1/public_html -type f -exec chmod 644 {} \;
You must remove vendor directory in your shared host and run below code in your local project:
composer dumpautoload
and copy vendor directory from local project to shared host.

warning error in autoload.php file in laravel

I am trying to run quickstart-basic-master but got this error please give me solution
Warning: require(D:\xamp\htdocs\quickstart-basic-master\bootstrap/../vendor/autoload.php):
failed to open stream: No such file or directory in D:\xamp\htdocs\quickstart-basic-master\bootstrap\autoload.php on line 17
Fatal error: require():
Failed opening required 'D:\xamp\htdocs\quickstart-basic-master\bootstrap/../vendor/autoload.php' (include_path='.;D:\xamp\php\PEAR') in D:\xamp\htdocs\quickstart-basic-master\bootstrap\autoload.php on line 17
You have to run
composer install
so it creates your vendordirectory with all dependencies.

How to get the dropbox-php library with pear HTTP_OAUTH to work?

I've been struggelig to get the dropbox-php library to work, but the page where I try to use the classes outputs an error:
Warning: include(HTTP/OAuth/Consumer.php) [function.include]: failed to open stream: No such file or directory in /home/sensured/public_html/sensured.net/Dropbox/OAuth/PEAR.php on line 47
Warning: include(HTTP/OAuth/Consumer.php) [function.include]: failed to open stream: No such file or directory in /home/sensured/public_html/sensured.net/Dropbox/OAuth/PEAR.php on line 47
Warning: include() [function.include]: Failed opening 'HTTP/OAuth/Consumer.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/sensured/public_html/sensured.net/Dropbox/OAuth/PEAR.php on line 47
Fatal error: Uncaught exception 'Dropbox_Exception' with message 'The HTTP_OAuth_Consumer class could not be found! Did you install the pear HTTP_OAUTH class?' in /home/sensured/public_html/sensured.net/Dropbox/OAuth/PEAR.php:51 Stack trace: #0 /home/sensured/public_html/sensured.net/Dropbox/getmetadata.php(11): Dropbox_OAuth_PEAR->__construct('', '') #1 {main} thrown in /home/sensured/public_html/sensured.net/Dropbox/OAuth/PEAR.php on line 51
The pear HTTP_OAUTH class is installed (v 0.2.3), but its done though cpanel so I'm unsure where and don't even know if that has anything to say.
You need to make sure that PEAR's PHP directory is in your include_path.
Find the path with
$ pear config-get php_dir
then add it to your php.ini's include_path directive. Restart your web server software afterwards to activate the new settings .

Categories