Zen Cart Logo
Forums / Installing on a Windows Server / links not working on a site backup on localhost.

links not working on a site backup on localhost.

Views: 3,177

Results 1 to 11 of 11
24 Jan 2014, 7:45 PM
#1
kevin_a avatar

kevin_a

Zen Follower

Join Date:
Mar 2007
Location:
Worcester UK
Posts:
135
Plugin Contributions:
0

links not working on a site backup on localhost.

I am hoping someone can help with links not working on a site backup on localhost.

I am backing up a live site built on zencart 1.3.9f onto wamp localhost server.
I have carried out a clean install (including Products) of zencart 1.3.9f on
local host /RARECOINSLOCAL2/
The Site worked and all links were operational with default template.
I have then overwritten all files from source server onto localhost
except admin/includes/configure.php, and includes/ configure.php

The result: The index home page displays perfectly, and the search function interrogates the database, and delivers a resulting list of products.
Header and footer links work.

I have run fix_cache_key.php

THE PROBLEM

All other links in the category menus, products, and side panels, result in similar error message eg

The requested URL /RARECOINSLOCAL2/coins-c-81.html was not found on this server.

Similarly, the admin login page displays, but does not respond to the username and password I set up for the admin area.

I list below the software platform details, and a code abstracted from the 2 configure.php files.
I have deleted the htaccess files following a suggestion in another hread, but no improvement.

If anyone can please comment on any suggestions to solve this.
I have searched the forums, and found nothing that proposes a solution.

Server: localhost (localhost via TCP/IP)
Software: MySQL
Software version: 5.5.24-log - MySQL Community Server (GPL)
Protocol version: 10
User: root@localhost
Server charset: UTF-8 Unicode (utf8)
Apache/2.2.22 (Win64) PHP/5.3.13
Database client version: libmysql - mysqlnd 5.0.8-dev - 20102224 - $Id: 65fe78e70ce53d27a6cd578597722950e490b0d0 $
PHP extension: mysqli [IMG]file:///C:\Users\Sup\AppData\Local\Temp\msohtml1\01\clip_image001.gif[/IMG]
ZenCart 1.3.9f
includes
define('HTTP_SERVER', 'http://localhost');
define('HTTPS_SERVER', 'https://localhost');
define('DIR_WS_CATALOG', '/RARECOINSLOCAL2/');
define('DIR_WS_HTTPS_CATALOG', '/RARECOINSLOCAL2/');
define('DIR_FS_CATALOG', 'C:/wamp/www/RARECOINSLOCAL2/');

admin200/includes

define('HTTP_SERVER', 'http://localhost');
define('HTTPS_SERVER', 'https://localhost');
define('HTTP_CATALOG_SERVER', 'http://localhost');
define('HTTPS_CATALOG_SERVER', 'https://localhost');

define('DIR_WS_ADMIN', '/RARECOINSLOCAL2/admin200/');
define('DIR_WS_CATALOG', '/RARECOINSLOCAL2/');
define('DIR_WS_HTTPS_ADMIN', '/RARECOINSLOCAL2/admin200/');
define('DIR_WS_HTTPS_CATALOG', '/RARECOINSLOCAL2/');

define('DIR_FS_ADMIN', 'C:/wamp/www/RARECOINSLOCAL2/admin200/');
define('DIR_FS_CATALOG', 'C:/wamp/www/RARECOINSLOCAL2/');
25 Jan 2014, 7:56 AM
#2
frank18 avatar

frank18

Deceased

Join Date:
Nov 2007
Location:
Sunny Coast, Australia
Posts:
3,427
Plugin Contributions:
2

Re: links not working on a site backup on localhost.

The requested URL /RARECOINSLOCAL2/coins-c-81.html was not found on this server.

The culprit most likely are your SEO friendly URL's. Suggest to uninstall that mod on your local install, it should resolve itself.

25 Jan 2014, 10:29 AM
#3
kevin_a avatar

kevin_a

Zen Follower

Join Date:
Mar 2007
Location:
Worcester UK
Posts:
135
Plugin Contributions:
0

Re: links not working on a site backup on localhost.

I can confirm that Enable SEO URLs? was set to true on the live site.
Unfortunately I cannot get past the login page to access the admin area to change the setting on the localhost.
Do you know which php files need this setting to be false?
Alternatively, if I turn them off on the live site, which php files would I need to copy to the localhost to make this change?
Thanks

25 Jan 2014, 11:11 AM
#4
kevin_a avatar

kevin_a

Zen Follower

Join Date:
Mar 2007
Location:
Worcester UK
Posts:
135
Plugin Contributions:
0

Re: links not working on a site backup on localhost.

includes/classes/seo.install.php

in the above file I have tried changing the following on line 38 from 'DEFAULT' => true,

to 'DEFAULT' => 'false', but no improvement to the links functioning

function SEO_URL_INSTALLER() {
$this->attributes = array();
$x = 0;
$this->default_config = array();
$this->default_config['SEO_ENABLED'] = array(
'DEFAULT' => 'false',

25 Jan 2014, 11:45 AM
#5
frank18 avatar

frank18

Deceased

Join Date:
Nov 2007
Location:
Sunny Coast, Australia
Posts:
3,427
Plugin Contributions:
2

Re: links not working on a site backup on localhost.

kevin_a:

includes/classes/seo.install.php

in the above file I have tried changing the following on line 38 from 'DEFAULT' => true,

to 'DEFAULT' => 'false', but no improvement to the links functioning

function SEO_URL_INSTALLER() {
$this->attributes = array();
$x = 0;
$this->default_config = array();
$this->default_config['SEO_ENABLED'] = array(
'DEFAULT' => 'false',

Because we are working on a local install we can't do damage to business. That's the good thing.

I would go to the live site admin and (using developers tool kit) do a search for all files associated with your SEO plugin. Then, on the local site, remove / uninstall all instances of these files. If you have phpMyAdmin in your WAMP then go to the relevant DB and check for any remnants of SEO URLs, remove them locally if found. Next, try again to get to your local admin.

Just remember that the live site only serves as a tool to find those files - don't change anything there!

25 Jan 2014, 12:56 PM
#6
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Re: links not working on a site backup on localhost.

kevin_a:

includes/classes/seo.install.php

in the above file I have tried changing the following on line 38 from 'DEFAULT' => true,

to 'DEFAULT' => 'false', but no improvement to the links functioning

function SEO_URL_INSTALLER() {
$this->attributes = array();
$x = 0;
$this->default_config = array();
$this->default_config['SEO_ENABLED'] = array(
'DEFAULT' => 'false',

Unless something is actually calling the function SEO_URL_INSTALLER, changing something inside of it will not do anything...for now.

If in your live site you see a setting like, enable SEO or disable SEO, if you take note of the gID and I think it is clID in the URI then if in fact your local database is a relatively recent backup of your live store (at least after the SEO mod was installed), then you can go to the configuration table and look up that combination of numbers and turn it off. May still have issues, but... Also when you say you can't get past the login of the admin area, what is the system response? Wrong username/password? Or does it cycle back to login with no clear reason provided. Any error logs in your cache directory related to these attempts?

25 Jan 2014, 2:39 PM
#7
kevin_a avatar

kevin_a

Zen Follower

Join Date:
Mar 2007
Location:
Worcester UK
Posts:
135
Plugin Contributions:
0

Re: links not working on a site backup on localhost.

Thanks
I have deleted all the files associated with Ultimate SEO urls

I do not know how to purge the database of references to remnants of SEO URLs
At the moment the index home page is blank, having deleted the SEO files.

/public_html/stockroom/extra_datafiles/seo.php
/public_html/stockroom/functions/extra_functions/seo.php
/public_html/stockroom/reset_seo_cache.php
/public_html/includes/auto_loaders/config.ultimate_seo.php
/public_html/includes/classes/seo.install.php
/public_html/includes/classes/seo.url.php
/public_html/includes/extra_datafiles/seo.php

Can you advise me on how to purge the database in phpMyAdmin?

Thanks

25 Jan 2014, 3:02 PM
#8
kevin_a avatar

kevin_a

Zen Follower

Join Date:
Mar 2007
Location:
Worcester UK
Posts:
135
Plugin Contributions:
0

Re: links not working on a site backup on localhost.

I have looked up the following on the live site links for settings.

Enable SEO URLs .... gID=31&cID=538&action=edit
Enable SEO cache to save queries? ..... gID=31&cID=543&action=edit
Output W3C valid URLs (parameter string)? ..... gID=31&cID=542&action=edit
Using this info,
In the database on the local server, there are 17 tables referring to SEO events.
their
cID is from 538 to 554
gID all 31.

Is it safe to delete these tables?, or should I set those 'true' values to false?

Regarding login area, it returns "You entered the wrong username or password"

25 Jan 2014, 3:30 PM
#9
kevin_a avatar

kevin_a

Zen Follower

Join Date:
Mar 2007
Location:
Worcester UK
Posts:
135
Plugin Contributions:
0

Re: links not working on a site backup on localhost.

I have also found the following in the admin200/product.php
added to default file, which i tried replacing with the raw zencart product.php file, to no avail.

// Ultimate SEO URLs v2.100
// If the action will affect the cache entries
if (preg_match("/(insert|update|setflag)/i", $action)) {
    include_once(DIR_WS_INCLUDES . 'reset_seo_cache.php');
}
25 Jan 2014, 5:07 PM
#10
kevin_a avatar

kevin_a

Zen Follower

Join Date:
Mar 2007
Location:
Worcester UK
Posts:
135
Plugin Contributions:
0

Re: links not working on a site backup on localhost.

ok.I think i have resolved the problem, and thanks for pointing me in the right direction.

Rooting around the mods made by the seo url I found that the default product.php, categories.php and html_output.php had been changed.
I replaced these 3 files with the default installation files, set the database values to false for all seo entries, and the links are now working well.

I reset my login with a database reset Query, and every thing seems good.

Many thanks again for your help and assistance.
Best wishes
Kevin_a

26 Jan 2014, 3:02 AM
#11
frank18 avatar

frank18

Deceased

Join Date:
Nov 2007
Location:
Sunny Coast, Australia
Posts:
3,427
Plugin Contributions:
2

Re: links not working on a site backup on localhost.

kevin_a:

ok.I think i have resolved the problem, and thanks for pointing me in the right direction.

Rooting around the mods made by the seo url I found that the default product.php, categories.php and html_output.php had been changed.
I replaced these 3 files with the default installation files, set the database values to false for all seo entries, and the links are now working well.

I reset my login with a database reset Query, and every thing seems good.

Many thanks again for your help and assistance.
Best wishes
Kevin_a

My pleasure kevin_a, glad I could be of assistance and point you into the right direction.