 | News Feed |
 | Jobs Feed |
Sections
|
| feed this: |  |
PHPro.org: PHP Security
by Chris Cornutt September 18, 2008 @ 12:04:31
Kevin Waterson has posted a new article to his site today - an introductory look at security in your PHP applications.
One of the great benefits of PHP is its ease of access to new-comers. Its entry level is minimal and so attracts those looking for simple scripts to their sites. It is this same ease of access that becomes a problem as the new-comers begin to deal with input from users. Failure to adequately validate and sanitize data is the leading cause of security problems when dealing with PHP.
He looks at a few different areas that developers need to focus on (and be sure to filter on) like PHP_SELF, protection from email header injections, file inclusion and the use of error reporting to make handling user-generated errors "more correct".
voice your opinion now!
security tutorial phpself email header include error reporting
Jaisen Methai's Blog: Stop including class files and use __autoload() instead
by Chris Cornutt July 02, 2008 @ 11:11:50
On his blog, Jaisen Methai posted about a very handy feature of PHP5 - the __autoload function.
It's one of the gems in PHP that I find to be relatively under used. It's common for PHP applications to break out classes into their own files. This becomes cumbersome when working on large projects as you wind up with numerous include/require calls for any given page.
He shows an example of its usage (loading class files dynamically from a specified directory) and mentions how it can help to make your code a lot less ugly. Comments on the post range in topics - from comparing it to include paths, how the idea was borrowed from PEAR, and how proper naming conventions can make its use even easier.
voice your opinion now!
include class file autoload php5 tip
Matthew Turland's Blog: Watch Your Include Path
by Chris Cornutt March 27, 2008 @ 10:24:38
Matthew Turland is looking to "save you some grief" by pointing out an issue he recently had trouble with and eventually found out was a bug in PHP.
It's pretty rare that I encounter a bug in the software I run that hampers my ability to work or my server environment's ability to function normally. However, I encountered one last week that has taken me and several Rackspace support technicians nearly a week to figure out, namely PHP bug #43677.
The issue was that PHP seemed to be "forgetting" the include_path in the current script (not Apache). The bug has been found in PHP 5.2.5 (and possible in all of the 5.2.x releases as well). The problem has been fixed in the latest CVS version and a patch has been created for those that want to correct the problem right away.
voice your opinion now!
include path apache bug setincludepath patch fix
DevX.com: Add the Graphics Power of SVG to PHP
by Chris Cornutt February 26, 2008 @ 10:44:00
In this DevX tutorial, Octavia Anghel shows how use PHP to create images based on the SVG libraries available to any browser.
Scalable Vector Graphics (SVG) is an XML specification for producing vector-based graphic content that you can create, modify, and manipulate dynamically from programming languages. Here, you'll explore the most important techniques and libraries for integrating SVG with PHP to create diverse graphic content'"from simple shapes to complex graphs.
They show a few different ways to get the job done including a straight 'echo' call with the output, sending a converted SVG document over with a PHP header or including another (or multiple) SVG documents into another and outputting them. They also talk about tools like the phpHtmlLib library, the PEAR::XML_SVG package and the PEAR::Image_Canvas package.
voice your opinion now!
svg graphic tutorial echo output include dynamic
Cal Evans' Blog: set_include_path() failing
by Chris Cornutt February 14, 2008 @ 15:09:38
Cal Evans came up against a problem earlier in his development work - issues when he was trying to get his old include path.
What you SHOULD get back is a string describing your old include path. If you get false, you have hit the problem I hit last night. I went so far as to recompile 2 difference versions of Apache thinking (almost correctly) that it was something that had changed in my Apache config files.
If you're one of the "falsers" out there, check out the rest of his post of his solution around the problem. His problem stemmed from his trying to reassign a php_admin_value (instead of php_value where the script could override it) setting, specifically the one for the include_path.
He also points out that Zend Framework users might keep an eye out for this problem too as the Zend_Loader package changes the include path at times.
voice your opinion now!
include path setincludepath fail phpvalue phpadminvalue
DevShed: Auto Loading Classes in PHP 5
by Chris Cornutt December 04, 2007 @ 09:25:00
A new tutorial on DevShed today takes a look at a handy bit of functionality that's included with PHP5 - the automatic autoloading of classes.
As you might know, the "__autoload()" function, when used in a clever way, can eliminate almost completely the need to use the "require()/require_once()" and "include()/include_once()". [...] Now is the perfect time to move forward and start learning how to put the "__autoload()" magic function to work for you, and load your classes without having to include them manually into your PHP 5 object-oriented applications.
They show the more traditional approach with a code example (just using the require/include method) then show the difference in using a custom defined autoload function to tell the script where to find the libraries.
voice your opinion now!
php5 autload class tutorial require include php5 autload class tutorial require include
|
Community Events
Don't see your event here? Let us know!
|