errors
Tag Archive

Pimp Your 404: Presentation and Functionality

I have been wanting to write about 404 error pages for quite awhile now. They have always been very important to me, with customized error pages playing a integral part of every well-rounded web-design strategy. Rather than try to re-invent the wheel with this, I think I will just go through and discuss some thoughts about 404 error pages, share some useful code snippets, and highlight some suggested resources along the way. In a sense, this post is nothing more than a giant “brain-dump” of all things 404 for future reference. Hopefully you will find it useful in pimping your […] Read more »

Important Security Fix for WordPress

The other day, my server crashed and Perishable Press was unable to connect to the MySQL database. Normally, when WordPress encounters a database error, it delivers a specific error message similar to the following: Read more »

Best Practices for Error Monitoring

Given my propensity to discuss matters involving error log data (e.g., monitoring malicious behavior, setting up error logs, and creating extensive blacklists), I am often asked about the best way to go about monitoring 404 and other types of server errors. While I consider myself to be a novice in this arena (there are far brighter people with much greater experience), I do spend a lot of time digging through log entries and analyzing data. So, when asked recently about my error monitoring practices, I decided to share my response here at Perishable Press, and hopefully get some good feedback […] Read more »

WordPress Error Fix: Unable to Parse URL

Note: This information is intended primarily for WordPress versions previous to 2.3, but may be applicable in other versions as well. For those of you running an older version of WordPress that is generating errors such as: Warning: parse_url(http://) [function.parse-url]: Unable to parse url in /home/path/to/public_html/wordpress/wp-includes/functions.php on line 1067 Warning: parse_url(http://) [function.parse-url]: Unable to parse url in /home/path/to/public_html/wordpress/wp-includes/functions.php on line 1067 Warning: parse_url(http://) [function.parse-url]: Unable to parse url in /home/path/to/public_html/wordpress/wp-includes/functions.php on line 1067 Warning: parse_url(http://) [function.parse-url]: Unable to parse url in /home/path/to/public_html/wordpress/wp-includes/functions.php on line 1067 Warning: parse_url(http://) [function.parse-url]: Unable to parse url in /home/path/to/public_html/wordpress/wp-includes/functions.php on line 1067 Warning: parse_url(http://) [function.parse-url]: […] Read more »

Preventing the Unpredictable White Screen of Death for WordPress Sites with Multiple Themes

For the past several months and up until just recently, Perishable Press had been suffering from unpredictable episodes of the dreaded white screen of death. Although blank white screens happen to virtually all WordPress users now and then, certain configurations seem to trigger crashes more frequently than others. Here, I am referring to WordPress version 2.3. In this case, the unpredictable crashes, inconsistent errors, and general instability began several months ago after I had completed my WordPress theme restoration project. Prior to that, I had removed all of my alternate themes and placed them on a subdomain. Meanwhile, after the […] Read more »

Unexplained Crawl Behavior Involving Tagged Query Strings

I need your help! I am losing my mind trying to solve another baffling mystery. For the past three or four months, I have been recording many 404 Errors generated from msnbot, Yahoo-Slurp, and other spider crawls. These errors result from invalid requests for URLs containing query strings such as the following: http://perishablepress.com/press/page/2/?tag=spam http://perishablepress.com/press/page/3/?tag=code http://perishablepress.com/press/page/2/?tag=email http://perishablepress.com/press/page/2/?tag=xhtml http://perishablepress.com/press/page/4/?tag=notes http://perishablepress.com/press/page/2/?tag=flash http://perishablepress.com/press/page/2/?tag=links http://perishablepress.com/press/page/3/?tag=theme http://perishablepress.com/press/page/2/?tag=press ..plus hundreds and hundreds more 1. The URL pattern is always the same: a different page number followed by a query string containing one of the tags used here at Perishable Press, for example: “/?tag=something”. The problem is that there are […] Read more »

Three Unsolved WordPress Mysteries

After several years of using WordPress, I have at least three unanswered questions: What’s up with the WordPress PHP Memory Error? Why do certain phrases trigger “Forbidden” errors when saving or publishing posts? What happened to the Plugin Pages in the WordPress Codex? Let’s have a look at each one of these baffling mysteries.. Read more »

Custom HTTP Errors via htaccess

We all know how important it is to deliver sensible, helpful 404 error pages to our visitors. There are many ways of achieving this functionality, including the well-known htaccess trick used to locally redirect users to custom error pages: # htaccess custom error pages ErrorDocument 400 /errors/400.html ErrorDocument 401 /errors/401.html ErrorDocument 403 /errors/403.html ErrorDocument 404 /errors/404.html ErrorDocument 500 /errors/500.html ..and so on. These directives basically tell Apache to deliver the designated documents for their associated error types. Many webmasters and developers employ this trick to ensure that visitors receive customized error pages that are generally more user-friendly or design-specific than […] Read more »

Improve Site Performance by Increasing PHP Memory for WordPress

During the recent ASO server debacle, I raced frantically to restore functionality to Perishable Press. Along the way, one of the many tricks that I tried while trying to fix the dreaded “white screen of death” syndrome involved increasing the amount of PHP memory available to WordPress. This fix worked for me, but may not prove effective on every installation of WordPress. If you are unsure as to whether or not you need to increase your PHP memory, consult with your host concerning current available memory 1 and overall compatibility with a localized increase. Note that if your blog is running […] Read more »

WordPress Error Fix(?): Increase PHP Memory for cache.php

This trick isn’t guaranteed to prevent all WordPress-generated PHP memory errors, but it certainly seems to help reduce their overall occurrence. For some reason, after my host upgraded their servers to Apache 1.3.41, I began logging an extremely high number of fatal PHP “memory exhausted” errors resulting from the WordPress cache.php script. Here is an example of the countless errors that are generated: Read more »

Advanced PHP Error Handling via PHP

In my previous articles on PHP error handling, I explain the process whereby PHP error handling may be achieved using htaccess. Handling (logging, reporting) PHP errors via htaccess requires the following: Access/editing privileges for htaccess files A server running PHP via Apache, not CGI (e.g., phpSuExec) 1 Ability to edit/change permissions for files on your server If you are having trouble handling PHP errors using htaccess, these three items are the first things to check. If it turns out that you are unable to use htaccess to work with PHP errors, don’t despair — this article explains how to achieve the […] Read more »

Important Note for Your Custom Error Pages

Just a note to web designers and code-savvy bloggers: make sure your custom error pages are big enough for the ever-amazing < cough> Internet Explorer browser. If your custom error pages are too small, IE will take the liberty of serving its own proprietary web page, replete with corporate linkage and poor grammar. How big, baby? Well, that’s a good question. In order for users of Internet Explorer to enjoy your carefully crafted custom error pages, they need to exceed 512 bytes in size. Using proper doctype markup, your custom pages should include more than around 10 lines (roughly) of […] Read more »

Advanced PHP Error Handling via htaccess

In my previous article on logging PHP errors, How to Enable PHP Error Logging via htaccess, we observed three fundamental aspects of preventing, preserving, and protecting your site’s PHP errors: Prevent public display of PHP errors via htaccess # supress php errors php_flag display_startup_errors off php_flag display_errors off php_flag html_errors off php_value docref_root 0 php_value docref_ext 0 Preserve (log) your site’s PHP errors via htaccess # enable PHP error logging php_flag log_errors on php_value error_log /home/path/public_html/domain/PHP_errors.log Protect your site’s PHP error log via htaccess # prevent access to PHP error log <files PHP_errors.log> Order allow,deny Deny from all Satisfy All […] Read more »

How to Enable PHP Error Logging via htaccess

In this brief tutorial, I will show Apache users how to suppress PHP errors from visitors and enable PHP error logging via htaccess. Tracking your site’s PHP errors is an excellent way to manage and troubleshoot unexpected issues related to plugins and themes. Even better, monitoring PHP errors behind the scenes via private log is far better than trying to catch them as they appear at random visits. Thanks to the magical powers of htaccess, there is an easy way to implement this effective strategy. Hide PHP errors from visitors In our article, , we discuss a technique whereby PHP […] Read more »

Plenty of Errors to Chew On..

Alrighty then! Looks like recent changes to site structure have really dropped a bomb on quite a few regular visitors out there. After switching over to the new default theme last night, I had setup an email notification system to alert me of all errors encountered at this domain (i.e., the main site and all test sites). Of course, I knew that at least a few errors would be inevitable, but I had no idea that I would receive nearly 300 of them! After examining the nature of these errors, it appears that the bulk of them are the result […] Read more »

Eliminate 404 Errors for PHP Functions

Recently, I discussed the suspicious behavior recently observed by the Yahoo! Slurp crawler. As revealed by the site’s closely watched 404-error logs, Yahoo! had been requesting a series of nonexistent resources. Although a majority of the 404 errors were exclusive to the Slurp crawler, there were several instances of requests that were also coming from Google, Live, and even Ask. Initially, these distinct errors were misdiagnosed as existing URLs appended with various JavaScript functions. Here are a few typical examples of these frequently observed log entries: http://perishablepress.com/press/category/websites/feed/function.opendir http://perishablepress.com/press/category/websites/feed/function.array-rand http://perishablepress.com/press/category/websites/feed/function.mkdir http://perishablepress.com/press/category/websites/feed/ref.outcontrol Fortunately, an insightful reader named Bas pointed out that the […] Read more »

Latest Tweets CSS Dropdown Menu in WordPress: perishablepress.com/css-dropdo…