5 project and after install Laravel and make php artisan serve it fails.
PHP Warning: require(/var/www/html/sidbrint/vendor/autoload.php):
failed to open stream: No such file or directory in
/var/www/html/sidbrint/artisan on line 18
PHP Fatal error: require():
Failed opening required '/var/www/html/sidbrint/vendor/autoload.php
(include_path='.:/usr/share/php') in /var/www/html/sidbrint/artisan on
line 18
I'm using an Ubuntu Server and I don't know hat to do.
When I install Laravel I use composer create-project --prefer-dist laravel/laravel blog "5.5.*"
If I don't put the version, it installs the 5.4 version, that works fine, but I need version 5.5 because is LTS.
Try using this it might solve your issue
composer update --no-scripts
composer update
is required as the vendor files are missing.
Seems that I needed some PHP packages, so I installed them:
sudo apt-get install php-dev php-mcrypt php-gd php-mbstring php-xml php-common php-zip apache2-dev libapache2-mod-php mysql-server composer npm
After this I executed composer create-project --prefer-dist laravel/laravel blog "5.5.*" and worked fine.
I have consulted this:
How to Install Laravel 5.5 on Ubuntu 16.04 with Apache
Related
i just installed laravel for the first time and got this error, i have reinstalled Composer many times but it doesn't work, maybe you guys can help me out
PHP version 8.2
i installed laravel global installer, but it shows symfony things error, i have reinstalled composer but it doesn't work
please see this url ( installation laravel)
first: install composer on OS (Linux , Windows or MAC)
If you have already installed Composer, you must be clear chache in composer:
php composer.phar clear-cache
or this command:
composer clear-cache
then Using installation via composer:
composer create-project laravel/laravel example-app
I was trying to install Magento 2 on MacOS 10.15 using https://alpineinc.com/2020/05/install-magento-2-locally-on-a-mac/.
I use the command:
php composer.phar create-project --repository-url=https://repo.magento.com/ magento/project-community-edition magento2 --ignore-platform-reqs
but I receive: Failed to set PHP CodeSniffer installed_paths Config.
I tried with php composer.phar global require "squizlabs/php_codesniffer=* and brew install php-code-sniffer, but I get the same error.
I am new to CentOS and I am trying to install composer through the terminal. Unforently it keeps saying file not found.
My terminal command as root:
curl -sS https://getcomposer.org/install | php
and the output error is
bash: php: command not found
curl: (23) Failed writing body ( 0 !=7626)
have things changed with composer and the install process for centos or am I missing something?
You need to install PHP first before you can install composer.
Installing PHP with yum package management:
yum install php
You need to install PHP first on centos then you will be able to run your command
First, install php & php-cli
yum install php
yum install php-cli
and then run composer install
Read this article too
I have done setup for mongodb on my system with Yii2 basic.
I have also installed the extension for mongodb (yii2-mongodb) inside a directory /vendor/yiisoft and checked for the permissions.
Now I am testing the connection with a controller and model but I am getting the following error.
PHP Fatal Error – yii\base\ErrorException Class
'yii\mongodb\ActiveRecord' not found
Is there anything that needs to be installed?
Have you install yii2/mongodb by composer ^^?
composer require --prefer-dist yiisoft/yii2-mongodb
Or your try follow this official Yii2 document step by step maybe can help you up :)!
In this case I tried following command before updating composer to fulfill the packages that need to update the composer
sudo apt-get update
sudo apt-get install php7.0-xml
most likely you are missing mbstring too . If you get the error install this package as well.
sudo apt-get install php-mbstring
then run
composer require --prefer-dist yiisoft/yii2-mongodb
composer update
Will work!!!
I am trying to install composer while SSHed on a vagrant machine. Whenever I run php composer.phar install I get the following error:
vagrant#precise64:/vagrant$ php composer.phar install
Loading composer repositories with package information
Installing dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.
Problem 1
- Installation request for doctrine/migrations dev-master -> satisfiable by doctrine/migrations[dev-master].
- doctrine/migrations dev-master requires php ^5.5|^7.0 -> your PHP version (5.4.45) does not satisfy that requirement.
I do not know what to do with the first 'installation request for doctrine...' problem and when I check run php -v I have php 5.5.27 installed. I have also tried sudo php composer.phar install. Any insight?
Your box, precise64 (Ubuntu 12.04) likely has an outdated version of PHP on it.
There are a couple of ways you could approach upgrading PHP. For the sake of simplicity and modularity, we will focus just on upgrading PHP.
SSH into the box:
vagrant ssh
The version of PHP you need is not available by default in the Precise repos IIRC. Add a PPA which has an updated version:
sudo apt-get update
sudo apt-get install -y python-software-properties
sudo add-apt-repository -y ppa:ondrej/php5
sudo apt-get update
Remove existing PHP:
sudo apt-get purge php5
Check the install candidate, it should be at least 5.5 (it's 5.5.33+ for me as of this post):
sudo apt-cache policy php5
Install the updated version of php5:
sudo apt-get install php5
And now composer should work just fine for you.
It seems there are several PHP are installed on your machine. Use the below command to check the first php in your PATH environment.
which php