[Loris-dev] upgrading LORIS v22 - v23 error

Shen Wang wangshen.mcin at gmail.com
Mon Feb 8 13:16:39 EST 2021


Hi To
I am so glad to hear that you had fixed the composer issue.
"chmod 770 smarty/templates_c"
It will fix the problem.
Best
Shen


On Mon, 8 Feb 2021 at 12:49, Tom Beaudry <waveflux at gmail.com> wrote:

> Hi  DAve and Shen,
>
> I wasn't able to rollback my version of composer so it made me realize it
> was corrupt, so i removed composer, reinstalled it and rolled back to the
> version you suggest.  Now i can do composer insall with no problem, and
> make clean & make work without errors.
>
> The only error i'm left with now when i visit the main page is:
>
> [Mon Feb 08 12:47:27.785383 2021] [php7:error] [pid 7082] [client
> 172.16.253.8:54598] PHP Fatal error:  Uncaught  --> Smarty: unable to
> write file /var/www/loris/smarty/templates_c/wrt6021792fbfb5b4_53411590 <--
> \n  thrown in
> /var/www/loris/vendor/smarty/smarty/libs/sysplugins/smarty_internal_runtime_writefile.php
> on line 60
>
> Thanks!
> Tom
>
> [Mon Feb 08 12:47:27.785383 2021] [php7:error] [pid 7082] [client
> 172.16.253.8:54598] PHP Fatal error:  Uncaught  --> Smarty: unable to
> write file /var/www/loris/smarty/templates_c/wrt6021792fbfb5b4_53411590 <--
> \n  thrown in
> /var/www/loris/vendor/smarty/smarty/libs/sysplugins/smarty_internal_runtime_writefile.php
> on line 60
>
> On Fri, Feb 5, 2021 at 10:19 AM Dave MacFarlane <dave.macfarlane at mcin.ca>
> wrote:
>
>> What version of composer are you using?
>>
>> Composer 2 (which was backwards incompatible) came out at around the same
>> time as LORIS 23.
>>
>> If you're using composer 2 you can try `composer self-update 1.10.17` to
>> downgrade and then try the
>> composer install again.
>>
>> On Thu, Feb 4, 2021 at 6:00 PM Tom Beaudry <waveflux at gmail.com> wrote:
>>
>>> Hey Shen,
>>>
>>> Sadly it's the same error.
>>>
>>> Tom
>>>
>>> On Thu, Feb 4, 2021 at 4:39 PM Shen Wang <wangshen.mcin at gmail.com>
>>> wrote:
>>>
>>>> Hi Tom,
>>>> Try "composer self-update --snapshot" or "composer self-update
>>>> --stable".
>>>> Please let me know the result.
>>>> Best
>>>> Shen
>>>>
>>>> On Thu, 4 Feb 2021 at 16:27, Tom Beaudry <waveflux at gmail.com> wrote:
>>>>
>>>>> Hey Shen,
>>>>>
>>>>> I followed your instructions and can confirm i'm using php 7.4:
>>>>> https://docs.google.com/document/d/1QppFZ8MtKoMRltiIQidFDslfVwriuS9cpfuZN49nOZ8/edit?usp=sharing
>>>>>
>>>>> composer install still fails:
>>>>>
>>>>>   [ErrorException]
>>>>>   Trying to access array offset on value of type null
>>>>>
>>>>> Thanks!
>>>>> Tom
>>>>>
>>>>> On Thu, Feb 4, 2021 at 4:04 PM Shen Wang <wangshen.mcin at gmail.com>
>>>>> wrote:
>>>>>
>>>>>> Hi Tom,
>>>>>> It is very helpful, it means you need to do "composer install"
>>>>>> again.
>>>>>> if it not works for you then try these steps for Centos.
>>>>>> sudo yum-config-manager --disable remi-php80
>>>>>> sudo yum-config-manager --enable remi-php74
>>>>>> sudo systemctl restart httpd sudo systemctl status httpd
>>>>>> /var/www/loris/htdocs$ echo "<?php phpinfo(); ?>" >> test.php
>>>>>> Using test.php to check your PHP version in your brower.
>>>>>> Best
>>>>>> Shen
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> On Thu, 4 Feb 2021 at 15:55, Tom Beaudry <waveflux at gmail.com> wrote:
>>>>>>
>>>>>>> Hey Shen,
>>>>>>>
>>>>>>> I checked the apache log and the error is different now:
>>>>>>>
>>>>>>> [Thu Feb 04 15:54:16.131158 2021] [php7:warn] [pid 5215] [client
>>>>>>> 172.16.253.6:62349] PHP Warning:
>>>>>>>  require_once(/var/www/loris/htdocs/../vendor/autoload.php): failed to open
>>>>>>> stream: No such file or directory in /var/www/loris/htdocs/index.php on
>>>>>>> line 18
>>>>>>> [Thu Feb 04 15:54:16.131215 2021] [php7:error] [pid 5215] [client
>>>>>>> 172.16.253.6:62349] PHP Fatal error:  require_once(): Failed
>>>>>>> opening required '/var/www/loris/htdocs/../vendor/autoload.php'
>>>>>>> (include_path='.:/usr/share/php:/var/www/loris/project/libraries:/var/www/loris/php/libraries')
>>>>>>> in /var/www/loris/htdocs/index.php on line 18
>>>>>>>
>>>>>>> I'm not sure if that helps figure out what's wrong.
>>>>>>>
>>>>>>> Thanks again!
>>>>>>> Tom
>>>>>>>
>>>>>>> On Thu, Feb 4, 2021 at 3:45 PM Tom Beaudry <waveflux at gmail.com>
>>>>>>> wrote:
>>>>>>>
>>>>>>>> Hi Shen,
>>>>>>>>
>>>>>>>> My productions server is CentOS.
>>>>>>>>
>>>>>>>> If i check what version of php i'm using:
>>>>>>>>
>>>>>>>> [lorisadmin at loris loris]$ rpm -qa | grep php
>>>>>>>> php-json-7.4.15-1.el7.remi.x86_64
>>>>>>>> php-pear-1.10.12-5.el7.remi.noarch
>>>>>>>> php-7.4.15-1.el7.remi.x86_64
>>>>>>>> php-devel-7.4.15-1.el7.remi.x86_64
>>>>>>>> php-sodium-7.4.15-1.el7.remi.x86_64
>>>>>>>> php-fedora-autoloader-1.0.1-2.el7.noarch
>>>>>>>> php-fpm-7.4.15-1.el7.remi.x86_64
>>>>>>>> php-gd-7.4.15-1.el7.remi.x86_64
>>>>>>>> php-cli-7.4.15-1.el7.remi.x86_64
>>>>>>>> php-pdo-7.4.15-1.el7.remi.x86_64
>>>>>>>> php-mysqlnd-7.4.15-1.el7.remi.x86_64
>>>>>>>> php-bcmath-7.4.15-1.el7.remi.x86_64
>>>>>>>> php-xml-7.4.15-1.el7.remi.x86_64
>>>>>>>> php-mbstring-7.4.15-1.el7.remi.x86_64
>>>>>>>> oniguruma5php-6.9.6-1.el7.remi.x86_64
>>>>>>>> php-common-7.4.15-1.el7.remi.x86_64
>>>>>>>> php-process-7.4.15-1.el7.remi.x86_64
>>>>>>>> php-pecl-mcrypt-1.0.4-1.el7.remi.7.4.x86_64
>>>>>>>>
>>>>>>>> They are all showing up as 7.4.
>>>>>>>>
>>>>>>>> Thanks!
>>>>>>>> Tom
>>>>>>>>
>>>>>>>> On Thu, Feb 4, 2021 at 3:37 PM Shen Wang <wangshen.mcin at gmail.com>
>>>>>>>> wrote:
>>>>>>>>
>>>>>>>>> Hi Tom,
>>>>>>>>> If you got same error like "Deprecated: Required parameter
>>>>>>>>> $ignoreFilters follows optional parameter $packageName " ,
>>>>>>>>> It seems like you are still using PHP 8. After downgraded to PHP
>>>>>>>>> 7.4, you need to install PHP 7.4 dependencies as well.
>>>>>>>>> Try these steps :
>>>>>>>>>
>>>>>>>>>    1. sudo apt-get install -y php7.4 php7.4-mysql php7.4-xml
>>>>>>>>>    php7.4-json php7.4-mbstring php7.4-gd php-ast
>>>>>>>>>    2. sudo apt-get install -y composer
>>>>>>>>>    3. sudo apt-get install -y libapache2-mod-php7.4
>>>>>>>>>    4. sudo a2dismod php8.0
>>>>>>>>>    5. sudo a2enmod php7.4
>>>>>>>>>    6. sudo service apache2 restart
>>>>>>>>>
>>>>>>>>> 7, make clean
>>>>>>>>> 8, make
>>>>>>>>> Good luck.
>>>>>>>>> Best
>>>>>>>>> Shen
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> On Thu, 4 Feb 2021 at 15:05, Tom Beaudry <waveflux at gmail.com>
>>>>>>>>> wrote:
>>>>>>>>>
>>>>>>>>>> Hey Shen,
>>>>>>>>>>
>>>>>>>>>> I downgraded to php 7.4 and get the same results.
>>>>>>>>>>
>>>>>>>>>> What can i try next?
>>>>>>>>>> Tom
>>>>>>>>>>
>>>>>>>>>> On Thu, Feb 4, 2021 at 2:01 PM Shen Wang <wangshen.mcin at gmail.com>
>>>>>>>>>> wrote:
>>>>>>>>>>
>>>>>>>>>>> Hi Tom,
>>>>>>>>>>> We don't support PHP 8 with Loris yet. We are working on it.
>>>>>>>>>>> For the 23.0-release, you have to use PHP 7.3 or 7.4.
>>>>>>>>>>> Best
>>>>>>>>>>> Shen
>>>>>>>>>>>
>>>>>>>>>>> On Thu, 4 Feb 2021 at 13:50, Tom Beaudry <waveflux at gmail.com>
>>>>>>>>>>> wrote:
>>>>>>>>>>>
>>>>>>>>>>>> Hey Shen,
>>>>>>>>>>>>
>>>>>>>>>>>> Unfortunately it didn't work.  Here's the output:
>>>>>>>>>>>> https://pastebin.com/raw/ZQjPuAG1
>>>>>>>>>>>>
>>>>>>>>>>>> I'm using php8.
>>>>>>>>>>>>
>>>>>>>>>>>> Thanks,
>>>>>>>>>>>> Tom
>>>>>>>>>>>>
>>>>>>>>>>>> On Thu, Feb 4, 2021 at 1:40 PM Shen Wang <
>>>>>>>>>>>> wangshen.mcin at gmail.com> wrote:
>>>>>>>>>>>>
>>>>>>>>>>>>> Hi Tom,
>>>>>>>>>>>>> You are welcome. I think that you need to remove all the
>>>>>>>>>>>>> vendor files.
>>>>>>>>>>>>> Try  step 1: "make clean"    (delete all the vendor and
>>>>>>>>>>>>> node_modules)
>>>>>>>>>>>>>        step 2: "make"             ( run composer install and
>>>>>>>>>>>>> npm install ...)
>>>>>>>>>>>>> If it still can't work, could you tell me which PHP version
>>>>>>>>>>>>> are you using?
>>>>>>>>>>>>> Best
>>>>>>>>>>>>> Shen
>>>>>>>>>>>>>
>>>>>>>>>>>>> On Thu, 4 Feb 2021 at 13:29, Tom Beaudry <waveflux at gmail.com>
>>>>>>>>>>>>> wrote:
>>>>>>>>>>>>>
>>>>>>>>>>>>>> Hi Shen,
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> Thanks for the answer:  Composer install gives me the
>>>>>>>>>>>>>> following error:
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> [lorisadmin at loris loris]$ composer install
>>>>>>>>>>>>>> PHP Deprecated:  Required parameter $ignoreFilters follows
>>>>>>>>>>>>>> optional parameter $packageName in
>>>>>>>>>>>>>> phar:///usr/local/bin/composer/src/Composer/Command/ArchiveCommand.php on
>>>>>>>>>>>>>> line 97
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> Deprecated: Required parameter $ignoreFilters follows
>>>>>>>>>>>>>> optional parameter $packageName in
>>>>>>>>>>>>>> phar:///usr/local/bin/composer/src/Composer/Command/ArchiveCommand.php on
>>>>>>>>>>>>>> line 97
>>>>>>>>>>>>>> Deprecation Notice: Required parameter $path follows optional
>>>>>>>>>>>>>> parameter $schema in
>>>>>>>>>>>>>> phar:///usr/local/bin/composer/vendor/justinrainbow/json-schema/src/JsonSchema/Constraints/UndefinedConstraint.php:53
>>>>>>>>>>>>>> Deprecation Notice: Required parameter $path follows optional
>>>>>>>>>>>>>> parameter $schema in
>>>>>>>>>>>>>> phar:///usr/local/bin/composer/vendor/justinrainbow/json-schema/src/JsonSchema/Constraints/UndefinedConstraint.php:97
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>   [ErrorException]
>>>>>>>>>>>>>>   Trying to access array offset on value of type null
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> Best,
>>>>>>>>>>>>>> Tom
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> On Thu, Feb 4, 2021 at 1:13 PM Shen Wang <
>>>>>>>>>>>>>> wangshen.mcin at gmail.com> wrote:
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> Hi Tom,
>>>>>>>>>>>>>>> You need to re-run " composer install " to solve this issue.
>>>>>>>>>>>>>>> Good Luck.
>>>>>>>>>>>>>>> Best
>>>>>>>>>>>>>>> Shen
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> On Thu, 4 Feb 2021 at 13:01, Tom Beaudry <waveflux at gmail.com>
>>>>>>>>>>>>>>> wrote:
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>> Hey Guys,
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>> I decided to upgrade LORIS v22 to v23 and I ran into this
>>>>>>>>>>>>>>>> apache error when i navigate to the homepage in my web browser:
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>> [Thu Feb 04 12:52:22.608901 2021] [php7:warn] [pid 5215]
>>>>>>>>>>>>>>>> [client 172.16.253.6:62122] PHP Warning:  session_start():
>>>>>>>>>>>>>>>> Setting option 'cookie_samesite' failed in
>>>>>>>>>>>>>>>> /var/www/loris/php/libraries/NDB_Client.class.inc on line 147
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>> [Thu Feb 04 12:52:22.610434 2021] [php7:error] [pid 5215]
>>>>>>>>>>>>>>>> [client 172.16.253.6:62122] PHP Fatal error*:  Uncaught
>>>>>>>>>>>>>>>> Error: Class 'Laminas\\Diactoros\\ServerRequestFactory'*
>>>>>>>>>>>>>>>> not found in /var/www/loris/htdocs/index.php:35\nStack trace:\n#0 {main}\n
>>>>>>>>>>>>>>>>  thrown in /var/www/loris/htdocs/index.php on line 35
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>> It seems that the server request is failing:
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>> $serverrequest = \Laminas\Diactoros\ServerRequestFactory::
>>>>>>>>>>>>>>>> fromGlobals();
>>>>>>>>>>>>>>>> 36
>>>>>>>>>>>>>>>> <https://github.com/aces/Loris/blob/11e6780c0d0e2f4e33ee915f8258f9222c314892/htdocs/index.php#L36>
>>>>>>>>>>>>>>>> Any help would be greatly appreciated!
>>>>>>>>>>>>>>>> Tom
>>>>>>>>>>>>>>>> _______________________________________________
>>>>>>>>>>>>>>>> Loris-dev mailing list
>>>>>>>>>>>>>>>> Loris-dev at bic.mni.mcgill.ca
>>>>>>>>>>>>>>>> https://mailman.bic.mni.mcgill.ca/mailman/listinfo/loris-dev
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> --
>>>>>>>>>>>>>>> Shen Wang
>>>>>>>>>>>>>>> Loris <https://github.com/aces/Loris>  Developer
>>>>>>>>>>>>>>> Montreal Neurological Institute
>>>>>>>>>>>>>>> McGill University
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>> --
>>>>>>>>>>>>> Shen Wang
>>>>>>>>>>>>> Loris <https://github.com/aces/Loris>  Developer
>>>>>>>>>>>>> Montreal Neurological Institute
>>>>>>>>>>>>> McGill University
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>> --
>>>>>>>>>>> Shen Wang
>>>>>>>>>>> Loris <https://github.com/aces/Loris>  Developer
>>>>>>>>>>> Montreal Neurological Institute
>>>>>>>>>>> McGill University
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>
>>>>>>>>> --
>>>>>>>>> Shen Wang
>>>>>>>>> Loris <https://github.com/aces/Loris>  Developer
>>>>>>>>> Montreal Neurological Institute
>>>>>>>>> McGill University
>>>>>>>>>
>>>>>>>>>
>>>>>>
>>>>>> --
>>>>>> Shen Wang
>>>>>> Loris <https://github.com/aces/Loris>  Developer
>>>>>> Montreal Neurological Institute
>>>>>> McGill University
>>>>>>
>>>>>>
>>>>
>>>> --
>>>> Shen Wang
>>>> Loris <https://github.com/aces/Loris>  Developer
>>>> Montreal Neurological Institute
>>>> McGill University
>>>>
>>>> _______________________________________________
>>> Loris-dev mailing list
>>> Loris-dev at bic.mni.mcgill.ca
>>> https://mailman.bic.mni.mcgill.ca/mailman/listinfo/loris-dev
>>>
>>

-- 
Shen Wang
Loris <https://github.com/aces/Loris>  Developer
Montreal Neurological Institute
McGill University
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.bic.mni.mcgill.ca/pipermail/loris-dev/attachments/20210208/7624e23e/attachment-0001.html>


More information about the Loris-dev mailing list