4 Replies - 399 Views - Last Post: 05 February 2020 - 06:25 PM Rate Topic: -----

#1 sayhello   User is offline

  • D.I.C Regular

Reputation: 4
  • View blog
  • Posts: 302
  • Joined: 12-November 17

while upgrading php from version 5.6 to 7.4.2 i get a critical error

Posted 05 February 2020 - 04:22 PM

hello dear Experts on DreaminCode,

well - while upgrading php from version 5.6 to 7.4.2 i get a critical error on the wp-site:

Quote

There has been a critical error on your website.
Learn more about debugging in WordPress.


and i get linked to the page https://wordpress.or...g-in-wordpress/

where i learn_;


WP_DEBUG # WP_DEBUG

Quote

WP_DEBUG is a PHP constant (a permanent global variable) that can be used to trigger the “debug” mode throughout WordPress. It is assumed to be false by default and is usually set to true in the wp-config.php file on development copies of WordPress.

define( 'WP_DEBUG', true );
define( 'WP_DEBUG', false );



Note: The true and false values in the example are not surrounded by apostrophes (‘) because they are boolean (true/false) values. If you set constants to 'false', they will be interpreted as true because the quotes make it a string rather than a boolean.

It is not recommended to use WP_DEBUG or the other debug tools on live sites; they are meant for local testing and staging installs.



so i activate the debugmode and get the follwing:


Deprecated: Array and string offset access syntax with curly braces is deprecated in /sites/www.my-domain.com/wp-content/plugins/participants-database/classes/PDb_Base.php on line 1844



see more here..:

Fatal error: Uncaught Exception: Cannot open source device in /sites/www.my-domain.com/wp-content/plugins/participants-database/vendor/wp-session-manager/wp-session-manager.php:46 Stack trace: #0 /sites/www.my-domain.com/wp-content/plugins/participants-database/vendor/wp-session-manager/wp-session-manager.php(46): session_start() #1 /sites/www.my-domain.com/wp-includes/class-wp-hook.php(286): wp_session_manager_start_session() #2 /sites/www.my-domain.com/wp-includes/class-wp-hook.php(312): WP_Hook->apply_filters(NULL, Array) #3 /sites/www.my-domain.com/wp-includes/plugin.php(478): WP_Hook->do_action(Array) #4 /sites/www.my-domain.com/wp-settings.php(392): do_action('plugins_loaded') #5 /sites/www.my-domain.com/wp-config.php(90): require_once('/sites/www.my-domain-...') #6 /sites/www.my-domain.com/wp-load.php(37): require_once('/sites/www.my-domain-...') #7 /sites/www.my-domain.com/wp-blog-header.php(13): require_once('/sites/www.my-domain-...') #8 /sites/www.my-domain.com/index.php(17): require('/sites/www.my-domain-...') #9 in /sites/www.my-domain.com/wp-content/plugins/participants-database/vendor/wp-session-manager/wp-session-manager.php on line 46
There has been a critical error on your website.



and ideas - any hints!?

Is This A Good Question/Topic? 0
  • +

Replies To: while upgrading php from version 5.6 to 7.4.2 i get a critical error

#2 ArtificialSoldier   User is offline

  • D.I.C Lover
  • member icon

Reputation: 2494
  • View blog
  • Posts: 7,551
  • Joined: 15-January 14

Re: while upgrading php from version 5.6 to 7.4.2 i get a critical error

Posted 05 February 2020 - 04:33 PM

It looks like that's an issue with PHP not being able to generate random data:

https://www.google.c...n+source+device

The most common solution seems to be giving access to /dev/random or /dev/urandom but it's going to depend on your environment.
Was This Post Helpful? 0
  • +
  • -

#3 sayhello   User is offline

  • D.I.C Regular

Reputation: 4
  • View blog
  • Posts: 302
  • Joined: 12-November 17

Re: while upgrading php from version 5.6 to 7.4.2 i get a critical error

Posted 05 February 2020 - 05:01 PM

Hello dear ArtificalSoldier,


many thanks for the quick reply - i am very happy to hear from you.


View PostArtificialSoldier, on 05 February 2020 - 11:33 PM, said:

It looks like that's an issue with PHP not being able to generate random data:

https://www.google.c...n+source+device

The most common solution seems to be giving access to /dev/random or /dev/urandom but it's going to depend on your environment.


hmm - i will give these advices to the Serveadmin - (note : he cares for the backend) - i hope that he will arrange all the necessary tings - and will igvie access to dev/random or equivalent..


Again - many thanks for all you do here - this is outstanding - and i am so happy to be part of this great community,

Have a great day.
Was This Post Helpful? 0
  • +
  • -

#4 Martyr2   User is offline

  • Programming Theoretician
  • member icon

Reputation: 5524
  • View blog
  • Posts: 14,526
  • Joined: 18-April 07

Re: while upgrading php from version 5.6 to 7.4.2 i get a critical error

Posted 05 February 2020 - 05:34 PM

Ummm... for the first part, the answer is right there in the error message. In your plugin "participants-database" there is a file called "PDb_Base.php" in the directory "classes". On line 1844 you will probably see a line that is doing an operation on a string variable and using array syntax for it. This is deprecated in PHP 7.4.

For instance you can no longer do something like...

$string = "foo";
echo $string[0];  // This use to echo out "f" but not anymore

$string = "bar";
echo $string{1}; // This use to echo out "a" but not anymore



Going from PHP 5 straight to 7.4 is a huge jump... so test thoroughly!

:)

This post has been edited by Martyr2: 05 February 2020 - 05:34 PM

Was This Post Helpful? 0
  • +
  • -

#5 sayhello   User is offline

  • D.I.C Regular

Reputation: 4
  • View blog
  • Posts: 302
  • Joined: 12-November 17

Re: while upgrading php from version 5.6 to 7.4.2 i get a critical error

Posted 05 February 2020 - 06:25 PM

hello dear Martyr - many thanks for the quick reply.

for the quick and dirty check - can i erase the plugin from the folder - and testrun the whole installation again!!?

is this a way and a method to do a quick test!?

update: i did it like so - and found out that if i set the folder of the participants_database - with permission to 000 - and test the whole site - then all goes well.

no issues left with the site!?


Have agreat day and keep up the great project
it rocks!!!
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1