Installing PyroCMS error when installing in xampp (windows) - php

I am getting below error after downloading the package:
**In MigrateCommand.php line 58:
Too few arguments to function Illuminate\Database\Console\Migrations\MigrateCommand::__construct(), 1 passed in C:\xampp\htdocs\pyro\vendor\anomaly\streams-platform\src\Database\Migration\MigrationServiceProvider.php on line 88 and exactly 2 expected**
Above error is generated when entering the command
php artisan install

I had the Same issue! It looks that composer.lock file and your php version are not compatible.
I deleted the composer.lock file that comes with the repo, and the vendor project, after run composer install and then php artisan install.
I hope it works for you!

Related

Laravel command not found. But it is added to my $PATH on Ubuntu

So I know there are alot of simmular issues but none if them are exactly the same,
I want to start my first laravel project but, my terminal tells me command not found,
I installed composer from the website and when I run composer I can see that it works perfectally with no issue, when running composer global require "laravel/installer" I get this in response :
Info from https://repo.packagist.org: #StandWithUkraine
Using version ^4.2 for laravel/installer
./composer.json has been updated
Running composer update laravel/installer
Loading composer repositories with package information
Updating dependencies
Nothing to modify in lock file
Installing dependencies from lock file (including require-dev)
Nothing to install, update or remove
Generating autoload files
9 packages you are using are looking for funding.
Use the `composer fund` command to find out more!
This tells me that laravel is indeed installed but has not updates but when I run command laravel the response is laravel: command not found,
I have added composer to my $PATH already.
This is why I am posting this issue because all the posts I find says to add composer to your $PATH but mine is already but its still a issue.
PHP is also installed on my machine
I am running linux Ubuntu 22.04 LTS
I'll write the answer here so you can close the question. As #geertjanknapen said in the comment if you can install your project the run
composer create-project laravel/laravel your-app-name
cd /your-app-name
php artisan serve
You must have a local server running also, once you have run php artisan serve then just go to http://127.0.0.1:8000/ and you'll see Laravel's home screen. (NOTE 8000 is the default port, so put yours there if you've changed it).

Laravel does not create folder vendor

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

ERROR: Your system is not ready to run Symfony projects

I've downloaded a Symfony application and then checked it using php -f ./app/check.php. However, I get:
[ERROR]
Your system is not ready to run Symfony projects
Fix the following mandatory requirements
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
* Vendor libraries must be installed
> Vendor libraries are missing. Install composer following
> instructions from http://getcomposer.org/. Then run "php
> composer.phar install" to install them.
However, there is no composer.phar file in this application. e.g.
php composer.phar install
Could not open input file: composer.phar
Note: I already have composer installed.
Any suggestions?
The answer is right there in the error message you received.
Install composer following instructions from http://getcomposer.org/
Instead of composer.phar run:
php composer install
I think that's what you need. If you install Composer, then you probably renamed it to composer, and that's the bin you run.

How do I fix Laravel Composer autoload_classmap Error

I've downloaded our copy of a Laravel project to my local computer. I'm running XAMP 3.2.2, PHP 5.6.19. I've installed Composer and updated the database configuration.
But as I run the project, localhost/AAAAA (AAAAA is the folder of the Laravel project), I get the error below:
Parse error: syntax error, unexpected '' => $vendorDir . '' (T_CONSTANT_ENCAPSED_STRING) in C:\xampp\htdocs\AAAAA\vendor\composer\autoload_classmap.php on line 1621
How do I fix the problem?
Thanks
You could try regenerating the composer autoload files:
php composer.phar dump-autoload
Since you just downloaded the project, you'd likely need to initiate an install first which should do this for you:
php composer.phar install
The install command will install all project dependencies into vendor/ and dump the autoload files. The package information is stored in composer.json & composer.lock.

Symfony2 error when installing via composer

I am trying to install Symfony2 via composer on an Ubuntu server:
php composer.phar create-project symfony/framework-standard-edition /var/www/dev/myproject 2.1.7
but it fails with the following error:
- Installing doctrine/doctrine-bundle (v1.1.0)
Downloading: 100%
rm: cannot remove `/var/www/dev/myproject/vendor/doctrine/doctrine-bundle/Doctrine/Bundle/DoctrineBundle': Directory not empty
[ErrorException]
ZipArchive::extractTo(): File name too long
Google didn't help, any idea what the problem could be?
Thanks!
try by going inside the directory where you want to install it and then execute
php composer.phar create-project symfony/framework-standard-edition myproject 2.1.7
I guess the problem had to do with the linux server being a VM and the folder I tried to install symfony2 in was a folder shared from windows (the host) ...
After rebooting that error went away (leaving me with lots of random composer errors, but those are not in the scope of this question ;))

Categories