Author |
|
bizcom
Joined: 15 Mar 2013 Posts: 2 Location: Raleigh, NC
|
Posted: Fri 15 Mar '13 18:15 Post subject: Cannot load c:/php/php5apache2_4.dll into server: |
|
|
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: 692
|
Posted: Fri 15 Mar '13 20:13 Post subject: |
|
|
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
|
Posted: Fri 15 Mar '13 20:25 Post subject: |
|
|
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
|
Posted: Mon 01 Jul '13 17:58 Post subject: |
|
|
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
|
Posted: Thu 04 Jul '13 15:29 Post subject: |
|
|
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
|
|
Back to top |
|
Tadeh
Joined: 25 Jul 2013 Posts: 11 Location: United States, Los Angeles
|
Posted: Fri 26 Jul '13 22:08 Post subject: Re: |
|
|
#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
|
Posted: Sat 27 Jul '13 0:12 Post subject: Re: |
|
|
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
|
Posted: Wed 19 Feb '14 9:00 Post subject: Error message when I try to restart Apache |
|
|
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: 3092 Location: Hilversum, NL, EU
|
Posted: Wed 19 Feb '14 11:24 Post subject: |
|
|
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
|
Posted: Thu 20 Feb '14 0:39 Post subject: Re: Error message when I try to restart Apache |
|
|
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
|
Posted: Mon 21 May '18 11:07 Post subject: |
|
|
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 |
|
Back to top |
|