Jump to content

htacess - Invalid command 'Order', perhaps misspelled or defined by a module not included in the server configuration

Recommended Posts

I just installed CubeCart on my localhost and I can't even get to the admin or storefront page.  I get the following error when I visit either page:

Internal Server Error

The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator at [email protected] to inform them of the time this error occurred, and the actions you performed just before this error.

More information about this error may be available in the server error log.


In the logs I found this:

Invalid command 'Order', perhaps misspelled or defined by a module not included in the server configuration


From Stack Overflow I found the syntax changed from Apache 2.2 to 2.4 for the following lines in the .htaccess:  "Order allow, deny Allow from all".  Now it seems like an easy fix.  But my question is why am I encountering this issue so early on in the process?  Why isn't it using the latest syntax in the .htaccess file?

Edited by dmikester1
Link to post
Share on other sites

This is part of the .htaccess directives CubeCart uses in the file if .htaccess does not already exist:

### File Security ###
<FilesMatch "\.(htaccess)$">
  Order Allow,Deny
  Deny from all

What you posted above does not match exactly, thus I suspect there was already a file named .htaccess in CubeCart's main folder.

  1. Having the web server send out .htaccess is denied to all.
  2. Having the Deny directive be on the same line as the Order directive may be illegal.

The web server may have these directives in its own dedicated configuration file.

Also, in this configuration file, there should be an AllowOverride directive so that directives found in any .htaccess file can overrule those found in the web server's configuration file, such as mod_rewrite directives.

Link to post
Share on other sites
30 minutes ago, bsmither said:

I have no answer for CubeCart's continued use of the Apache 2.2 directives Order and Deny.

There is no problem with using this statement with Apache 2.4 - every single server we run uses 2.4 and all CubeCart sites have this directive as part of the .htaccess file.

Firstly check that the syntax and layout is exactly the same as shown above

Link to post
Share on other sites

I'm using Windows 10 with Apache 2.4 and PHP 7.  Just trying to install a fresh CubeCart install to play around and learn it.

I blew away the contents of the folder again.  I deleted the DB and the user.  I recopied over the folder contents from CubeCart-6.2.6.zip.

Now, I'm getting different errors.  The page is just blank when I try and run the setup.  I've attached an image showing my log.  Those error messages all happen at the same time when I try and hit the setup folder in my browser.


Link to post
Share on other sites

One can ignore any Notices. The Warnings need to be dealt with, but the Fatal Error is what is causing the white page.

Somehow, PHP thinks there is an existing database it can communicate with. But CubeCart is not sending a username and a password.

You mention the OS (Win10), PHP7, the web server (A24), but no mention of a database server.

Initialize the database server if it's not already running. Make sure there is a user with a password. Create a database (sometimes called a Catalog or a Schema). Give the User relevant permissions to manage the database.

Link to post
Share on other sites

A database server can contain a number of Schemas ("databases"). Each schema can have tames of tables that are the same as those in another schema. So, CubeCart needs to know which schema ("database") to use. User names can be anything. Therefore, the name of the schema and the name of the user could be the same.

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...