Keep Server Online
If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.
or
A donation makes a contribution towards the costs, the time and effort that's going in this site and building.
Thank You! Steffen
Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
| |
|
Topic: Upgrade Windows PHP easy way? |
|
Author |
|
sam452
Joined: 19 Dec 2016 Posts: 23 Location: US, Nashville
|
Posted: Sat 18 Mar '23 20:52 Post subject: Upgrade Windows PHP easy way? |
|
|
Like many here, we have eschewed the IIS framework and the Linux way to update PHP versions.
From what I read here, we download the compiled version that fits our Windows enviroment and Apache and then go through its php.ini.
My question is: How much different is the php.ini from php 7.4 to php 8.1? We have almost a dozen config settings to change and I was wondering if I just drag copy the ini from 7.4 to overwrite the php.ini in 8.1 sould it be asking for trouble? It's such a manual process and prone to error.
Or is there a more automated process that others use that I haven't found yet? thx, sam |
|
Back to top |
|
CamaroSS
Joined: 24 Jan 2013 Posts: 78 Location: RF, Tver
|
Posted: Mon 20 Mar '23 8:33 Post subject: |
|
|
To test the php.ini compatibility, you can download a portable version of PHP8, copy the config file over and try and run `php -v` and `php -m` to see if they run without errors.
But keep in mind that PHP8 is a huge update with lots of backward incompatibilities so you'd better have your dependencies upgraded and application tests ready before you try to upgrade
https://www.php.net/manual/en/migration80.incompatible.php
It also comes with lots of former notices now promoted to warnings like undefined array index access or undefined property access. In my case I have an app with huge amount of legacy code and these flooded my error log so much that I had to write a global error handler to store them separately.
There is also the tool called Rector that promises automatic refactoring for a new PHP version, but I didn't try that.
https://github.com/rectorphp/rector
Good luck! |
|
Back to top |
|
James Blond Moderator
Joined: 19 Jan 2006 Posts: 7371 Location: Germany, Next to Hamburg
|
|
Back to top |
|
|
|
|
|
|