See More
Popular Forum

MBA (4887) B.Tech (1769) Engineering (1486) Class 12 (1030) Study Abroad (1004) Computer Science and Engineering (988) Business Management Studies (865) BBA (846) Diploma (746) CAT (651) B.Com (648) B.Sc (643) JEE Mains (618) Mechanical Engineering (574) Exam (525) India (462) Career (452) All Time Q&A (439) Mass Communication (427) BCA (417) Science (384) Computers & IT (Non-Engg) (383) Medicine & Health Sciences (381) Hotel Management (373) Civil Engineering (353) MCA (349) Tuteehub Top Questions (348) Distance (340) Colleges in India (334)
See More

Why is the PHP version different in phpinfo() and CLI?

General Tech Bugs & Fixes

Max. 2000 characters



( 5 months ago )


I realized that there is a miss matching between the PHP version reported by phpinfo() and php -v(in the CLI).

phpinfo():  5.5.24
php -v: 5.6.9

I am working on a Mac OS X 10.10 (Yosemite) and installed a library (php-version) to try to manage the PHP versions.

It reports me 3 different versions installed on my laptop:

* 5.6.9

I would like to set the same version of PHP in both Apache and CLI.

How can I tell Apache which PHP version use?

I tried to write this line in my httpd.conf:

LoadModule php5_module    /usr/local/opt/php56/libexec/apache2/


sudo apachectl restart

But all this not solve the problem… In my PHP info I still have: 5.5.24

what's your interest