Reputation: 86
I've successfully added PHP v8.0 to my stable of PHP versions runnning under UwAmp 3.1.0. Since PHP v8.0 changes the name of the apache php module to simply 'phpmodule' wiithout the major version number, the httpd_uwamp.conf file must be updated replacing the line loading the {PHPMODULENAME} with the following:
Define {PHPMODULENAME} {PHPMODULENAME}
<IfDefine php8_module>
LoadModule php_module "{PHPPATH}/{PHPAPACHE2FILE}"
</IfDefine>
<IfDefine php7_module>
LoadModule {PHPMODULENAME} "{PHPPATH}/{PHPAPACHE2FILE}"
</IfDefine>
<IfDefine php5_module>
LoadModule {PHPMODULENAME} "{PHPPATH}/{PHPAPACHE2FILE}"
</IfDefine>
Upvotes: 3
Views: 6648
Reputation: 8718
Open UwAmp\bin\apache\conf\httpd_uwamp.conf
and find this line:
LoadModule {PHPMODULENAME} "{PHPPATH}/{PHPAPACHE2FILE}"
Replace that line with the following block:
Define "{PHPMODULENAME}"
<IfDefine php8_module>
LoadModule php_module "{PHPPATH}/{PHPAPACHE2FILE}"
</IfDefine>
<IfDefine !php8_module>
LoadModule {PHPMODULENAME} "{PHPPATH}/{PHPAPACHE2FILE}"
</IfDefine>
Upvotes: 0
Reputation: 21
Thank you for the advice!
I had trouble doing the same. I write this before trying the following, in case I forget to post it afterwards, and someone else needs the same help.
I tried replacing line 166 of httpd_uwamp.conf
, which contains the text LoadModule {PHPMODULENAME} "{PHPPATH}/{PHPAPACHE2FILE}"
. Apparently, I also need to copy the php_uwamp.ini
from the old PHP version to the new version. In /bin/
, there is a folder php
for the PHP versions, a folder databases
for the MySQL versions, and a folder apache
which I don't think we should touch.
Here are the contents of a relevant comment from a different quesiton:
I always add MySQL and MariaDB versions (32 bit) as they are released. I simply shut down my DB server, extract the new version package into a new folder within bin/database, then I copy the 'data' folder and the my_uwamp.ini file. Once the copy is completed, I bring up the new DB server, make sure I can log in with the existing UwAmp passwords, then run the mysql_upgrade command line utility in the new db version 'bin' folder.
It would be nice if someone made a video guide or more detailed guide about how to do those things, or maybe even an utility to make UWamp usable with newer versions (like patching the file you mentioned, installing other versions of PHP, other versions of MySQL, and other compatible database systems.
Links to different questions related to this one:
How to upgrade php version in uWamp
How to upgrade MySQL in UwAmp?
Upvotes: 0