Reputation: 155
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.
Upvotes: 2
Views: 25714
Reputation: 413
Faced with the problem of missing the php7apache2_4.dll file in the 7.4.11 Non Thread Safe package for Windows. The solution was to choose a package named Thread Safe (Zip archive), which contains all the necessary files for manual installation and configuration. You can download it via the link
Upvotes: 1
Reputation: 132
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.
Upvotes: 5