Jump to content

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


dmikester1

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?

Link to comment
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
</FilesMatch>

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 comment
Share on other sites

I had an old install on here from before.  I completely deleted all the files in the folder and deleted the entire database and started fresh.  I'm not sure how there could have been an old .htacess file from before.  I looked at the file and it says it was created today.

Link to comment
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 comment
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.

errors.PNG

Link to comment
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 comment
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 comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...