Installing Learning with Texts in Linux / Error 1698

All about language programs, courses, websites and other learning resources
Ingaræð
Orange Belt
Posts: 170
Joined: Sat Nov 26, 2016 9:34 pm
Languages: English (N), German (heritage)
Learning: Russian, French, German, Mandarin, Arabic, Spanish.
Mostly forgotten: Italian, Welsh.
x 377

Installing Learning with Texts in Linux / Error 1698

Postby Ingaræð » Thu Apr 12, 2018 9:17 pm

FYI: This post has been completely rewritten (2021-03-06) following changes to Learning With Texts.

Some time ago, the installation instructions for LWT under Linux would result in a database connection error (1698). The installation instructions have since been amended to prevent this, but the error can still occur if MySQL is updated afterwards. If that happens, you can fix it by redoing this section of the installation instructions:

Code: Select all

Open a Terminal and type and execute the following commands:

sudo more /etc/mysql/debian.cnf
 (note the password for user "debian-sys-maint")
mysql -u debian-sys-maint -p
 (password for user "debian-sys-maint" from above)
uninstall plugin validate_password;
UPDATE mysql.user SET authentication_string=PASSWORD(''), plugin='mysql_native_password' WHERE User='root' AND Host='localhost';
FLUSH privileges;
QUIT;
sudo service apache2 restart
sudo service mysql restart


LWT should now work as normal in your browser, without any data being lost.

For reference, here are the full instructions from the original LWT site for installing in Windows, Mac and Linux:

Code: Select all

LWT_INSTALLATION.txt
====================
Last updated 08-2020
====================

#############
1. Windows 10
#############

1a. Possibility (a): Installation EasyPHP & LWT on Win10
========================================================

Step 1a: Download MSVCR110.dll from https://www.microsoft.com/en-us/download/details.aspx?id=30679
Step 1b: Choose the x86 version and download.
Step 1c: Run the installer vcredist_x86.exe in the Downloads folder.

Step 2a: Go to http://www.easyphp.org/easyphp-devserver.php.
Step 2b: Download "EasyPHP DevServer 17.0".
Step 2c: Open your Downloads folder and run the downloaded EasyPHP-Devserver-17.0-setup.exe into C:\Program Files (x86)\EasyPHP-Devserver-17.

Step 3: Go to http://sourceforge.net/projects/lwt and download the latest zip archive lwt_v_1_6_3.zip.

Step 4a: Copy the downloaded zip archive lwt_v_1_6_3.zip into the directory eds-www below the EasyPHP installation directory, i.e. C:\Program Files (x86)\EasyPHP-Devserver-17\eds-www.
Step 4b: Now right-click on the zip archive and select "Extract all", and unzip everything into a new folder C:\Program Files (x86)\EasyPHP-Devserver-17\eds-www\lwt_v_1_6_3.
Step 4c: Rename the folder lwt_v_1_6_3 to lwt.
Step 4d: The zip archive C:\Program Files (x86)\EasyPHP-Devserver-17\eds-www\lwt_v_1_6_3.zip may be deleted.

Step 5: Now go into C:\Program Files (x86)\EasyPHP-Devserver-17\eds-www\lwt. Rename the file "connect_easyphp.inc.php" to "connect.inc.php". (Sometimes the "php" extension is hidden, so be careful! You can display file extensions via the Windows Explorer settings and check it.)

Step 6a: Start EasyPHP via Desktop Icon (Devserver 17). In the Task Bar near the clock appears the EasyPHP app icon (it may be hidden!).
Step 6b: LWT can now be started. Right-Click on the EasyPHP icon in the taskbar, choose "Servers->Start/Restart all Servers", open a browser, and open http://127.0.0.1/lwt (please bookmark).

Step 7: You may now install the LWT demo database, or define the first language you want to learn.

If you start up Windows, you must repeat Step 6a+b.

If you want to start EasyPHP every time you start Windows and avoid Step 6a, put an EasyPHP link into C:\Users\(YourUID)\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup.

Now you must only do step 6b to start LWT.

1b. Possibility (b): Installation XAMPP & LWT on Win10
======================================================

Step 1a: Go to https://www.apachefriends.org/download.html .
Step 1b: Download "XAMPP for Windows 7.3.6 (64 bit)" (or higher).
Step 1c: Open your Downloads folder and run the downloaded xampp-windows-x64-7.3.6-2-VC15-installer.exe. Please install the components Apache, MySQL, PHP and phpMyAdmin into the folder C:\xampp.

Step 2: Go to http://sourceforge.net/projects/lwt and download the latest zip archive lwt_v_1_6_3.zip.

Step 3a: Copy the downloaded zip archive lwt_v_1_6_3.zip from the Downloads folder into the directory htdocs below the XAMPP installation directory, i.e. C:\xampp\htdocs.
Step 3b: Now right-click on the zip archive and select "Extract all", and unzip everything into a new folder C:\xampp\htdocs\lwt_v_1_6_3.
Step 3c: Rename the folder lwt_v_1_6_3 to lwt.
Step 3d: The zip archive C:\xampp\htdocs\lwt_v_1_6_3.zip may be deleted.

Step 4: Now go into C:\xampp\htdocs\lwt. Rename the file "connect_easyphp.inc.php" to "connect.inc.php". (Sometimes the "php" extension is hidden, so be careful! You can display file extensions via the Windows Explorer settings and check it.)

Step 5a: Start the "XAMPP Control Panel" (C:\xampp\xampp-control.exe) and start the two modules Apache and MySQL. Now the two module names should have a green background color.
Step 5b: LWT can now be started. Open a browser, and open http://localhost/lwt (please bookmark).

Step 6: You may now install the LWT demo database, or define the first language you want to learn.

If you start up Windows, you must repeat Step 5a+b.

If you want to start "XAMPP Control Panel" every time you start Windows and to avoid Step 5a, put a "XAMPP Control Panel" link to C:\xampp\xampp-control.exe into C:\Users\(YourUID)\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup. To autostart also the Apache and MySQL modules, please open "Config" within the XAMPP Control Panel and check the two checkboxes.

Now you must only do step 5b to start LWT.

###############
2. macOS 10.10+
###############

Step 1: Go to http://www.mamp.info/en/downloads/.

Step 2: Download "MAMP & MAMP PRO" (currently MAMP_MAMP_PRO_5.7.pkg).

Step 3: Double-click on the downloaded installation package MAMP_MAMP_PRO_5.7.pkg, accept the license, click on "Install for all users..." and on "Continue", on the next panel titled "Standard Install on Macintosh HD" click on "Customize", deselect "MAMP PRO", and click Install. You must enter your password. After this step MAMP is installed within a folder named "MAMP" in the Applications folder.

Step 4: Go to http://sourceforge.net/projects/lwt and download the latest zip archive lwt_v_1_6_3.zip.

Step 5: Copy the downloaded zip archive lwt_v_1_6_3.zip into the directory htdocs below the MAMP directory, i.e. /Applications/MAMP/htdocs.
Doubleclick on the zip archive to unzip; a new folder lwt_v_1_6_3 will be created in htdocs.

Step 6: Rename the new folder lwt_v_1_6_3 to lwt. The zip archive lwt_v_1_6_3.zip may be deleted.

Step 7: Go to /Applications/MAMP/htdocs/lwt. Rename the file connect_mamp.inc.php to connect.inc.php.

Step 8: Open MAMP.app in /Applications/MAMP. Accept the messages from the firewall. Apache and MySQL start automatically.

Step 9: LWT can now be started in your web browser, go to: http://localhost:8888/lwt.

Step 10: You may install the LWT demo database, or define the first language you want to learn.

If you want to use LWT again, just do step 8 and 9.
The local webserver (MAMP) will be automatically stopped by quitting the MAMP application.

#####################################
3. Linux (tested on Ubuntu 18.04 LTS)
#####################################

Step 1: Open a Terminal and type and execute the following commands:

sudo apt update
sudo apt install tasksel
sudo tasksel install lamp-server
sudo apt install php-mbstring
sudo more /etc/mysql/debian.cnf
 (note the password for user "debian-sys-maint")
mysql -u debian-sys-maint -p
 (password for user "debian-sys-maint" from above)
uninstall plugin validate_password;
UPDATE mysql.user SET authentication_string=PASSWORD(''), plugin='mysql_native_password' WHERE User='root' AND Host='localhost';
FLUSH privileges;
QUIT;

Step 2: Open a browser and go to http://sourceforge.net/projects/lwt and download the latest zip archive lwt_v_1_6_3.zip. It will be normally placed in /home/[your userid]/Downloads.

Step 3: Open a file explorer, go to /home/[your userid]/Downloads and extract the LWT zip archive.

Step 4: Rename the new directory lwt_v_1_6_3 to lwt. The zip archive lwt_v_1_6_3.zip may be deleted.

Step 5: Rename the file connect_xampp.inc.php in /home/[your userid]/Downloads/lwt to connect.inc.php.

Step 6: Open a Terminal window, type and execute the following commands:

sudo mv /home/[your userid]/Downloads/lwt /var/www/html
sudo chmod -R 755 /var/www/html/lwt
sudo rm /var/www/html/index.html
sudo service apache2 restart
sudo service mysql restart

Step 7: LWT can now be started in your web browser, go to: http://localhost/lwt.

Step 8: You may install the LWT demo database, or define the first language you want to learn.

If you want to use LWT again, just do step 7.

#######################################
4. Upgrade LWT
#######################################

Step 1: Backup the LWT directory. Backup your database (within LWT).

Step 2: Download the newer version of LWT, extract the ZIP archive and copy everything into the LWT directory.

Step 3: Copy the following from your LWT backup into the LWT directory: "connect.inc.php" and the whole "media" sub-directory (if you created one; contains your MP3 audio files).

Step 4: Clear the web browser cache and open LWT as usual.

#######################################
############# END #####################
#######################################
Last edited by Ingaræð on Sun Mar 07, 2021 12:13 am, edited 2 times in total.
1 x

User avatar
vinnie
White Belt
Posts: 30
Joined: Mon Apr 30, 2018 9:24 pm
Languages: Italian (N), Engish (beginner), German (beginner)
x 11

Re: Installing Learning with Texts in Linux (can someone cross-post to Sourceforge?)

Postby vinnie » Mon Apr 30, 2018 9:45 pm

These days I did a lot of tests with dockers, they all failed ( I also made an issue report https://github.com/jcul/lwt-docker/issues/1 ).
I did a lot of tests because I did not want to install a webserver locally, but by failing all of them I redirected myself to the old bitnami and it worked.

Basically:
1) I downloaded LAMP 5.6.36-0 (64-bit) version from this site https://bitnami.com/stack/lamp/installer
2) opened a terminal in the file dir and made executable the installer with "chmod + x ./bitnami-lampstack-5.6.36-0-linux-x64-installer.run executable"
3) run the executable (it does nothing but decompress files in the dir you prefer), when it asks you for the password, remember it why you will need it later
4) downloaded lwt and unzipped into [bitnami_dir]/apache2/htdocs/lwt
5) copied (or renamed) the file connect_xampp.inc.php into connect.inc.php
6) modified this file by adding the password previously annotated in the field $passwd = "password_annotated";
7) if you try to open http://localhost:8080/lwt/ in the browser you should see the index.php, anyway, starting the file manager-linux-x64.run inside the decompressed bitnami directory you can start and suspend the servers

let me know if it worked too
0 x

User avatar
Lysander
Yellow Belt
Posts: 89
Joined: Fri Mar 16, 2018 10:34 am
Languages: English (N); Spanish (beginner)
Language Log: https://forum.language-learners.org/vie ... 15&t=18668
x 245

Re: Installing Learning with Texts in Linux (can someone cross-post to Sourceforge?)

Postby Lysander » Fri Jun 01, 2018 5:54 am

I am getting the same database connection error (1698) error. I guess because I did not set the root password during install? I am a bit confused on how to work through this issue now. I am new to Linux, but would love to get LWT to work! Anyone know an easy, step-by-step way to fix this? Here are my errors:

Fatal Error: DB connect error (MySQL not running or connection parameters are wrong; start MySQL and/or correct file "connect.inc.php"). Please read the documentation: http://lwt.sf.net [Error Code: 1698 / Error Message: Access denied for user 'root'@'localhost']

Backtrace:

#0 my_die(DB connect error (MySQL not running or connection parameters are wrong; start MySQL and/or correct file "connect.inc.php"). Please read the documentation: http://lwt.sf.net [Error Code: 1698 / Error Message: Access denied for user 'root'@'localhost']) called at [/var/www/html/lwt/utilities.inc.php:3360]
#1 require_once(/var/www/html/lwt/utilities.inc.php) called at [/var/www/html/lwt/index.php:46]


Should I uninstall and redo it but actually put in a password when doing the "During the second command you must confirm once with Y. You are also asked several times for a MySQL password for user "root". Just press [Return] in all these cases." part of Step 1?

And if yes on uninstalling, how do I do that?

**edit update: when trying to follow the steps in the OP, I get a note that the "directory not empty" when doing the first command in Step 7. This was after I added the password into the text editor in Step 6. So I am thinking there must be stuff left over from my first attempt. But I am unsure how to go clear out that directory.
0 x
: 17 / 30 Fluenz: Latin American Spanish Vol 1
: 17 / 150 Fluenz: Latin American Spanish - Overall

Nico546
Posts: 8
Joined: Sun Apr 01, 2018 12:35 am
Languages: French (N), English (C2), Russian (B1)
x 21

Re: Installing Learning with Texts in Linux (can someone cross-post to Sourceforge?)

Postby Nico546 » Fri Jun 01, 2018 1:11 pm

Hi,
I never installed it on Linux, but if it still doesn't work, even with the advices given before,
I suggest that you install it on an hosting website. Some of them are free (like altervista.org for example).
That's what I did, and I can access my texts though every devices, and even if I'm far from home. It's really useful.
2 x

User avatar
georgiqg
Posts: 5
Joined: Mon Feb 06, 2017 8:57 pm
Languages: Bulgarian (N), Spanish (C2), English (upper-intermediate), German (lower-intermediate), Russian (beginner)
x 16

Re: Installing Learning with Texts in Linux (can someone cross-post to Sourceforge?)

Postby georgiqg » Wed Jan 20, 2021 11:01 am

Hello everyone,
I realize this is an old post, but I will post what worked for me in case it helps someone else. I had the exact same problem today after installing EasyPHP. I guess it won't happen to most people, but I already had MySQL installed (because I'm a developer) and my password didn't match the one specified in the file "connect.inc.php" (you can open it as a text file with Notepad or similar). The password for user "root" is usually also "root", so you can try that if you are getting the same error message.

BTW I'm posting this here because the link to Sourceforge from the original post doesn't work anymore.
3 x

User avatar
vinnie
White Belt
Posts: 30
Joined: Mon Apr 30, 2018 9:24 pm
Languages: Italian (N), Engish (beginner), German (beginner)
x 11

Re: Installing Learning with Texts in Linux (can someone cross-post to Sourceforge?)

Postby vinnie » Sun Jan 24, 2021 12:50 am

In case anyone is interested, I found this but have never tried it: https://learningwithtexts.com/
And in case it can be useful, some time ago i posted this guide for android, but actually it's for a ubuntu in chroot:
https://forum.language-learners.org/vie ... 33#p178233
1 x

Ingaræð
Orange Belt
Posts: 170
Joined: Sat Nov 26, 2016 9:34 pm
Languages: English (N), German (heritage)
Learning: Russian, French, German, Mandarin, Arabic, Spanish.
Mostly forgotten: Italian, Welsh.
x 377

Re: Installing Learning with Texts in Linux / Error 1698

Postby Ingaræð » Sun Mar 07, 2021 12:24 am

georgiqg wrote:BTW I'm posting this here because the link to Sourceforge from the original post doesn't work anymore.

Thanks - I'd forgotten all about this, and have now rewritten my orginal post as the instructions were updated in the meantime.

Lysander wrote:I am getting the same database connection error (1698) error.

Sorry, I missed your post. Did you get it sorted in the end?
0 x


Return to “Language Programs and Resources”

Who is online

Users browsing this forum: No registered users and 2 guests