Archive for March 21st, 2007

AnyExample.com: 5 useful PHP functions for MySQL data fetching

The AnyExample.com tutorial site has a quick article for PHP/MySQL developers out there with 5 useful functions that can help you in your database development.

PHP usually comes with mysql extension mysql (mysql_… functions) which is rather low-level and requires writing too much code for a trivial tasks: error-checked execution of SQL queries, getting single row from SQL table, getting value from SQL table cell, etc. OOP mysqli extension isn’t any better. In this article we present 5 useful functions which greatly simplify majority of real-life MySQL operations.

All of these helpful functions mentioned work with both PHP4 and PHP5, so no one’s left out. They are:

  • good_query
  • good_query_list
  • good_query_assoc
  • good_query_value
  • good_query_table

All of these can be added easily by grabbing their source and including it into your application.

Continue Reading · Add comment

Nexen.net: The Month of PHP Security Overview

On Nexen.net, there’s a full posting of the bugs that have been posted to the PHP Month of Bugs by Stefan Esser so far (also here for the French speakers in the audience).

Some of the bugs include:

  • PHP ext/gd Already Freed Resource Access Vulnerability
  • PHP header() Space Trimming Buffer Underflow Vulnerability
  • PHP shmop Functions Resource Verification Vulnerability
  • PHP php_binary Session Deserialization Information Leak Vulnerability
  • PHP Variable Destructor Deep Recursion Stack Overflow

Each one is linked to its description with details on the issue, including what needs to be done (usually an upgrade) to take care of it. You can also filter them by the version of PHP that you’re using to see which ones might apply to your applications and servers.

Continue Reading · Add comment

Zend Developer Zone: PHP Security Tip #14

The Zend Developer Zone continues their great series of tips today with the latest - #14 - a tip concerning the consideration of the overall security of your application (there’s a mouthful).

Almost any application running PHP on the back-end uses web technologies for it’s front end. Many developers who think hard on PHP security, don’t spend a thought on front-end security for their application.

The specific example they give is a frontend issue, a Javascript cookie. Ensure that any data you put inside a cookie is safe. No matter what, do not put anything sensitive in its contents.

Continue Reading · Add comment

DevShed: Abstracting Database Access Using Polymorphism with Objects in PHP 5

In a new article from DevShed, they walk you through a method of using abstraction and objects along with polymorphism to work with databases.

I’ll be explaining how to implement Polymorphism to achieve a high level of abstraction when accessing different database systems. Subsequent articles will cover the use of polymorphic objects to build dynamic web documents and validate user-supplied input.

They start out with a bad example of a database link in a PHP script, a database handler that, based on what type of database you tell it you’re using, handles the requests appropriately. This is good, but poor design - their alternative is using objects (created from classes of one type for each kind of database). These are pulled together in a factory class and the correct one is built - out into a generic database object that’s smart enough to know what it’s supposed to do.

Continue Reading · Add comment

Job Posting: Shulman Fleming & Partners Seeks Senior PHP Developer (New York, NY)

Company Shulman Fleming & Partners
Location New York, NY
Title Senior PHP Developer
Summary

Qualifications:

  • 5-7+ years Web development work experience
  • Strong backend Web Application Development experience with PHP
  • Strong working knowledge of RDBMS, SQL
  • Must be able to code in UNIX/Linux environment
  • Experience with either Java, C, or C++ highly desired

If you are interested, please send me a copy of your resume in Word/text format at Amy [at] sap8 [dot] com to get more information about the company and the position. Feel free to call me as well.

Link More Information

Continue Reading · Add comment