General discussion
Codoforum 4.9 displaying errors in PHP 7.4

I'm new to codoforum. I installed 4.8 and have updated, but I'm still having the same issue. I'm seeing errors on the front page like:

Deprecated: Function get_magic_quotes_gpc() is deprecated in /var/www/sbcforums/routes.php on line 9

I'm also getting error messages in the admin console under Plugins:

Notice: Trying to access array offset on value of type bool in /var/www/sbcforums/admin/modules/plugins/plugins.php on line 225

(this is repeated for different line numbers)

I've edited sites/default/constants.php with:

define('CODO_DEBUG', 0);
define('DISPLAY_ERRORS', 'OFF');

In my /etc/php/7.4/apache/php.ini I have display_errors = Off, display_startup_errors = Off and I have error_reporting = E_ALL & ~E_DEPRECATED & ~E_STRICT.

I've tried editing the .htaccess in the site root and I'm still seeing the errors.

And I've tried clearing the cache, and restarting the webserver.

What do I need to do?

I'm new to codoforum. I installed 4.8 and have updated, but I'm still having the same issue. I'm seeing errors on the front page like: ```` Deprecated: Function get_magic_quotes_gpc() is deprecated in /var/www/sbcforums/routes.php on line 9 ```` I'm also getting error messages in the admin console under Plugins: ```` Notice: Trying to access array offset on value of type bool in /var/www/sbcforums/admin/modules/plugins/plugins.php on line 225 ```` (this is repeated for different line numbers) I've edited `sites/default/constants.php` with: ```` define('CODO_DEBUG', 0); define('DISPLAY_ERRORS', 'OFF'); ```` In my `/etc/php/7.4/apache/php.ini` I have `display_errors = Off`, `display_startup_errors = Off` and I have `error_reporting = E_ALL & ~E_DEPRECATED & ~E_STRICT`. I've tried editing the `.htaccess` in the site root and I'm still seeing the errors. And I've tried clearing the cache, and restarting the webserver. What do I need to do?
edited 7 days ago at 5:15 am

Hi,

You can just delete the below lines in routes.php

if (get_magic_quotes_gpc()) {
    $gpc = array(&$_GET, &$_POST, &$_COOKIE, &$_REQUEST);

    array_walk_recursive($gpc, function (&$value) {
        $value = stripslashes($value);
    });
}
Hi, You can just delete the below lines in routes.php ``` if (get_magic_quotes_gpc()) { $gpc = array(&$_GET, &$_POST, &$_COOKIE, &$_REQUEST); array_walk_recursive($gpc, function (&$value) { $value = stripslashes($value); }); } ```
Necessity is the mother of all inventions!

Thanks admin, but that's only one of the errors that I'm getting - there are many more.

My work-around was to edit index.php. That's where it's turning display_errors on, without checking the settings.

For version 4.9, in index.php line 9 there is:

ini_set("display_errors", "on");

On line 14 there is:

error_reporting(-1);

Which reports all errors. Perhaps 0 was meant here.

and then on line 20:

ini_set('display_errors', 1);

Which again I assume was supposed to be a 0.

I just commented those lines out. It seems like maybe this version of the file wasn't intended for release.

It would make more sense if the values just came from the database settings.

(Also on this topic I have the notification level set to 3 but I didn't get an email that you'd responded - thanks for your reply!).

Thanks admin, but that's only one of the errors that I'm getting - there are many more. My work-around was to edit `index.php`. That's where it's turning `display_errors` on, without checking the settings. For version 4.9, in `index.php` line 9 there is: ```` ini_set("display_errors", "on"); ```` On line 14 there is: ```` error_reporting(-1); ```` Which reports all errors. Perhaps `0` was meant here. and then on line 20: ```` ini_set('display_errors', 1); ```` Which again I assume was supposed to be a `0`. I just commented those lines out. It seems like maybe this version of the file wasn't intended for release. It would make more sense if the values just came from the database settings. (Also on this topic I have the notification level set to 3 but I didn't get an email that you'd responded - thanks for your reply!).
26
2
2
live preview
enter atleast 10 characters
WARNING: You mentioned %MENTIONS%, but they cannot see this message and will not be notified
Saving...
Saved
With selected deselect posts show selected posts
All posts under this topic will be deleted ?
Pending draft ... Click to resume editing
Discard draft