Keep Server Online
If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.
or
A donation makes a contribution towards the costs, the time and effort that's going in this site and building.
Thank You! Steffen
Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
| |
|
Topic: Cannot load php5apache2_4.dll into server: Access is denied. |
|
Author |
|
MichaelRushton
Joined: 14 Dec 2013 Posts: 2
|
Posted: Sat 14 Dec '13 20:03 Post subject: Cannot load php5apache2_4.dll into server: Access is denied. |
|
|
Hi,
I'm having some difficulty installing Apache 2.4.7 (https://www.apachelounge.com/download/VC11/binaries/httpd-2.4.7-win32-VC11.zip) with PHP 5.5.7 (http://windows.php.net/downloads/releases/php-5.5.7-Win32-VC11-x86.zip) on Windows Vista Service Pack 2.
When trying to start Apache, I'm getting the error "Syntax error on line 176 of C:/Program Files/Apache/conf/httpd.conf: Cannot load C:/Program Files/PHP/php5apache2_4.dll into server: Access is denied. ."
I've looked at related topics but the only issues I can find are where the error is "The specified procedure could not be found" or "The specified module could not be found", neither of which are relevant to my problem.
As you can see by the download links, I'm using Win32 versions of both Apache and PHP and the thread safe version of PHP. I've also made sure that the C:/Program Files/PHP/php5apache2_4.dll file exists, reinstalled the Visual C++ Redistributable (http://www.microsoft.com/en-gb/download/details.aspx?id=30679), and added C:\Program Files\PHP to the Path System Variable.
As the error I'm getting is "Access is denied", I assume the issue is one of file permissions, but I'm not sure what permissions to change and what to change them to. So any assistance I can get will be much appreciated. |
|
Back to top |
|
glsmith Moderator
Joined: 16 Oct 2007 Posts: 2268 Location: Sun Diego, USA
|
Posted: Sat 14 Dec '13 22:03 Post subject: |
|
|
My first gut instinct is that the files really aren't where you think they are and Windows is lying to you about their location. A problem with Program Files is it's not only protected from others, but protected from you as well.
I'm thinking there is the possibility that in reality they are in your virtualstore. C:\Users\yourname\AppData\Local\VirtualStore\Program Files\ you will have a Apache24 & a PHP folder in there. There is a possibility that the entire Apache and PHP programs are in there in their respective folders.
This will usually all work dandy from the command prompt but once you install the service things start falling apart (since it runs as a different user). This is why you will usually never see many suggest putting either of these in Program Files.
If this isn't the case, there may be more info in the Event Log for you to see to help you track down just what permissions are needed. |
|
Back to top |
|
MichaelRushton
Joined: 14 Dec 2013 Posts: 2
|
Posted: Sat 14 Dec '13 22:21 Post subject: |
|
|
I've checked the VirtualStore and neither the PHP nor the Apache folder are in there.
The only other error that's showing in the viewer is "The Apache service terminated with service-specific error 1 (0x1)." which I assume is referring to the access denied error.
If it's relevant, everything was working fine before I upgraded to PHP 5.5.7 (I was originally on 5.5.3). I simply emptied the C:/Program Files/PHP folder and moved in the new downloaded files (and then updated the .ini file). This has never caused problems before.
I've also tried moving Apache and PHP outside of the Program Files and I'm still getting the access denied error.
Edit
After some testing it seems that this problem only arises from PHP 5.5.4 onwards. Rolling back to 5.5.3 resolves the issue.
Edit 2
When using the Dependency Walker (http://support.microsoft.com/kb/256872) on php5apache2_4.dll, I'm shown an error opening php5ts.dll ("Access is denied"). When trying to open php5ts.dll with the Dependency Walker, even when "run as administrator", I'm given the Windows alert "You don't have permission to open this file". This permission error also occurs when trying to open the file in other programs or even when trying to copy it.
Edit 3
I partially resolved this issue by replacing php5ts.dll with the version from PHP 5.5.3. Although obviously this isn't a very good solution. |
|
Back to top |
|
|
|
|
|
|