khejit68 Posted April 17, 2015 Share Posted April 17, 2015 (edited) Hello, I have big trouble with moving prestashop 1.6.0.9 from server to localhost. 1. I downloaded all files from ftp, deleted .htaccess 2. Uploaded whole database and set connections to it by settings.inc.php 3. Set alias in xampp/apache/conf/httpd.conf under # Alias /webpath /full/filesystem/path by Alias /allchemy2 "C:/xampp/htdocs/allchemy" I want to have second shop accesible under localhost/allchemy2, first shop from localhost/allchemy. 4. In ps_shop_url table, set domain to localhost for both shops, domain_ssl as well. Tried to set different values for physical_uri, i.e. /allchemy , /allchemy/ , tried to leave blank. Sometimes the result is redirecting to my live shop, but without changing url in browser. That suggests some other redirecting field in database. Where could it be? Admin panel doesn't accept my credentials, and is shown with no css. After 'sign in' button, no message about wrong username/password, only reload of the page. I also tried to put false credentials, this time info about wrond user/password appears. In ps_shop_url: How to set domains, physical uri's for each shop? In ps_configuration: I don't have PS_SHOP_DOMAIN and PS_SHOP_DOMAIN_SSL fields. I checked whole table, nothing. Should I look somewhere else? Please, help me, as local test environment is essential during upgrade of my shop @EDIT2: A little update: I set up multistore by adding missing tables PS_SHOP_DOMAIN and PS_SHOP_DOMAIN_SSL, with random id_configuration, id_shop_group to NULL, id_shop NULL and value of localhost in both. This is weird, because these tables are missing from my live store, and everything works just fine. Alias for localhost is set the same as in pt 3. above. In ps_shop_url domain and domain ssl are set to localhost, and physical_uri is set to /allchemy/ for first shop, and /allchemy2/ for second shop. But main problem remains: I still can't login to Back Office. Of course cleared cache and cookies, checked whole settings.inc.php. Also images in store are not displayed correctly @EDIT3: Alright, I managed to repair images and links in my shop. I created new multistore in another folder by installing new prestashop. I set up alias for apache for this new shop, regenerated .htaccess from seo & urls, and then I copied .htaccess to my previous multistore had to change names of folders inside it to fit this shop. But still no access to Back Office :< anyone? Edited April 20, 2015 by khejit68 (see edit history) 1 Link to comment Share on other sites More sharing options...
khejit68 Posted November 19, 2015 Author Share Posted November 19, 2015 (edited) I CAN'T BELIEVE IT I just did it After this topic was posted, I didn't try to do this for a long time, but eventually I needed to do this once more. I followed my previous steps, but @EDIT2 (adding tables with SHOP_DOMAIN to configuration table) wasn't necessary. As far as I know, newer versions of presta store this in separate table, not in ps_configuration. I don't have this entries in ps_configuration and everything works just fine. Important files: a ) .htaccess, which I kept from fresh install on localhost. On my fresh install I already set up multistore, domain names according to my previous steps, so: domain and ssl domain set to localhost, physical url set to /first_store_path/ and /second_store_path/ b ) /config/settings.inc.php, and this file turned out to be crucial. Besides setting database access, important settings are _COOKIE_KEY_, _COOKIE_IV_, _RIJNDAEL_KEY_, _RIJNDAEL_IV_. I set the first two to original values taken from live site, but the other two were missing on my live site. I eventually copied this entries from settings.inc.php from my fresh install on localhost, and turned out that this step was final. Everything just worked from there. So: cookies from live site, rijndael from localhost install. As for step 4 in above post: yes, you have to mess with ps_shop_url table in database. Domain and domain_ssl set to localhost, physical_url set to whatever path you chose for your stores: /first_store_path/, /second_store_path/. Yes, you have to set up alias in httpd.conf as described in above post: Alias /second_store_path "C:/xampp/htdocs/first_store_path". I really hope this is useful for somebody struggling with the same problem. Took a few months to get back to this problem and it's finally done Edited November 19, 2015 by khejit68 (see edit history) Link to comment Share on other sites More sharing options...
HaCos Posted December 12, 2015 Share Posted December 12, 2015 Hello, so the way you describe it, you use separate subfolders for different stores, is this right? eg domain/first_store , domain/second_store Have you tried make this work localy for different domains ? Link to comment Share on other sites More sharing options...
khejit68 Posted January 13, 2016 Author Share Posted January 13, 2016 (edited) No, this is not correct. I use only one folder for all files of prestashop: in xampp it would be in htdocs folder, lets say /htdocs/presta_folder. Then, multistore feature of prestashop (along with redirects set up in httpd.conf) takes care of handling domains/urls. So I can access localhost/presta_folder, and this would be my first main store, and I can access localhost/my_second_store which is my second store. I don't have folder /htdocs/my_second_store, but this is redirected by httpd.conf to my /htdocs/presta_folder and then multistore feature recognizes this, and builds my second store with multistore feature. I hope I understood your question correctly. Edited January 15, 2016 by khejit68 (see edit history) Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now