Jump to content

Moving shop from live server to localhost


Recommended Posts

Hi people, i'm working in a new enterprise. It has a working prestashop web platform, and now i want to install it locally. I have the database script creation, obtained with mysqldump. I've replaced all the references to "www.oursite.com" by "my_local_path". Ive created database and configurated Prestashop database user and pass. Everything works ok, i can see prestashop login to control panel, but when prestashop validates my employee user then i get redirected again to login page. I've checked mysql log during the login and i think everything is ok? There are four connections from the correct prestashop database user. I provide the log.

What could be happening? Any help would be grateful

thanks in advance

sql.txt

Link to comment
Share on other sites

Did you go into your Preferences in the admin control panel and set the path to the directory that contained your shop?

We have several and I have them all installed on localhost but in different directories.
For one, I use E:/wamp/www/mechanic, so the PS directory in my Preferences is set to /mechanic/
My documentroot is set to "E:/wamp/www/" in my httpd.conf

Also make sure __PS_BASE_URI__ in your settings.inc.php is set correctly point to your directory:
Here is ours: define('__PS_BASE_URI__', '/mechanic/');

Link to comment
Share on other sites

i didn't go to preferences because my login isn't success. When i'm in the relative URL "login.php?redirect=index.php" and put my email and pass, then a get redirected again to "login.php?redirect=index.php". However, my user is correctly validated.

The directories structure of live server are the same as localhost's. Remember, i can see login page tipping "http://localhost/......login.php?redirect=index.php" or tipping "http://localhost/...../admin123". It's supposed that "http://localhost/...../admin123" redirects "http://localhost/......login.php?redirect=index.php", taking a look to login.php script. But i don't understand, in that php code or somewhere else, why i get redirected to "http://localhost/......login.php?redirect=index.php".

Link to comment
Share on other sites

well, there aren't any .htaccess into login.php s directory

into the root directory, where "classes", "config" etc are in, there are a .htaccess, but only contains rewriting rules:

# .htaccess automaticaly generated by PrestaShop e-commerce open-source solution
# http://www.prestashop.com - http://www.prestashop.com/forums

# URL rewriting module activation
RewriteEngine on

# URL rewriting rules
RewriteRule ^lang-([a-z]{2})/([0-9]+)\.........
..........

# Catch 404 errors
ErrorDocument 404 /tienda/404.php

and any of them (i think) affects neither "login.php" and "index.php"

thanks for your fast replies :)

Link to comment
Share on other sites

prestashop 1.3.0.3
php-5.2.9
apache_2.2.11
mysql-essential-5.0.77
Windows XP service pack 3

i'll try to put "www.oursite.com" into etc/hosts pointing to localhost, and install original mysql script, but i think i'll achieve the same result.

Link to comment
Share on other sites

  • 3 months later...

ok now i know what is the point of that .htaccess file. Finally we installed prestashop into a subdomain on the remote server. Now we have another problem, which could be related to all of this (i think). The post is at "Configuring & using PrestaShop" forum, and the thread is "Friendly URLs showing not existing products"

Link to comment
Share on other sites

look here - a random example:
http://www.jolidragon.com/19-recipients'>http://www.jolidragon.com/19-recipients goes to category 19
http://www.jolidragon.com/19- still goes to category 19

this is how default presta is working

for the products:
http://www.jolidragon.com/recipients/270-wine-karafe-carafe-a-vin-klean-kanteen-800ml-inox.html'>http://www.jolidragon.com/recipients/270-wine-karafe-carafe-a-vin-klean-kanteen-800ml-inox.html
or
http://www.jolidragon.com/recipients/270-.html

points to the same product page
-----------

can you explain better on the above example?

Link to comment
Share on other sites

yes... hopefully that will be fixed in the future - and the fix is not impossible as modules like mine prove it.

the problems appear when bad links appear over the internet to your website and google will index it. You may be banned for duplicate content.

however prestashop still remains a good software and there are many websites doing good selling to prove it

Link to comment
Share on other sites

yes i think that prestashop is a very good platform and enough for make a good business. Although there are details which suggests that is a relatively young software. I think that the importing process is not very reliable and fast for shops having a big number of products. Actually we have 600 and we are encountering some problems and difficulties.

Very carefully i'm doing changes in the code, but also prestashop lacks of development documentation. A good point is that the code files are well separated and structured i think.

thnaks for your reply

regards

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...