Don't work composer in PHP 7.0
I insert this command to the terminal:
$sudo composer require cocur/slugify
In the directory is created only one empty file composer.json
My OS:
Ubuntu 14.04
My PHP:
PHP 7.0.1-5+deb.sury.org~trusty+1 (cli) ( NTS )
Copyright (c) 1997-2015 The PHP Group
Zend Engine v3.0.0, Copyright (c) 1998-2015 Zend Technologies
with Xdebug v2.4.0RC2, Copyright (c) 2002-2015, by Derick Rethans
with Zend OPcache v7.0.6-dev, Copyright (c) 1999-2015, by Zend Technologies
Sorry, the application php7.0 has stopped unexpectedly
php7.0 crashed with sigsegv in xdebug_var_export
To get rid of the error, you might simply disable the Zend Extension "xdebug" for Composer runs:
;zend_extension = "/path/to/xdebug.so" in php.ini.
Related
I downloaded & installed xampp-linux-x64-7.4.6-0-installer.run on my VM using terminal. Everything went right except PHP version.
The terminal output
php -v
PHP 7.2.24-0ubuntu0.18.04.4 (cli) (built: Apr 8 2020 15:45:57) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.2.0, Copyright (c) 1998-2018 Zend Technologies
with Zend OPcache v7.2.24-0ubuntu0.18.04.4, Copyright (c) 1999-2018, by Zend Technologies
but php info shows version 7.4.6
is there any way to upgrade php version ??
you should be able to use this comand to set the default php version:
sudo update-alternatives --config php
I just upgraded my PHP version from PHP 5.59 to PHP 6 by following this answer
Upgrade php 5.5.* to php 5.6.* using apt-get
But I am getting a strange problem PHP -version on terminal result in
PHP 5.6.34-1+ubuntu14.04.1+deb.sury.org+1 (cli)
Copyright (c) 1997-2016 The PHP Group
Zend Engine v2.6.0, Copyright (c) 1998-2016 Zend Technologies
with Zend OPcache v7.0.6-dev, Copyright (c) 1999-2016, by Zend Technologies
but phpversion() is still retuning the old version which is
5.5.9-1ubuntu4.24
I have installed plesk onyx in my ubuntu server plus php v7.0 and v7.1. When I tried to install WHCMS v 7.3.0 he told me that I have old ioncube loeader version and I need to make an upgrade to continue the installation so I followed that tutorial : https://support.plesk.com/hc/en-us/articles/214527125-The-IonCube-loader-is-not-available-for-Plesk-PHP-7-1
and this is the version of php v7.0 and v7.1 :
root#sd-86418:/opt/plesk/php/7.1/lib/php/modules# /opt/plesk/php/7.1/bin/php -v
PHP 7.1.10 (cli) (built: Sep 29 2017 15:42:12) ( NTS )
Copyright (c) 1997-2017 The PHP Group
Zend Engine v3.1.0, Copyright (c) 1998-2017 Zend Technologies
with the ionCube PHP Loader (enabled) + Intrusion Protection from ioncube24.com (unconfigured) v10.0.3, Copyright (c) 2002-2017, by ionCube Ltd.
with Zend OPcache v7.1.10, Copyright (c) 1999-2017, by Zend Technologies
root#sd-86418:/opt/plesk/php/7.1/lib/php/modules# /opt/plesk/php/7.0/bin/php -v
Cannot load the ionCube PHP Loader - it was already loaded
PHP 7.0.24 (cli) (built: Sep 29 2017 12:33:10) ( NTS )
Copyright (c) 1997-2017 The PHP Group
Zend Engine v3.0.0, Copyright (c) 1998-2017 Zend Technologies
with the ionCube PHP Loader (enabled) + Intrusion Protection from ioncube24.com (unconfigured) v10.0.3, Copyright (c) 2002-2017, by ionCube Ltd.
with Zend OPcache v7.0.24, Copyright (c) 1999-2017, by Zend Technologies
The issue is all time I got HTTP ERROR 500. Please any one help me.
Cannot load the ionCube PHP Loader - it was already loaded
In Plesk ioncube module is already installed and loaded out of the box with the corresponding plesk-php70-ioncube-loader package. You shouldn't install it as described in the mentioned KB article.
Actually, it is a bad idea to install WHMCS on the server where Plesk is already installed. Consequences may be unpredictable. Anyway, why do you think that WHMCS installer uses Plesk PHP /opt/plesk/php/7.0/bin/php instead of OS vendor's PHP from /usr/bin/php with own outdated ioncubeloader?
php -v
PHP 7.0.10-2+deb.sury.org~xenial+1 (cli) ( NTS )
Copyright (c) 1997-2016 The PHP Group
Zend Engine v3.0.0, Copyright (c) 1998-2016 Zend Technologies
with Zend OPcache v7.0.10-2+deb.sury.org~xenial+1, Copyright (c) 1999-2016, by Zend Technologies
I use 5.6 with magento so I get errors. How can i change this? It must be 5.6?
i did this but did not work
sudo apt-add-repository ppa:ondrej/php5
You can set alias in your bash profile.
For Ubuntu edit: ~/.profile
For Centos edit: ~/.bash_profile
You can add alias before the export path command like
alias php='/opt/rh/rh-php56/root/usr/bin/php'
After saving execute by typing '. ~/.profile' (or '. ~/.bash_profile') and your version is now set until you close your terminal.
I use PHPStorm on OSX with PHPUnit and Laravel.
When I go inside my project from the PHPStorm console and type:
$ php --version
PHP 5.5.29 (cli) (built: Sep 9 2015 00:26:40)
Copyright (c) 1997-2015 The PHP Group
Zend Engine v2.5.0, Copyright (c) 1998-2015 Zend Technologies
$ which php
/usr/bin/php
From my terminal:
$ php --version
PHP 5.6.16 (cli) (built: Nov 27 2015 21:37:15)
Copyright (c) 1997-2015 The PHP Group
Zend Engine v2.6.0, Copyright (c) 1998-2015 Zend Technologies
with Zend OPcache v7.0.6-dev, Copyright (c) 1999-2015, by Zend Technologies
with Xdebug v2.2.5, Copyright (c) 2002-2014, by Derick Rethans
$ which php
/usr/local/php5/bin/php
The above I installed. I have edited my PATH to use it.
Now I want to change the PHP version inside my PHPStorm.
I tried editing composer.json:
"require": {
"php": ">=5.6.16",
and then running update:
$ composer update
Your requirements could not be resolved to an installable set of packages.
Problem 1
- This package requires php >=5.6.16 but your PHP version (5.5.29) does not satisfy that requirement.
I also tried to create a symbolic link .
$ sudo ln -s /usr/local/php5/bin/php /usr/bin/php
It fails with:
ln: /usr/bin/php: Operation not permitted
I am not sure what to do. I would like to update Php to 5.6.16.
It appears you have at least two versions of Php installed.
Try changing the interpreter path within PhpStorm.
File->settings->languages & frameworks->interpreter ...