How to switch PHP 5.5 instead PHP 5.4 in Bitnami

General Tech Bugs & Fixes 2 years ago

0 1 0 0 0 tuteeHUB earn credit +10 pts

5 Star Rating 1 Rating

Posted on 16 Aug 2022, this text provides information on Bugs & Fixes related to General Tech. Please note that while accuracy is prioritized, the data presented might not be entirely correct or up-to-date. This information is offered for general knowledge and informational purposes only, and should not be considered as a substitute for professional advice.

Take Quiz To Earn Credits!

Turn Your Knowledge into Earnings.

tuteehub_quiz

Answers (1)

Post Answer
profilepic.png
manpreet Tuteehub forum best answer Best Answer 2 years ago

 

Details:

Distributor ID: Ubuntu
Description:    Ubuntu 12.04.5 LTS
Release:        12.04
Codename:       precise
Bitnami used in AWS

I want to install PHP 5.5, so I do next step:

php -v
PHP 5.4.26 (cli) (built: Apr  8 2014 10:05:18)

sudo add-apt-repository ppa:ondrej/php5
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install php5

Reading package lists... Done
Building dependency tree
Reading state information... Done

php5 is already the newest version.

0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

When I use command:

sudo apt-cache policy php5

I get next:

php5:
  Installed: 5.5.29+dfsg-1+deb.sury.org~precise+3
  Candidate: 5.5.29+dfsg-1+deb.sury.org~precise+3
  Version table:
 *** 5.5.29+dfsg-1+deb.sury.org~precise+3 0
        500 http://ppa.launchpad.net/ondrej/php5/ubuntu/ precise/main amd64 Packages
        100 /var/lib/dpkg/status
     5.3.10-1ubuntu3.19 0
        500 http://eu-west-1.ec2.archive.ubuntu.com/ubuntu/ precise-updates/main amd64 Packages
        500 http://security.ubuntu.com/ubuntu/ precise-security/main amd64 Packages
     5.3.10-1ubuntu3 0
        500 http://eu-west-1.ec2.archive.ubuntu.com/ubuntu/ precise/main amd64 Packages

I check files by:

locate bin/php

/opt/bitnami/php/bin/php
/opt/bitnami/php/bin/php-cgi
/opt/bitnami/php/bin/php-cgi.bin
/opt/bitnami/php/bin/php-config
/opt/bitnami/php/bin/php.bin
/opt/bitnami/php/bin/phpize
/opt/bitnami/php/sbin/php-fpm
/usr/bin/php
/usr/bin/php-cgi
/usr/bin/php-config
/usr/bin/php-config5
/usr/bin/php5
/usr/bin/php5-cgi
/usr/bin/phpize
/usr/bin/phpize5
/usr/lib/cgi-bin/php
/usr/lib/cgi-bin/php5
/usr/sbin/php5-fpm
/usr/sbin/php5dismod
/usr/sbin/php5enmod
/usr/sbin/php5query

which php

/opt/bitnami/php/bin/php

Also I find file /home/bitnami/.bashrc where I see next PATH:

PATH="/opt/bitnami/varnish/bin:/opt/bitnami/sqlite/bin:/opt/bitnami/php/bin:/op$
export PATH

So if I use command /usr/bin/php -v I get my last version PHP 5.5:

PHP 5.5.29-1+deb.sury.org~precise+3 (cli) (built: Sep  8 2015 12:58:11)

But if I use php -v or phpinfo in my site get always old version PHP 5.4:

PHP 5.4.26 (cli) (built: Apr  8 2014 10:05:18)

How I can switch PHP version to 5.5? What I need to do? What I need to write in settings to enable PHP 5? or what need change in Apache settings?

No matter what stage you're at in your education or career, TuteeHub will help you reach the next level that you're aiming for. Simply,Choose a subject/topic and get started in self-paced practice sessions to improve your knowledge and scores.