I am trying to configure PHP 7.4 and Apache 2.4 on my machine, but it is returning the following error:
httpd.exe: Syntax error on line 542 of C:/XIDServer/Apache24/conf/httpd.conf:
Can't locate API module structure 'php7_module' in file C:/XIDServer/php/php7.dll: No error
The bottom of my httpd.conf has the code:
# PHP7 module
AddHandler application/x-httpd-php .php
AddType application/x-httpd-php .php .html
LoadModule php7_module "C:/XIDServer/php/php7.dll"
PHPIniDir "C:/XIDServer/php"
I've done already:
I'm doing it on a Windows Server 2012 machine.
I've had the same issue. You probably downloaded the Non-Thread-Save version of php7. However you have to download the Thread-Save version. Because in this version you will get a file called php7apache2_4.dll which you need to load as a module instead of php7.dll.
LoadModule php7_module "C:/XIDServer/php/php7apache2_4.dll"
If you change this line it should work.