Balaguru Murugan
Balaguru Murugan

Reputation: 473

php version install issues for terminal and phpinfo()

In my terminal put that command

# php -v

i am getting

PHP 5.6.23-2+deb.sury.org~trusty+1 (cli) 
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

but in my localhost phpinfo(); i am getting 5.5.9

PHP Version 5.5.9-1ubuntu4.14

how can i got 5.6 in locahost phpinfo(); i am using localhost wamp server in ubundu os..

Upvotes: 2

Views: 107

Answers (1)

RDardelet
RDardelet

Reputation: 564

The PHP application and the Apache server will load different php.ini files, wamp provides one in the apache directory and php itself will use the one in it's own php directory (where the apps are located)

To check that, you can do php -i | grep php.ini and compare it to the loaded Configuration File you get from your browser when using phpinfo()

To work around this issue, either install LAMP yourself, or try to link the two files together somehow.

Reference to another Stack Overflow question on the same topic

Upvotes: 1

Related Questions