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 !


Book: Guide to Programming with Zend Framework

Posted: October 23rd, 2008 | Author: Mihai Bojin | Filed under: PHP | No Comments »

I’ve been busy lately, lot of work to do, so little time… I wasn’t able to write as much as I would like on the blog, but I’m trying to.

In the last couple of days I’ve been reading PHP Architect’s Guide to programming with Zend Framework.

Guide to programming with Zend Framework

It’s a moderately good book written by Cal Evans for those of us that are beginning their journey into the Zend Framework.

It is very light, only 200 pages and it sheds a light into the ins and outs of the Zend Framework. Unfortunately it is more or less useless for the seasoned coder that knows his way into PHP.

The author presents some simple things that you probably can find out yourself from the Zend Framework Manual or the Zend Quickstart Application, given you have some time to research it.

I’d recommend this book if you have to learn how to use ZF fast and you don’t have time to dig into the Zend Documentation (which is in my opinion excellent). You won’t be able to use this book as a reference later on and it will only serve as bookshelf decoration.

Also I feel that the book stresses the Web Services topic a little too much.

The next book I want to read is called Zend Framework in Action and I hope will be more complex and advanced. It’s not out yet but I came upon a prerelease so I’ll see how it is.

Do you know any other good ZF books ?

Share them in the comments ! Thanks !


Clicky Web Analytics