Jump to content

CC 6.2.2 move to new server


citabriabob
 Share

Recommended Posts

Host moved on; was able to download CC and its database. When trying to access my admin page, I get this: Fatal error: Access denied for user 'typeclub_aac'@'localhost' (using password: YES) in /home/aac/CCstore.aeronca.org/classes/db/mysqli.class.php on line 42

Where does this "user" come from? It's wrong for the new host.

Link to comment
Share on other sites

The database server (which manages your database data) that CubeCart (and anything else) wants to talk to is not recognizing the username and password that CubeCart is using.

Using your site's control panel, examine what the database has for you as regards the user, pass, and host (most often 'localhost') for you on your new host.

Then, in Cubecart's file /includes/global.inc.php, make sure these data items are correct.

 

Edited by bsmither
Link to comment
Share on other sites

Now that the admin side is working properly, a new wrinkle has arisen: The user side page comes up, but when clicking on the content bar (?) I get this:
 

Quote

 

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.

Additionally, a 500 Internal Server Error error was encountered while trying to use an ErrorDocument to handle the request.

 

I tried deleting all and uploading (Filezilla) the store from a backup from another host, with no luck. Checked file sizes for ASCII/Binary state and it looks good, but there are so many files, I may have missed one. https://ccstore.aeronca.org/

Old host store is at https://typeclubs.org/aac-toc-cc/index.php which is working fine.

Edited by citabriabob
added link
Link to comment
Share on other sites

The .htaccess file may have a disagreement with the name of the category "/aeronca.org". The other site is in a subdirectory "/aac-toc-cc". So for that other site, there will be a Rewrite Base directive telling the web server that everything is to be considered located in that subdirectory.

Is there a Rewrite Base directive in the .htaccess file for "ccstore"?

 

Link to comment
Share on other sites

Changed it, but the same result:
 

Quote

 

##### START CubeCart .htaccess #####

### GZIP Compression ###
<ifmodule mod_deflate.c>
   AddOutputFilterByType DEFLATE text/text text/html text/plain text/xml text/css application/x-javascript application/javascript
</ifmodule>

### Files Expiration ###
<IfModule mod_expires.c>
    ExpiresActive On
    ExpiresByType text/html "access 0 seconds"
    ExpiresDefault "access 7 days"
</IfModule>

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

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

<ifModule mod_headers.c>
  Header always append X-Frame-Options SAMEORIGIN
</ifModule>

### Rewrite rules for SEO functionality ###
<IfModule mod_rewrite.c>
  RewriteEngine On
  RewriteBase /CCstore/

  ##### 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 ^(.*)?$ index.php?seo_path=$1 [L,QSA]
</IfModule>

### Default store 404 page ###
ErrorDocument 404 /CCstore/index.php

## Override default 404 error document for missing page resources ##
<FilesMatch "\.(gif|jpe?g|png|ico|css|js|svg)$">
  ErrorDocument 404 "<html></html>
</FilesMatch>
##### END CubeCart .htaccess #####

 

 

Link to comment
Share on other sites

For the store that is not in a subdirectory:

RewriteBase /

And near the end:

### Default store 404 page ###
ErrorDocument 404 /index.php

Also, try to find the web server's error log in your hosting site's control panel.

Edited by bsmither
Link to comment
Share on other sites

Store is in a subdirectory CCstore.aeronca.org

Errors:

[Sun Nov 28 16:37:25.310860 2021] [core:crit] [pid 38229] (13)Permission denied: [client 138.68.130.210:34220] AH00529: /home/aac/public_html/.htaccess pcfg_openfile: unable to check htaccess file, ensure it is readable and that '/home/aac/public_html/' is executable
[Sun Nov 28 16:24:59.015768 2021] [core:crit] [pid 4462] (13)Permission denied: [client 192.241.214.140:56824] AH00529: /home/aac/public_html/.htaccess pcfg_openfile: unable to check htaccess file, ensure it is readable and that '/home/aac/public_html/' is executable

Link to comment
Share on other sites

Please do not confuse a sub-domain with a sub-folder. "ccstore." is a sub-domain (technically, so is www., but that is a universally understood situation).

Earlier you said that the admin side of your store is working fine. Denied permission would still happen when requesting the admin PHP script if this were really the issue.

Reviewing earlier statements, an error referenced:

/home/aac/CCstore.aeronca.org/classes/db/mysqli.class.php

Ok, so now we assume that CubeCart has been installed in /home/aac/CCstore.aeronca.org/, where the folder /CCstore.aeronca.org/ is considered as the site's "root" or "home" or aka "public_html" folder.

That means, the web server configuration may have an incorrect designation as to what is stated as to where CubeCart is located.

But the admin is still working fine???

 

Edited by bsmither
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.

 Share

×
×
  • Create New...