ales496 Posted August 1, 2023 Share Posted August 1, 2023 (edited) Hi everybody i'm trying to migrate my shop from localhost to my server, but I got several errors, even if I tried to clear cache, so I suppose that I'm wronging something. In localhost I have my main dir called 'proj' and inside that I have my prestashop dir called 'catalogo'. Assuming that I need to upload proj dir, to my server exposed via url 'https://www.proj.com', what steps should i follow? Edited August 1, 2023 by ales496 (see edit history) Link to comment Share on other sites More sharing options...
musicmaster Posted August 1, 2023 Share Posted August 1, 2023 Hard to say what you did wrong when you don't bother to mention what you did. Did you: - edit parameters.php - edit ps_shop_url - clear the cache - regenerate .htaccess in the SEO&urls page ???? 1 Link to comment Share on other sites More sharing options...
ales496 Posted August 1, 2023 Author Share Posted August 1, 2023 1) In app/config/parameters.php I updated 'database_host' to my VPS ip and even database credentials; 2) In table 'ps_shop url' I updated 'domain' and 'domain_ssl' fields with https://project.com 3) In the same table I updated 'physical_uri' field with '/catalogo/' 4) Deleted everything in var/cache/ Between many warning I got the following error: Fatal error: require_once(): Failed opening required '/var/www/html/project/catalogo/var/cache/dev/appParameters.php' Link to comment Share on other sites More sharing options...
s4lvozesta Posted August 1, 2023 Share Posted August 1, 2023 If i were you, I would check permission mode on var and log folders (and subfolders) 1 Link to comment Share on other sites More sharing options...
ales496 Posted August 2, 2023 Author Share Posted August 2, 2023 After editing permissions in every folder, now I get no errors, but if I try to connect to www.proj.com/catalogo Im redirected to https://https//www.proj.com//catalogo/ and of course the url doesnt work. If I try to reach the admin folder instead, I got the error: This page isn’t working www.proj.com is currently unable to handle this request. In catalogo folder, the .htaccess file is not generated Link to comment Share on other sites More sharing options...
musicmaster Posted August 2, 2023 Share Posted August 2, 2023 I am curious what you put as domain in ps_shop url. It should be the basic domain. So just "www.shop.com". No http and no slashes. 1 Link to comment Share on other sites More sharing options...
ales496 Posted August 2, 2023 Author Share Posted August 2, 2023 34 minutes ago, musicmaster said: I am curious what you put as domain in ps_shop url. It should be the basic domain. So just "www.shop.com". No http and no slashes. Thanks. Instead, in domain ssl, should I use the same notation (www.shop.com) or have I to specify https before? Link to comment Share on other sites More sharing options...
musicmaster Posted August 2, 2023 Share Posted August 2, 2023 (edited) Please start answering questions before you ask them. And don't ask yes/no questions when you can find out for yourself with an experiment that would take minutes. Edited August 2, 2023 by musicmaster (see edit history) 1 Link to comment Share on other sites More sharing options...
ales496 Posted August 2, 2023 Author Share Posted August 2, 2023 You're right, but I can't try, because with both solutions I got: Fatal error: Trait 'Psr\Log\LoggerAwareTrait' not found (/var/www/html/proj/catalogo/vendor/composer/../psr/log/Psr/Log/LoggerAwareTrait.php) I was editing previous question, but you answered too soon Link to comment Share on other sites More sharing options...
musicmaster Posted August 2, 2023 Share Posted August 2, 2023 a) for every try: empty the cache. You can use Prestools for that or empty the /var/cache directory. b) you are still murky. Please be crystal clear what you put into the ps_shop_url table. Consider adding a screen dump. c) Provide a screen dump of the error. It will provide previous code steps that led to the error. You can blacken out private information. d) Your error refers to a file. Look whether that file is present. 1 Link to comment Share on other sites More sharing options...
ales496 Posted August 2, 2023 Author Share Posted August 2, 2023 I tried to clear cache, but error is still present. I can't find LoggerAwareTrait.php, but it doesn't exist neither in localhost. Link to comment Share on other sites More sharing options...
musicmaster Posted August 2, 2023 Share Posted August 2, 2023 See point d) of my previous reaction. Please react only when you exhaust my previous suggestions. 1 Link to comment Share on other sites More sharing options...
ales496 Posted August 2, 2023 Author Share Posted August 2, 2023 3 minutes ago, musicmaster said: See point d) of my previous reaction. Please react only when you exhaust my previous suggestions. I already answered "I can't find LoggerAwareTrait.php, but it doesn't exist neither in localhost." Link to comment Share on other sites More sharing options...
musicmaster Posted August 2, 2023 Share Posted August 2, 2023 2 minutes ago, ales496 said: I already answered "I can't find LoggerAwareTrait.php, but it doesn't exist neither in localhost." I don't care about localhost. I care about the file system. In my PS 8.1 installation I see a file /vendor/psr/log/Psr/Log/LoggerAwareTrait.php. If you don't have that file your installation is broken. 1 Link to comment Share on other sites More sharing options...
ales496 Posted August 2, 2023 Author Share Posted August 2, 2023 Ok, I pushed again and now every file should be present. But now on www.proj.com I got "ERR_TOO_MANY_REDIRECTS", while backend work great. Link to comment Share on other sites More sharing options...
musicmaster Posted August 2, 2023 Share Posted August 2, 2023 23 minutes ago, ales496 said: ERR_TOO_MANY_REDIRECTS That is usually related to SSL. If this is just a test shop you can disable the redirect to SSL. 1 Link to comment Share on other sites More sharing options...
ales496 Posted August 3, 2023 Author Share Posted August 3, 2023 I tried to edit physical_uri field in ps_shop_url table and after many attempts I noticed that writing just '/' it works, but it doesn't load css. In browser console I got many times the following error: Mixed Content: The page at '<URL>' was loaded over HTTPS, but requested an insecure stylesheet '<URL>'. This request has been blocked; the content must be served over HTTPS. Link to comment Share on other sites More sharing options...
musicmaster Posted August 3, 2023 Share Posted August 3, 2023 18 minutes ago, ales496 said: I tried to edit physical_uri field in ps_shop_url table and after many attempts I noticed that writing just '/' it works, but it doesn't load css. In browser console I got many times the following error: Mixed Content: The page at '<URL>' was loaded over HTTPS, but requested an insecure stylesheet '<URL>'. This request has been blocked; the content must be served over HTTPS. Looks like you set in the backoffice to use http and then you called the shop in the browser with https. 1 Link to comment Share on other sites More sharing options...
ales496 Posted August 9, 2023 Author Share Posted August 9, 2023 (edited) Now it works. Many thanks for your help and your patient. I enclose all the steps that I followed, hoping that in a future they can help someone: 1) In app/config/parameters.php I updated 'database_name', 'database_user' and 'database_password'; 2) In table 'ps_shop url' I updated 'domain' and 'domain_ssl' fields with www.project.com 3) In the same table I updated 'physical_uri' field with '/catalogo/' 4) Deleted everything in var/cache/ 5) Shop parameters -> General -> Enable SSL / Enable SSL in all pages Edited August 9, 2023 by ales496 (see edit history) 1 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