HugoFara / lwt

Learn languages by reading! A language learning app stemmed from Learning with Texts (LWT).
https://hugofara.github.io/lwt/
The Unlicense
169 stars 19 forks source link

failing to update lwt to latest build on a Mac #134

Closed quopquai closed 1 year ago

quopquai commented 1 year ago

Hi, I recently installed lwt (version 2_0_3) on an M2 Mac and then realised the latest build is 2.8.1.

I tried to do an update and followed the instructions as best as I could, but whenever I go to open the lwt-2.8.1/ or lwt-master with the MAMP server in Chrome it always gives the error message:

"This page isn’t working localhost is currently unable to handle this request. HTTP ERROR 500"

HugoFara commented 1 year ago

Hi! Do you already have some content in your instance of LWT? If not, I think the easiest solution is a clean install (do not update anything, just download it from scratch again).

As you are trying to do a big update, waiting ~5 minutes may be enough for the server to update the database. You can also try to reload the server.

What version of PHP/MAMP are you using?

quopquai commented 1 year ago

thanks for the advice, I will give it a try!...

I have about 100 words and expressions stored and 3 articles, but it's no biggy!

when you say clean install, does that mean delete the old one before installing the new one?

I'm on MAMP Version 6.8 (1258)

HugoFara commented 1 year ago

Well, it's up to you to determine what will be the most time consuming task between an update and a clean installation. If you go for a clean install, you don't need to delete the old version of LWT, just make sure to set up a different database.

With MAMP 6.8, you should be able to use PHP 8+ (see the documentation). PHP 7 and below is no longer maintained and is not compatible with this version of LWT. That may a cause for your issue :thinking:

quopquai commented 1 year ago

...you solved it...

I switched to PHP 8, gave it a second or two to register, and now it works.

thank you very much for your help and all of your work!!! :):):):)

HugoFara commented 1 year ago

You're welcome! I hope you will have fun learning new languages!

quopquai commented 1 year ago

...also, I don't know why, but it seems to have preserved all of my work. all of my articles and words are intact!!? even though I deleted the older version before installing the new one!

...I don't know what the heck is going on there, but still that's a bonus!!!

HugoFara commented 1 year ago

Well, if you deleted them, that's not supposed to happen :smile:

I think you just deleted LWT, not the database, and the new version knows how to update the database...

quopquai commented 1 year ago

...I'm sorry to keep hassling you but there's another problem...

when I open a text now, it shows the following...

Fatal Error: Your OS 'DAR' cannot use MeCab with this version of LWT!

Backtrace:

0 /Applications/MAMP/htdocs/lwt-2.8.1/inc/kernel_utility.php(268): my_die('Your OS 'DAR' c...')

1 /Applications/MAMP/htdocs/lwt-2.8.1/inc/session_utility.php(4498): get_mecab_path(' -O yomi ')

2 /Applications/MAMP/htdocs/lwt-2.8.1/do_text_header.php(186): phonetic_reading('\xE8\x8C\xA8\xE5\x9F\x8E\xE7\x9C\x8C\xE3\x81\xAE\xE7\xB4\x8D...', 'ja')

3 /Applications/MAMP/htdocs/lwt-2.8.1/do_text_header.php(313): browser_tts('\xE8\x8C\xA8\xE5\x9F\x8E\xE7\x9C\x8C\xE3\x81\xAE\xE7\xB4\x8D...', 'Japanese')

4 /Applications/MAMP/htdocs/lwt-2.8.1/do_text.php(96): do_text_header_content(3, true)

5 /Applications/MAMP/htdocs/lwt-2.8.1/do_text.php(144): do_text_desktop_content(3)

6 /Applications/MAMP/htdocs/lwt-2.8.1/do_text.php(150): do_text_page(3)