Jump to content

Problem with prestashop transfered on my computer


Recommended Posts

  Hello,

  I have a website with Prestashop. I transfered it to my computer (Ubuntu 14.04 virtualized) . The problem is, when I type on my browser the local address of Prestashop (localhost/prestashop), I arrived to my real website, on a shared server, not on local.

 

  I already posted on the French forum, but no solution found. What I made :

 

- Empty the cache of /cache/smarty/cache & /cache/smarty/compile (not index.php)

 

- Complet the coordinates of my data base on /config/setting.inc.php .

define('_DB_SERVER_', 'localhost');
define('_DB_NAME_', 'prestashop');
define('_DB_USER_', 'root');
define('_DB_PASSWD_', 'password');

  Impossible to change the url on "seo url" , because it' s impossible to connect myself on the back office (first my id was refused, I installed again prestashop and now I have a white page) .

 

  On the French forum, someone told me to go to phpmyadmin, and on my database, search on ps_configuration at right ps_shop_domain and ps_shop_domain_ssl. I didn' t find them... I correct at left

ps_shop_url like that :

Domain varchar 150 : localhost

Domains ssl varchar 150 : localhost

physical uri varchar 150 : /prestashop/

  It seems to be better, now I am in local, not any more on my shared server, but no pictures, only texts. And always impossible to connect myself on the back office.

 

  I believed that was a problem with my browser, but I tryed to be connected from an other computer on my lan, the problem is the same.

 

  My htacces is :

# ~~start~~ Do not remove this comment, Prestashop will keep automatically the code outside this comment when .htaccess will be generated again
# .htaccess automaticaly generated by PrestaShop e-commerce open-source solution
# http://www.prestashop.com - http://www.prestashop.com/forums

<IfModule mod_rewrite.c>
<IfModule mod_env.c>
SetEnv HTTP_MOD_REWRITE On
</IfModule>

RewriteEngine on
RewriteRule . - [E=REWRITEBASE:/prestashop/prestashop/]
RewriteRule ^api/?(.*)$ %{ENV:REWRITEBASE}webservice/dispatcher.php?url=$1 [QSA,L]

# Images
RewriteRule ^([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/p/$1/$1$2$3.jpg [L]
RewriteRule ^([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/p/$1/$2/$1$2$3$4.jpg [L]
RewriteRule ^([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/p/$1/$2/$3/$1$2$3$4$5.jpg [L]
RewriteRule ^([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/p/$1/$2/$3/$4/$1$2$3$4$5$6.jpg [L]
RewriteRule ^([0-9])([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/p/$1/$2/$3/$4/$5/$1$2$3$4$5$6$7.jpg [L]
RewriteRule ^([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/p/$1/$2/$3/$4/$5/$6/$1$2$3$4$5$6$7$8.jpg [L]
RewriteRule ^([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/p/$1/$2/$3/$4/$5/$6/$7/$1$2$3$4$5$6$7$8$9.jpg [L]
RewriteRule ^([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/p/$1/$2/$3/$4/$5/$6/$7/$8/$1$2$3$4$5$6$7$8$9$10.jpg [L]
RewriteRule ^c/([0-9]+)(\-[\.*_a-zA-Z0-9-]*)(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/c/$1$2$3.jpg [L]
RewriteRule ^c/([a-zA-Z_-]+)(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/c/$1$2.jpg [L]
# AlphaImageLoader for IE and fancybox
RewriteRule ^images_ie/?([^/]+)\.(jpe?g|png|gif)$ js/jquery/plugins/fancybox/images/$1.$2 [L]

# Dispatcher
RewriteCond %{REQUEST_FILENAME} -s [OR]
RewriteCond %{REQUEST_FILENAME} -l [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^.*$ - [NC,L]
RewriteRule ^.*$ %{ENV:REWRITEBASE}index.php [NC,L]
</IfModule>

AddType application/vnd.ms-fontobject .eot
AddType font/ttf .ttf
AddType font/otf .otf
AddType application/x-font-woff .woff

#If rewrite mod isn't enabled
ErrorDocument 404 /prestashop/prestashop/index.php?controller=404

# ~~end~~ Do not remove this comment, Prestashop will keep automatically the code outside this comment when .htaccess will be generated again

  Thank you a lot for your help, nice day.

Edited by ungars (see edit history)
Link to comment
Share on other sites

  Hello, thank you for your answer.

  Since this morning, I found what I searched on phpmyadmin with more explanations. Now I am really on local, but the pages appear strangely : http://www.avignon-net.com/Capture.png

  That is on my local server, if I open the address of prestashop on my browser. If I try to connect from an other computer on my lan, I have a white page.

  I already activated the debugging mode :

/* Debug only */
if (!defined('_PS_MODE_DEV_'))
define('_PS_MODE_DEV_', true);

  Nothing appeared... I had first a problem with chmod, I changed it, and then the strange page appeared.

 

  Thank you for your help, nice afternoon.

Link to comment
Share on other sites

  Hello, thank you for your answer.

 

 

That usually happens when the wrong subfolder is set after the site's url in SEO and URLs, can you check it?

 

  You would like I check that in the back office ? I can' t access to it, I have almost the same page as the picture I posted. On the French forum, I understood I can change that on the data base, but perhaps I took the wrong way : with phpmyadmin, I select ps_configuration, on the left panel, I open ps_shop_url , can I check that here ?

  I change the url like that :

Domain varchar 150 : localhost

Domains ssl varchar 150 : localhost

physical uri varchar 150 : /prestashop/

  Is it good ?

 

  Thank you so much again for your help, and sorry for my poor English, I try to do my best.

Link to comment
Share on other sites

  Hello,

  No, nothing of that !

  Here is my .htaccess :

# ~~start~~ Do not remove this comment, Prestashop will keep automatically the code outside this comment when .htaccess will be generated again
# .htaccess automaticaly generated by PrestaShop e-commerce open-source solution
# http://www.prestashop.com - http://www.prestashop.com/forums

<IfModule mod_rewrite.c>
<IfModule mod_env.c>
SetEnv HTTP_MOD_REWRITE On
</IfModule>

RewriteEngine on
RewriteRule . - [E=REWRITEBASE:/prestashop/]
RewriteRule ^api/?(.*)$ %{ENV:REWRITEBASE}webservice/dispatcher.php?url=$1 [QSA,L]

# Images
RewriteRule ^([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/p/$1/$1$2$3.jpg [L]
RewriteRule ^([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/p/$1/$2/$1$2$3$4.jpg [L]
RewriteRule ^([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/p/$1/$2/$3/$1$2$3$4$5.jpg [L]
RewriteRule ^([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/p/$1/$2/$3/$4/$1$2$3$4$5$6.jpg [L]
RewriteRule ^([0-9])([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/p/$1/$2/$3/$4/$5/$1$2$3$4$5$6$7.jpg [L]
RewriteRule ^([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/p/$1/$2/$3/$4/$5/$6/$1$2$3$4$5$6$7$8.jpg [L]
RewriteRule ^([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/p/$1/$2/$3/$4/$5/$6/$7/$1$2$3$4$5$6$7$8$9.jpg [L]
RewriteRule ^([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/p/$1/$2/$3/$4/$5/$6/$7/$8/$1$2$3$4$5$6$7$8$9$10.jpg [L]
RewriteRule ^c/([0-9]+)(\-[\.*_a-zA-Z0-9-]*)(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/c/$1$2$3.jpg [L]
RewriteRule ^c/([a-zA-Z_-]+)(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/c/$1$2.jpg [L]
# AlphaImageLoader for IE and fancybox
RewriteRule ^images_ie/?([^/]+)\.(jpe?g|png|gif)$ js/jquery/plugins/fancybox/images/$1.$2 [L]

# Dispatcher
RewriteCond %{REQUEST_FILENAME} -s [OR]
RewriteCond %{REQUEST_FILENAME} -l [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^.*$ - [NC,L]
RewriteRule ^.*$ %{ENV:REWRITEBASE}index.php [NC,L]
</IfModule>

AddType application/vnd.ms-fontobject .eot
AddType font/ttf .ttf
AddType font/otf .otf
AddType application/x-font-woff .woff

#If rewrite mod isn't enabled
ErrorDocument 404 /prestashop/prestashop/index.php?controller=404

# ~~end~~ Do not remove this comment, Prestashop will keep automatically the code outside this comment when .htaccess will be generated again

  Thank you again for your help, nice day

Link to comment
Share on other sites

  Hello again,

  I change the line physical_uri in ps_shop_url , I type the same as I have on wamp, and which works, no success. I put again /prestashop/ and now I have the front office, without pictures, only the slide show works. All the links don' t work... I don' t know why that didn' t work before, the settle was the same.

 

  Why the pictures don' t appear ? And why the links don' t work ?

 

  Thank you for your help !

Link to comment
Share on other sites

You would like I earase all what is written on .htaccess ? I did, except the first comment lines, no change, always the front office, without pictures (only the slide show)

 

 

and retry without friendly urls, as you didn't

 

  I never touched friendly urls, and now I can' t access to back office, I don' t know where I can change that on the data base.

 

  Thank you a lot.

Link to comment
Share on other sites

  Hello,

  To try, I jus import a backup of a database I have on wamp, with the same settings I wrote before :

- ps_shop_url

Domain varchar  : localhost

Domains ssl varchar  : localhost

physical uri varchar  : /prestashop/

- And localhost on ps_shop_domain and ps_shop_domain_ssl

 

  And that works fine.

 

  I wonder why that works fine, and that don' t works fine with the same settings when I import my database from my website which works on my shared server. Perhaps the problem is not here.

 

  Thank you, nice Sunday

 

  Edit : some pictures don' t appear when I click on the menu...

Edited by ungars (see edit history)
Link to comment
Share on other sites

Hello,

I can' t give you a good answer for that... Yesterday I could have only the pictures on the reception page, not in the categories. Yesterday evening, I download again the data base, and then no picture, even with the same setting. I can' t give you an explanation.

 

  On wamp, wich works well with that :

Domain varchar  : localhost

Domains ssl varchar  : localhost

physical uri varchar  : /prestashop/

and localhost on ps_shop_domain and ps_shop_domain_ssl , I tried to download the data base from the shared server, and I have the same problem, even with the same settings... So I think the problem is perhaps in an other place.

 

  Thank you for your help, nice evening.

Link to comment
Share on other sites

  Hello,

  I installed again the database on Wamp. I have almost the same thing, I already have on Lamp : http://www.avignon-net.com/Capture.png (With an other installation, same settings, I had better results, no explanation for that) .

  Somebody suggested me on the French forum those settings :ps_shop_domain and ps_shop_domain_ssl = localhost/prestashop/ .  I have my website, without pictures, all the categories are dead, I can see the text of the slide show (but sometimes, it didn' t appear) .

  On lamp, with the same settings, that is a little bit better. Again only the text of the slide show, all the pictures except one appear on the first page . The link are not dead, but the pictures which appear doesn' t correspond to the text, and the pictures are not at the good categories.

 

  That is really crazy, nothing is logical...

 

  Nice evening !

Link to comment
Share on other sites

  Hello, thank you for your answer.

  I already erase this folder, but perhaps I didn' t use the good way (see post 15) . Should I erase all the folder (delete it) or only what is written inside ?

 

the regenerate using friendly url's on/off

 

  What do you mean ? It will regenerate by itself ?

 

  I will try that this evening late when I will be back. Thank you a lot for your help, nice day.

Link to comment
Share on other sites

  Hello, don' t worry, this topic is so long.

  I tryed :

- With removing what is written on the folder.

- With deleting the folder.

 

  No change, always the same thing... And my identity is refused when I want to be connected at the back office. I always had that when I imported my database.

 

  I don' t know why I have so much problem, and why I am alone to have that.

  I downloaded the database from the back office.

 

  Thank you for your help.

 

  Edit : on lamp, the images don' t correspond to the text.... Crazy, I really don' t know what happened.

Edited by ungars (see edit history)
  • Like 1
Link to comment
Share on other sites

  Hello, the day after my last post I found ! I would like to try a last time. I will explain what I did, because I am sure one day somebody will have the same problem.

- First change on the site which is on product  : "préférence" -> "url"  (don' t do that with phpmyadmin, I don' t know why, with me that don' t work.

- When Prestashop is transfered, 2 good surprises, now I can reach the back office (my id is recognized) . The categories take to a 404 error, but now that is the personalized page.

- And now, on "seo url", write "no" at "simplified url" (I am not sure of the translation, I work on a French version) . And that work. I have only a problem with an image which don' t appear, but I think that was a problem with my backup, I made an other backup, and an other, and that still work.

 

  When I install prestashop on the shared server, I think this option is selected automaticaly on "no" , but if the database is downloaded on my computer, that don' t work.

 

  I tryed an experience, I wrote "yes" on "simplified url" on my shared server, on the first page most of the images disapeared, and impossible after to recover them : http://www.avignon-net.com/prestashop/prestashop/index.php . What is the error I made, and what can I do ? I think we don' t have to select this option on "yes" when apache have not the settings for that (impossible to change on a shared server) .

 

  Thank you for your help, nice day.

  • Like 1
Link to comment
Share on other sites

Hello,

I make a "up" about my last questions :

 

I tryed an experience, I wrote "yes" on "simplified url" on my shared server, on the first page most of the images disapeared, and impossible after to recover them : http://www.avignon-n...ashop/index.php . What is the error I made, and what can I do ? I think we don' t have to select this option on "yes" when apache have not the settings for that (impossible to change on a shared server) .

 

  Thank you for your help, nice day.

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...