Jump to content

Access denied


Recommended Posts

I don't see the .htaccess file in the admin menu but when I compared the new .htaccess file in the root folder against the old one, they definitely don't match up.

my .htaccess file at the moment is

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

#### Apache directory listing rules ####
DirectoryIndex index.php index.htm index.html
IndexIgnore *

#### Rewrite rules for SEO functionality ####
<IfModule mod_rewrite.c>
  RewriteEngine On
  
  ######## START v4 SEO URL BACKWARD COMPATIBILITY ########
  RewriteCond %{QUERY_STRING} (.*)$
  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteRule cat_([0-9]+)(\.[a-z]{3,4})?(.*)$ index.php?_a=category&cat_id=$1&%1 [NC]

  RewriteCond %{QUERY_STRING} (.*)$
  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteRule prod_([0-9]+)(\.[a-z]{3,4})?$ index.php?_a=product&product_id=$1&%1 [NC]

  RewriteCond %{QUERY_STRING} (.*)$
  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteRule info_([0-9]+)(\.[a-z]{3,4})?$ index.php?_a=document&doc_id=$1&%1 [NC]

  RewriteCond %{QUERY_STRING} (.*)$
  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteRule tell_([0-9]+)(\.[a-z]{3,4})?$ index.php?_a=product&product_id=$1&%1 [NC]

  RewriteCond %{QUERY_STRING} (.*)$
  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteRule _saleItems(\.[a-z]+)?(\?.*)?$ index.php?_a=saleitems&%1 [NC,L]
  ######## END v4 SEO URL BACKWARD COMPATIBILITY ########

  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteCond %{REQUEST_FILENAME} !-d
  RewriteCond %{REQUEST_URI} !=/favicon.ico
  RewriteRule ^(.*)\.html?$ index.php?seo_path=$1 [L,QSA]
</IfModule>

Edited by dasickzz
Link to comment
Share on other sites

Could it maybe got something to do with the index.php ?

this is what my index.php looks like..

 

<?php
/**
 * CubeCart v6
 * ========================================
 * CubeCart is a registered trade mark of CubeCart Limited
 * Copyright CubeCart Limited 2015. All rights reserved.
 * UK Private Limited Company No. 5323904
 * ========================================
 * Web:   http://www.cubecart.com
 * Email:  [email protected]
 * License:  GPL-3.0 https://www.gnu.org/licenses/quick-guide-gplv3.html
 */
die('Access denied');

Link to comment
Share on other sites

That depends: if replacing the existing /index.php file with the file from the download package makes CubeCart 6 work without problems, and you are really more interested in getting your store back online after that point, then maybe you don't want to worry about it.

But for others, there is an amount of curiosity that begs to be satisfied.

 

Link to comment
Share on other sites

Okay, just to double check.

All my index.php's in my modules folder say:

<?php
/**
 * CubeCart v6
 * ========================================
 * CubeCart is a registered trade mark of CubeCart Limited
 * Copyright CubeCart Limited 2015. All rights reserved.
 * UK Private Limited Company No. 5323904
 * ========================================
 * Web:   http://www.cubecart.com
 * Email:  [email protected]
 * License:  GPL-3.0 https://www.gnu.org/licenses/quick-guide-gplv3.html
 */
die('Access denied');

 

let me guess, thats not supposed to be like that? Just tried to checkout with sagepay and all it does is giving me a blank page.

I did download the 6.0.4 and 6.0.3 and every  time the index.php says the same?

Link to comment
Share on other sites

The index.php files that appear anywhere except the main CubeCart folder are there to prevent a site visitor from attempting to get a directory listing. CubeCart does not call any of these other index.php files.

The one and only index.php file that has workable code is in the main folder - which you say you have the correct copy in place now.

Someone would need to look closely at the SagePay module to determine why it is misbehaving.

Link to comment
Share on other sites

Hi all,

I'm having a similar problem after upgrading version v5 to v6.0.5. I have received the following when trying to access my homepage:


Warning: mysqli::mysqli(): (28000/1045): Access denied for user 'XXXXX'@'localhost' (using password: YES) in /home/XXXXX/public_html/classes/db/mysqli.class.php on line 30

Warning: mysqli_options(): Couldn't fetch mysqli in /home/XXXXX/public_html/classes/db/mysqli.class.php on line 32

Fatal error: Access denied for user 'XXXXX'@'localhost' (using password: YES) in /home/XXXXX/public_html/classes/db/mysqli.class.php on line 35

---

My index.php file appears to be fine:

 

<?php
/**
 * CubeCart v6
 * ========================================
 * CubeCart is a registered trade mark of CubeCart Limited
 * Copyright CubeCart Limited 2015. All rights reserved.
 * UK Private Limited Company No. 5323904
 * ========================================
 * Web:   http://www.cubecart.com
 * Email:  [email protected]
 * License:  GPL-3.0 https://www.gnu.org/licenses/quick-guide-gplv3.html
 */
require dirname(__FILE__).DIRECTORY_SEPARATOR.'ini.inc.php';
define('CC_IN_ADMIN', false);

header('X-Frame-Options: SAME-ORIGIN'); // do not allow iframes

global $config_default;

include CC_ROOT_DIR.CC_DS.'controllers'.CC_DS.'controller.index.inc.php';

$GLOBALS['smarty']->display('templates/'.$global_template_file);

 

----

 

Any thoughts? Many thanks.

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

Guest
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...