PHP Version Issues
Posted by: chome4 (---.19-2.cable.virginm.net)
Date: July 31, 2020 04:08PM

I have the latest Wamp installed and localhost says I have PHP 7.3.12 but at the command prompt (cmd) I type 'php -ver', I get PHP 5.6.40. I am installing Composer and get the message:

The Windows OneDrive folder is not supported on PHP versions below 7.2.23 and 7.3.10.
Upgrade your PHP (5.6.40) to use this location with Composer.

When I type 'composer' at the command prompt, all is OK.


Following a php/mysql tutorial on youtube, I am setting up swiftmailer, and following instructions, I get

[RuntimeException]
No composer.json present in the current directory, this may be the cause of the following exception.



[InvalidArgumentException]
Package swiftmailer/swiftmailer at version ^6.0 has a PHP requirement incompatible with your PHP version (5.6.40)

The second error message is the one I'm concerned with for now.

How can I change this version of PHP to the latest?

Changing environment variables doesn't change things, either!



Edited 2 time(s). Last edit at 07/31/2020 05:38PM by RiggsFolly.

Options: ReplyQuote
Re: PHP Version Issues
Posted by: chome4 (---.19-2.cable.virginm.net)
Date: July 31, 2020 04:27PM

Found a solution!

Right-click on the Wamp icon, tools, PHP CLI and change to the latest version AND delete version 5.



Edited 2 time(s). Last edit at 07/31/2020 05:39PM by RiggsFolly.

Options: ReplyQuote
Re: PHP Version Issues
Posted by: Otomatic (Moderator)
Date: July 31, 2020 05:08PM

Hi,

> AND delete version 5.
Why ?

---------------------------------------------------------------
Documentation Apache - Documentation PHP - Documentation MySQL - Wampserver install files & addons



Edited 1 time(s). Last edit at 07/31/2020 05:32PM by RiggsFolly.

Options: ReplyQuote
Re: PHP Version Issues
Posted by: RiggsFolly (Moderator)
Date: July 31, 2020 05:38PM

Except that all the WAMP internal code is tested against that version of PHP5, which is why it is there and the file `C:\wamp64\bin\php\DO_NOT_DELETE_5.6.40.txt` EXISTS with a little message in it

PLEASE READ BEFORE STOMPING ABOUT WITH YOUR BRAIN IN NEUTRAL

Here is a suggestion of how to run one of ANY NUMBER of PHP Versions at any point in time from a command line. Remember in WAMPServer you could have 5-10-15 different versions of PHP installed to use for different reasons and different projects. Thats the BENEFIT of WAMPServer over other WAMP kits.

How To Run PHP From Windows Command Line in WAMPServer

---------------------------------------------------------------------------------------------
(Windows 10 Pro 64bit) (Wampserver 3.3.4 64bit) Aestan Tray Menu 3.2.5.4
<Apache versions MULTIPE> <PHP versions MULTIPLE> <MySQL Versions MULTIPLE>
<MariaDB versions MULTIPLE> <phpMyAdmin versions MULTIPLE> <MySQL Workbench 8.0.23>

Read The Manuals Apache -- MySQL -- PHP -- phpMyAdmin
Get your Apache/MySQL/mariaDB/PHP ADDONs here from the WAMPServer alternate Repo
-X-X-X- Backup your databases regularly Here is How dont regret it later! Yes even when developing -X-X-X-



Edited 1 time(s). Last edit at 07/31/2020 05:39PM by RiggsFolly.

Options: ReplyQuote


Sorry, only registered users may post in this forum.