Page 1 of 1

Function set_magic_quotes_runtime() is deprecated

Posted: Wed Oct 05, 2011 11:50 pm
by konus
Hello, in my blog I have the error

Code: Select all

Deprecated: Function set_magic_quotes_runtime() is deprecated in /usr/share/php/Cache/Lite.php on line 718 Deprecated: Function set_magic_quotes_runtime() is deprecated in /usr/share/php/Cache/Lite.php on line 728
it is near the freetag-plugin.

1. is this something from serendipity? I cant find the path /usr/share/php/Cache/ . I only found /serendipity/bundled-libs/Cache/Lite.php

2. what can I do? I use PHP Version 5.3.6 at the moment. "magic_quotes_runtime" ist set to "Off"

Update: the bundled Lite.php ist v 1.54 2009/07/07. I found a newer one 1.7.12, but

Code: Select all

set_magic_quotes_runtime(0);
ist still in use in this newer version

Re: Function set_magic_quotes_runtime() is deprecated

Posted: Thu Oct 06, 2011 9:23 am
by garvinhicking
Hi!

When serendipity detects a PEAR installation on your server, it prefers this over the bundled library. On your server, that is the case. Thus, you need to update your PEAR packages (or remove them).

Or you can edit the serendipity_config_local.inc.php and insert $serendipity['use_PEAR'] = false.

Reading your update - I didn't know this wasn't fixed. You might want to edit your php.ini and set the error_Reporting so that E_DEPRECATED does not raise a visible warning.

HTH,
Garvin

Re: Function set_magic_quotes_runtime() is deprecated

Posted: Thu Oct 06, 2011 10:31 am
by konus
Thank you for the very fast answer!

I inserted in serendipity_config_local.inc.php

Code: Select all

$serendipity['use_PEAR'] = false;
but still get the error pointing to /usr/share/php/Cache/Lite.php

I also tried a php.ini (and think, my hoster recognized them) with

Code: Select all

error_reporting = E_ALL & ~E_DEPRECATED
and in .htaccess

Code: Select all

<IfModule mod_php.c>
     php_value error_reporting  1
</IfModule>
but nothing helped. I am waiting for the replay of my hoster now.

Re: Function set_magic_quotes_runtime() is deprecated

Posted: Thu Nov 03, 2011 6:23 pm
by littlerabbit
Same issue. Tried disabling PEAR in the config file as well as .htaccess and php.ini. Still getting tons of deprecated errors.

This is a reply from my host. Maybe this will help you also.
The problem is that your application is not compatible with PHP 5.3 It is using a function that is deprecated. We configured the website with PHP 5.2 by adding the following code to the .htaccess file at the /[application-directory]/ directory:

AddHandler application/x-httpd-php52 .php

The website is no longer throwing errors.

Note that this will only be a temporary fix, until we stop PHP 5.2.

You need to obtain an updated version of your theme that is compatible with PHP 5.3. Then, you can set up the website with PHP 5.3 by removing the code that we added to the .htaccess file.