HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
Options
Class 'Locale' not found
AndersR
New
in Localization
Just installed vanilla for a try. Followed instructions found at https://websiteforstudents.com.
But instead of up and running I get the following message from the initiation phase:
Fatal Error in LocalesApiController.{closure}();
Class 'Locale' not found
Any ideas?
Additional information for support personnel:
Application: Vanilla
Application Version: 3.2-2019.012-SNAPSHOT
PHP Version: 7.2.3-1ubuntu1
Operating System: Linux
Server Software: Apache/2.4.29 (Ubuntu)
User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.120 Safari/537.36
Request Uri: /index.php?p=/dashboard/setup
Controller: LocalesApiController
Method: {closure}
he error occurred on or near: /var/www/html/vanilla/applications/dashboard/controllers/api/LocalesApiController.php
99: 100: $populate = function (array &$row, array $locales) { 101: $displayNames = []; 102: foreach ($locales as $locale) { 103: $displayName = \Locale::getDisplayLanguage($row["localeKey"], $locale); 104: 105: // Standardize capitalization 106: $displayName = mb_convert_case($displayName, MB_CASE_TITLE); 107:
0
Comments
Resolved, after inst af php intl and gd
//AR
Hi, I have received the same problem. Sorry but what did you say about php extensions intl and gd? The comment was pretty illegible to me.
never mind, I have sorted it by editing the php.ini file from ;extension=php_intl.dll and deleted the semi colon. Then duplicated the
icu**.dll from php to apache/bin
I have this problem when trying to create a forum today. I installed php-intl and restarted apache2 but it still gives the same error. Is there something else I am supposed to do as I am on Linux and they do not have php_intl.dll files.
I downloaded using this command and maybe it got the wrong version ??
My location in php.ini is date.timezone = Australia/Sydney
My Error:
Class 'Locale' not found
The error occurred on or near: /var/www/html/vanilla/applications/dashboard/controllers/api/LocalesApiController.php
Backtrace:
Need Help?
If you are a user of this website, you can report this message to a website administrator.
If you are an administrator of this website, you can get help at the Vanilla Community Forums.
Additional information for support personnel:
Just in case I downloaded the wrong version I downloaded version 3.3 and I still get the same error.
git clone --branch release/3.3 https://github.com/vanilla/vanilla.git
Additional information for support personnel:
You should always use the zipped file from this page. You can find it here: https://open.vanillaforums.com/addon/vanilla-core
The git version requires some additional build steps.
I downloaded the file from the link above and unzipped and put it in my /var/www/html folder as vanilla. I restarted apache2 and opened the browser and I get the same error as before. http://forum.dingo-den.com/
I could not find a tutorial on how to install, lots of upgrades but no first time install.
Class 'Locale' not found
The error occurred on or near: /var/www/html/vanilla/applications/dashboard/controllers/api/LocalesApiController.php
Backtrace:
Need Help?
If you are a user of this website, you can report this message to a website administrator.
If you are an administrator of this website, you can get help at the Vanilla Community Forums.
Additional information for support personnel:
This looks like the issue I referenced here:
The resolution was to install php-intl
If you follow the links it comes back to this post which does not solve the problem???? Linux does not have .dll files and I do not see a solution ..... I think I will just try another forum as this one does not work on Ubuntu 19
I'm using Ubuntu 18, and installing php-intl solved the issue.
This looks like the version is php dependent:
but I'm pretty sure I just did
sudo apt-get install php-intl
I also got this error when upgrading my forum from 3.2 to 3.3.
I'm using a shared hosting. So, there is no way for me to install php-intl.
I commented the line #103 of the
applications/dashboard/controllers/api/LocalesApiController.php
And then, added this line after the commented line.
$displayName = "English";
This fixed the issue. 🙂
Hope this hack will not lead to any other problems, as I'm not using different locales and the API.
Thank you for this fix! I am in the same boat as you with shared hosting and do not have access to install php-intl. This worked like a charm. I am back up and running. 😁
Thank you, @whu606 - installing php-intl (and then restarting Apache) works perfectly.
same error
but im sure last night i was change my PHP version from 7.2 to 7.4 is the main reason on my web
Resolved, after inst af php intl