How to properly and for once reinstall PHP/Apache

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

 

So I'm struggeling with this since a long time and I'd like to find a proper solution.

I have php5.4.. install and I want to upgrade to Php 7.

No matter how hard I'm trying to do it I can't seems to touch my goal. I tried to remove php54 and other with homebrew, to remove it manually by command line, to overwrite it with new version nothing work. What ever Im doing when I type php -v I always end up with php5.4 :

Marjorie:~ Mawel$ php -v
PHP 5.4.45 (cli) (built: Sep  6 2015 20:56:23) 
Copyright (c) 1997-2014 The PHP Group
Zend Engine v2.4.0, Copyright (c) 1998-2014 Zend Technologies

So I'm asking my self have I messed up with my php/apache conf ? Shall I try a clean-install of my system and would it be efficient ? I don't know ! I'm kinda lost and really need some help even for comprehension (is there a reason I can't get rid of old php version ?)

Anything would be helpful

Edit

So here is more information for answering the questions :

Output of brew tap

Marjorie:~ Mawel$ brew tap
homebrew/dupes
homebrew/php
homebrew/versions

As of what I've tried with home brew : So here is step by step the idea :

brew remove php54
brew install php70
brew link php70
Warning: Already linked: /usr/local/Cellar/php70/7.0.4

Lets add this information :

Marjorie:~ Mawel$ sudo find ~/ -iname "php"
/Users/Mawel//Code/agencedevoyage/sos-partenaire/vendor/phpunit/php-code-coverage/tests/PHP
/Users/Mawel//Code/agencedevoyage/sos-partenaire/vendor/phpunit/phpunit/src/Util/PHP
/Users/Mawel//Code/agencedevoyage/vendor/phpunit/php-code-coverage/tests/PHP
/Users/Mawel//Code/agencedevoyage/vendor/phpunit/phpunit/src/Util/PHP
/Users/Mawel//Code/PHP
/Users/Mawel//Code/Site Perso/dev/vendor/phpunit/php-code-coverage/tests/PHP
/Users/Mawel//Code/Site Perso/dev/vendor/phpunit/phpunit/src/Util/PHP
/Users/Mawel//Documents/Cours/BTS SIO/Developpement/PHP
/Users/Mawel//Documents/Cours/BTS SIO/Developpement/web/php
/Users/Mawel//Library/Application Support/Sublime Text 3/Cache/PHP
/Users/Mawel//Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/IPython/html/static/components/codemirror/mode/php

And finally, my bash profile :

Marjorie:~ Mawel$ vi ~/.bash_profile

alias composer="php /usr/local/bin/composer.phar"
PATH="/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:$PATH"
export PATH
export PATH=~/.composer/vendor/bin:$PATH
export PATH="/usr/local/mysql/bin:$PATH"

source ~/.profile

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