set_magic_quotes_runtime() is deprecated
Posted: July 3rd, 2009 | Author: Mihai Bojin | Filed under: PHP, Troubleshooting, zend framework | 1 Comment »Hello,
If you’re using Zend Framework 1.7.x (I was using 1.7.4), PHP 5.3.0 and Zend_Cache, you’ll probably see an error like set_magic_quotes_runtime() is deprecated.
You can easily fix this error by editing Zend/Cache/Backend/File.php and in the _fileGetContents method commenting the following two blocks of code:
if (function_exists(’get_magic_quotes_runtime’)) {
$mqr = @get_magic_quotes_runtime();
@set_magic_quotes_runtime(0);
}
and
if (function_exists(’set_magic_quotes_runtime’)) {
@set_magic_quotes_runtime($mqr);
}
Additionally you could search for all the set_magic_quotes_runtime function calls and comment them out.
You could also update to the latest Zend Framework (which now is 1.8.4) which has this issue fixed.
As usual feel free to drop any thoughts in the comments section of this post !




