I have a strange problem with Mac OS. Problem mixing two versions.
When I look at the PHP version through the VSCode:
When I look at the PHP version through the terminal:
~ ยป php -v
PHP 8.1.0 (cli) (built: Nov 28 2021 02:36:02) (NTS)
Copyright (c) The PHP Group
Zend Engine v4.1.0, Copyright (c) Zend Technologies
with Zend OPcache v8.1.0, Copyright (c), by Zend Technologies
When I run a page of code in XAMPP containing phpinfo();
PHP Version 8.0.6
This program makes use of the Zend Scripting Language Engine:
Zend Engine v4.0.6, Copyright (c) Zend Technologies
with Xdebug v3.1.1, Copyright (c) 2002-2021, by Derick Rethans
I just want to have PHP installed on my system. What is the solution to my problem?
Related
I using Mac BigSur lastest update.
I have install Bitnami MAPP with PHP version 8.0.8.
But in CLI still PHP 7.3.24
I try create PATH to Bitnami PHP8.0.8 but have warning like below
WARNING: PHP is not recommended
PHP is included in macOS for compatibility with legacy software.
Future versions of macOS will not include PHP.
PHP 7.3.24-(to be removed in future macOS) (cli) (built: Dec 21 2020 21:33:25) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.3.24, Copyright (c) 1998-2018 Zend Technologies
How to switch PHP CLI to PHP8.0.8 of Bitnami?
Bitnami engineer here!
The output you are seeing is produced by the PHP binary that comes preinstalled in macOS. When you install Bitnami MAMP, a standalone, updated version of PHP will also be installed in your system. In order to use it instead of the default one, you have two options:
Use the full path to the binary (installdir/php/bin/php)
$ /Applications/mampstack-8.0.9-0/php/bin/php --version
PHP 8.0.9 (cli) (built: Jul 30 2021 07:59:45) ( NTS )
Copyright (c) The PHP Group
Zend Engine v4.0.9, Copyright (c) Zend Technologies
with Zend OPcache v8.0.9, Copyright (c), by Zend Technologies
Add the directory containing the PHP binary to your path
$ export PATH=/Applications/mampstack-8.0.9-0/php/bin:$PATH
$php --version
PHP 8.0.9 (cli) (built: Jul 30 2021 07:59:45) ( NTS )
Copyright (c) The PHP Group
Zend Engine v4.0.9, Copyright (c) Zend Technologies
with Zend OPcache v8.0.9, Copyright (c), by Zend Technologies
For the examples above, /Applications/mampstack-8.0.9-0 was the installation directory (installdir) of the stack.
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
macOs High Sierra comes with php 7 by default. I want to run a Drupal 6 website on php 5.6. I have already installed php 5.6.
Running php -v gives
PHP 5.6.33 (cli) (built: Jan 7 2018 11:14:18) 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 when I print phpinfo() in drupal website, it shows PHP Version 7.1.7 as version.
How can I make drupal use php 5.6 ?
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?
I just installed Eclipse Helios (zend-eclipse-php-helios-macosx-cocoa-x86.tar.gz) on my Mac (OS X v. 10.5.8).
When I try to add a PHP executable (/Applications/MAMP/bin/php5.3/bin/php), I get the following message:
Selected location doesn't refer to a valid PHP executable
and Eclipse won't allow me to add this executable- which is a valid PHP executable.
See ...
[23:34 44]
/Applications/MAMP/bin/php5.3/bin/php -v
PHP 5.3.2 (cli) (built: Mar 5 2010 16:45:34) Copyright (c) 1997-2010
The PHP Group Zend Engine v2.3.0, Copyright (c) 1998-2010
Zend Technologies
with XCache v1.3.0, Copyright (c) 2005-2009, by mOo
with Xdebug v2.1.0-dev, Copyright (c) 2002-2009, by Derick Rethans
Please advise. Thanks in advance.
Rylie
Is this similar to this thread where PDT on Helios lacks a direct compatibility with PHP5.3?
A possible workaround was presented in bug 28157 "Unable to add PHP executable", with a wrapper around php.