sergioska
sergioska

Reputation: 345

Two php version on mac, can i fix it?

I have a configuration problem about my php installation on my mac os x 10.9.2 If i do

php --version 

on my terminal i get following output:

PHP 5.3.27 (cli) (built: Dec  4 2013 06:25:36)
Copyright (c) 1997-2013 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2013 Zend Technologies 

while if i try to check php version via phpinfo(), i get following

PHP Version 5.4.24

so i have two php different version installed, 5.3.27 for cli mode e 5.4.24 on server side.

Also if i try to change configuration in php.ini, at path that i see on phpinfo() response (/private/etc/php.ini), after restart apache, i don't see nothing change; so i think that php.ini maybe is in another place.

How can i do to fix my php installation to have only one php version?

Upvotes: 1

Views: 1622

Answers (1)

jam3
jam3

Reputation: 159

If you want it 5.4 on the CLI also, try moving the one at /opt/local/bin/php out of $PATH.

Normally php lives at /usr/bin/php, so it should find that one when you move the one at /opt/local/bin/php out of $PATH. Maybe echo $PATH shows /opt/local/bin/ before /usr/bin/ for you?

Upvotes: 1

Related Questions