Mbak-Noe Posted November 29, 2014 Share Posted November 29, 2014 Guys, I've tried to move my prestashop from localhost into live server. For your information, i'm using prestashop v1.6.0.9But i have the problem. This is my database setting from localhost : *i'm using XAMPP* define('_DB_SERVER_', 'localhost');define('_DB_NAME_', 'ps7');define('_DB_USER_', 'root');define('_DB_PASSWD_', '');define('_DB_PREFIX_', 'ps_'); And then i made a database setting at abc.com *example*, with this setting db name : psps7 db username : psps7 db password : xxixxi So, i export the database on my localhost and upload/import to my live server *abc.com* and backup my full website and i upload it too. And i change setting.inc.php into : define('_DB_SERVER_', abc.com'); --> this part i change into abc.com or localhost, but it doesn't response anywaydefine('_DB_NAME_', 'psps7');define('_DB_USER_', 'psps7');define('_DB_PASSWD_', 'xxixxi');define('_DB_PREFIX_', 'ps_'); But my web, still blank when it refresh.... i see my logs folder, and found this error... *ERROR* 2014/11/30 - 00:15:35: Link to database cannot be established. at line 38 in file classes/db/MySQL.php So, which part i have to checked this code/error/setting?? Thank you so much... Link to comment Share on other sites More sharing options...
musicmaster Posted November 29, 2014 Share Posted November 29, 2014 You should check first with your provider how mysql should be addressed. It must be somewhere on their help pages. For server you have many variations among providers. Some use the domain name, some use "localhost" and yet some others use a subdomain of your domain like "mysql.mydomain.com". Similarly there may be some prefix before the database name. Oh, and don't forget to update the ps_shop_url table. Link to comment Share on other sites More sharing options...
Mbak-Noe Posted November 30, 2014 Author Share Posted November 30, 2014 Hai @musicmaster. thanks for your advice, i've got my website okay now.... This is what i'm doing to know what errors on my website. 1. set "ini_set('display_errors', 'on');" into my config/config.inc.php --> i'm i have to set off again? 2. add line with "extension=mcrypt.so" in my php.ini 3. change the permission on cache/smarty/cache and cache/smarty/compile to 777 for point 3, i'm not sure it safe with 777 so when my website is okay, i change it to 755,.... what is the best setting for those ?? 777 or 755?? Thanks in advance.... Link to comment Share on other sites More sharing options...
musicmaster Posted November 30, 2014 Share Posted November 30, 2014 Hi Mbak-Noe, Congratulations with your new shop! On your questions: - Yes, you should turn display_errors off again when everything is finished. If there still might be some bug somewhere you don't want your customer looking at the error messages. There is also an element of safety: nobody needs to know how your filesystem is organized. Yet they would get some clues as the error messages usually contain the name and full path of the problematic file. - mcrypt: I don't know much about that. I never had to change something about it and I never heard someone else who had a problem with it. - 777 or 755: depends on your provider. Make the rights as strict as possible while the shop still works. For some people it only works with 777, most keep the defaults. With my own provider I have yet another problem: sometimes I need to run a "take ownership" routine because the system doesn't allow me to overwrite some files. Link to comment Share on other sites More sharing options...
Recommended Posts