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 -> Third-party Modules View previous topic :: View next topic
Reply to topic   Topic: Mod_Security Issues - Specified Procedure Not Found
Author
own3mall



Joined: 09 Jun 2013
Posts: 9

PostPosted: Sun 09 Jun '13 20:56    Post subject: Mod_Security Issues - Specified Procedure Not Found Reply with quote

Hi Guys,

I tried installing mod_security for 32-bit apache 2.4.x from this site on my Windows 7 x64 server running Apache 32-bit 2.4.3, but I receive this error message after adding the correct entries to the httpd.conf when I try to restart apache:

Code:

httpd.exe: Syntax error on line 189 of C:/zpanel/bin/apache/conf/httpd.conf: Cannot load modules/mod_security2.so into server: The specified procedure could not be found. 


My configuration looks like this:

Code:

# Security
LoadModule security2_module modules/mod_security2.so
LoadModule unique_id_module modules/mod_unique_id.so

<ifmodule mod_security2.c>
Include mod_security_rules/*.conf
</ifmodule>



mod_security2.so is in the modules folder. Any idea as to why I'm receiving this error?
Back to top
Steffen
Moderator


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

PostPosted: Sun 09 Jun '13 21:16    Post subject: Reply with quote

Anything in the Windows event log ?

Re-check if you downloaded mod_security for 2.4 Win32 and follow the instructions in the Readme.txt. And be sure you have installed the Visual C++ 2010 SP1 Redistributable Package x86.


Steffen
Back to top
skiglades



Joined: 11 Jun 2013
Posts: 4

PostPosted: Tue 11 Jun '13 19:30    Post subject: Apache2 Mod_Security Issues - Specified Procedure Not Found Reply with quote

Also having the same issue. Trying to configure 64bit ModSecurity on a 64bit WAMP installation and receiving the error:

Code:
C:\wamp\bin\apache\apache2.4.2\bin>httpd.exe
httpd.exe: Syntax error on line 150 of C:/wamp/bin/apache/apache2.4.2/conf/httpd
.conf: Cannot load C:/wamp/bin/apache/apache2.4.2/modules/mod_security2.so into
server: The specified procedure could not be found.


httpd.conf
Code:
LoadModule unique_id_module modules/mod_unique_id.so
LoadModule security2_module modules/mod_security2.so


The "mod_security2.so" module is located in the /modules folder.

Windows Event logs show the same Apache error as above.

I've also posted this in the WAMP forum to rule out it being something to do with WAMP: http://forum.wampserver.com/read.php?2,115347


WAMP 64-bit
    Windows Server 2008 R2
    Apache 2.4.2
    Mysql 5.5.24
    PHP 5.4.3
    ModSecurity 2.7.4 64bit (http://www.apachelounge.com/download/win64/modules-2.4/mod_security-2.7.4-win64.zip)
    Visual C++ 2010 SP1 Redistributable Package x64
Back to top
admin
Site Admin


Joined: 15 Oct 2005
Posts: 677

PostPosted: Tue 11 Jun '13 19:49    Post subject: Reply with quote

A note from Ivan in his mod_security handbook:

Although it might be possible to run Steffen’s ModSecurity binaries with a version
of Apache produced elsewhere, you should really use only the packages from a single
location that are intended to be used together. If you don’t, you may encounter unusual
behavior and web server crashes.


Please try it with 2.4.4 Win64 from here.
Back to top
Steffen
Moderator


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

PostPosted: Tue 11 Jun '13 19:59    Post subject: Reply with quote

Mostly you get this error when there is a version mismatch of Apache and/or one of the modules, corrupted file or it is build wrong.

Do not know the WAMP dependencies versions and the way they build the apache and the dependencies.
The culprit can be libxml2.dll and/or pcre corrupted or wrong build

You can try to copy one by one from the 2.4.4 zip here and see how it goes.

Steffen


Last edited by Steffen on Tue 11 Jun '13 20:49; edited 1 time in total
Back to top
skiglades



Joined: 11 Jun 2013
Posts: 4

PostPosted: Tue 11 Jun '13 20:13    Post subject: Reply with quote

Thank you both.

First I'll try replacing the libxml2 and pcre .dll's from the 2.4.4 package.

As a last resort, I'll try to upgrade Apache within WAMP but am waiting as it seems more complex.
Back to top
skiglades



Joined: 11 Jun 2013
Posts: 4

PostPosted: Tue 11 Jun '13 20:19    Post subject: Reply with quote

Steffen, I'd hug you if I could.

Replacing the two .dll's fixed the issue and Apache starts without a problem. I'm hoping the .dll swap doesn't cause issues later on in the ModSecurity install but it's working at the moment.
Back to top
Steffen
Moderator


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

PostPosted: Tue 11 Jun '13 20:48    Post subject: Reply with quote

The replace is not a problem at all.
Back to top
own3mall



Joined: 09 Jun 2013
Posts: 9

PostPosted: Thu 13 Jun '13 8:58    Post subject: Reply with quote

So, I should just update those 2 dll files from the latest version of Apache? Does that mean I can still run Apache 2.4.3 but use those two files from the latest?

To upgrade to the latest version of Apache on Windows, I just copy the files from the latest version but keep everything in my httpd.conf?
Back to top
skiglades



Joined: 11 Jun 2013
Posts: 4

PostPosted: Thu 13 Jun '13 16:38    Post subject: Reply with quote

I used the two .dll's from Apache 2.4.4 and copied them into my Apache 2.4.2 install and it worked fine.

I'm not sure about your question regarding upgrading the actual Apache version vs. only the two .dll's.
Back to top
own3mall



Joined: 09 Jun 2013
Posts: 9

PostPosted: Sat 15 Jun '13 19:42    Post subject: Reply with quote

I just wanted to confirm that replacing libxml2.dll and pcre.dll from the Apache 2.4.4 package also worked for me.
Back to top


Reply to topic   Topic: Mod_Security Issues - Specified Procedure Not Found View previous topic :: View next topic
Post new topic   Forum Index -> Third-party Modules