Search the Community
Showing results for tags 'setlocale'.
Found 3 results
I always seem to get this warning on every new install of PW on my Ubuntu 14 box with Digital Ocean. The servers are usually based in the UK and I was wondering if I should be adding something other than the below in the config? Is there a UK based locale code? Quick Google didnt come up with much. Warning: your server locale is undefined and may cause issues. Please add this to /site/config.php file (adjust “en_US.UTF-8” as needed): setlocale(LC_ALL,'en_US.UTF-8'); Added to the config file: setlocale(LC_ALL,'en_US.UTF-8');
Hey everyone, I had one of the worst days of my life today due to the setlocale(LC_ALL,'en_US.UTF-8'); suggestion at the notification bar of my admin panel. I went into config.php, went to the last line and added setlocale(LC_ALL,'en_US.UTF-8'); Then my client's 30k/day site completely crashed. All I can get is the following output: 404 page not found (no site configuration or install.php available) Of course I removed the line of code and the problem is still there. In the midst of all of that I did NOT have the site profile exported, nor did I have a backup of the files and when I panicked I tried to upgrade the Processwire components, but in the fray of it all I recursively removed the assets folder--losing about 3-4GB of images and files. The client pays to get access to many of these photos, most of which are mug shots for newly released criminals and they do not have a local backup. So, I thankfully had a copy of all my templates, remade every one of my fields, and at least tried to get them publishing fresh again. Well, that same error showed up at the top of the screen. Guess what I did? The SAME THING!!! Only now I am BEGGING for help. I cannot start over again. Please, someone offer any advice. I thought I did EXACTLY what I was instructed to do.
Hi all, I have experienced some weird problems when using the Float field combined with the translation of setlocale() arguments. It seems that with specific setlocale() (in my case setlocale('it_IT')) leads to transform the decimal separator from "."to "," (for example "2.566" is transformed to "2,566") so all queries contains a "," and mysql stores only the integer part (without any errors). Good query: INSERT INTO `field_testfloat` (pages_id, data) VALUES('1024', '24.534') ON DUPLICATE KEY UPDATE data=VALUES(data) Bad query: INSERT INTO `field_testfloat` (pages_id, data) VALUES('1024', '24,534') ON DUPLICATE KEY UPDATE data=VALUES(data) The naive solution is to leave blank setlocale(), but i wonder if it is possibile to correct this behaviour.