Jump to content

CC 6.2.2 move to new server


citabriabob

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.

 

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.

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

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???

 

Link to comment
Share on other sites

As for the Document Root, is it just to be understood that /home/aac/ is actually part of the root path and so need not be displayed, or might that part of the path actually be missing that should be showing the full path to the site's document root?

But the admin is still working fine?

 

Link to comment
Share on other sites

The storefront does come up. So, it can only be the case that the .htaccess file that the error messages were mentioning has the wrong permissions, or that whatever is wanting to look at the .htaccess file is looking at a place where it is not at.

This works:

https://ccstore.aeronca.org/index.php?_a=product&product_id=26
Bounces to:
https://ccstore.aeronca.org/volume-10-member-price-16.95.html
which causes an error.

This also works:

https://ccstore.aeronca.org/index.php?seo_path=volume-10-member-price-16.95.html
https://ccstore.aeronca.org/index.php?seo_path=contact-us.html
https://ccstore.aeronca.org/index.php?seo_path=aeronca.org
Note the seo_path in the querystring.

The rewrite directives in the .htaccess file appear to be correct (with the changes specified), but I think that is where the web server is faulting.

Apache can have a directive entered in its virtual host file to debug the mod-rewrite directives.

See:
https://stackoverflow.com/questions/9632852/how-to-debug-apache-mod-rewrite
https://stackoverflow.com/questions/69525973/getting-error-in-cpanel-regarding-htacess-permission
But you may need to get your hosting provider involved if you not running your own dedicated virtual server.

Researching the error message suggests CPanel really expects all web sites (or at least specifically the .htaccess file that needs to be checked) to be in the /home/cpaneluser/public_html/ folder or child folder- which I believe your site is not, being in a sibling folder.

Think about moving the site to /home/aac/public_html/ccstore/ and point the subdomain ccstore.aeronca.org directly to it.

But then, again, all those other URL patterns work. Only when needing to rewrite one.

Link to comment
Share on other sites

     

Please note that another sub-domain exists and works fine:  https://aac-bb3.aeronca.org/index.php.

This is also the case on another domain of ours:  https://bcc-bb3.bellanca-championclub.com/

Really don't want to move this store...

Also, since the admin works, it seems that it's finding the sub-domain; something is wrong with something.

       
       
Link to comment
Share on other sites

I added above:

"But then, again, all those other URL patterns work. Only when needing to rewrite one."

I can agree that moving CubeCart need not happen.

Let's look at the other sites:

The Aeronca and Bellanca bulletin boards may not need any URL rewriting, if there is an .htaccess file.

But you may want to compare the user:group ownership (chown) and file (chmod) permission on each of these three .htaccess files.

 

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...