You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
Reading a text might result in this error:
[Mon Jan 10 17:40:52 2022] PHP 7.4.12 Development Server (http://localhost:9004) started
[Mon Jan 10 17:40:54 2022] [::1]:53495 Accepted
[Mon Jan 10 17:40:54 2022] [::1]:53495 [500]: GET /do_text.php?start=1 - require_once(): Failed opening required 'vendor/mobiledetect/mobiledetectlib/Mobile_Detect.php' (include_path='.:/Applications/MAMP/bin/php/php7.4.12/lib/php') in /Users/username/vendor/hugofara/lwt/do_text.php on line 15
[Mon Jan 10 17:40:54 2022] [::1]:53495 Closing
To Reproduce
(I'm not sure if this is the proper way to set up lwt. But since MAMP doesn't come with composer, I followed this guide and put composer.phar in ~/
composer require hugofara/lwt
Start PHP development server from VSCode. Everything seems to work fine until making a request to do_text.php or do_test.php
Read a text, which results in a blank web page
Expected behavior
lwt automatically finds the right Mobile_Detect.php.
Screenshots
Essentially blank web page:
Desktop (please complete the following information):
OS: MacOS 12.0.1
Browser: Safari
PHP 7.4.12
MySQL 5.7.32
Additional context
Specifying the absolute path to Mobile_Detect.php fixes the issue, but I'm sure this isn't the most elegant solution.
Apparently I went a bit too fast with issue #4 . Composer isn't guilty here: the command I suggest in the README (composer require) is wrong.
Problem
composer require is usually used for packages you want to include in another project (API for instance). However, LWT is an application. It installs LWT in the vendor/ folder, which breaks all paths.
Solution
Use composer create-project hugofara/lwt. It will create a folder with the same organization is in the git.
In the future
With v2.1.0, I have more or less finished reorganizing the code. Now I will continue developing tests, so that I won't miss this kind of obvious issue. Until then, thank you for your contribution!
Describe the bug
Reading a text might result in this error:
To Reproduce
(I'm not sure if this is the proper way to set up lwt. But since MAMP doesn't come with composer, I followed this guide and put
composer.phar
in~/
composer require hugofara/lwt
do_text.php
ordo_test.php
Expected behavior
lwt automatically finds the right
Mobile_Detect.php
.Screenshots

Essentially blank web page:
Desktop (please complete the following information):
Additional context
Specifying the absolute path to
Mobile_Detect.php
fixes the issue, but I'm sure this isn't the most elegant solution.Since composer installs both
mobiledetect/mobiledetectlib
andhugofara/lwt
invendor/
, this also worksThe text was updated successfully, but these errors were encountered: