 | News Feed |
 | Jobs Feed |
Sections
|
| feed this: |  |
IBM developerWorks: Five common PHP database problems
by Chris Cornutt August 02, 2006 @ 06:08:41
It seems like there's not a site out there anymore that doesn't use a database of some sort. Frankly, they're just a simple way to get the storage you need without the hassle of having to manage the resource yourself. It even comes with its own language to help query the data! Of course, with the good comes the bad, and this new article from IBM's developerWorks site about five common database mistakes.
If only there were one way to use databases correctly... You can create database design, database access, and the PHP business logic code that sits on top of it in any number of ways, and you often end up getting it wrong. This article illustrates five common problems in database design, in the PHP code that accesses databases, and how to fix these problems when you see them.
The problems they discuss are:
- Using MySQL directly
- Not using auto-increment functionality
- Using multiple databases
- Not using relations
- The n+1 pattern
Each of the items is discussed and explained with code samples for both the good and the bad side to make comparison easier. Knowing these issues before you develop your system definitely makes it easier, but they're still useful as a tool to fix things as well.
voice your opinion now!
common five database problems mysql autoincrement relations common five database problems mysql autoincrement relations
php|architect: Five Top PHP Mistakes
by Chris Cornutt July 21, 2006 @ 06:00:25
New to the A/R/T article repository from php|architect today is this look at the "Top Five PHP Mistakes" from Marco Tabini.
These topics have been beaten to death, and will likely continue to be beaten well after their bones have turned to dust. However, I have never had the opportunity to explore some aspects of PHP that obviously are mistakes-not just to understand their origin, but to analyze their impact on PHP and the way they have been dealt with.
His list of mistakes is:
- Objects in PHP 4
- Function Naming Consistency
- Safe Mode and Magic Quotes
- Register Globals
- Lack of Unicode Support
Under each he explains them, noting why they are important enough to mention is the list. He does, however, end on a bit lighter note - the PHP, for all its problems and woes, is just like any other laugnage out there. It has its problems, but its learned from them and, as Marco puts it "has grown because of them".
voice your opinion now!
top five mistakes safe_mode register_globals unicode objects function name top five mistakes safe_mode register_globals unicode objects function name
IBM developerWorks: Five common PHP design patterns
by Chris Cornutt July 19, 2006 @ 06:09:24
The IBM developerWorks site brings us yet another fine PHP-related article with this new tutorial today, a look at five common design patterns (and how to use them).
It's difficult to demonstrate the value of patterns using small examples. They often look like overkill because they really come into play in large code bases.
This article can't show huge applications, so you need to think about ways to apply the principles of the example -- and not necessarily this exact code -- in your larger applications. That's not to say that you shouldn't use patterns in small applications. Most good applications start small and become big, so there is no reason not to start with solid coding practices like these.
The five patterns they cover are:
- the Factory pattern
- the Singleton pattern
- the Observer pattern
- the Chain-of-Command pattern
- the Strategy pattern
For each, they explain (basically) how it works and include some sample code to show it in action. There's also diagrams showing how the different parts of the pattern relate to each other.
voice your opinion now!
common five design patterns example tutorial common five design patterns example tutorial
SecurityFocus.com: Five common Web application vulnerabilities
by Chris Cornutt May 03, 2006 @ 06:59:25
Sephiroth.it has a quick post pointing out this helpful article on the SecurityFocus site looking at five common web application vulnerabilities.
This article looks at five common Web application attacks, primarily for PHP applications, and then presents a case study of a vulnerable Website that was found through Google and easily exploited. Each of the attacks we'll cover are part of a wide field of study, and readers are advised to follow the references listed in each section for further reading.
It is important for Web developers and administrators to have a thorough knowledge of these attacks. It should also be noted that that Web applications can be subjected to many more attacks than just those listed here.
The list they share contains all of the usual suspects:
- remote code execution
- SQL injection
- format string vulnerabilities (unfiltered user input)
- cross-site scripting (XSS)
- username enumeration
For each, they give a definition of what it is and how it's done, a rating on how critical it is, some of the previously vulnerable products, some code examples of how it might work, and some countermeasures/reference material for more information.
voice your opinion now!
php web application vulnerabilities five sql injection xss user input php web application vulnerabilities five sql injection xss user input
Lukas Smith's Blog: The top 5 of PEAR bugs
by Chris Cornutt April 17, 2006 @ 06:49:59
PEAR, the large repository of useful PHP libraries, is steadily growing even more in popularity. The PEAR server packages introduced have made it even easier for people to share their own libraries with the world. Unfortunately, all of this useful code doesn't come without a few issues, and in this new blog post, Lukas Smith mentions the top five packages with the most number of bug reports.
The 5 packages with the most bug reports are all pretty popular although the quality of the code varies. They are all also fairly complex and/or large. I have gone through the bugs of most of them now and then to see if I spot an obvious bogus report.
As of the time of this post, the top five are:
- Spreadsheet_Excel_Writer
- SOAP
- HTML_QuickForm
- Mail_Mime
- PhpDocumentor
Lukas also puts out a call for help, hoping that there are users out there that would like to help conquer these bugs, to help out with making the packages a cleaner place. All it takes is a little time, some inititave, and a glance at the bug reports for the packages to get started.
voice your opinion now!
php top five pear bugs soap html_quickform mail_mime phpdocumentor php top five pear bugs soap html_quickform mail_mime phpdocumentor
Codewalkers.com: Book Raffle - Pro PHP XML and Web Services
by Chris Cornutt April 03, 2006 @ 07:29:55
Codewalkers.com has an announcement today about a new book raffle they're doing with a new book from APress - "Pro PHP XML and Web Services.
On April 7th, we will be giving away five copies of Pro XML and Web Services. This is a great new book authored by Rob Richards and published by Apress. All you need to do in order to get a free copy is to sign up below. We promise we will not use the information you give us for anything other than contacting you if you win.
There's a bit more about the book, including its table of contents [PDF], the book's home page, and a sample chapter [PDF] for those interested.
If you're interested at all, be sure to register
voice your opinion now!
php book raffle xml web services five copies php book raffle xml web services five copies
Rudd-o.com: 5 minutes to finding issues in production PHP Web applications
by Chris Cornutt March 13, 2006 @ 07:51:51
In this post on Bitacle.org, they look at a 5 minute approach to finding some of the more common issues with PHP web applications.
Detecting and correcting problems with applications at early stages is an important role of the server manager. Unfortunately, not all errors are detected at the testing stages. Even more unfortunate is the fact that most errors go undetected because they are usually triggered when a certain set of criteria is met.
Since all you have is 5 minutes (which is one of the tenets of this Server management series, and quite possibly the only simple truth in your case), in this installment, we'll unlock the secret of server log foraging.
They mainly make use of grep, a very handly unix command-line tool, to parse through the server logs for answers. Combine that with upping the error reporting level inside of PHP itself, and you should be able to track down most of the problems you'd have. They also include a sample situation or two to watch out for specifically.
voice your opinion now!
php five minutes issues bugs web applications php five minutes issues bugs web applications
|
Community Events
Don't see your event here? Let us know!
|