Jump to content

Resolved - permalinks have changed to 404.html


slic535

Recommended Posts

i am using 5.1.4 and i have links that normaly were created by themselves and something happened after the new upgrade. i talked with my hosting company about it and it says its in the .htaccess files. what do i need to change to get the permalinks to work again?

96.125.163.32/little-blue-switchblade-pocket-knife-8364bl.html used to work but now it wont.

Link to comment
Share on other sites

If you can examine yor database directly, please look in the CubeCart_seo_urls table, the 'path' column (may help to sort on that column), and find a record with a path of little-blue-switchblade-pocket-knife-8364bl.

If its there, then we can look at the .htaccess file. If not, then this friendly URL was deleted when the product was last edited (or by some other function).

By "new upgrade", please explain. In which version of CC were these URLs last known to work?

You might also want to examine the contents of the .htaccess file. The four relevant lines for CC514 are:


RewriteCond %{REQUEST_FILENAME} !-f

RewriteCond %{REQUEST_FILENAME} !-d

RewriteCond %{REQUEST_URI} !=/favicon.ico

RewriteRule ^(.*).html?$ index.php?seo_path=$1 [L,QSA]





Actually, a wrong "friendly URL" causes a different problem. A 404 is either the rewrite engine is not on, or not installed.



<IfModule mod_rewrite.c>

RewriteEngine On

........

</IfModule>

Link to comment
Share on other sites

when i updated to 5.1.4 from 5.1.0 . i am getting these errors in my error log. could this be it?

[31-Aug-2012 15:42:02] PHP Warning: mysql_get_server_info() [<a href='http://docs.php.net/manual/en/function.mysql-get-server-info.php'>function.mysql-get-server-info.php</a>]: Access denied for user 'slic535'@'localhost' (using password: NO) in /home/slic535/public_html/admin/sources/maintenance.sql.inc.php on line 24

[31-Aug-2012 15:42:02] PHP Warning: mysql_get_server_info() [<a href='http://docs.php.net/manual/en/function.mysql-get-server-info.php'>function.mysql-get-server-info.php</a>]: A link to the server could not be established in /home/slic535/public_html/admin/sources/maintenance.sql.inc.php on line 24

[31-Aug-2012 20:43:14] PHP Notice: Cleaning cached files... in /home/slic535/public_html/classes/cache/cache.class.php on line 134

[31-Aug-2012 20:43:14] PHP Fatal error: Call to a member function has() on a non-object in /home/slic535/public_html/classes/seo.class.php on line 710

[31-Aug-2012 21:57:10] PHP Warning: Security Warning: Illegal array key "amp;subscribed" was detected and was removed. in /home/slic535/public_html/classes/sanitize.class.php on line 88

[31-Aug-2012 21:57:10] PHP Fatal error: Call to a member function read() on a non-object in /home/slic535/public_html/classes/seo.class.php on line 711

[31-Aug-2012 17:30:02] PHP Warning: Invalid argument supplied for foreach() in /home/slic535/public_html/admin/sources/products.index.inc.php on line 329

[31-Aug-2012 17:36:10] PHP Warning: Invalid argument supplied for foreach() in /home/slic535/public_html/admin/sources/products.index.inc.php on line 329

[31-Aug-2012 22:36:18] PHP Warning: Invalid Security Token in /home/slic535/public_html/classes/sanitize.class.php on line 123

[31-Aug-2012 18:11:13] PHP Warning: Invalid argument supplied for foreach() in /home/slic535/public_html/admin/sources/products.index.inc.php on line 329

[31-Aug-2012 23:20:13] PHP Warning: Stored session data did not match DB record. Session aborted as possible session hijack. Old IP Address: '184.3.190.42' New IP Address: '184.3.190.42' Old User Agent: 'Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0; WOW64; Trident/5.0; AskTbBCPA/5.15.4.23821)' New User Agent: 'Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.0; WOW64; Trident/5.0)' in /home/slic535/public_html/classes/session.class.php on line 631

[01-Sep-2012 00:10:50] PHP Notice: Cleaning cached files... in /home/slic535/public_html/classes/cache/cache.class.php on line 134

[01-Sep-2012 00:10:50] PHP Fatal error: Call to a member function has() on a non-object in /home/slic535/public_html/classes/seo.class.php on line 710

[01-Sep-2012 02:46:06] PHP Warning: Stored session data did not match DB record. Session aborted as possible session hijack. Old IP Address: '96.236.44.146' New IP Address: '96.236.44.146' Old User Agent: 'Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.1; WOW64; Trident/5.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; eSobiSubscriber 1.0.0.40; MAAR; .NET4.0C)' New User Agent: 'Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; WOW64; Trident/5.0)' in /home/slic535/public_html/classes/session.class.php on line 631

[01-Sep-2012 03:22:00] PHP Warning: Invalid Security Token in /home/slic535/public_html/classes/sanitize.class.php on line 123

[31-Aug-2012 22:38:54] PHP Warning: Invalid argument supplied for foreach() in /home/slic535/public_html/admin/sources/products.index.inc.php on line 329

the .htaccess file seems to be ok.

Link to comment
Share on other sites

Wow!

I recognize four of those error messages as being caused by switching/upgrading Internet Explorer from v7 to v9 (or using a profile manager user agent alias tool in Firefox), while still being logged in to CC5 (using the same cookie across the versions of the browser).

I just came across a bug in the file adminsourcesmaintenance.sql.inc.php, line 24.

mysql_get_server_info(), $glob['dbhost'], $glob['dbusername'], $glob['dbhost']));


should read


mysql_get_server_info(), $glob['dbhost'], $glob['dbusername'], $glob['dbpassword']));

I'll have to review my notes about what happens with a bad "friendly URL".

Hang on... I now think dbhost||dbpassword above is not a bug. I think this error occurred because no legitimate connection to the database had been previously established, or if there had been, it expired.

So, let's try again.

What was the results of your looking at the database for that path?

Link to comment
Share on other sites

Ok, here's a serious question...

Are you sure you have an account at HostGator? Browsing to the IP address you gave returns a 404 page. So, either this is not your IP, or the web space at this IP has not been configured at all, or the IP is shared and you need to supply a vaild www.domain.com address.

Link to comment
Share on other sites

i had a business plan from hostgator but i wasnt using all the space and had a dedicated ip. so when i down graded i think it changed something. can this be fixed? here is what i found in the adminsourcesmaintenance.sql.inc.php, line 24.

<?php

if (!defined('CC_INI_SET')) die('Access Denied');

Admin::getInstance()->permissions('maintenance', CC_PERM_FULL, true);

global $lang, $glob;

if (isset($_POST['execute'])) {

if (!empty($_POST['query'])) {

$GLOBALS['db']->query(stripslashes($_POST['query']), false);

if ($GLOBALS['db']->error()) {

$GLOBALS['main']->setACPWarning($GLOBALS['db']->errorInfo());

} else {

$GLOBALS['main']->setACPNotify($lang['maintain']['affected_rows'].': '.(int)$GLOBALS['db']->affected());

}

} else {

$GLOBALS['main']->setACPWarning($lang['maintain']['no_query_entered']);

}

} else {

$GLOBALS['main']->setACPWarning($lang['maintain']['expert_use_only']);

}

$GLOBALS['main']->addTabControl($lang['maintain']['tab_query_sql'], 'general');

$GLOBALS['smarty']->assign('INFO', sprintf($lang['maintain']['title_db_info'], mysql_get_server_info(), $glob['dbhost'], $glob['dbusername'], $glob['dbhost']));

$prefix = (!$GLOBALS['config']->isEmpty('config', 'dbprefix')) ? $GLOBALS['config']->get('config', 'dbprefix') : false;

$GLOBALS['smarty']->assign('PREFIX',$prefix);

if(!empty($_POST['query'])){

$GLOBALS['smarty']->assign('VAL_QUERY', stripslashes($_POST['query']));

}

$page_content = $GLOBALS['smarty']->fetch('templates/maintenance.sql.php');

so should i change dbhost?

Link to comment
Share on other sites

this is what my .htaccess says

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

<IfModule mod_suphp.c>

suPHP_ConfigPath /home/slic535

<Files php.ini>

order allow,deny

deny from all

</Files>

</IfModule>

Link to comment
Share on other sites

when i had my site updated from 5.1.0 to 5.1.4 i let the hosting company do it and they made a file within /public_html/home/slic535/public_html/ and i had only one database with one user in it slic535_ccrt1. now i have one database slic535_ccrt1 with two users in it, slic535_ccrt1 and slic535_ccr. would this have anything to do with it?

i tried to delete the slic535_ccr user and it made the site not work and gave me some kind of strange error instead of showing the site.

Link to comment
Share on other sites

oh, i downgraded from a business account to a hatchling account. the business account gave me 1 dedicated ip. i am now on https://gator20.host...r.com/~slic535/ shared. here is the ip now 96.125.163.9

Program

Path

Aspell

/usr/bin/aspell

curl

/usr/bin/curl

gdlib

/usr/lib/

GET

/usr/bin/GET

Web root

/home/slic535/

Working directory

/home/slic535/public_html

ImageMagick

/usr/bin/

ImageMagick ©

/usr/bin/convert

Lynx

/usr/bin/lynx

MySQL

/var/lib/mysql

OpenSSL

/usr/bin/openssl

Program

Path

PEAR

/usr/bin/pear

Perl

/usr/local/bin/perl

PHP

/usr/bin/php

phpMyAdmin

Python

/usr/bin/python

rsynch

/usr/bin/rsync

Sendmail

/usr/sbin/sendmail

Shared SSL

[click here]

wget

/usr/bin/wget

Zend Optimizer

/usr/local/Zend

Ruby

/usr/bin/ruby

Program

Version

Apache:

2.2.22

CentOS:

CentOS release 6.3 (Final)

cPanel:

11.32.4 (build 14)

Curl:

7.12.1

MySQL

5.5.23

phpMyAdmin

3.4.10.1

Python:

2.6.6

Program

Version

Perl:

5.8.8

PHP:

5.2.17

ionCube Loader:

4.2.2

Zend Optimizer:

3.3.9

Ruby:

1.8.7

Rails:

2.3.14

OpenSSL:

1.0.0-fips

Link to comment
Share on other sites

Well, we've figured out just a little more.

If I go here:

gator20.hostgator.com/~slic535/index.php?seo_path=little-blue-switchblade-pocket-knife-8364bl

I get to the appropriate View Product page.

The above web address is precisely and absolutely what the rewrite rule in the .htaccess file is supposed to convert the friendly URL into for Cubecart's use.

I still maintain, because:

Does not work: gator20.hostgator.com/~slic535/little-blue-switchblade-pocket-knife-8364bl.html

Does work: gator20.hostgator.com/~slic535/index.php?seo_path=little-blue-switchblade-pocket-knife-8364bl

that the rewrite mod is not enabled for your site or something is interfering with it -- not CubeCart's fault!

Here's something I want you to try. Since your site (as of now) is not in the root folder of a domain, but rather in a subfolder (~slic535), we can add a statement to the .htaccess file. Just below the statement: RewriteEngine On, add: RewriteBase /~slic535/

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