ycarrasco Posted October 4, 2013 Share Posted October 4, 2013 Helo there, In a new installation of Prestashop 1.5.5 we are experiencing random forbidden access in / and or question mark Gifs. This is only happening when friendly urls are activated. All seems to work smoothly without SEO. I have regenerated the .htaccess file without changes. Any ideas or thoughts? Apache 2.2.22 in a 12.04.1 LTS ubuntu server PS 1.5.5 Plesk 11.0.9 yolanda Link to comment Share on other sites More sharing options...
EvilDragon Posted November 18, 2013 Share Posted November 18, 2013 I've got the same issue on my shop. Latest PrestaShop 1.5 version, was an upgrade from 1.4. Link to comment Share on other sites More sharing options...
Ciseur Posted November 19, 2013 Share Posted November 19, 2013 Hello guys, Can we have some URL examples ? Give us different examples/behaviours for a better understanding. Best regards, Ciseur Link to comment Share on other sites More sharing options...
EvilDragon Posted November 19, 2013 Share Posted November 19, 2013 Well, that's the hard thing... it can be any link you click. Categories, Products, etc. Sometimes, only a question mark appears. Refreshing the browser does load the correct page then. I've just re-enabled friendly URLs at my shop, as it's nighttime in Germany right now so I won't have that many visitors. Just go to the site and click yourself through a few links, it will happen eventually. http://www.dragonbox.de/ I'll disable friendly URLs again in about 30 minutes, but in case you want to look at it some other time, we can easily make an appointment. Link to comment Share on other sites More sharing options...
EvilDragon Posted November 19, 2013 Share Posted November 19, 2013 Just tried around a bit, and this time it happened with the URL: https://www.dragonbox.de/de/18-everdrives (which was supposed to be a category). I'll switch off friendly URLs again now, until someone wants to test it further. Link to comment Share on other sites More sharing options...
Kagobio Posted December 15, 2013 Share Posted December 15, 2013 Hello, I've got the same issue. I've got two prestashop installations, one comes from an update and the other one is a new installation. Both got the same issue. Any help please? Thank you!! Link to comment Share on other sites More sharing options...
Kagobio Posted December 19, 2013 Share Posted December 19, 2013 EvilDragon try to change in blockviewed module, blockviewed.php file , line 110 the query by the following: $productsImages = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS(' SELECT MAX(image_shop.id_image) id_image, p.id_product, il.legend, product_shop.active, pl.name, pl.description_short, pl.link_rewrite, cl.link_rewrite AS category_rewrite FROM '._DB_PREFIX_.'product p '.Shop::addSqlAssociation('product', 'p').' LEFT JOIN '._DB_PREFIX_.'product_lang pl ON (pl.id_product = p.id_product'.Shop::addSqlRestrictionOnLang('pl').') LEFT JOIN '._DB_PREFIX_.'image i ON (i.id_product = p.id_product AND i.cover = 1)'. Shop::addSqlAssociation('image', 'i', false, 'image_shop.cover=1').' LEFT JOIN '._DB_PREFIX_.'image_lang il ON (il.id_image = image_shop.id_image) LEFT JOIN '._DB_PREFIX_.'category_lang cl ON (cl.id_category = product_shop.id_category_default'.Shop::addSqlRestrictionOnLang('cl').') WHERE p.id_product IN ('.$productIds.') AND pl.id_lang = '.(int)($params['cookie']->id_lang).' AND cl.id_lang = '.(int)($params['cookie']->id_lang).' GROUP BY product_shop.id_product' ); The difference is "AND i.cover = 1" Link to comment Share on other sites More sharing options...
EvilDragon Posted December 21, 2013 Share Posted December 21, 2013 Thanks. Updated, changed back the config to SEO, will check if that worked. Link to comment Share on other sites More sharing options...
EvilDragon Posted December 21, 2013 Share Posted December 21, 2013 Sadly, did not work for me Link to comment Share on other sites More sharing options...
EvilDragon Posted December 22, 2013 Share Posted December 22, 2013 Thanks to the help of doekia, the issue has been solved: It seems SSL and mod_cache do not play well together. Disabling mod_cache for the shop (you can do that in virtual host config) did solve the issue. 1 Link to comment Share on other sites More sharing options...
bunnybubs Posted December 25, 2013 Share Posted December 25, 2013 Thanks to the help of doekia, the issue has been solved: It seems SSL and mod_cache do not play well together. Disabling mod_cache for the shop (you can do that in virtual host config) did solve the issue. Hi, can you please expand on how you fixed the issues pls, I'm having the same problem, still learning and finding my way around prestshop admin... step by step instructions would be greatly appreciated thank you cheers Link to comment Share on other sites More sharing options...
Kagobio Posted December 29, 2013 Share Posted December 29, 2013 (edited) Thanks to the help of doekia, the issue has been solved: It seems SSL and mod_cache do not play well together. Disabling mod_cache for the shop (you can do that in virtual host config) did solve the issue. Hello, We will try this, thank you. Edited December 29, 2013 by Kagobio (see edit history) Link to comment Share on other sites More sharing options...
EvilDragon Posted December 30, 2013 Share Posted December 30, 2013 Well, after a few more days, I have to report the same. It was a lot better (not that many question marks), but it's still not solved Link to comment Share on other sites More sharing options...
bunnybubs Posted December 30, 2013 Share Posted December 30, 2013 this is what ipage did for me to fix it... "I have corrected the reported issue by regenerating the .htaccess file with default rewrite code for your Prestashop website. Now, the images are showing fine with friendly URL in the website at http://www.bunnybubsclothing.com.au/ without any issues. Please check if images are showing fine in your website, and let us know if you have any further issues"... I have no idea "how" to do this..... hope that helps you.... my images now display properly when friendly urls are enabled cheers Link to comment Share on other sites More sharing options...
EvilDragon Posted December 30, 2013 Share Posted December 30, 2013 Images are not the issue - my images have always displayed fine without problems. The problem is that sometime (randomly) visiting a page (could even be the main index) just shows the ?-Image, nothing else. Refreshing the browser loads the site manually. Link to comment Share on other sites More sharing options...
haunter Posted January 28, 2014 Share Posted January 28, 2014 BUMP, what can presta team say about this? Link to comment Share on other sites More sharing options...
technoschool Posted January 29, 2014 Share Posted January 29, 2014 Your website url should be userfriendly and you can customize urls to remember easily. Link to comment Share on other sites More sharing options...
Luthyan Posted September 17, 2014 Share Posted September 17, 2014 Hi Since i migrate my prestashop from 1.5.0 to 1.5.6, i have question mark randomly on the site, and refresh the page display all informations correctly. Did someone find a solution ? Link to comment Share on other sites More sharing options...
Sundbox Posted November 14, 2014 Share Posted November 14, 2014 I also have this problem, I have multi-shop activated with 2 shops with different domains and the problem is in both stores. I have my own VPS with Plesk and I tried a lot of solutions but nothing works. In the same server I have other websites working with wordpress and don't have the problem, so the problem is in prestashop. I'm using a tool to monitor the websites and compare their activity, it's uptimerobot.com and it's free, when a website crashes send me an email. You can see when the web crashes and what error code gives. Sometimes the web crashes every 5 minutes, other times works continuosly for hours. Any news about it? Link to comment Share on other sites More sharing options...
Sundbox Posted November 14, 2014 Share Posted November 14, 2014 Maybe anyone have some kind of cache system enabled? About 403 forbidden error I noticed that the error is more frequent when more people are watching the website, so maybe the problem is related about the cache system. I have APC working on my server and I read that is a good thing clear the cache at least once a day. You can do this restarting apache or calling a little php script with cron jobs. For now I configured my server to restart apache every 12 hours to prevent fragmented cache and refresh all the system. At this moment my Prestashop installation is working fine in the both domains of the multi-shop, no 403 error. The other problem "Random Question marks" I think is related to cache too. The most time this error appears when I click on a category link through the top menu of the shop. If I visit a category for first time, the question mark appears. If I reload the page it loads fine. When I click another category that is not so much visited, question mark appears also. So I think my cache system (APC) have some problem with cached pages and (I don't know why) shows me the question mark image. Maybe corrupted cache or something related, I don't know. I'll keep you informed. Link to comment Share on other sites More sharing options...
Sundbox Posted November 16, 2014 Share Posted November 16, 2014 Maybe anyone have some kind of cache system enabled? About 403 forbidden error I noticed that the error is more frequent when more people are watching the website, so maybe the problem is related about the cache system. I have APC working on my server and I read that is a good thing clear the cache at least once a day. You can do this restarting apache or calling a little php script with cron jobs. For now I configured my server to restart apache every 12 hours to prevent fragmented cache and refresh all the system. At this moment my Prestashop installation is working fine in the both domains of the multi-shop, no 403 error. The other problem "Random Question marks" I think is related to cache too. The most time this error appears when I click on a category link through the top menu of the shop. If I visit a category for first time, the question mark appears. If I reload the page it loads fine. When I click another category that is not so much visited, question mark appears also. So I think my cache system (APC) have some problem with cached pages and (I don't know why) shows me the question mark image. Maybe corrupted cache or something related, I don't know. I'll keep you informed. Ok none of this things are the problem, after this the errors increase so I've tried other things: I'm using Plesk 11.5 in Ubuntu 12.04 Server. QUESTION MARKS: In my apache /var/log/apache2/error_log I found that the server is looking for the files in /var/www/default/htdocs but the correct path is /var/www/domain.com/httpdocs/ so maybe this is the problem of the question marks. SOLUTION??: Delete some domain alias in plesk, I have multiple domains as alias for the main domain and one of these is the domain for the second store (I have multishop working), then create it again, this action will regenerate the /var/www/system/domain.com/conf/last_httpd.conf file where is defined the domain document root and where the server should look for files, not in the default directory. FORBIDDEN 403: In /var/www/vhosts/domain.com/logs/error_log I can see the following error: [Thu Nov 13 10:11:41 2014] [warn] [client 192.81.213.81] (104)Connection reset by peer: mod_fcgid: error reading data from FastCGI server [Thu Nov 13 10:11:41 2014] [error] [client 192.81.213.81] Premature end of script headers: index.php SOLUTION??: Searching in internet I found this rule for apache configuration, in plesk you should go to your plesk panel and clic in "Web server configuration" under your domain. Then put the following code in Additional HTTP directives: <IfModule mod_fcgid.c> FcgidBusyTimeout 3600 </IfModule> This increase the timeout for FastCGI and let Prestashop finish their php scripts to work. I think is possible to put it in your .htaccess file, but if you can put at server level is better. Both solutions at this moment are working for me, but I want to test it more time. I'll keep you informed. Link to comment Share on other sites More sharing options...
EvilDragon Posted April 23, 2015 Share Posted April 23, 2015 (edited) Okay, time for some more news, as I switched to PrestaShop v1.6 yesterday night - and the issue is still there! Interestingly, it didn't happen on the test setup where I setup the shop during the last weeks. The test setup was on the EXACT same virtualhost, so the server settings are the same. The ONLY difference between the the test setup and the live setup was that SSL was disabled on the test setup. Therefore, I can tell that those random question marks only appear when using SSL in combination with Friendly URLs. SSL alone works, friendly URLs alone work as well. Now, what happens when the issue happens? Take a look at the sourcecode it creates a basically empty HTML file with the image: <img src="https://www.dragonbox.de/de/60-restposten" alt="https://www.dragonbox.de/de/60-restposten"></img>For some reason, PrestaShop sometimes creates an empty page just containing an image where it tries to load the friendly URL as a picture! (Sorry, I wanted to post the full HTML output, but the forum didn't let me, the code-field became empty all the time) In my opinion this can't be something in the server config, but rather in the friendly URL generator inside PrestaShop. Maybe that helps the PrestaShop team resolving the issue (I'll put that into the bugtracker as well). Does anyone know which file it is in prestashop that handles the friendly URLs? Or is it REALLY only the generated .htaccess-file that handles that? Edited April 23, 2015 by EvilDragon (see edit history) Link to comment Share on other sites More sharing options...
plaffff Posted June 1, 2015 Share Posted June 1, 2015 Same problem for me. Did someone solve it ? Link to comment Share on other sites More sharing options...
Sundbox Posted June 2, 2015 Share Posted June 2, 2015 Same problem for me. Did someone solve it ? The solutions mentioned in my last message (#21) is working for me in all my shops under the same server. Link to comment Share on other sites More sharing options...
pagliaso Posted April 19, 2016 Share Posted April 19, 2016 (edited) Hello, Did someone solved this really? I have been having this issue for a couple of months now, and I am reaching a point where I am thinking seriously to dump Prestashop and my online store out of the window. I have 2 Prestashop installations on the same server, on the same domain, and under different folders. I have the dreaded problem in one, and the other is a new default installation and it is okay, so I am not sure that the solution is as Sundbox suggests. Many thanks in advance and kind regards from Spain, Edited April 19, 2016 by pagliaso (see edit history) Link to comment Share on other sites More sharing options...
pagliaso Posted May 7, 2016 Share Posted May 7, 2016 Hello! Anyone? Please!! Link to comment Share on other sites More sharing options...
discou98_pr Posted August 23, 2016 Share Posted August 23, 2016 I'm having the same issue. If I enable "Friendly URLs" my images do NOT show up on my website. I was told to disable Friendly URLs and my images will work. And they do but my URLs look terrible and are even worse for SEO. I purchased an Addon (Pretty URLs) hoping to use it as a work around to this issue but the Addon won't work unless Friendly URLs is enabled. No bueno. Is there a solution? Thanks! 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