I'm learning PHP and wanted to work with Laravel, by doing so i follow tutorials and the guy explaining it uses artisan commands.
However I looked it up on how to add such commands but every time i go to command line tool support it gives me this error
Problem
Failed to parse output as xml: Error on line 2: Content is not allowed in prolog..
Command
php.exe D:\Websites\untitled\artisan list --format=xml
Output
Warning: require(D:\Websites\untitled\bootstrap/../vendor/autoload.php): failed to open stream: No such file or directory in D:\Websites\untitled\bootstrap\autoload.php on line 17
Fatal error: require(): Failed opening required 'D:\Websites\untitled\bootstrap/../vendor/autoload.php' (include_path='.;C:\php\pear') in D:\Websites\untitled\bootstrap\autoload.php on line 17
So i removed that project and installed Laravel again using "composer project"
and trying to add the artisan again doesn't work again with this fresh start.
Am I missing something? Or did I forgot something to do?
I hope someone can help me since I'm still a beginner and this would be a good learning school
Greetings
Ditger
Run composer install before using php artisan:
composer install
Related
I have a project that I need to upgrade Laravel version. I did not write this project myself. Now when I type php artisan --version to find out the Laravel version of the project, I get the following error.
PHP Warning: require(C:\Users\USER\Desktop\omnicourse_creator_panel-main/vendor/autoload.php): failed to open stream: No such file or directory in C:\Users\USER\Desktop\omnicourse_creator_panel-main\artisan on line 18
PHP Fatal error: require(): Failed opening required 'C:\Users\USER\Desktop\omnicourse_creator_panel-main/vendor/autoload.php' (include_path='.;C:\php\pear') in C:\Users\USER\Desktop\omnicourse_creator_panel-main\artisan on line 18
Do you know why I am getting this error?
use the command 'composer update --ignore-platform-reqs' to update all the packages regardless of the differences in their versions.
I need to make a CRUD application with laravel, and i installed it just like how it is supposed too but now i get this error. I am just checking what version of laravel i have installed but somehow this shows up? i am no expert on any means. Can someone help.
C:\Users\Gebruiker\blog>php artisan --version PHP Warning:
require(C:\Users\Gebruiker\blog\bootstrap/../vendor/autoload.php):
failed to open stream: No such file or directory in
C:\Users\Gebruiker\blog\bootstrap\autoload.php on line 17
Warning:
require(C:\Users\Gebruiker\blog\bootstrap/../vendor/autoload.php):
failed to open stream: No such file or directory in
C:\Users\Gebruiker\blog\bootstrap\autoload.php on line 17 PHP Fatal
error: require(): Failed opening required
'C:\Users\Gebruiker\blog\bootstrap/../vendor/autoload.php'
(include_path='C:\xampp\php\PEAR') in
C:\Users\Gebruiker\blog\bootstrap\autoload.php on line 17
Fatal error: require(): Failed opening required
'C:\Users\Gebruiker\blog\bootstrap/../vendor/autoload.php'
(include_path='C:\xampp\php\PEAR') in
C:\Users\Gebruiker\blog\bootstrap\autoload.php on line 17
When you first create a laravel project, there's a folder called vendor that laravel needs. Laravel the framework itself exists there among other folders there. There is a file named autoload.php that is vendor folder that loads all the packages that laravel uses. For you to get these packages, you'll run this command below
composer install
then laravel can now work, so can php artisan command too.
you have to update your wamp server, the php version has to be at least 5.7
When starting any new Laravel project make sure you run composer install
A friend send me a project but it is give me an error when i try run.
I go to project location and execute php artisan serve but i have this error:
Fatal error: require(): Failed opening required '/project1/bootstrap/../vendor/autoload.php' (include_path='.:') in /project1/bootstrap/autoload.php on line 17
When i run composer install i have this error:
[ErrorException]
file_put_contents(/project1/rev2/bootstrap/cache/ser
vices.php): failed to open stream: No such file or directory
What is the problem?
Thank you
Do you compose installed ? if not you can install it form here.
https://getcomposer.org/
Once composer is installed then you can run php artisan serve or you can place the project in the wamp/xampp project directory and run like this.
http://localhost/projectname/public
Make sure you have /project1/rev2/bootstrap/cache directory in your project location if not, you have to manually create it.
I am trying to get familiar with testing (unit, functional) under Symfony 2.3.24/Windows7/PHP 5.4.7.
It seems PHPUnit is installed correctly (via Composer), but when I run a phpunit -c app/ command I get the following error:
Warning: require_once(PHP/CodeCoverage/Filter.php): failed to open stream: No such file or directory in C:\xampp\php\phpunit on line 38
Fatal error: require_once(): Failed opening required 'PHP/CodeCoverage/Filter.php' (include_path='.;C:\xampp\php\PEAR') in C:\xampp\php\phpunit on line 38
I googled for the issue to no avail. I additionnaly found in the official PHPUnit website that The code coverage report feature requires the Xdebug (2.1.3 or later) and tokenizer extensions.
What do you think about all this? your help is much appreciated.
In current versions of PHPUnit the phpunit script does not include PHP/CodeCoverage/Filter.php directly. It appears you are using an outdated version of PHPUnit and/or have a mixup of Composer/PEAR installations.
Please follow the instructions on https://phpunit.de/getting-started.html to properly install PHPUnit. And http://thephp.cc/news/2015/01/phpunit-migration-from-pear-to-phar explains how to migrate from a PEAR-based installation to Composer or PHAR.
I was having difficulty getting libphonenumber for PHP to run as per this question.
All I got was:
My output:
Warning: require(/var/www/phone/libphonenumber/vendor/autoload.php): failed to open stream: No such file or directory in /var/www/phone/libphonenumber/index.php on line 2
Fatal error: require(): Failed opening required '/var/www/phone/libphonenumber/vendor/autoload.php' (include_path='.:/usr/share/php:/usr/share/php/PEAR:/var/www/cakephp/lib') in /var/www/phone/libphonenumber/index.php on line 2
What finally got it working was installing composer, and moving the generated composer.phar file into the libphonenumber folder, then running the install procedure. This step is missing from the docs, so I wanted to list it here. Thank you to #Simon_eQ for assisting me with this.
Try this command:
php composer.phar dump-autoload
This will generate autoload files if not already present.