 | News Feed |
 | Jobs Feed |
Sections
|
| feed this: |  |
Zend Developer Zone: Building Websites with Joomla! 1.5
by Chris Cornutt June 06, 2008 @ 12:53:46
The Zend Developer Zone has posted a book review of an Packt book, "Building Websites with Joomla! 1.5" (by Hagen Graf - the book, not the review):
The book is a tutorial guide to Joomla! 1.5 and was already written and published during the development of Joomla! 1.5. This is the final version and it aims for "web developers, designers, webmasters, content editors and marketing professionals" and is suitable for anyone starting out with Joomla! 1.5, for people who upgrade to Joomla 1.5 and for those who just want a good printed guide/manual at hand.
The review steps through the chapters, highlighting points of interest and the wrapup uses terms like "great instructional value", "very passionate about Joomla!" and the fact that the only thing the reviewer sees missing of a chapter about security.
voice your opinion now!
joomla book review packt reference security
Ibuildings Blog: Accessing object properties by reference
by Chris Cornutt May 05, 2008 @ 14:38:49
On the Ibuildings blog today, Harrie Verveer has posted about an interesting quirk he found when working with objects and references:
PHP is a loosely typed language. Most of the time this is very useful because you as a programmer don't have to worry about typecasting: it's done for you. However, on some occasions this can cause some unexpected trouble. [...] In this blog I want to point out what can happen if you try to access object properties by reference when the object is not initialized.
His example shows the problem when it tries to grab a value from an array in a non-existent object by reference. It results in a dyanamically created object (of that type) with an empty array inside of it. It only works when you grab it by reference, but he shares a tip or two about how you can prevent hard to track down issues like this.
voice your opinion now!
property object reference find difficult issue
Paul Jones' Blog: Memory Leaks With Objects in PHP 5
by Chris Cornutt September 28, 2007 @ 08:46:00
Paul Jones presents a problem he was having in a new post to his blog - the issue was with memory leaks in objects in a PHP5 application he was working on.
One of the nice things about using a scripting language is that it automates garbage collection for you. You don't have to worry about releasing memory when you're done with your variables. [...] But there is at least one circumstance in which PHP will not free memory for you when you call unset(). Cf. http://bugs.php.net/bug.php?id=33595.
The problem is that, when trying to unset the parent object in a parent/child relationship, the memory space for the parent reference in the child isn't removed. The problem, left unchecked can cause a script to go over the memory limit pretty easily (especially with larger objects).
He suggests two solutions - one that the user can control (calling a destructor before unsetting the object) or a PHP internals method that involves fixing issues with the reference counts created with the objects.
voice your opinion now!
memory leak object php5 reference parent child release memory leak object php5 reference parent child release
Stefan Esser's Blog: PHP 4 - Reference Counter Overflow Fix
by Chris Cornutt May 21, 2007 @ 08:47:00
Stefan Esser has a new post mentioning a new patch that he's created to help correct an issue with the ZVAL Reference Counter that could cause a buffer overflow in an application.
When a PHP application is run in PHP 4 it can overflow the variable reference counter because it is only 16 bit wide. Whenever this happens it will result in a double destruction of the underlying variable. A local attacker can easily create PHP code that uses such a double destruction to execute arbitrary code within the process executing PHP (e.g. webserver process). This allows bypassing restrictions enforced by disable_functions, open_basedir, SAFE_MODE or to launch direct local root exploits against the target system.
The patch [tar.gz] fixes the issue and keeps from breaking anything from the past (backwards compatibility). You can either grab it now and apply it to your distribution (the sooner the better) or wait until it gets merged into the PHP CVS version and released with the next bug fix release.
voice your opinion now!
reference counter overflow patch fix php4 reference counter overflow patch fix php4
Sara Golemon's: You're being lied to.
by Chris Cornutt January 29, 2007 @ 08:38:00
If you think you know what's going on behind the scenes when you're working with objects in PHP5 - you're wrong. You're even being lied to, according to Sara Golemon's latest entry:
If you're among the crowd who have migrated an OOP based application from PHP4 to PHP5, then I'm sure you've heard the expression "Objects are copied by reference by default in PHP5". Whoever told you that, was lying.
As she explains, the truth is more that they behave that way, not that they are actually like that. She talks about what objects actually are and how things are handled differently from PHP4 to PHP5. She also "lies" a little also about the "copying" part, and explains the internal structure of a variable to show why.
She also includes a bit on why referencing variables when it's not really a must is a bad idea - the main idea of it being a waste of space and memory in the application.
voice your opinion now!
php5 object reference copy behave lie php5 object reference copy behave lie
|
Community Events
Don't see your event here? Let us know!
|