bebang Posted April 2, 2014 Share Posted April 2, 2014 Hello, I get the following error from when trying to change the PHP settings from 5.2 to 5.3 or 5.4 Warning: preg_replace(): Compilation failed: invalid range in character class at offset 24 in /home/xxxx/public_html/classes/Tools.php on line 1079 Any idea how I can solve this? Link to comment Share on other sites More sharing options...
prestashopninja Posted April 2, 2014 Share Posted April 2, 2014 Hello, What is your Prestashop version? Link to comment Share on other sites More sharing options...
bebang Posted April 2, 2014 Author Share Posted April 2, 2014 PrestaShop™ 1.5.6.2 - the other problem I had in the past is that when upgrading changes to the language settings are not saved.Not sure if the two are connected. Link to comment Share on other sites More sharing options...
vekia Posted April 2, 2014 Share Posted April 2, 2014 strange i tested ps on 5.4 (unix os) and everything is fine you see this error always and everywhere? or only after certain actions ? Link to comment Share on other sites More sharing options...
bebang Posted April 2, 2014 Author Share Posted April 2, 2014 It appears as soon as I upgrade the PHP version from 5.2, on the top of the screen at every page. Link to comment Share on other sites More sharing options...
prestashopninja Posted April 2, 2014 Share Posted April 2, 2014 (edited) This error is most probably caused by a PHP bug or a PHP compilation without proper UTF-8 support. You can save the day by disallowing accented characters from backend -> preferences -> seo & url's. Edited April 2, 2014 by prestashopninja (see edit history) 1 Link to comment Share on other sites More sharing options...
bebang Posted April 2, 2014 Author Share Posted April 2, 2014 Brilliant!!! That solved the error message issue!!! Thank you so much! Link to comment Share on other sites More sharing options...
prestashopninja Posted April 2, 2014 Share Posted April 2, 2014 You are welcome. Please remember to turn dev mode off on the production site and edit the title as "solved" so the others may also benefit. Link to comment Share on other sites More sharing options...
bebang Posted April 2, 2014 Author Share Posted April 2, 2014 I would love to but I can't work out how to edit the title, so I have just marked your answer as solved. Unless there is another way. Link to comment Share on other sites More sharing options...
prestashopninja Posted April 3, 2014 Share Posted April 3, 2014 Thank you for your effort. I hope @Vekia would be kind to do it for us. Link to comment Share on other sites More sharing options...
tony1dk Posted August 20, 2014 Share Posted August 20, 2014 Is there a fix for this without just turning something off ? Need a fix Link to comment Share on other sites More sharing options...
the.rampage.rado Posted August 25, 2014 Share Posted August 25, 2014 I have exactly the same problem.1.5.6.2 and I need cyrillic symbols in the URLs otherwise the conversion makes them pretty bad and unreadable. The accented symbols function work but at the moment I'm running on PHP 5.4.31 and there's this error.Also the added operators in the URL when using layered navigation don't appear and also the names of the manufacturers are gone. What can be done? Link to comment Share on other sites More sharing options...
mrbatyo Posted October 6, 2014 Share Posted October 6, 2014 S.O.S Hi all! I have got same problem. "[06-Oct-2014 15:04:45 Europe/Budapest] PHP Warning: preg_replace(): Compilation failed: invalid range in character class at offset 24 in /var/www/home/bortour/public_html/classes/Tools.php on line 1079" Errorlog send for me. When I off accented URL, I don't make nothing my products(price, seo, frindly url). My server php v5.4.3. thx Link to comment Share on other sites More sharing options...
kashifkhan112 Posted December 27, 2014 Share Posted December 27, 2014 (edited) I have 1.5.0.17 and backend -> preferences -> seo & url's accented characters option is not given, looking any solution for 1.5.0.17 Edited December 27, 2014 by kashifkhan112 (see edit history) Link to comment Share on other sites More sharing options...
Alzok Posted October 30, 2015 Share Posted October 30, 2015 Dans le fichier "Tools.php" du dossier" classes", à la ligne concerné échappé le "-" (ce qui donne "\-") par exemple : preg_replace('/[^a-zA-Z0-9\s\'\:\/\[\]-\pL]/u', '', $str); devient : preg_replace('/[^a-zA-Z0-9\s\'\:\/\[\]\\-\pL]/u', '', $str); Link to comment Share on other sites More sharing options...
Recommended Posts