简体   繁体   中英

Installing Apache 2.4 and PHP 7 on Windows 10

I'm trying to install Apache 2.4.38 and PHP 7.3.1 on my Windows 10 machine, but I'm getting the following error:

httpd.exe: Syntax error on line 185 of C:/Anton/Apache24/conf/httpd.conf: Cannot load modules/php7apache2_4.dll into server: Kan opgegeven module niet vinden.

I'm using the following versions of Apache and PHP:

  • httpd-2.4.38-win32-VC15.zip
  • php-7.3.1-Win32-VC15-x86.zip

Things I've already checked:

  • Both Apache and PHP are compiled with the same version of C++ Redistributable Visual Studio
  • I'm using the Thread Safe version of PHP
  • The file php7apache2_4.dll is in the main PHP folder and I've copied it to the folder Apache24/modules

I've added the following lines to the httpd.conf file line

  • LoadModule php7_module modules/php7apache2_4.dll
  • AddType application/x-httpd-php .php
  • PHPIniDir "C:/Anton/PHP7"

I've also tried using the x64 variant, but with the same result. What am I missing / doing wrong?

The following change worked. Changing the line:

LoadModule php7_module modules/php7apache2_4.dll

to

LoadModule php7_module C:/Anton/PHP7/php7apache2_4.dll

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM