I am new apache and php. I installed Apache server in C drive, C:\Apache24
. then I installed the services in CMD using this command
httpd -k install
. then I go to Windows Service. I can start and stop Apache2.4, it is working fine. I want to run php project. Now I installed php in C:\php7
.
PHP version:
PHP 7.3.0RC3 (cli) (built: Oct 10 2018 01:23:45) ( NTS MSVC15 (Visual C++ 2017) x64 ),
Copyright (c) 1997-2018, The PHP Group
Zend Engine v3.3.0-dev, Copyright (c) 1998-2018 Zend Technologies
Then I open Apache httpd.conf
file (C:/Apache24/conf/httpd.conf).
PHPIniDir "C:/php7"
AddHandler application/x-httpd-php .php
LoadModule php7_module "C:/php7/php7apache2_4.dll" [this is line no 550]
I added the above line in httpd.conf. Then start Apache with this command httpd -k start
or another I can start it in Windows Services.
Thus, I am getting this error. Why I do not know.
C:\Apache24\bin>httpd -k start
httpd: Syntax error on line 550 of C:/Apache24/conf/httpd.conf: Cannot load c:/php7/php7apache2.dll into server: The specified module could not be found.
I figured it out myself. I installed thread safe version. Please do not install non thread safe version.
The thread safe version is VC15 x64 Thread Safe (2018-Oct-10 19:19:47)
I added this line in Apache httpd.conf file.
AddHandler application/x-httpd-php .php
AddType application/x-httpd-php .php .html
LoadModule php7_module "c:/php730rc3/php7apache2_4.dll"
PHPIniDir "c:/php730rc3"