Ben90 Posted April 11, 2015 Share Posted April 11, 2015 Hi guys, I wanna copy prestashop from the server to the localhost. Just in case something happens on the server, at least I have it offline. This is what I did: https://www.prestashop.com/forums/topic/299575-solvedmove-from-server-to-localhost/ And attached the result on what I got. Please somebody help... Link to comment Share on other sites More sharing options...
NemoPS Posted April 11, 2015 Share Posted April 11, 2015 Were you using caching? I suggest you turn that off if so. I also have a tut for the opposite, you just have to reverse the procedure: http://nemops.com/prestashop-migration-local-live/#.VSj5XvnQqr0 Link to comment Share on other sites More sharing options...
Ben90 Posted April 13, 2015 Author Share Posted April 13, 2015 Were you using caching? I suggest you turn that off if so. I also have a tut for the opposite, you just have to reverse the procedure: http://nemops.com/prestashop-migration-local-live/#.VSj5XvnQqr0 Good to see you're replying, Nemo. I did that one on my first try but it didn't work. Or maybe because I was using not the latest website files with the latest database? (probably the cause of the problem, right?) Where can I check whether I am using caching or no? Advanced Parameters > Performance? The caching is not enable on that part. Link to comment Share on other sites More sharing options...
NemoPS Posted April 13, 2015 Share Posted April 13, 2015 Settings.inc.php, check if you have these lines define('_MEDIA_SERVER_1_', ''); define('_MEDIA_SERVER_2_', ''); define('_MEDIA_SERVER_3_', ''); 1 Link to comment Share on other sites More sharing options...
Ben90 Posted April 15, 2015 Author Share Posted April 15, 2015 Settings.inc.php, check if you have these lines define('_MEDIA_SERVER_1_', ''); define('_MEDIA_SERVER_2_', ''); define('_MEDIA_SERVER_3_', ''); Hi Nemo, there's no media server defined on Settings.inc.php before, so I add those 3 lines. Now there's no more error appeared when I access the homepage, but it just blank. Is it because I was using SSL (https) on the server before? Because it's automatically redirected to "https". I can access BO, but there is only the very top bar appeared (Name of shop, etc) after I login. The rest is just blank Link to comment Share on other sites More sharing options...
Ben90 Posted April 15, 2015 Author Share Posted April 15, 2015 Ah, 1 more thing! The backup files are not the latest one. It's like 2 months behind from the database. Is it also the possible reason of the error? Link to comment Share on other sites More sharing options...
NemoPS Posted April 15, 2015 Share Posted April 15, 2015 Search for "SSL" in the ps_configuration table of the database, set it to 0 and see if it works 1 Link to comment Share on other sites More sharing options...
Ben90 Posted April 22, 2015 Author Share Posted April 22, 2015 Search for "SSL" in the ps_configuration table of the database, set it to 0 and see if it works Hi Nemo, finally the FO is running. But only the homepage, the product pages, even cms page, showing 404 Page is not available. And I can access BO but its only showing the top bar. The rest is black. When I click quick access, it shows this on the drop down: Link to comment Share on other sites More sharing options...
NemoPS Posted April 22, 2015 Share Posted April 22, 2015 Add this to classes/Link.php public function matchQuickLink($url) { $quicklink = $this->getQuickLink($url); if (isset($quicklink) && $quicklink === ($this->getQuickLink($_SERVER['REQUEST_URI']))) return true; else return false; } 1 Link to comment Share on other sites More sharing options...
Ben90 Posted April 24, 2015 Author Share Posted April 24, 2015 Add this to classes/Link.php public function matchQuickLink($url) { $quicklink = $this->getQuickLink($url); if (isset($quicklink) && $quicklink === ($this->getQuickLink($_SERVER['REQUEST_URI']))) return true; else return false; } I put it inside class LinkCore and this is what appears: Still error & can't open another page except homepage. The other pages are 404 Link to comment Share on other sites More sharing options...
NemoPS Posted April 24, 2015 Share Posted April 24, 2015 I guess you also need this: public static function getQuickLink($url) { $parsedUrl = parse_url($url); $output = array(); if (is_array($parsedUrl) && isset($parsedUrl['query'])) { parse_str($parsedUrl['query'], $output); unset($output['token'], $output['conf'], $output['id_quick_access']); } return http_build_query($output); } 1 Link to comment Share on other sites More sharing options...
Ben90 Posted April 27, 2015 Author Share Posted April 27, 2015 I guess you also need this: public static function getQuickLink($url) { $parsedUrl = parse_url($url); $output = array(); if (is_array($parsedUrl) && isset($parsedUrl['query'])) { parse_str($parsedUrl['query'], $output); unset($output['token'], $output['conf'], $output['id_quick_access']); } return http_build_query($output); } The BO finally appears! But there are some errors message when I got inside: Notice on line 375 in file C:\wamp\www\marblecc\cache\smarty\compile\c4\9b\39\c49b39f66d98fcfe3612ef4efefeafd640424e13.file.header.tpl.php [8] Undefined index: quick_access_current_link_name Notice on line 375 in file C:\wamp\www\marblecc\cache\smarty\compile\c4\9b\39\c49b39f66d98fcfe3612ef4efefeafd640424e13.file.header.tpl.php [8] Trying to get property of non-object Notice on line 377 in file C:\wamp\www\marblecc\cache\smarty\compile\c4\9b\39\c49b39f66d98fcfe3612ef4efefeafd640424e13.file.header.tpl.php [8] Undefined index: quick_access_current_link_icon Notice on line 377 in file C:\wamp\www\marblecc\cache\smarty\compile\c4\9b\39\c49b39f66d98fcfe3612ef4efefeafd640424e13.file.header.tpl.php [8] Trying to get property of non-object Anyway, the FO product pages still shown 404 Link to comment Share on other sites More sharing options...
Ben90 Posted April 27, 2015 Author Share Posted April 27, 2015 When I opened the catalog > product, another errors message appears: Notice on line 43 in file C:\wamp\www\marblecc\tools\smarty\sysplugins\smarty_internal_templatebase.php(157) : eval()'d code [8] Undefined index: tooltip Notice on line 43 in file C:\wamp\www\marblecc\tools\smarty\sysplugins\smarty_internal_templatebase.php(157) : eval()'d code [8] Trying to get property of non-object Notice on line 43 in file C:\wamp\www\marblecc\tools\smarty\sysplugins\smarty_internal_templatebase.php(157) : eval()'d code [8] Undefined index: tooltip Notice on line 43 in file C:\wamp\www\marblecc\tools\smarty\sysplugins\smarty_internal_templatebase.php(157) : eval()'d code [8] Trying to get property of non-object Notice on line 43 in file C:\wamp\www\marblecc\tools\smarty\sysplugins\smarty_internal_templatebase.php(157) : eval()'d code [8] Undefined index: tooltip Notice on line 43 in file C:\wamp\www\marblecc\tools\smarty\sysplugins\smarty_internal_templatebase.php(157) : eval()'d code [8] Trying to get property of non-object Notice on line 43 in file C:\wamp\www\marblecc\tools\smarty\sysplugins\smarty_internal_templatebase.php(157) : eval()'d code [8] Undefined index: tooltip Notice on line 43 in file C:\wamp\www\marblecc\tools\smarty\sysplugins\smarty_internal_templatebase.php(157) : eval()'d code [8] Trying to get property of non-object Notice on line 375 in file C:\wamp\www\marblecc\cache\smarty\compile\c4\9b\39\c49b39f66d98fcfe3612ef4efefeafd640424e13.file.header.tpl.php [8] Undefined index: quick_access_current_link_name Notice on line 375 in file C:\wamp\www\marblecc\cache\smarty\compile\c4\9b\39\c49b39f66d98fcfe3612ef4efefeafd640424e13.file.header.tpl.php [8] Trying to get property of non-object Notice on line 377 in file C:\wamp\www\marblecc\cache\smarty\compile\c4\9b\39\c49b39f66d98fcfe3612ef4efefeafd640424e13.file.header.tpl.php [8] Undefined index: quick_access_current_link_icon Notice on line 377 in file C:\wamp\www\marblecc\cache\smarty\compile\c4\9b\39\c49b39f66d98fcfe3612ef4efefeafd640424e13.file.header.tpl.php [8] Trying to get property of non-object And what appears after I click 1 of the items: Warning on line 1150 in file C:\wamp\www\marblecc\classes\Tools.php [2] preg_replace(): Compilation failed: invalid range in character class at offset 24 Warning on line 1150 in file C:\wamp\www\marblecc\classes\Tools.php [2] preg_replace(): Compilation failed: invalid range in character class at offset 24 Warning on line 1150 in file C:\wamp\www\marblecc\classes\Tools.php [2] preg_replace(): Compilation failed: invalid range in character class at offset 24 Notice on line 375 in file C:\wamp\www\marblecc\cache\smarty\compile\c4\9b\39\c49b39f66d98fcfe3612ef4efefeafd640424e13.file.header.tpl.php [8] Undefined index: quick_access_current_link_name Notice on line 375 in file C:\wamp\www\marblecc\cache\smarty\compile\c4\9b\39\c49b39f66d98fcfe3612ef4efefeafd640424e13.file.header.tpl.php [8] Trying to get property of non-object Notice on line 377 in file C:\wamp\www\marblecc\cache\smarty\compile\c4\9b\39\c49b39f66d98fcfe3612ef4efefeafd640424e13.file.header.tpl.php [8] Undefined index: quick_access_current_link_icon Notice on line 377 in file C:\wamp\www\marblecc\cache\smarty\compile\c4\9b\39\c49b39f66d98fcfe3612ef4efefeafd640424e13.file.header.tpl.php [8] Trying to get property of non-object Link to comment Share on other sites More sharing options...
NemoPS Posted April 27, 2015 Share Posted April 27, 2015 At this point, I would replace all the controllers/ and classes files with fresh ones, just download a prestashop zip and replace It would take ages to fix them all one by one Link to comment Share on other sites More sharing options...
Ben90 Posted April 28, 2015 Author Share Posted April 28, 2015 At this point, I would replace all the controllers/ and classes files with fresh ones, just download a prestashop zip and replace It would take ages to fix them all one by one I replace those 2 folders from prestashop 1.6.0.14, this is what appears on BO: (I still have the old controllers & classes in zip just in case they are still needed) On the FO side, it's still the same. Link to comment Share on other sites More sharing options...
NemoPS Posted April 29, 2015 Share Posted April 29, 2015 add that column in the DB as DATETIME type I think it's going to take long anyway, it appears the upgrade failed and missed many areas Link to comment Share on other sites More sharing options...
Ben90 Posted April 30, 2015 Author Share Posted April 30, 2015 add that column in the DB as DATETIME type I think it's going to take long anyway, it appears the upgrade failed and missed many areas Oh my.... What if I just try once again download the lastest web files & DB, then following your tutorial & let's see if it's work Link to comment Share on other sites More sharing options...
NemoPS Posted May 1, 2015 Share Posted May 1, 2015 Might be a better pick something went wrong, definitely Link to comment Share on other sites More sharing options...
Ben90 Posted May 6, 2015 Author Share Posted May 6, 2015 Might be a better pick something went wrong, definitely Thanks, mate. Will let you know when it's done. Cheers! Link to comment Share on other sites More sharing options...
Ben90 Posted May 8, 2015 Author Share Posted May 8, 2015 Might be a better pick something went wrong, definitely Okay, so I followed thoroughly the tutorial video and here is the screenshots: settings.inc.php ps_configuration ps_shop_url result Is there any part that I missed? Link to comment Share on other sites More sharing options...
electriz Posted May 8, 2015 Share Posted May 8, 2015 Check apache error logs 1 Link to comment Share on other sites More sharing options...
Ben90 Posted May 9, 2015 Author Share Posted May 9, 2015 Check apache error logs [core:alert] [pid 6148:tid 824] [client 127.0.0.1:50604] C:/wamp/www/mcc-complete/.htaccess: Invalid command 'suPHP_ConfigPath', perhaps misspelled or defined by a module not included in the server configuration Link to comment Share on other sites More sharing options...
Ben90 Posted May 9, 2015 Author Share Posted May 9, 2015 Alright. So the problem is with .htaccess file. I replace .htaccess from my cpanel to .htaccess from original prestashop I already installed as the offline site & do some little changes to line 11 & 53. RewriteRule . - [E=REWRITEBASE:/change-this-to-current-directory/] ErrorDocument 404 /change-this-to-current-directory/index.php?controller=404 After that, homepage & BO are working fine, but product pages are 404. So I disable friendly URL & looks like all working fine. Link to comment Share on other sites More sharing options...
Ben90 Posted May 9, 2015 Author Share Posted May 9, 2015 Is there anything else that I maybe missed & need to be configured? Link to comment Share on other sites More sharing options...
electriz Posted May 9, 2015 Share Posted May 9, 2015 Try to enable friendly URL again and check if there are any 404s Link to comment Share on other sites More sharing options...
Ben90 Posted May 11, 2015 Author Share Posted May 11, 2015 Try to enable friendly URL again and check if there are any 404s Only homepage working if I enable friendly url Link to comment Share on other sites More sharing options...
NemoPS Posted May 13, 2015 Share Posted May 13, 2015 Is your local server located at localhost? Otherwise you need to add the local server's ip, like 127.0.0.1 Link to comment Share on other sites More sharing options...
Ben90 Posted May 15, 2015 Author Share Posted May 15, 2015 Is your local server located at localhost? Otherwise you need to add the local server's ip, like 127.0.0.1 Hey, Nemo! Yes, it is. Where should I add the IP? Link to comment Share on other sites More sharing options...
NemoPS Posted May 15, 2015 Share Posted May 15, 2015 Oh, sorry, I mean in the prestashop url configuration (and then reach out that one from the browser)You are using wamp, correct? Link to comment Share on other sites More sharing options...
Ben90 Posted May 18, 2015 Author Share Posted May 18, 2015 (edited) Oh, sorry, I mean in the prestashop url configuration (and then reach out that one from the browser) You are using wamp, correct? Yes, I'm using wamp. Do you mean ps_shop_url ? And is there any quick way if I want to update the product list from the online website to localhost? Edited May 18, 2015 by Ben90 (see edit history) Link to comment Share on other sites More sharing options...
NemoPS Posted May 18, 2015 Share Posted May 18, 2015 Yeah, it's odd it doesn't work if wamp usually runs at localhost/. Are you sure you cleared out the htaccess file as well? WHat about mod_rewrite? Check it's enabled as wellAs for importing, I'd dump some tables straight out of the db, (all products related, features, attributes, categories) and just import them locally Link to comment Share on other sites More sharing options...
Ben90 Posted May 20, 2015 Author Share Posted May 20, 2015 Yeah, it's odd it doesn't work if wamp usually runs at localhost/. Are you sure you cleared out the htaccess file as well? WHat about mod_rewrite? Check it's enabled as well As for importing, I'd dump some tables straight out of the db, (all products related, features, attributes, categories) and just import them locally What do you mean by cleared out the htaccess file? As for mod_rewrite, it is ON inside htaccess. <IfModule mod_rewrite.c> <IfModule mod_env.c> SetEnv HTTP_MOD_REWRITE On </IfModule> Link to comment Share on other sites More sharing options...
NemoPS Posted May 20, 2015 Share Posted May 20, 2015 I mean erasing the htaccess so it's regenerated. As for mod rewrite, click on wamp's icon, apache, apache modules, and see if rewrite_module has the tick. If not, enable it, then restart apache 1 Link to comment Share on other sites More sharing options...
Ben90 Posted May 25, 2015 Author Share Posted May 25, 2015 (edited) I mean erasing the htaccess so it's regenerated. As for mod rewrite, click on wamp's icon, apache, apache modules, and see if rewrite_module has the tick. If not, enable it, then restart apache Brilliant! rewrite_module in WAMP is the key to enable friendly url Anyway, when I deleted .htaccess it's not regenerated automatically. No idea why. So what I did with .htaccess to make it works was on post #23 Last thing, I still don't get it how to update all of the products (price & combination) from online to localhost. I think it will be too much if I need to reconfigure whole database by exporting from phpmyadmin & importing in local + resetting everything (well, it's not everything but some configurations in database like we did before). If I export products manually from BO & import it in localhost, I reckon the combination is not included. Do you know a better ways in regard of this? Well, now this thread is like a complete guide moving from server to localhost, including the problem arises with WAMP + backup the products to localhost Hope it's not too much Edited May 25, 2015 by Ben90 (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