Gettext Error
Contents |
here for a quick overview of the site Help Center Detailed answers to any questions you might method gettext must be called from the ui thread in android have Meta Discuss the workings and policies of this site About
Method Gettext Must Be Called From The Ui Thread Android Studio
Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads method gettext must be called from the ui thread currently inferred thread is worker with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million method must be called from ui thread programmers, just like you, helping each other. Join them; it only takes a minute: Sign up Gettext not working, no error messages, using php 5.3 up vote 2 down vote favorite 1 I've been bouncing my head in this for a couple of days now without any success. I just want to get gettext to work.
Method Execute Must Be Called From The Main Thread Currently Inferred Thread Is Worker
What happens is that the string as it is written in the php-file is printed, not the translated one. I.e. if i do "echo gettext("Service");" then "Service" is printed, not the swedish "Tjänster". There are absolutely no error messages in httpd/error_log. Not when running the app or (re-)starting apache. Using Centos 6.2 and php 5.3. This is my directory structure: /path/to/locale/sv_SE.utf8/LC_MESSAGES/messages.mo /path/to/setlocale.php My messages.po file: msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2012-01-18 20:09+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta method "settext" must be called from the ui thread Discuss the workings and policies of this site About Us Learn more getcontext must be called from the ui thread about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Stack
Gettext Must Be Called From Ui Thread
Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, http://stackoverflow.com/questions/8917968/gettext-not-working-no-error-messages-using-php-5-3 helping each other. Join them; it only takes a minute: Sign up Method getText() must be called from the UI Thread (Android Studio) up vote 3 down vote favorite 1 I'm trying to create a login for an application. However I have a problem. This is my code: package com.forgetmenot.loginregister; import java.util.ArrayList; import java.util.List; import org.apache.http.NameValuePair; import org.apache.http.message.BasicNameValuePair; http://stackoverflow.com/questions/32011996/method-gettext-must-be-called-from-the-ui-thread-android-studio import org.json.JSONArray; import org.json.JSONException; import org.json.JSONObject; import android.app.Activity; import android.content.Intent; import android.os.AsyncTask; import android.os.Bundle; import android.util.Log; import android.view.Menu; import android.view.MenuItem; import android.view.View; import android.widget.Button; import android.widget.EditText; public class MainActivity extends Activity { EditText uname, password; Button submit; // Creating JSON Parser object JSONParser jParser = new JSONParser(); private static final String TAG = "Login"; JSONObject json; private static String url_login = "http://localhost:8080/ForgetMeNotApplication/Login"; //JSONArray incoming_msg = null; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); findViewsById(); submit.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View arg0) { // execute method invokes doInBackground() where we open a Http URL connection using the given Servlet URL //and get output response from InputStream and return it. new Login().execute(); } }); } private void findViewsById() { uname = (EditText) findViewById(R.id.txtUser); password = (EditText) findViewById(R.id.txtPass); submit = (Button) findViewById(R.id.login); } private class Login extends AsyncTask
communities company blog Stack Exchange Inbox Reputation and Badges sign up log in tour help Tour Start here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company http://askubuntu.com/questions/755383/phpmyadmin-not-working-due-to-missing-extensions Business Learn more about hiring developers or posting ads with us Ask Ubuntu Questions Tags http://superuser.com/questions/590208/phpmyadmin-symlinks-error-after-ubuntu-upgrade Users Badges Unanswered Ask Question _ Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute: Sign up Here's how it works: Anybody can ask a question Anybody can answer The best answers are voted up and rise to the top phpmyadmin not working due to missing extensions up vote must be 14 down vote favorite 4 I am about to use phpmyadmin on Ubuntu 16.04. But it shows that the page is not working. the error log says error 500 PHP Fatal error: require_once(): Failed opening required '/usr/share/php/php-gettext/gettext.inc' (include_path='.:/usr/share/php') in /usr/share/phpmyadmin/libraries/select_lang.lib.php on line 477 At first it says that the mysqli|mysql extension is missing. but after sleepless hours I forget what I've been done to it. I am using php7. php mysql phpmyadmin share|improve this question edited must be called May 4 at 14:14 Jorge Castro 24.4k91387589 asked Apr 9 at 0:36 kepalabotak 71113 add a comment| 8 Answers 8 active oldest votes up vote 38 down vote sudo apt-get install php-mbstring php7.0-mbstring php-gettext sudo service apache2 restart This has been reported at this bug: https://bugs.launchpad.net/ubuntu/+source/phpmyadmin/+bug/1577482 share|improve this answer edited May 4 at 15:47 Jorge Castro 24.4k91387589 answered Apr 24 at 14:49 user534575 38112 I am setting up a server for the first time and I had the same issue as the op, except that I wasn't upgrading it was a fresh install of 16.04. The same issue however, and this fixed the problem. Thank you! –Darren Haynes May 2 at 2:58 Thanks you, I had the same problem, it worked, +1 from me. –Zviad Gabroshvili Jul 15 at 16:51 add a comment| up vote 6 down vote You need to install php-gettext , Install it using sudo apt-get install php-gettext share|improve this answer answered Apr 11 at 8:36 t9toqwerty 418211 add a comment| up vote 5 down vote I lost hours to solve this problem. Just install php-mbstring, php7.0-mbstring and php-gettext. That's it. You can do that by running the following command: sudo apt-get install php-mbstring php7.0-mbstring php-gettext share|improve this answer edited Apr 19 at 16:07 Dan 4,38023057 answered Apr 19 at 12:42 Mich. Gio. 6316 I haven't installed
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Super User Questions Tags Users Badges Unanswered Ask Question _ Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute: Sign up Here's how it works: Anybody can ask a question Anybody can answer The best answers are voted up and rise to the top phpmyadmin symlinks error after ubuntu upgrade up vote 12 down vote favorite 4 After the upgrade of my ubuntu server to 13.04 my phpmyadmin is no longer reachable. the browser reports 500 (internal server error) and in the error.log it says: PHP Fatal error: require_once(): Failed opening required './libraries/php-gettext/gettext.inc' (include_path='.') in /usr/share/phpmyadmin/libraries/select_lang.lib.php on line 370 Any other php software works fine on the machine and so does mysql itself. Phpmyadmin is installed correctly and worked fine before the dist-upgrade. i also did sudo aptitude reinstall phpmyadmin but that did not help. the version number of phpmyadmin is 4:3.5.8.1-1 any ideas, what could be wrong here? /edit: by now i found out, that the symlinks here do not seem to work: mcnesium@fluse:/usr/share/phpmyadmin/libraries/php-gettext$ ls -l total 0 lrwxrwxrwx 1 root root 36 Apr 25 03:38 gettext.inc -> ../../../php/php-gettext/gettext.inc lrwxrwxrwx 1 root root 36 Apr 25 03:38 gettext.php -> ../../../php/php-gettext/gettext.php lrwxrwxrwx 1 root root 36 Apr 25 03:38 streams.php -> ../../../php/php-gettext/streams.php i backed up the folder php-gettext and cp -r'd the symlinked one over, now it works. so this actually seems to be a symlink-problem. this is the beginning of my /etc/phpmyadmin/apache.conf # phpMyAdmin default Apache configuration Alias /phpmyadmin /usr/share/phpmyadmin