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 -> Apache View previous topic :: View next topic
Reply to topic   Topic: invalid command 'require' when upgrading
Author
DocDJ



Joined: 11 Oct 2009
Posts: 18

PostPosted: Tue 01 Jan '13 22:15    Post subject: invalid command 'require' when upgrading Reply with quote

When upgrading to Httpd 2.4 - X64 on Win 7 X64 I have: LoadModule access_compat_module modules/mod_access_compat.so

All files are in a new folder, so there should be no confusion with old 2.2 files. The Conf file was copied from old 2.2 and all LoadModule commands have been checked to match the default conf. All old extinct directives are gone.

I have removed all the 2.2 order/allow/deny commands in my conf and replaced them with "require" commands.

I don't know why I am still getting the subject error message.

I'm mystified. Any tips?
Back to top
glsmith
Moderator


Joined: 16 Oct 2007
Posts: 2268
Location: Sun Diego, USA

PostPosted: Tue 01 Jan '13 22:33    Post subject: Reply with quote

Per docs:
Quote:
Require Directive
Description: Tests whether an authenticated user is authorized by an authorization provider.
Syntax: Require [not] entity-name [entity-name] ...
Context: directory, .htaccess
Override: AuthConfig
Status: Base
Module: mod_authz_core


Is mod_authz_core loaded?
Back to top
Steffen
Moderator


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

PostPosted: Tue 01 Jan '13 22:37    Post subject: Reply with quote

In an other post from you, Covener replied that the way you want to upgrade is not the best way.

Also Covener referenced you to http://httpd.apache.org/docs/2.4/mod/quickreference.html and look there when you get an error.

So when yo look there, you see that the Directive Require needs mod_authz_core

Edit: glsmith already posted that you need mod_authz_core
Back to top
DocDJ



Joined: 11 Oct 2009
Posts: 18

PostPosted: Tue 01 Jan '13 23:41    Post subject: invalid command 'require' when upgrading Reply with quote

Thanks Steffen and glsmith.
I thought I had matched the load commands 1:1, with the default conf, but I missed that one.
I appreciate your patience and assistance.

Steffen said that my method of updating was not the best. Is there something does not involve copying & pasting all my "directory" and other settings from one conf to the other? I need to update the conf file, one way or the other. Is there a tool that catches missing & extraneous load module entries?
Back to top
glsmith
Moderator


Joined: 16 Oct 2007
Posts: 2268
Location: Sun Diego, USA

PostPosted: Wed 02 Jan '13 4:09    Post subject: Re: invalid command 'require' when upgrading Reply with quote

DocDJ wrote:
Is there a tool that catches missing & extraneous load module entries?


Not that I know of. I used my existing vhost conf files but a fresh httpd.conf. It wasn't a terrible pain to switch. When something went wrong, I looked at the docs.

Anytime it says invalid command/directive 'some-directive' it usually says right behind it that a module might not be loaded. Look at the docs for that directive, it'll tell you what needs to be loaded.

The Auth system is the biggest change in this version. You should read the docs for it;
http://httpd.apache.org/docs/2.4/howto/auth.html

It took me some time to swallow it and I still do not think I understand it completely.

Another biggie is the If,Else,ElseIf and the expression syntax that can be used in your config now.
Back to top
DocDJ



Joined: 11 Oct 2009
Posts: 18

PostPosted: Sat 05 Jan '13 3:23    Post subject: upgrade to 2.4 Reply with quote

Yes, I'll have to go over the auth changes soon. For now, everything "seems" to be working. I also noticed that the "userdir" directive seems to be gone. I'll need the replacement for that on my other system.
Back to top


Reply to topic   Topic: invalid command 'require' when upgrading View previous topic :: View next topic
Post new topic   Forum Index -> Apache