I have just pulled a remote Laravel project from Github and ran composer install to create the vendor folder.
However, this returns an error in the terminal:
[RuntimeException]
Could not scan for classes inside "/Applications/MAMP/htdocs/imperialnet/ve
ndor/patchwork/utf8/src/Normalizer.php" which does not appear to be a file
nor a folder
And this error in the error log:
PHP Fatal error: require(): Failed opening required '/Applications/MAMP/htdocs/app/vendor/symfony/var-dumper/Resources/functions/dump.php' (include_path='/Applications/MAMP/htdocs/app/vendor/phpseclib/phpseclib/phpseclib:.:/Applications/MAMP/bin/php/php5.6.2/lib/php') in /Applications/MAMP/htdocs/app/vendor/composer/autoload_real.php on line 58
Looking in Vendor > patchwork > utf8 there is no SRC folder? What is going with composer or ?
I had the same problem. Deleting the vendor folder and the composer.lock file and then running composer install solved the issue.
You may write in console: composer update --dev
Related
I am new to php and usage of composer in php. I am using windows 10.
While trying to delete previous installation of composer I think I have mistakenly deleted the composer folder inside phpMyAdmin. Now I am getting the below error while trying to access http://localhost/phpmyadmin/ :
Warning: require_once(C:\xampp\phpMyAdmin\vendor/composer/autoload_real.php): failed to open stream: No such file or directory in C:\xampp\phpMyAdmin\vendor\autoload.php on line 5
Fatal error: require_once(): Failed opening required 'C:\xampp\phpMyAdmin\vendor/composer/autoload_real.php' (include_path='C:\xampp\php\PEAR') in C:\xampp\phpMyAdmin\vendor\autoload.php on line 5
was there supposed to be a composer folder inside phpMyAdmin by default? Did I delete something that was used by mysql?
How do I solve it?
The vendor folder is required yes. If there's a composer.json file present in your phpmyadmin folder you can run composer install to fetch all dependencies into the vendor folder.
Go To xampp>phpMyAdmin first then run "composer install" on your git bash or any other terminal.I hope it will work
I am new in Laravel and I have the following problem.
I developed a Laravel 5 project on an old computer, and I put the code on a GIT repository. I retrieved my source code on my new laptop from the repository.
But I am facing problems while running the Laravel project on Apache and I am obtaining this error message on my Laravel website instead:
Warning: require(C:\xampp\htdocs\HotelRegistration\bootstrap/../vendor/autoload.php): failed to open stream: No such file or directory in C:\xampp\htdocs\HotelRegistration\bootstrap\autoload.php on line 17
Fatal error: require(): Failed opening required 'C:\xampp\htdocs\HotelRegistration\bootstrap/../vendor/autoload.php' (include_path='C:\xampp\php\PEAR') in C:\xampp\htdocs\HotelRegistration\bootstrap\autoload.php on line 17
The C:\xampp\htdocs\HotelRegistration\bootstrap\autoload.php is present in my project
Why am I facing this issue? What is the problem? What am I missing? How can I fix this issue? How can I try to solve this issue?
You need to run
composer install
command to install packages. By default vendor directory is ignored when committing to GIT (this is good) so if you pull data from repository you need to install all packages running above command.
After installing Composer it worked well, Laravel created all folders and it started correctly with:
php artisan serve
Now, when I try:
laravel new mypro
It does not create the vendor folder. And when I try:
php artisan serve
It says:
php artisan serve
PHP Warning: require(/mnt/PROJECTS/[3]_PROCOM/[6]_PHP_Learning/Laravel_1/blog4/bootstrap/../vendor/autoload.php): failed to open stream: No such file or directory in /mnt/PROJECTS/[3]_PROCOM/[6]_PHP_Learning/Laravel_1/blog4/bootstrap/autoload.php on line 17
PHP Fatal error: require(): Failed opening required '/mnt/PROJECTS/[3]_PROCOM/[6]_PHP_Learning/Laravel_1/blog4/bootstrap/../vendor/autoload.php' (include_path='.:/usr/share/php') in /mnt/PROJECTS/[3]_PROCOM/[6]_PHP_Learning/Laravel_1/blog4/bootstrap/autoload.php on line 17
After I copy folder vendor it says:
php artisan serve
PHP Fatal error: Class 'Illuminate\Notifications\NotificationServiceProvider' not found in /mnt/PROJECTS/[3]_PROCOM/[6]_PHP_Learning/Laravel_1/blog3/vendor/laravel/framework/src/Illuminate/Foundation/ProviderRepository.php on line 146
[Symfony\Component\Debug\Exception\FatalErrorException]
Class 'Illuminate\Notifications\NotificationServiceProvider' not found
I encountered the same problem. It occurred because the composer was not able to install the dependencies specified in composer.json file. try running
composer install
If this does not solve the problem, make sure the following PHP modules are installed php-mbstring php-dom
To install this extensions run the following in terminal
sudo apt-get install php-mbstring php-dom
once the installation is complete
try running the command again in your project root folder
composer install
So, if the above doesn't work, you can as well try this command
composer update --no-scripts
More solutions on this thread.
Laravel 5 Failed opening required bootstrap/../vendor/autoload.php
Instead of copying vendor folder please run a command
composer install
in your laravel's project directory
After trying multiple solutions from different sources, the only thing that worked for me was upgrading the PHP version.
Try to install it manually sudo apt-get install php5.6-mbstring
I have a git repository which is a simple cakephp3 application. (i cant share because that is private).
i forked the repository and cloned it to my local directory, but as i open the url it gives me this error:
Warning: require(C:\xampp\htdocs\cakephp\shopinator\sms\smsv3\vendor\autoload.php): failed to open stream: No such file or directory in C:\xampp\htdocs\cakephp\shopinator\sms\smsv3\config\bootstrap.php on line 23 Fatal error: require(): Failed opening
required 'C:\xampp\htdocs\cakephp\shopinator\sms\smsv3\vendor\autoload.php' (include_path='.;C:\xampp\php\PEAR') in C:\xampp\htdocs\cakephp\shopinator\sms\smsv3\config\bootstrap.php on line 23
I also have composer installed and is recognizable. I'm using git bash.
the same repository is running fine on another machine.
Any help would be appreciated.
Update:
I've tried it this way:
I'm installing cakephp 3 using composer, it still gives me the same error.
composer create-project cakephp/app
I've also tried this but no luck.
Update:
with this command
composer create-project --prefer-dist cakephp/app
the fresh installation worked.
I've solved the problem.
I downloaded the composer.phar file from packagist.org
and executed the following commands in my application root.
php composer.phar install
Now i don't have that autoload.php issues.
I'm stuck on a very basic problem:
I'm trying to use Laravel, which I installed on my windows 7 with composer.
When I try to access my website locally with Wamp, I get the error:
Warning:
require(C:\wamp\www\sitedirectory\public\protected\bootstrap/../vendor/autoload.php):
failed to open stream: No such file or directory in
C:\wamp\www\sitedirectory\public\protected\bootstrap\autoload.php on
line 17
Everywhere I can read that all I have to do is run composer install or update.
The problem is that I did run both and nothing has to be updated.
The files are where they are needed so I dont understand what could be the problem.
Does anyone have an idea of what could be my problem?
Thank you in advance.
Composer is a tool for managing and installing dependencies.
There should exist a file named composer.phar in the directory C:\wamp\www\sitedirectory\public\protected\. There you should execute the command composer.phar install (on the command line).
Then, the directory vendor containing the autoload.php etc. should be generated.
If the composer.phar does not exist (but at least a file named composer.json), follow the steps explained here to download composer.