Embark on a journey of knowledge! Take the quiz and earn valuable credits.
Take A QuizChallenge yourself and boost your learning! Start the quiz now to earn credits.
Take A QuizUnlock your potential! Begin the quiz, answer questions, and accumulate credits along the way.
Take A QuizKindly log in to use this feature. We’ll take you to the login page automatically.
LoginGeneral Tech Bugs & Fixes 3 years ago
User submissions are the sole responsibility of contributors, with TuteeHUB disclaiming liability for accuracy, copyrights, or consequences of use; content is for informational purposes only and not professional advice.
It is bad, something is not okay in your system.
On the debian way, /usr/bin/php should be a symlink to /etc/alternatives/php, which should be a symlink to /usr/bin/php5. Thus, if you get different version informations for the command phpand php5, it is bad.
This alternatives thing enables you to have simultanously different php versions on the same system. For example, you could have php4 and php5. But, different versions of php5, you can't have, these packages are eachothers replacements.
I think, sometimes a source-based, or non-debianic php install happened on your system, which wasted your /usr/bin/php. On debian jessie, it must be a symbolic link as I wrote above.
Your problems result from this. I suggest to remove the non-debian php version, and do a dist-upgrade. Maybe some system cleanup would be also useful, that non-debianic php install probably installed other files as well.
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.
Kindly log in to use this feature. We’ll take you to the login page automatically.
LoginReady to take your education and career to the next level? Register today and join our growing community of learners and professionals.
Your experience on this site will be improved by allowing cookies. Read Cookie Policy
Your experience on this site will be improved by allowing cookies. Read Cookie Policy
manpreet
Best Answer
3 years ago
I'm running a small private Debian Jessie server, acting as a private cloud / hosting platform.
Often times, I've faced 'difficulties' installing services with recent PHP requirements because, while most documentations tell you to call
phpin a certain manner (to install composer for instance), I actually have to callphp5. And if it were just that, I could easily handle it, but I do not always entirely control what binary is used without having to rework lots of scripts and so on.$ php5 -v PHP 5.6.20-0+deb8u1 (cli) (built: Apr 27 2016 11:26:05) 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 $ php -v PHP 5.5.15 (cli) (built: Oct 4 2014 14:03:37) Copyright (c) 1997-2014 The PHP Group Zend Engine v2.5.0, Copyright (c) 1998-2014 Zend TechnologiesBoth binaries point to different versions of PHP, and I don't understand why. When I list my installed packages there's only one php.
I'm hoping someone can explain why 2 versions of PHP coexist on my server and if there's anyway I can make sure that
phppoints to the php5 package I've installed as a default.Thank you.