/home » workblog

Entries for the ‘PHP’ Category

PHP Error Logs with Virtuozzo

Virtuozzo sets domains up to have PHP’s display_errors flag turned off by default, so that you’ll only see a blank page when there are critical errors. This is a good thing in production environments because it avoids potential security issues, but it can also be annoying when you’re trying to debug something.
Instead of displaying the [...]

Natural Sorting for MySQL

MySQL doesn’t provide a way to perform natural sorting on a string, so if you have numbers in your data you may get results like this
Product 110
Product 120
Product 13
Product 140
There are a lot of hacks available, but all of the ones I’ve seen only work in specific circumstances. The only comprehensive solution I found to [...]

Passing dates and times between PHP and MySQL

Richard Lord wrote a good article explaining the various ways of handling dates and times with PHP and MySQL.

Installing the Oracle Library for PHP

Chris Sibert wrote a good tutorial on installing the Oracle library for PHP. If you’re running SELinux, I’d recommend temporarily turning it off to get the module setup so you don’t have to worry about problems during the install, and then turn SELinux back on after you verify the module is working. Then you can [...]

Home page posts missing when using Pretty Permalinks for Wordpress on IIS

I’ve been working on a problem recently with the Pretty Permalinks solution for Wordpress on IIS. I was migrating a working Wordpress blog from one server to another and once it was on the new server the front page would come up w/ the theme, but instead of the default posts it would say “Sorry, [...]

Blank Page when using IIS Permalink hack

I use Pretty Wordpress Permalinks on IIS when I need to install WP on a windows server, but on one host I ran into a problem where I would get a blank page if the post didn’t exist instead of the theme’s 404 template. But for some reason it works fine if I just echo [...]