I can't install laravel on mac - php

This is my error, I found it on google, and I don't know where is the error. I have MAMP PRO with php 5.4.4 version
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
- laravel/framework v4.2.4 requires php >=5.4.0 -> no matching package found.
- laravel/framework v4.2.3 requires php >=5.4.0 -> no matching package found.
- laravel/framework v4.2.2 requires php >=5.4.0 -> no matching package found.
- laravel/framework v4.2.1 requires php >=5.4.0 -> no matching package found.
- laravel/framework v4.2.0 requires php >=5.4.0 -> no matching package found.
- Installation request for laravel/framework 4.2.* -> satisfiable by laravel/framework[v4.2.0, v4.2.1, v4.2.2, v4.2.3, v4.2.4].
Potential causes:
- A typo in the package name
- The package is not available in a stable-enough version according to your minimum-stability setting
see https://groups.google.com/d/topic/composer-dev/_g3ASeIFlrc/discussion for more details.
Read http://getcomposer.org/doc/articles/troubleshooting.md for further common problems.

OS X is pre-installed with its own PHP, and it's probably older than 5.4 that Laravel 4.2 requires. And when you do php in your terminal, you'll probably get your OSX's php. Try it with php -v
You'll need to make your MAMP PRO's php your default binary, as suggested in change the PHP path to MAMPs PHP Try:
export PATH=/Applications/MAMPPRO/php5.4.4/bin:$PATH
This will only work up until you close your terminal. To make the change permanent, add the line above to your ~/.bash_profile
Then you check again by typing which php to your terminal. It should now point to your MAMP PRO's PHP binary.

Use homestead , its a vagrant box that will help your development.
https://github.com/laravel/homestead

You can set up a virtualbox with debian.
virtualbox: https://www.virtualbox.org
debian: https://www.debian.org
web server install tut:
http://www.howtoforge.com/ubuntu-lamp-server-with-apache2-php5-mysql-on-14.04-lts
or install homestead: http://laravel.com/docs/homestead
And read this: https://www.andrewmunsell.com/blog/development-environments-with-vagrant-and-puppet

Alternatively, if you are comfortable with the terminal, installing Apache & PHP, you can use MacPorts to install any version of PHP >= 5.4.
MacPorts

Related

how to remove PHP version error on deployment

I am using Xampp for local development, and I am working on the Laravel application. Everything works fine on the local server, but I am unable to deploy it. I am getting this error:
Problem 1
- Installation request for symfony/css-selector v5.0.6 -> satisfiable by symfony/css-selector[v5.0.6].
- symfony/css-selector v5.0.6 requires php ^7.2.5 -> your PHP version (7.2.2) does not satisfy that requirement.
Problem 2
- Installation request for symfony/mime v5.0.6 -> satisfiable by symfony/mime[v5.0.6].
- symfony/mime v5.0.6 requires php ^7.2.5 -> your PHP version (7.2.2) does not satisfy that requirement.
Problem 3
- Installation request for symfony/service-contracts v2.0.1 -> satisfiable by symfony/service-contracts[v2.0.1].
- symfony/service-contracts v2.0.1 requires php ^7.2.5 -> your PHP version (7.2.2) does not satisfy that requirement.
Problem 4
- Installation request for symfony/translation-contracts v2.0.1 -> satisfiable by symfony/translation-contracts[v2.0.1].
- symfony/translation-contracts v2.0.1 requires php ^7.2.5 -> your PHP version (7.2.2) does not satisfy that requirement.
Problem 5
- symfony/mime v5.0.6 requires php ^7.2.5 -> your PHP version (7.2.2) does not satisfy that requirement.
- symfony/http-foundation v4.4.6 requires symfony/mime ^4.3|^5.0 -> satisfiable by symfony/mime[v5.0.6].
- Installation request for symfony/http-foundation v4.4.6 -> satisfiable by symfony/http-foundation[v4.4.6].
I am using Xampp version 7.2.28 and using Laravel Envoyer for deployment. How can I solve this? Any help would be highly appreciable.
Thats becuase the version you are using locally is newer than the version of on the server. so your installing dependencies for the newer version and then trying to install on a lower version. you should make sure that your local environments match the live enviornment as much as possible, using Docker is quite handy for this.
Your possible solutions are:
Upgrade the PHP version on the live server
Downgrade the PHP version on your local to match production and adjust the dependencies accordingly
Set versions of your dependencies for the live system to compatible versions and re-install the dependencies
Downgrade your dependencies so that they can run on PHP 7.2.2 or later
The solution I would recommend is: "Downgrade your dependencies so that they can run on PHP 7.2.2 or later"
Note: I wouldn't actually recommend lowering your PHP version on the live system, but it is an option.

Composer & Plesk, encountering PHP version difficulties

Am currently attempting to get my Laravel application running behind Plesk Onyx. Now when trying to run composer install, I get the following error messages:
Your requirements could not be resolved to an installable set of packages.
Problem 1
- Installation request for doctrine/inflector v1.3.0 -> satisfiable by doctrine/inflector[v1.3.0].
- doctrine/inflector v1.3.0 requires php ^7.1 -> your PHP version (7.0.27) does not satisfy that requirement.
Problem 2
- Installation request for symfony/css-selector v4.0.6 -> satisfiable by symfony/css-selector[v4.0.6].
- symfony/css-selector v4.0.6 requires php ^7.1.3 -> your PHP version (7.0.27) does not satisfy that requirement.
Problem 3
- Installation request for symfony/event-dispatcher v4.0.6 -> satisfiable by symfony/event-dispatcher[v4.0.6].
- symfony/event-dispatcher v4.0.6 requires php ^7.1.3 -> your PHP version (7.0.27) does not satisfy that requirement.
Problem 4
- Installation request for symfony/translation v4.0.6 -> satisfiable by symfony/translation[v4.0.6].
- symfony/translation v4.0.6 requires php ^7.1.3 -> your PHP version (7.0.27) does not satisfy that requirement.
Problem 5
- Installation request for doctrine/instantiator 1.1.0 -> satisfiable by doctrine/instantiator[1.1.0].
- doctrine/instantiator 1.1.0 requires php ^7.1 -> your PHP version (7.0.27) does not satisfy that requirement.
Problem 6
- doctrine/inflector v1.3.0 requires php ^7.1 -> your PHP version (7.0.27) does not satisfy that requirement.
- laravel/framework v5.5.39 requires doctrine/inflector ~1.1 -> satisfiable by doctrine/inflector[v1.3.0].
- Installation request for laravel/framework v5.5.39 -> satisfiable by laravel/framework[v5.5.39].
OK. I understand the errors for sure. I run Debian 9 and "PHP by OS Vendor" is 7.0.27. However, I know that PHP 7.1+ (and even 7.2) is installed on the server, because Plesk'd let me choose (for domains and vhosts) these versions. My question now is: How can I tell composer to use a certain PHP version installed on the server, and how could this work under Debian with Plesk?
Edit: I did not install Composer globally. Just https://getcomposer.org/download/ "Command-line installation".
Here's how:
Find the PHP paths used by Plesk. In my case, this is /opt/plesk/php/. Inside this folder, there are the folders according to PHP versions installed: 7.0, 7.1, 7.2. So php composer.phar install becomes /opt/plesk/php/7.2/bin/php composer.phar install. & it works. :-)
You may use platform setting in composer.json to emulate PHP version:
"config": {
"platform": {
"php": "7.1"
}
},
Composer will assume that PHP version is 7.1 during installation and update, even if you're using 7.0 to actual install.
This will only affect Composer installation and update - if you want to run console commands of your app, you will need to use correct binary (same for web server). However setting this will make your Composer installs and updates more predictable, so it's worth doing it anyway.

upgrading yii2 advanced from 2.0.6 to 2.0.7 does not work

In my project directory I first executed the following two commands
php C:\ProgramData\ComposerSetup\bin\composer.phar self-update
php C:\ProgramData\ComposerSetup\bin\composer.phar global require "fxp/composer-asset-plugin:~1.1.1"
But executing the command
composer require yiisoft/yii2 2.0.5
yields:
Your version of PHP, 5.4.7, is affected by CVE-2013-6420 and cannot safely perform certificate validation, we strongly suggest you upgrade.
You are running composer with xdebug enabled. This has a major impact on runtime performance. See https://getcomposer.org/xdebug
./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.
Problem 1
- Installation request for yiisoft/yii2 2.0.7 -> satisfiable by yiisoft/yii2[2.0.7].
- Conclusion: remove bower-asset/jquery.inputmask 3.1.63
- Conclusion: don't install bower-asset/jquery.inputmask 3.1.63
- yiisoft/yii2 2.0.7 requires bower-asset/jquery.inputmask ~3.2.2 -> satisfiable by bower-asset/jquery.inputmask[3.2.7, 3.2.6, 3.2.5, 3.2.4, 3.2.3, 3.2.2].
- Can only install one of: bower-asset/jquery.inputmask[3.1.63, 3.2.7].
- Can only install one of: bower-asset/jquery.inputmask[3.1.63, 3.2.6].
- Can only install one of: bower-asset/jquery.inputmask[3.1.63, 3.2.5].
- Can only install one of: bower-asset/jquery.inputmask[3.1.63, 3.2.4].
- Can only install one of: bower-asset/jquery.inputmask[3.1.63, 3.2.3].
- Can only install one of: bower-asset/jquery.inputmask[3.1.63, 3.2.2].
- Installation request for bower-asset/jquery.inputmask (locked at 3.1.63) -> satisfiable by bower-asset/jquery.inputmask[3.1.63].
Installation failed, reverting ./composer.json to its original content.
Any help?
Upgrade from Yii 2.0.6 to Yii 2.0.7, Pls visit this link
Added new requirement: ICU Data version >= 49.1. Please, ensure that your environment has ICU data installed and up to date to prevent unexpected behavior or crashes. This may not be the case on older systems e.g. running Debian Wheezy.

Installing composer.phar

I've been trying to install composer.phar to my HostGator website. However, I come across this error:
[~/public_html/flarum]# 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
- flarum/core v0.1.0-beta.4 requires php >=5.5.9 -> your PHP version (5.4.45) or value of "config.platform.php" in composer.json does not satisfy that requirement.
- flarum/core v0.1.0-beta.3 requires php >=5.5.9 -> your PHP version (5.4.45) or value of "config.platform.php" in composer.json does not satisfy that requirement.
- flarum/flarum-ext-suspend v0.1.0-beta.3 requires flarum/core ^0.1.0-beta.3 -> satisfiable by flarum/core[v0.1.0-beta.3, v0.1.0-beta.4].
- Installation request for flarum/flarum-ext-suspend ^0.1.0 -> satisfiable by flarum/flarum-ext-suspend[v0.1.0-beta.3].
I have updated my PHP to the newest via the cPanel.
If there is any help at all that I could get on this it would be greatly appreciated!
Your PHP version is too low for Flarum. You need 55 or better 56.
Enable and use a higher PHP version on HostGator.
To find the other PHP versions take a look at the /opt/ folder.
# /opt/php56/bin/php composer.phar install
You can refer this link
http://laravel.io/forum/02-13-2014-how-to-install-laravel-on-a-hostgator-shared-server
and install flarum with following
~/composer create-project flarum/flarum ~/public_html/flarum --stability=beta

MCrypt is missing from your system. OS Yosemite

So at work, I've been tasked to learn and start to use some Laravel, so I've been following the documentation and some tutorials on Youtube, but I cannot seem to get it working. I am using composer and MAMP to install Laravel. When I use the command (in the terminal) "composer create-project laravel/laravel TestLaravel" while in htdocs. It quickly comes up with this error:
➜ htdocs composer create-project laravel/laravel TestLaravel
Installing laravel/laravel (v5.0.1)
- Installing laravel/laravel (v5.0.1)
Loading from cache
Created project in TestLaravel
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
- laravel/framework v5.0.5 requires ext-mcrypt * -> the requested PHP extension mcrypt is missing from your system.
- laravel/framework v5.0.4 requires ext-mcrypt * -> the requested PHP extension mcrypt is missing from your system.
- laravel/framework v5.0.3 requires ext-mcrypt * -> the requested PHP extension mcrypt is missing from your system.
- laravel/framework v5.0.2 requires ext-mcrypt * -> the requested PHP extension mcrypt is missing from your system.
- laravel/framework v5.0.1 requires ext-mcrypt * -> the requested PHP extension mcrypt is missing from your system.
- laravel/framework v5.0.0 requires ext-mcrypt * -> the requested PHP extension mcrypt is missing from your system.
- Installation request for laravel/framework 5.0.* -> satisfiable by laravel/framework[v5.0.0, v5.0.1, v5.0.2, v5.0.3, v5.0.4, v5.0.5].
I was wondering if anyone would have a solution to this problem for me.
Thank you.
Joshua Johnson
Mac OS X Yosemite
the requested PHP extension mcrypt is missing from your system
I fixed this error by running the following commands in my Terminal :
brew update
brew upgrade
brew tap homebrew/dupes
brew tap josegonzalez/homebrew-php
brew install php54-mcrypt
Mostly this problem comes when your MAMP PHP Version not match with command version php. Please have a look in terminal by type php -v then it will show version like php 5.5.*
The problem is you have to set your MAMP PHP Path in ~/.bash_profile like this :
sudo nano ~/.bash_profile
PATH="/Applications/MAMP/bin/php/php5.6.7/bin:$PATH"
That's all, or install mcrypt lib if you want to use your default system php.
The way that I got around this was to install Homestead and make sure to log in to the Homestead Virtual Machine before running any commands. MCrypt is not installed on your local machine, but it is in Homestead.
There's a PHP extension named mcrypt that's often not distributed with stock PHP packages. The mcrypt extension is the defacto standard PHP extension for encryption and hashing functionality. Laravel uses mcrypt.
The built in PHP on OS X does not come with mcrypt installed. This means you either need to
Build and install the mcrypt extension yourself for OS X's built in PHP
Use homebrew to build and install PHP with mycrypt
Use a "pre-compiled for OS X" PHP package.
Use a vagrant virtual machine to run your development stack
I usually chose the third option, and use the lipp.ch package. This is a long running project, and has it's roots in the old entropy.ch packages managed by Marc Liyanage from even further back.

Categories