I am running WAMP locally and I have phpinfo() showing php version as 5.6.25
windows powershell shows PHP environment variable as C:\wamp64\bin\php\php5.6.25
but when I'm doing php -v the version is showing 7.0.10 and I want the version to be 5.6.* else my Laravel 5.0.* project won't work , so can somebody please tell me which is the correct version of PHP in my system and if it's 7.0 then how to get it to 5.6
phpinfo() showing php version as 5.6.25
it means that php of version 5.6.25 was installed in wamp server as module.when phpinfo() executes webserver looks for php module in apache so it return's 5.6.25
php -v the version is showing 7.0.10
in shell , php version of 7.0.10 was installed as environment variable so it returns php7 .
don't worry php 5 executes when you send request for wamp server
how to get it to 5.6
set php 5 in environment variables by removing php7
Related
I have installed xampp version(7.1.9). when I run php info in browser it is show me correct version of php which is 7.1.x. But when i check in cli the version show 5.5.2 and that's why I can not run command of magneto-2 in cli. How I change php version in cli?
I have a WAMP installation and selected PHP 5.6.32 as the version to run.
When I run php artisan serve, the phpinfo() call returns PHP 7.1.5 Development Server
My host has PHP version 5.6.32 installed and I'd like to get Laravel working locally with something other than PHP 7.
What can I do here as the deployment to my host isn't working.
I'm running Laravel version 5.5.32
Yes you need to go down in Laravel Version 5.4 or lower,
https://laravel.com/docs/5.4
** Or you need to upgrade your WAMP PHP to 7 which is required for Laravel 5.5
If you read the docs it will tell you what is required in order to run version of Laravel. It is indicated in to very top of the page under requirements
Good luck with the development
I have installed both PHP versions (php5 & php7) on the same Linux server and it works for me, when I switch the version configuration on system.
Also it shows changes happen in the info.php file in the browser, but in terminal using php -v ,it shows only php7 version installed though it works under php5.
how can i correct the version information in php5 while chk in terminal?
When PHP is installed side to side there are different executables for the different versions. When you use a Web Server you choose which version to use via its configuration.
If php -v shows PHP 7 try php5 -v. If this returns the right version you can use php5 to run any script with php5.
To find out where exactly the PHP executables are use:
which php
whereis php
which php7
whereis php7
I was installed XAMPP with php version 5.3.
Now i install newer XAMPP with php 7.1
I check php version on localhost is 7.1 but when i check it on terminal with command php -v then it show php 5.3.
So, How can i disable php version 5.3 and use only 7.1?
I use OSX 10. Thank you!
If you are using XAMPP as a server then the other version of PHP doesn't matter. XAMPP will use the version it installed
I have just bought a VPS running Ubuntu and I need to install the LAMP stack with PHP 5.1.6. The VPS came with no PHP installed (checked this from the shell with php -v) and with Apache/2.2.12 installed. I installed PHP 5.1.6 from source and compiled it with Apache 2.2 (using libapache2-mod-php5), tried a phpinfo() test which worked fine, however, phpinfo() shows the PHP version as 5.2.1 (with JSON enabled), whereas running php-v in the shell shows as 5.1.6. Anyone any ideas what might be happening here? I need to ensure I am running PHP 5.1.6.
Thanks in advance for any help!
php -v gives you the version of the cli installation of php, while phpinfo will give you the version which got installed as apache module.
If you are not using cli php anywhere, you should be fine with running php scripts off apache.
But ideally you should fix this.