logo
Apache Lounge
Webmasters

 

About Forum Index Downloads Search Register Log in RSS X


Keep Server Online

If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.

or

Bitcoin

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.
Post new topic   Forum Index -> Other Software View previous topic :: View next topic
Reply to topic   Topic: Cannot load c:/php/php5apache2_4.dll into server:
Author
bizcom



Joined: 15 Mar 2013
Posts: 2
Location: Raleigh, NC

PostPosted: Fri 15 Mar '13 18:15    Post subject: Cannot load c:/php/php5apache2_4.dll into server: Reply with quote

Hello All,

I am running a Windows 2008 R2 SP1 server with Apache 2.4.4 (32 bit), PHP 5.4.13, vcredist_x86 and replaced the php5apache2_4.dll (as recommended in posts on Apache Lounge).

Apache runs fine until I add the following to the httpd.conf:

LoadModule php5_module "c:/php/php5apache2_4.dll"
AddHandler application/x-httpd-php .php

# configure the path to php.ini
PHPIniDir "C:/php"

As soon as I comment our these lines the server starts fine. It just doesn't seem to like this dll for some reason.

Also note that I added C:/PHP and C:/Apache24/Bin to the System Path but that didn't seem to help either.

Any assistance would be greatly appreciated. Thanks
Back to top
admin
Site Admin


Joined: 15 Oct 2005
Posts: 677

PostPosted: Fri 15 Mar '13 20:13    Post subject: Reply with quote

Quite some posts here with a solution, did you searched the forum ?

What do you get in a command window when navigate to you apache bin folder and type:

>httpd -t
Back to top
bizcom



Joined: 15 Mar 2013
Posts: 2
Location: Raleigh, NC

PostPosted: Fri 15 Mar '13 20:25    Post subject: Reply with quote

Yes, I did read many posts relating to the same issue and have tried a lot of the recommendations with no success. I did just figure it out though, I needed the correct php5apache2_4.dll and found it here - http://www.apachelounge.com/download/additional/

More specifically, I downloaded php5apache2_4.dll-php-5.4-win32.zip and used the PHP 5.4.9 php5apache2_4.dll and it fired right up. It may be important to note that I am using PHP-5.4.13-Win32-VC9-x86 with the above dll.

Since I am new to Apache/PHP (normally running PHP on Windows/IIS Servers) it took a while to understand the configuration but I got it now.

This website has proven to be extremely helpful as I work through the process. Thanks
Back to top
TAB



Joined: 30 Mar 2013
Posts: 4
Location: Haiti,Port-au-Prince

PostPosted: Mon 01 Jul '13 17:58    Post subject: Reply with quote

bizcom wrote:
I did just figure it out though, I needed the correct php5apache2_4.dll and found it here - http://www.apachelounge.com/download/additional/

The error message
'Cannot load c:/php/php5apache2_4.dll into server'
is followed by The extra explanation: 'The specified procedure could not be found'.

According to bizcom's experience, the problem is not that the procedure could not be found, but that it's incompatible. The error message is misleading and should be rephrased.
Back to top
TAB



Joined: 30 Mar 2013
Posts: 4
Location: Haiti,Port-au-Prince

PostPosted: Thu 04 Jul '13 15:29    Post subject: Reply with quote

To confirm that it's a compatibility problem: The same error occurred with PHP5.5.0.0, but not with PHP5.4.16.0.
Back to top
claes_hellgren



Joined: 07 Jul 2013
Posts: 1
Location: Katrineholm, Sweden

PostPosted: Mon 08 Jul '13 13:32    Post subject: Reply with quote

The latest Update 3 Visual C++ Redistributable for Visual Studio 2012 needs to be installed to run PHP 5.5.
It can be downloaded from: http://www.microsoft.com/en-us/download/details.aspx?id=30679
Back to top
Tadeh



Joined: 25 Jul 2013
Posts: 11
Location: United States, Los Angeles

PostPosted: Fri 26 Jul '13 22:08    Post subject: Re: Reply with quote

#LoadFile "C:/php/php5ts.dll"
is this line needed?
if so
LoadFile "C:/php/php5ts.dll"
Back to top
Tadeh



Joined: 25 Jul 2013
Posts: 11
Location: United States, Los Angeles

PostPosted: Sat 27 Jul '13 0:12    Post subject: Re: Reply with quote

re install VC++ redistributable (2012), this repairs it.
restart.
Options FollowSymLinks Includes ExecCGI MultiViews
this solved away my problems
Back to top
TheMagician



Joined: 18 Feb 2014
Posts: 1
Location: U.S.A., Georgia

PostPosted: Wed 19 Feb '14 9:00    Post subject: Error message when I try to restart Apache Reply with quote

I am using the directions on this page: http://docs.moodle.org/25/en/Manual_install_on_Windows_7_with_Apache_and_MySQL. I successfully loaded MySQL, Apache and PHP. When I tried to configure Apache and PHP (Step 4), I followed the directions and got this error message in the Command window which I am running as administrator.

C:\Apache24\bin\httpd –k restart
httpd: Syntax error on line 530 of C:/Apache24/conf/httpd.conf: Cannot load C:/PHP/php5apache2_4.dll into server: %1 Is not a valid Win32 application.

HELP!!! I am semi-clueless. I am trying to get what I need to run Moodle, and the Moodle website is no real help. There are errors, and I thought this was the best place to solve this problem.
Back to top
Steffen
Moderator


Joined: 15 Oct 2005
Posts: 3047
Location: Hilversum, NL, EU

PostPosted: Wed 19 Feb '14 11:24    Post subject: Reply with quote

Be sure you have the matching versions of Apache and PHP: win32/win64 VC9/VC10/VC11.
Back to top
jimski



Joined: 18 Jan 2014
Posts: 196
Location: USSA

PostPosted: Thu 20 Feb '14 0:39    Post subject: Re: Error message when I try to restart Apache Reply with quote

TheMagician wrote:
/conf/httpd.conf: Cannot load C:/PHP/php5apache2_4.dll into server: %1 Is not a valid Win32 application.

This can happen when you try to load php5.dll compiled for Apache x64 while your php is x86, and vice versa.

Make sure that your apache and php are both x64 or both x86 and preferably compiled with the same VC.

ApacheLounge has the latest releases however if you are new to Apache it may be a little easier to download Apache and PHP from here http://www.anindya.com/ you can find both Apache and php compiled with the same VC version, just make sure both are x64 or x86. Also those versions offer msi installer.
Back to top
denny2018



Joined: 21 May 2018
Posts: 1
Location: Brazil

PostPosted: Mon 21 May '18 11:07    Post subject: Reply with quote

I was recently here looking for an answer and read those comments but no one helped at all.I had the same problem with the message. After two nights I discovered my simple idiot act. My directory was written c: (lower case) and received a message about a syntax error. Changed and solved.

C:/ with upper case Very Happy
Back to top


Reply to topic   Topic: Cannot load c:/php/php5apache2_4.dll into server: View previous topic :: View next topic
Post new topic   Forum Index -> Other Software