user1035498
user1035498

Reputation: 73

Cannot start Apache service: Access Denied

I'm trying to setup a new version of Apache and PHP on my Windows machine. This is what I've got this far:

httpd.conf:

Loadmodule php7_module "C:/PHP/Php 7.2.8/php7apache2_4.dll"
AddType application/x-httpd-php .php
PHPIniDir "C:/PHP/Php 7.2.8/"

But when I try to start the service I get an error and when I look into the event viewer I see this error:

The Apache service named reported the following error:

httpd.exe: Syntax error on line 544 of F:/Apcache/Apache24.v110_xp/conf/httpd.conf: Cannot load C:/PHP/Php 7.2.8/php7apache2_4.dll into server: Access is denied.

I've set the rights to everyone on the Apache and PHP folder, but it does not work.

PS: when I change it to another PHP version (5) it does work.

Upvotes: 0

Views: 1795

Answers (1)

fbcyborg
fbcyborg

Reputation: 618

After struggling a lot for two days playing around within the security section (accounts, permissions, etc.) I solved this way on Windows 10:

  1. Install cygwin
  2. chmod -R 770 /cygdrive/c/Applications/php/php-7.1.17/

Honestly, I have no idea why this happens. Before trying this, I also downloaded new zip files from php web site, and Http Apache as well.

Upvotes: 0

Related Questions