Can't access Resourcespace installation

47 views
Skip to first unread message

Herman

unread,
Jul 19, 2021, 12:14:38 PM7/19/21
to ResourceSpace

Hi to @all in this community.

I need help please. Without changing anything in the database installation itself, we get an error message: httpdocs/lib/stemming/en.php line 398: Array and string offset access syntax with curly braces is deprecated

This is part of the code, line 398 begins with 'return preg_match...':
 /**
        * Returns true/false as to whether the given string contains two
        * of the same consonant next to each other at the end of the string.
        *
        * @param  string $str String to check
        * @return bool        Result
        */
        private static function doubleConsonant($str)
        {
            $c = self::$regex_consonant;

            return preg_match("#$c{2}$#", $str, $matches) AND $matches[0]{0} == $matches[0]{1};
        }

Thanks in advance, guys

Mike Perry

unread,
Jul 19, 2021, 3:29:36 PM7/19/21
to ResourceSpace
My en.php line 398 follows:

      return preg_match("#" . $c . "{2}$#", $str, $matches) AND $matches[0][0] == $matches[0][1];

Can't explain it, but your formatting is different -- note the spaces that are missing in yours.

The deprecation was implemented in PHP 7.4; I'm running a version on 7.4.19 with no issues. .  .

Herman

unread,
Jul 19, 2021, 4:36:27 PM7/19/21
to ResourceSpace
Thanks a lot, @Mike

it seems that we're on the right way. Now I get the next error in line 415:
httpdocs/lib/stemming/en.php line 415: Array and string offset access syntax with curly braces is deprecated

It would be very nice, if you can contact me via email for sharing the whole file (or perhaps files): hermanv...@gmail.com

And I believe I know the reason for the errors now. The PHP version of the server was changed recently

Cheers Herman

Mike Perry

unread,
Jul 19, 2021, 5:38:46 PM7/19/21
to ResourceSpace

Was the PHP version changed after the install?

It might be better to do a fresh install and see if it works okay, rather than fixing individual files as you go. It would seem en.php was corrupted somehow, and other files as well. You would be well served to figure that issue out or you might have problems going forward with the current installation and updates.

Be sure to back up your database and save your current config.php file so you can retrieve the proper spider keys if needed.

Herman

unread,
Jul 20, 2021, 3:03:22 AM7/20/21
to ResourceSpace
Thanks a lot @Mike
Yes, the PHP version was changed from 7.3 to 7.4 on the server.
We were able to solve the issue by setting the PHP verson back to 7.3 for now. This can be only a temporarily solution.

@all
We need paid support, someone who can help us setting up RS on the current versions. Feel free to contact hermanv...@gmail.com, if you are interested
Reply all
Reply to author
Forward
0 new messages