[Loris-dev] Update LORIS to v21.0.0

Morales Pinzon, Alfredo AMORALESPINZON at bwh.harvard.edu
Fri Feb 21 17:06:37 EST 2020


Hi Ling Ma,

All set regarding php 7.2, is now enable and working. Going back to the error in the website: when I select Imaging -> Imaging Browser I got a 500 error in the front-end and the following error in the server:

===
[Fri Feb 21 12:27:21.231227 2020] [php7:error] [pid 17787] [client 170.223.207.1:46078] PHP Fatal error:  Allowed memory size of 134217728 bytes exhausted (tried to allocate 20480 bytes) in /var/www/loris/php/libraries/Database.class.inc on line 714, referer: https://ipmsa-loris.bic.mni.mcgill.ca/
===

Any ideas?

Thank you in advance.

Best,
Alfredo.

On Feb 21, 2020, at 10:09 AM, Ling Ma <lingyun.ma at mcin.ca<mailto:lingyun.ma at mcin.ca>> wrote:


        External Email - Use Caution

If you go to "/etc/apache2/mods-enabled", you can easily find which PHP version is enabled if after restart Apache2 you still have problem. Please don't modify source code to remove "?", there should be a lot of them, not possible to remove all.

On Fri, Feb 21, 2020 at 10:02 AM Ling Ma <lingyun.ma at mcin.ca<mailto:lingyun.ma at mcin.ca>> wrote:
Hi Alfredo,

You installed PHP7.2, but you might not use the new version, you might need to restart the Apache2, or enable Apache2 to use PHP7.2. Because currently your server is still running PHP7.0 or PHP5.6. Because "?" is part of PHP7.1

Please check.

Good luck.

Ling Ma

On Fri, Feb 21, 2020 at 9:59 AM Morales Pinzon, Alfredo <AMORALESPINZON at bwh.harvard.edu<mailto:AMORALESPINZON at bwh.harvard.edu>> wrote:
Dear Ling Ma and Cécile,

Thank you for the help and tips. After installing php7.2-xml and php7.2-mysql I was able to finish all the steps listed in the upgrade process. I followed this post to upgrade to PHP 7.2: https://medium.com/andrewmmc-io/upgrade-php-version-to-7-2-from-7-0-c005a0926642

Now we come back to the first error. Actually, the server is not running right now. I have the following error:

===
[Fri Feb 21 09:25:33.848915 2020] [:error] [pid 27936] [client 216.15.126.108:52419<http://216.15.126.108:52419/>] PHP Parse error:  syntax error, unexpected '?', expecting variable (T_VARIABLE) in /var/www/loris/php/libraries/NDB_Client.class.inc on line 49
===

After modifying the line 49 in NDB_Client.class.inc from

===
function initialize(?string $configFile = null)
===

to (removing the ?)

===
function initialize(string $configFile = null)
===

but I got the following error:

===
[Fri Feb 21 09:37:18.042287 2020] [:error] [pid 715] [client 216.15.126.108:52603<http://216.15.126.108:52603/>] PHP Parse error:  syntax error, unexpected '?', expecting variable (T_VARIABLE) in /var/www/loris/php/libraries/NDB_Factory.class.inc on line 109
===

Is this an error in the code or I am missing something?

Thank you for help.

Best,
Alfredo.

On Feb 19, 2020, at 7:23 PM, Ling Ma <lingyun.ma at mcin.ca<mailto:lingyun.ma at mcin.ca>> wrote:


        External Email - Use Caution

Hi Alfredo,

Since simplexml_load_file is part of php-xml package, I feel that you need to install php7.2-xml if you are using PHP7.2. In Ubuntu you install this package with apt-get install php7.2-xml, and make sure that this module is enabled in Apache2 if you are using Apache2. You can check which module is enabled via phpinfo() call from a PHP enabled web page, or just check your Apache2 PHP modules, the later is easier.

Good luck.

Ling Ma

On Wed, Feb 19, 2020 at 6:18 PM Morales Pinzon, Alfredo <AMORALESPINZON at bwh.harvard.edu<mailto:AMORALESPINZON at bwh.harvard.edu>> wrote:
Hi Ling Ma,

Thank you for the information. I would suggest to add this link to each release, where the upgrading instructions are listed, and also mention upgrading system requirements if needed.

Continuing with the upgrade to v21.0.0. I checked that all the system requirements are met. Now, in having this error when executing data_dictionary_cleaner.php:

===
lorisadmin at ipmsa-loris:/var/www/loris/tools/single_use$ php data_dictionary_cleaner.php
PHP Fatal error:  Uncaught Error: Call to undefined function simplexml_load_file() in /var/www/loris/php/libraries/NDB_Config.class.inc:96
Stack trace:
#0 /var/www/loris/php/libraries/NDB_Config.class.inc(70): NDB_Config->load('/var/www/loris/...')
#1 /var/www/loris/php/libraries/NDB_Factory.class.inc(118): NDB_Config::singleton('/var/www/loris/...')
#2 /var/www/loris/php/libraries/NDB_Client.class.inc(54): NDB_Factory->config('/var/www/loris/...')
#3 /var/www/loris/tools/generic_includes.php(25): NDB_Client->initialize('/var/www/loris/...')
#4 /var/www/loris/tools/single_use/data_dictionary_cleaner.php(24): require_once('/var/www/loris/...')
#5 {main}
  thrown in /var/www/loris/php/libraries/NDB_Config.class.inc on line 96
===

Any ideas on how to solve this?

Regards,
Alfredo.

On Feb 19, 2020, at 5:47 PM, Ling Ma <lingyun.ma at mcin.ca<mailto:lingyun.ma at mcin.ca>> wrote:


        External Email - Use Caution

Hi Alfredo,

If you check this link:

https://github.com/aces/Loris/blob/21.0-release/README.md

and

https://github.com/aces/Loris/blob/22.0-release/README.md

You will see that the system requires:

System Requirements

  *   Apache 2.4 or higher
  *   MySQL >= 5.7 (or MariaDB >= 10.3)
  *   PHP 7.2 or higher
  *   Composer<https://getcomposer.org/>
  *   NodeJS 8.0 or higher
  *   NPM
  *   make

Please make sure that you have all the latest or recent versions for each of them, otherwise you will run into trouble later.

Ling Ma

On Wed, Feb 19, 2020 at 5:29 PM Morales Pinzon, Alfredo <AMORALESPINZON at bwh.harvard.edu<mailto:AMORALESPINZON at bwh.harvard.edu>> wrote:
Hi Ling Ma,

Thank you. I will upgrade to PHP 7.2.

BTW, I cannot find the requirements for PHP for v21, I am looking at this link:

https://github.com/aces/Loris/releases/tag/v21.0.0

Regards,
Alfredo.


On Feb 19, 2020, at 5:18 PM, Ling Ma <lingyun.ma at mcin.ca<mailto:lingyun.ma at mcin.ca>> wrote:


        External Email - Use Caution

Hi Alfredo,

The warning is OK to ignore. As to php, please check v21 version requirements, I believe a php minimum 7.1 even 7.2 is required.

In fact, PHP 5.6 is no longer supported.

Best regards,
Ling Ma

On Wed., Feb. 19, 2020, 5:07 p.m. Morales Pinzon, Alfredo, <AMORALESPINZON at bwh.harvard.edu<mailto:AMORALESPINZON at bwh.harvard.edu>> wrote:
Dear Ling and Cécile,

Thank for your responses.

I had an issue with "git checkout”, somehow I had to remove some files before being able to checkout the v21.0.0. That was the reason I didn’t have the make file. Now that I have it, I have some errors:

After running “make” I have the following error:

===
    WARNING in configuration
    The 'mode' option has not been set, webpack will fallback to 'production' for this value. Set 'mode' option to 'development' or 'production' to enable defaults for each environment.
    You can also set it to 'none' to disable any default behavior. Learn more: https://webpack.js.org/concepts/mode/
composer install --no-dev
> mkdir -p project/libraries
Loading composer repositories with package information
Installing dependencies from lock file
Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - Installation request for php-http/guzzle6-adapter v2.0.1 -> satisfiable by php-http/guzzle6-adapter[v2.0.1].
    - php-http/guzzle6-adapter v2.0.1 requires php ^7.1 -> your PHP version (7.0.33) does not satisfy that requirement.
===

Do I have to upgrade PHP to 7.1?

Thank you again for your help.

Regards,
Alfredo.


On Feb 19, 2020, at 12:15 PM, Cecile Madjar <cecile.madjar at mcin.ca<mailto:cecile.madjar at mcin.ca>> wrote:


        External Email - Use Caution

Hi Alfredo,

Sorry to hear you are experiencing issues with the upgrade to 21.0.0. See below.

On Tue, Feb 18, 2020 at 4:31 PM Morales Pinzon, Alfredo <AMORALESPINZON at bwh.harvard.edu<mailto:AMORALESPINZON at bwh.harvard.edu>> wrote:
Hi Cécile,

I am in the process of upgrading LORIS from v20.1.1 to v21.0.0 (and then to v22.0.0). I had no issues to get to v20.3.0 but now, moving to v21.0.0, I have two issues:

1. I cannot access the link “Imaging->Imaging Browser” in the LORIS website. I get a 500 error. Any ideas on what should I check?

Could you send us what you see in the Apache error file for that 500 error? Although, might be worth focusing on fixing your second issue before we dive too much into that one.

2. In the instructions to upgrade to v21.0.0, the second point says:

"Run make from the Loris root directory to update all dependencies.”"

However when I run “make” In the Loris root direction it does nothing. Here is the result:

===
lorisadmin at ipmsa-loris:/var/www/loris$ make
make: *** No targets specified and no makefile found.  Stop.
===
It that the right directory? Maybe I am missing some files?

Are you sure you are on the 21.0.0 release of LORIS before you run make? Do you see a Makefile in your /var/www/loris directory? In theory it is supposed to be there on branch 21.0.0 (https://github.com/aces/Loris/tree/v21.0.0)

Hope this helps.

Cécile


Thank you for your help.

Best,
Alfredo.



The information in this e-mail is intended only for the person to whom it is
addressed. If you believe this e-mail was sent to you in error and the e-mail
contains patient information, please contact the Partners Compliance HelpLine at
http://www.partners.org/complianceline . If the e-mail was sent to you in error
but does not contain patient information, please contact the sender and properly
dispose of the e-mail.




-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.bic.mni.mcgill.ca/pipermail/loris-dev/attachments/20200221/d8b7e319/attachment-0001.html>


More information about the Loris-dev mailing list