[Loris-dev] Unable to Access the Front-end

Aaron Chen kchen339 at wisc.edu
Fri Nov 25 19:04:45 EST 2022


Hi Dave,

I just realized that there should be no forward slash before it since there is a forward slash at the end of the base path which I forgot to add at the beginning. Sorry for bothering you and thank you very much for your help!


Best,

Aaron

________________________________
From: Aaron Chen <kchen339 at wisc.edu>
Sent: Wednesday, November 23, 2022 1:27 PM
To: Dave MacFarlane <dave.macfarlane at mcin.ca>
Cc: loris-dev at bic.mni.mcgill.ca <loris-dev at bic.mni.mcgill.ca>
Subject: Re: [Loris-dev] Unable to Access the Front-end

Hi Dave,

It is working! Seems like it is because the path wasn't correct. We forgot to add the forward slash at the end of the path. Very much appreciated your help.

There is also one question I will like to ask which might be an error too. I was trying to debug it by myself before knowing the missing forward slash. I got an error log like this.
[Sat Nov 19 23:30:15.205931 2022] [php7:error] [pid 485530] [client 10.138.220.162:59913] PHP Fatal error:  Uncaught LorisNoSuchModuleException: No such module: acknowledgements in /var/www/loris/php/libraries/Module.class.inc:123
Stack trace:
#0 /var/www/loris/src/LorisInstance.php(79): Module::factory()
#1 /var/www/loris/src/LorisInstance.php(111): LORIS\\LorisInstance->getActiveModules()
#2 /var/www/loris/src/Router/BaseRouter.php(111): LORIS\\LorisInstance->hasModule()
#3 /var/www/loris/src/Middleware/ResponseGenerator.php(50): LORIS\\Router\\BaseRouter->handle()
#4 /var/www/loris/src/Middleware/ContentLength.php(52): LORIS\\Middleware\\ResponseGenerator->process()
#5 /var/www/loris/htdocs/index.php(55): LORIS\\Middleware\\ContentLength->process()
#6 {main}
 thrown in /var/www/loris/php/libraries/Module.class.inc on line 123

I found out that the path to find the module in the Module.class.inc file wasn't correct. I added a forward slash before project and modules and the error was gone.[cid:6f4d8945-b5a6-4ac0-9c29-ba9d544cb59b]

Should there be a forward slash before project and modules? Thank you in advance and Happy Thanksgiving!


Best,

Aaron

________________________________
From: Dave MacFarlane <dave.macfarlane at mcin.ca>
Sent: Wednesday, November 23, 2022 9:08 AM
To: Aaron Chen <kchen339 at wisc.edu>
Cc: loris-dev at bic.mni.mcgill.ca <loris-dev at bic.mni.mcgill.ca>
Subject: Re: [Loris-dev] Unable to Access the Front-end

This sometimes happens if the base path config setting isn't set correctly.

Can you run the SQL: SELECT * from Config WHERE ConfigID=(SELECT ID FROM ConfigSettings WHERE Name='base');
and see what the result is? Also check if there's a xml tag named <base> in the config.xml (which would override the database value)

The value should be the directory where you installed LORIS including the trailing slash. ie `/var/www/loris/` (errors like this sometimes happen if it's set to `/var/www/loris`)

If that config value is correct, it could also be a filesystem permission issue. Make sure the files' unix permissions are readable by apache and the directory permissions leading up to it are all executable by apache (including the /var and /var/www).

- Dave


On Wed, Nov 23, 2022 at 9:04 AM Aaron Chen <kchen339 at wisc.edu<mailto:kchen339 at wisc.edu>> wrote:
Hi,

Thank you very much for the help. I did see there was a typo in my config.xml file. However, the front end is still inaccessible after I corrected the typo. I also throw our XML file into the XML validator but there is no syntax error. Below is the new error log I got after fixing the typo.
[Tue Nov 22 16:40:55.155037 2022] [php7:notice] [pid 500127] [client 10.138.220.162:62703<http://10.138.220.162:62703>] [ERROR] Unable to load template 'file:404.tpl'#0 /var/www/loris/vendor/smarty/smarty/libs/sysplugins/smarty_internal_templatebase.php(232): Smarty_Internal_Template->render()
#1 /var/www/loris/vendor/smarty/smarty/libs/sysplugins/smarty_internal_templatebase.php(116): Smarty_Internal_TemplateBase->_execute()
#2 /var/www/loris/src/Http/Error.php(86): Smarty_Internal_TemplateBase->fetch()
#3 /var/www/loris/src/Router/PrefixRouter.php(102): LORIS\\Http\\Error->__construct()
#4 /var/www/loris/php/libraries/Module.class.inc(340): LORIS\\Router\\PrefixRouter->handle()
#5 /var/www/loris/src/Router/ModuleRouter.php(77): Module->handle()
#6 /var/www/loris/src/Middleware/ExceptionHandlingMiddleware.php(54): LORIS\\Router\\ModuleRouter->handle()
#7 /var/www/loris/src/Router/BaseRouter.php(126): LORIS\\Middleware\\ExceptionHandlingMiddleware->process()
#8 /var/www/loris/src/Middleware/ResponseGenerator.php(50): LORIS\\Router\\BaseRouter->handle()
#9 /var/www/loris/src/Middleware/ContentLength.php(52): LORIS\\Middleware\\ResponseGenerator->process()
#10 /var/www/loris/htdocs/index.php(55): LORIS\\Middleware\\ContentLength->process()
#11 {main}

[Tue Nov 22 16:40:55.159740 2022] [php7:error] [pid 500127] [client 10.138.220.162:62703<http://10.138.220.162:62703>] PHP Fatal error:  Uncaught  --> Smarty: Unable to load template 'file:500.tpl' <-- \n  thrown in /var/www/loris/vendor/smarty/smarty/libs/sysplugins/smarty_internal_template.php on line 195
[Tue Nov 22 16:40:55.159776 2022] [php7:notice] [pid 500127] [client 10.138.220.162:62703<http://10.138.220.162:62703>] [CRITICAL] /var/www/loris/vendor/smarty/smarty/libs/sysplugins/smarty_internal_template.php:195: Uncaught  --> Smarty: Unable to load template 'file:500.tpl' <-- \n  thrown

It seems like there are some other errors that LORIS is trying to display via frontend but can't find the template in the system. Though, I did find 404.tpl and 500.tpl under /var/www/loris/smarty/templates/ directory. Also, the path to load the config.xml somehow was fixed by itself as I didn't see the error message again in the log file.[cid:184a5021f97cb971f161]

Thank you in advance!


Best,

Aaron

________________________________
From: Dave MacFarlane <dave.macfarlane at mcin.ca<mailto:dave.macfarlane at mcin.ca>>
Sent: Tuesday, November 22, 2022 11:44 AM
To: Aaron Chen <kchen339 at wisc.edu<mailto:kchen339 at wisc.edu>>
Cc: loris-dev at bic.mni.mcgill.ca<mailto:loris-dev at bic.mni.mcgill.ca> <loris-dev at bic.mni.mcgill.ca<mailto:loris-dev at bic.mni.mcgill.ca>>
Subject: Re: [Loris-dev] Unable to Access the Front-end

Hi Aaron,

After resolving the ../ references the path looks like it's correctly looking at /var/www/loris/project.xml but the errors suggest that the file isn't valid xml.

It looks like from the second line <item value="V2">V2 label description</tem> that you made a typo in the V2 and missed the "i" in the closing tag for the "item" tag.

- Dave

On Tue, Nov 22, 2022 at 11:48 AM Aaron Chen <kchen339 at wisc.edu<mailto:kchen339 at wisc.edu>> wrote:
Good morning,

Hope this email finds you well. Our team is trying to set up the LORIS system for research. It was working before but somehow, we aren't able to access the front-end. Below are some snips of errors from the loris-error.log under the /var/log/apache2/ directory.

    [Mon Nov 21 22:05:36.946133 2022] [php7:warn] [pid 495460] [client 128.105.29.144:61741<http://128.105.29.144:61741>] PHP Warning:  simplexml_load_file(): /var/www/loris/php/libraries/../../project/config.xml:69: parser error : Opening and ending tag mismatch: item line 69 and tem in /var/www/loris/php/libraries/NDB_Config.class.inc on line 97
    [Mon Nov 21 22:05:36.946178 2022] [php7:warn] [pid 495460] [client 128.105.29.144:61741<http://128.105.29.144:61741>] PHP Warning:  simplexml_load_file():             <item value="V2">V2 label description</tem> in /var/www/loris/php/libraries/NDB_Config.class.inc on line 97
    [Mon Nov 21 22:05:36.946190 2022] [php7:warn] [pid 495460] [client 128.105.29.144:61741<http://128.105.29.144:61741>] PHP Warning:  simplexml_load_file():                                                        ^ in /var/www/loris/php/libraries/NDB_Config.class.inc on line 97
    [Mon Nov 21 22:05:36.946239 2022] [php7:error] [pid 495460] [client 128.105.29.144:61741<http://128.105.29.144:61741>] PHP Fatal error:  Uncaught Exception: Could not load Loris config file /var/www/loris/php/libraries/../../project/config.xml in /var/www/loris/php/libraries/NDB_Config.class.inc:100
    Stack trace:
    #0 /var/www/loris/php/libraries/NDB_Config.class.inc(70): NDB_Config->load()
    #1 /var/www/loris/php/libraries/NDB_Factory.class.inc(104): NDB_Config::singleton()
    #2 /var/www/loris/php/libraries/NDB_Client.class.inc(54): NDB_Factory->config()
    #3 /var/www/loris/htdocs/index.php(34): NDB_Client->initialize()
    #4 {main}
      thrown in /var/www/loris/php/libraries/NDB_Config.class.inc on line 100
It seems like the path to the config.xml isn't correct. It should be /var/www/loris/php/libraries/project/config.xml, not /var/www/loris/php/libraries/../../project/config.xml. Where could I change the path?

Any help would be much appreciated.

Best,
Aaron Chen

_______________________________________________
Loris-dev mailing list
Loris-dev at bic.mni.mcgill.ca<mailto:Loris-dev at bic.mni.mcgill.ca>
https://mailman.bic.mni.mcgill.ca/mailman/listinfo/loris-dev
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.bic.mni.mcgill.ca/pipermail/loris-dev/attachments/20221126/fd599f9c/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image.png
Type: image/png
Size: 31447 bytes
Desc: image.png
URL: <http://mailman.bic.mni.mcgill.ca/pipermail/loris-dev/attachments/20221126/fd599f9c/attachment-0002.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image.png
Type: image/png
Size: 49207 bytes
Desc: image.png
URL: <http://mailman.bic.mni.mcgill.ca/pipermail/loris-dev/attachments/20221126/fd599f9c/attachment-0003.png>


More information about the Loris-dev mailing list