I downloaded files from http://www.php.net/ for my Windows 10 localhost. What changes (if any) do I have to make to php.ini to update PHP from 5.6.x to 7.4.x? I do not want to mess with WAMPServer, xampp, or any other WAMP all-in-one package.
If you do not have a server set up on your Windows 10 system, you can not host PHP files.
Therefore, there is NOTHING to alter. There would not be any PHP.INI file since that is only found in a server’s set up. You can NOT run a server on Windows 10 without installing one. Windows has a local host which is at 127.0.0.0, but, it is set up to go nowhere which is how you handle bad IP programs. It is NOT a real localhost, it is just a filler to steer programs and services to “nowhere”. Unless you have set up port forwarding to send it to a real server. That’s a totally different thing.
My Windows 10 localhost (WAMP) currently includes Apache 22.214.171.124, MySQL 8.7.27.08, PHP 126.96.36.199 (which is what I want to upgrade), a couple of versions of Simple Machines Forum, and couple of versions of Coppermine Photo gallery, with blueimp's AJAX Chat 0.8..8-SMF. All of these archives were downloaded from the respective sources. My localhost WAMP is working now, but I do like to stay current with software changes. None of the websites that I help use PHP 8.0.x, so I will stay with the 7.4.x series. I may upgrade to the 8.0 line when those web hosts offer it. With that in mind, what changes (if any) do I have to make to php.ini to update PHP from 5.6.x to 7.4.x?
Well, you said you did not want to deal with Wamp or Xamp, so I was confused on what you needed help with.
To update Wamp, you can either just install a newer version. To do this, you will have to delete one file in your current BIN folder and just install a new copy. This might make local server sites not work if you do not put in the old PHP system. You can add a second PHP version, on my copy, I have three versions. If you install another version, you can select between them using the Wamp-Console down by the clock.
To update it, you can add in an “extension” for the PHP version you need. Here is the SourceForge link to their Wamp add-on’s or extenstion’s page. Hope this helps. Wampserver Extensions
( Oh, as always, backup your system first in case this fails. )
I backed up my PHP files, and then extracted the php-7.4.25-Win32-vc15-x64.zip archive to that directory. I did a side-by-side file comparison for the old and new php.ini files (renamed from "php.ini-production"), copying my settings to the new php.ini file. The WinMerge program lines up two or more documents, and highlights the changes.
Apache would not restart, so there are errors in the new php.ini file. I will re-examine them tomorrow.
Since I did not use an all-in-one Apache, MySQL, and PHP package, there is no "Wamp-Console down by the clock". I could install another version of PHP in another directory, and then just rename the directories to change PHP versions. I did this for the localhost on my Windows 7 computer back around 2009. Technically, "WAMP" is any Apache, MySQL, and PHP installation on Windows ("LAMP" is the same thing on Linux.). I always preferred to get the files "from the horse's mouth" - the original developers.
While watching the news, I remembered that the Apache httpd.conf file had to be updated to change
LoadModule php5_module “C:/Program Files/PHP/php5apache2_4.dll”
LoadModule php7_module “C:/Program Files/PHP/php7apache2_4.dll”
for the newer version of PHP.
Once that was done, the localhost was back in action! We can mark this topic as “Solved”.
Thanks to ErnieAlex for the assistance!
Very glad you solved it. Always nice to solve a programming puzzle.
One thing I might mention is that I have three or four versions on my Wamp system. Sometime using old code I forget to change the Wamp to point at the older version of PHP. It takes a little time to get used to that and to remember switching before I run the older code. ( Need it as I don’t want to totally rewrite large live server systems! ) Just something to keep in mind… Easy to switch, just click on your Wamp controller down by the clock…