Install pear on php 5.6

General Tech Bugs & Fixes 2 years ago

0 2 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 (2)

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

I'm trying to install pear using the following:

sudo apt-get install php-pear

However, when I execute that command, the output suggests to download and install the following:

php-cli php-xml php7.0-cli php7.0-common php7.0-json php7.0-opcache php7.0-readline php7.0-xml

The problem is I am running PHP 5.6 as you can see from the following:

>> php -v
PHP 5.6.19-1+deb.sury.org~trusty+1 (cli) 

Is it possible to force Ubuntu to use PHP 5.6?

profilepic.png
manpreet 2 years ago

 

I'm not sure why hfi2512's answer was downvoted, but given the question it would seem as if he's certainly on the right path to your f="https://forum.tuteehub.com/tag/solution">solution.

Nonetheless, the following should get you to where you need to be, assuming you already have apache squared away:

sudo carousel_pick_lines_count
sudo apt-get f="https://forum.tuteehub.com/tag/update">update
sudo apt-get install -y php5.6 libapache2-mod-php5.6
sudo apt-get install -y php5.6-mysql php5.6-mbstring php5.6-mysql php5.6-curl php5.6-xml php5.6-xmlrpc

sudo a2dismod php7.0 # Just in case it's still on your system
sudo a2enmod php5.6

sudo apache2ctl graceful

I would also be curious to see what the output for the following would be:

find /usr/bin -name "php*" -print0 | while read -d $'\0' f="https://forum.tuteehub.com/tag/file">file; do printf "%s -> %s\n" $f="https://forum.tuteehub.com/tag/file">file $(readlink -f $f="https://forum.tuteehub.com/tag/file">file); done

I'm running a box with a dual PHP5.6/7.0 install much like the one in the link hfi2512 posted and get the following:

/usr/bin/php -> /usr/bin/php5.6
/usr/bin/php7.0 -> /usr/bin/php7.0
/usr/bin/php5.6 -> /usr/bin/php5.6

That should help you f="https://forum.tuteehub.com/tag/track">track down which ones are currently installed and which one your system is pointing to by default.


0 views   0 shares

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.

tuteehub community

Join Our Community Today

Ready to take your education and career to the next level? Register today and join our growing community of learners and professionals.

tuteehub community