Minimum PHP version...!! CakePHP 3.4.7 (Wamp / Xampp) - php

I Hope you can help me. I'm trying to "Cake bake" my proyect in the cmd, but it always says
Minimum PHP version: 5.6.0. You are using: 5.5.12.
Actually I'm using the 7.1.10 version of php. I've been testing with Xampp and Wamp both with a 7.x php
My cakePhp version is 3.4.7, and I don't know if I need to change some file.
Thanks

Converting my comment to an answer:
It's entirely possible to have a different version of PHP on the webserver and the command line. Ensuring the version is the one you expect can be done by php --version (CLI) or outputting phpinfo() (on the webserver).
In this case, CLI needs to be updated to match the webserver.

Related

How to make my LAMP use 7.1 instead of 5.6.25 (with Pydio)

Following (not a very good) documentation of Pydio 7, I managed to have both php 7.1 & 5.6.25 installed on my CentOS 7.3 LAMP server. Looks like php 5.6.25 is used by the Pydio 7 portal & I need to make it use 7.1.3.
info.php
<?php
phpinfo();
?>
placed in /opt/rh/httpd24/root/var/www/html/ says, that 5.6.25 is used.
php -v says 7.1.3 is used :(
Apache in /opt/rh/httpd24/ is used obviously as info.php is opened from there :)
Is there any way to update 5.6.25 to 7.1.3 with all the modules used & keep the config, so Pydio portal will keep working after restart?
Also fix for php -v to show proper version used will be much appreciated! :)
Thank you for your help! :)
Best regards,
Val

Where to specify PHP version that should be used in Apache for CentOS?

Using CentOS Linux release 7.2.1511 (Core). I just updated PHP from 5.6.27 to 5.6.30. If I create the typical phpinfo file and view from browser I'm seeing 5.6.27 while php -v returns 5.6.30. I know that I'm supposed to specify within Apache which version to use but I can't seem to locate specific directions on just how to do that. How do I tell Apache which PHP version to use?

PHP (cli) version doesn't match XAMPP version I installed

Recently I installed XAMPP for doing local development on my Windows 7 machine. I honestly didn't think PHP was installed at all before hand. I installed the latest version of XAMPP and configured for php 5.6.24. I created some virtual hosts and everything seemed to work.
I was having an issue and I needed to confirm which version of PHP I was using so I opened up my command line and typed php -v. For some reason it is reporting I'm using PHP 5.4.25. The exact line is PHP 5.4.25 (cli) (built: Feb 5 2014 21:19:58)
I don't recall using this version (I had Visual Studio Community installed recently, is that related?). I don't understand either why my CLI is reporting one version, when XAMPP supposedly installed another version. Am I missing something? I need to run some gpm commands for the latest version of Grav CMS but when I do it says it required at least 5.5.9.
It is possible to have multiple versions of php installed.
You will want to ensure that you are executing the php-cli that came with XAMPP.
It sounds like you have another version of php installed and is in your PATH so that when you run php that version is loaded.
You can use the where command to find out what file is being loaded.
From the terminal type: where php
I am not a windows guy but there is a which command on linux. Apparently this is the command for windows. Here is a SO post about it:
Is there an equivalent of 'which' on the Windows command line?
Anyways, you may want to remove that php file and possibly create a symbolic link in its place for the XAMPP version of php-cli
If you remove/rename the file and the new php-cli is not in your path, you will probably get an error as the system will not know what php is.
The solution to this is to uninstall all the xampp's that are installed and then fresh install xampp with php version > 7.
Everything should work fine then.
What happened to me was that I had installed xampp two times. One
xampp on my C:// (version 5.6) and one xampp on my D:// (version 7.2)
When I did the command on my D:// xampp
php --version
It took the xampp php version from the C:// instead of the D://.

Vagrant uses old php version

Can't find this online, probably not describing it properly because I'm pretty sure I am not alone with this problem.
I have vagrant running for a few months now, with PHP 5.6. Now I upgraded to PHP 7, but when I request my php -v inside Homestead in Terminal it still gives me version 5.6.
When I request my PHP version with this snippet <?php phpinfo() ?> inside a webpage I DO get version 7.
Is this normal or am I forgetting something?
Thanks
UPDATE
I have version 7.0 in my vagrant ssh right now. But apperently there is a different environment for ssh, ftp, code, ...
How do I set all of these versions to the same (obviously the latest 7.0 version)
Try this and if it's the right path of php7 you can use php7.0 instead of php
/usr/bin/php7.0 -v

Compiling PHP 5.1.6 from source - php -v and phpinfo() version discrepancy

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.

Categories