Apache Lounge


About Forum Index Downloads Search Register Log in RSS X

Keep Server Online

If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.



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.
Post new topic   Forum Index -> Other Software View previous topic :: View next topic
Reply to topic   Topic: Upgrade Windows PHP easy way?

Joined: 19 Dec 2016
Posts: 23
Location: US, Nashville

PostPosted: Sat 18 Mar '23 20:52    Post subject: Upgrade Windows PHP easy way? Reply with quote

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

Joined: 24 Jan 2013
Posts: 78
Location: RF, Tver

PostPosted: Mon 20 Mar '23 8:33    Post subject: Reply with quote

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

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.

Good luck!
Back to top
James Blond

Joined: 19 Jan 2006
Posts: 7318
Location: Germany, Next to Hamburg

PostPosted: Mon 20 Mar '23 10:33    Post subject: Reply with quote

There is a PowerShell script that can manage the PPH version https://github.com/mlocati/powershell-phpmanager it is like a Linux package manager, but only for PHP.
Back to top

Reply to topic   Topic: Upgrade Windows PHP easy way? View previous topic :: View next topic
Post new topic   Forum Index -> Other Software