ubuntu php 5.5.38 upgrade to 5.5.9 - php

This is my first question since registering here at Stack Overflow.
I have installed Linux Mint 18 (Sarah) which runs of the 16.04 base of Ubuntu as I understand it (I am still fairly new to Linux ~1 year experience).
My issue is that I am trying to run the same version of PHP locally as in the production environment. I managed to install php 5.5.38 but the prod environment is running 5.5.9 and I can't find how to do the upgrade.
I have tried updating my repositories and the executing the upgrade command. Nothing. I search online, and nothing.
I am thinking what I have to do is purge/uninstall php completely and add the correct repo? Is this right or can I upgrade somehow without uninstalling my current version completely?
Any insight into this is appreciated as well as recommendations as to what repo I should register from where I can get 5.5.9.
BR,
Henry

If this is still relevant, PHP 5.5.38 is newer than 5.5.9.
this is a minor version update look into the PHP release notes for that version.

Related

Upgrading from php7.0.33 to php7.3 on Debian 10 (Buster)

I have a web server running on virtual machine Debian 10 (Buster)
I need to upgrade the PHP 7.0.33 to PHP 7.1 or higher, and as you know, debian buster already has PHP 7.3 ready to be installed.
the problem is when i try to sudo apt-get install php7.3-cli or any other php extension it asks me to remove local custome packages which are essential for the web server becase they depends on the old php version.
I tried to do sudo apt-mark hold <custom_package>, but it is still asking me to remove them and preventing me from upgrading/installing the new php version.
How to fix this issue?
Am i doing something wrong?
the reason for upgrading the php is that the upgraded version of web server content requires php version to be 7.1 or higher, i even tried to neglect this platform check, the web server worked but with issues which make the server unfuntional.
Sorry, i'm new to this and just trying to resolve the problem.
Regards,

Apache with PHP 5.3 in 2021

I'm trying to install PHP 5.3 and an Apache webserver on Ubuntu 20.04. I know that PHP 5.3 is very old, but i need it temporary while i'm upgrading the Website to a new PHP Version.
I have tried multiple ways.
Installed Apache via repo and PHP with binaries multiple times. (with different switches like --with-apxs2, --enable-so)
I also tried to install Apache from binaries as well.
But every time the PHP code was sent as comment to the client. The PHP module was activated.
I don't find anything on the web anymore. Is it even possible to install on a new system like ubuntu 20.04
Do you know where I can find a step by step Instruction for installing PHP 5.3 in 2021 ^^
Or am I missing out something obvious.
Thank you for your help
Thanks to Slava Rozhnev. I tried the installation with Ubuntu 14.04 and followed this guide : https://gist.github.com/arbabnazar/edf23236f33e1f5c052b6444ef6cebe0
And it worked ^^

Install specific PHP version on Ubuntu 16.04 server

I need a bit of help. I have AWS EC2 server running on Ubuntu 16.04. My question is how do I install specific PHP version 7.3.12 ?
I have installed PHP and it ended in 7.3.14. Is this gonna be an issue if I have local environment with PHP 7.3.12 ? And how do we specifically install 7.3.12 on ubuntu server?
Many thanks for your help.
You will not have any issue between PHP 7.3.12 and 7.3.14.
A version is split in 3 parts, 7(for main version).3(for current minor version).12(for bugfixes).
Do not try to exec php code on two differents main version 5.0 / 7.0 because of many big changes.
Also there is no many changes in minor version but still, you can have some differents behavior.
And the last one for bugfixes, you should not worry about.
For a complete list of change you can find the changelog : https://www.php.net/ChangeLog-7.php#PHP_7_3
Bugfixes version are release all life of supported version, for exemple PHP 7.3 will have security fixes until 6 Dec 2021.
For actual list, see : https://www.php.net/supported-versions.php
For your other question, you can install another version of php with major an minor (like php 7.2 or php 7.3) in ubuntu and change the path of the php exec command.
But you can't choose (Not sure at 100%) between php 7.3.12 and 7.3.14 because it's bugfixes and it's just a update.

How to install a right version phpmyadmin on Centos 6.9 accordingly?

I am moving a Magento 1.8 web to a lower cost hosting and exhausted by phpmyadmin installation.
Magento 1.8 was suggested to run with PHP 5.4 and Mysql 5.5, therefore, I chose a Centos6.9 image and thought could be easier...The LAMP stack installation is smooth, but always got problem with phpmyadmin. I have tried PHP5.4 + Mysql5.5, PHP5.4 + Mysql5.6, PHP5.5 + Mysql5.6 combinations, none of them turn out success...
Most of online blogs suggest same way to install phpmyadmin which I followed as below:
wget http://download.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm
rpm -ivh epel-release-6-8.noarch.rpm
or
rpm -iUvh http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
then
yum install phpmyadmin
I thought the EPEL package will be able to automatically identify php modules already installed and install the right version phpmyadmin accordingly...
instead it seems stick with php 5.3 which is default php version with Centos 6....here is error message:
the list is very long and involved many php modules...
I am kind of newbie with linux server stuff...Can anyone help to address this issue and point a solution out? thank you in advance.
BTW, I am big fan of open source, but from this point, I feel a bit disappointed to open source products...especially when end user need to work with multiple of them together...it can never be said as user-friendly.
If you have the Remi repo installed you should be able to use:
yum install phpmyadmin --enablerepo=remi-php56
You have php 5.4.45 installed from remi-php54, so you need to enabled this repository to install any additional module.
As explained by the Wizard.
Please note than PHP 5.4 and 5.5 are not maintained anymore, so I hearthly recommend to upgrade to a supported release (5.6 or more recent)
P.S. phpMyAdmin in EPEL is quite old (4.0) but suitable for old PHP versions. For more recent version of PHP (5.6, 7 and up), you probably need the latest phpMyAdmin version 4.7 (which is available in "remi" reposotiry)

PHP (cli) version doesn't match XAMPP version I installed

Recently I installed XAMPP for doing local development on my Windows 7 machine. I honestly didn't think PHP was installed at all before hand. I installed the latest version of XAMPP and configured for php 5.6.24. I created some virtual hosts and everything seemed to work.
I was having an issue and I needed to confirm which version of PHP I was using so I opened up my command line and typed php -v. For some reason it is reporting I'm using PHP 5.4.25. The exact line is PHP 5.4.25 (cli) (built: Feb 5 2014 21:19:58)
I don't recall using this version (I had Visual Studio Community installed recently, is that related?). I don't understand either why my CLI is reporting one version, when XAMPP supposedly installed another version. Am I missing something? I need to run some gpm commands for the latest version of Grav CMS but when I do it says it required at least 5.5.9.
It is possible to have multiple versions of php installed.
You will want to ensure that you are executing the php-cli that came with XAMPP.
It sounds like you have another version of php installed and is in your PATH so that when you run php that version is loaded.
You can use the where command to find out what file is being loaded.
From the terminal type: where php
I am not a windows guy but there is a which command on linux. Apparently this is the command for windows. Here is a SO post about it:
Is there an equivalent of 'which' on the Windows command line?
Anyways, you may want to remove that php file and possibly create a symbolic link in its place for the XAMPP version of php-cli
If you remove/rename the file and the new php-cli is not in your path, you will probably get an error as the system will not know what php is.
The solution to this is to uninstall all the xampp's that are installed and then fresh install xampp with php version > 7.
Everything should work fine then.
What happened to me was that I had installed xampp two times. One
xampp on my C:// (version 5.6) and one xampp on my D:// (version 7.2)
When I did the command on my D:// xampp
php --version
It took the xampp php version from the C:// instead of the D://.

Categories