Jump to content

PrestaShop™ 1.4.0.14 Generating .htaccess produces a PHP Fatal error / 500 Internal Server Error / 404


Recommended Posts

Ok this is a fresh install with innoDB toggled, Apache2, PHP Version: 5.2.16, MySQL Version: 5.1.54-log

This is what I found in the log file
---
[27-Feb-2011 02:57:52] PHP Fatal error: Call to a member function display() on a non-object in /home/xxxxxx/public_html/classes/FrontController.php on line 278

Now I can regain control of my BO by deleting the .htacess file but the url for the FO keeps going to...
---
http://xxxxxx.co/en/

Not Found

The requested URL /en/ was not found on this server.

Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.

Any ideas???

Link to comment
Share on other sites

Thanks you a lot for your report but yes it has been fixed for the next release. The cause was sample data for url rewrite wasn't correct.

This quick fix can solve your problem :

open classes/Tools.php

find line 1571-1572 :

                foreach (Meta::getMetasByIdLang($language['id_lang']) as $key => $meta)
                   if (!empty($meta['url_rewrite']))


replace by (only 1572 changed):

                foreach (Meta::getMetasByIdLang($language['id_lang']) as $key => $meta)
                   if (!empty($meta['url_rewrite']) AND Validate::isLinkRewrite($meta['url_rewrite']))

Link to comment
Share on other sites

  • 3 weeks later...

In RC6 there were still present some wrong predefined data about predefined rewrite (e.g. rewrite with spaces or special characters in Italian). To solve you have to change or remove all wrong info before generating the .htaccess.
But, please note from this morning is available the 1.4 stable version, so.. try with that one before.

Link to comment
Share on other sites

to solve the issue in previous version I made the following: use only the languages you need and then in the Back office, preferences, SEO, modify the url rewritten with spaces on special characters. Check all enable languages. If also in 1.4.0.17 the error is related with sample data, you could solve it.

Link to comment
Share on other sites

  • 1 month later...

re generated htaccess without url rewriting. now front office loads but only after i click on index.php. also, front office displays following error"We're sorry, but the Web address you entered is no longer available" and it's not actually the home page. did not attempt to implement the rewrite of Tools.php as the lines in file were different(maybe wrong prestashop vrs, for that fix) i'm on a shared server so i can't change the Mbstring option in apache as per bug report resolution. is there a patch available or can i change some code somewhere? thanks in advance


Prestashop Version: 1.4.0.17

Server information: Linux #107 SMP Tue Mar 1 18:57:23 CST 2011 i686

Server software Version: Apache mod_fcgid/2.3.6 mod_auth_passthrough/2.1 mod_bwlimited/1.4 FrontPage/5.0.2.2635

PHP Version: 5.2.15

MySQL Version: 5.1.52

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