PHP

warning: Creating default object from empty value in /home/cvickery/drupal-6.19/modules/taxonomy/taxonomy.pages.inc on line 34.
Installing, maintaining, or using PHP.

Sending email from PHP scripts

The PHP builtin function, mail() can be used to send email using either SMPT or using the operating system’s sendmail program. These features can be configured in the php.ini file, but I found I was having problems authenticating to my smtp relay server, and I wanted to minimize the number of SpamAssassin test failures so my messages would go to the recipients’ inboxes instead of their spam folders.

This post is about the gotchas I dealt with, not a tutorial on sending email in general.

PHP and CSV files

If you have ever tried to use PHP to process CSV files that contain non-ASCII characters, you know there is a problem out there with lots of solutions that may or may not work. Mostly the latter from what I can tell. Herewith some comments from a PHP command line program that I use to populate a PostgreSQL table with data derived from a spreadsheet.

This is all command-line stuff under OS X.

PHP on Leopard Redux

In Installing PostgreSQL on Leopard I talked about building a 64-bit version of PostgreSQL on Leopard. On or about September 12, 2009 Apple released a “security update” that required a re-boot. Routine stuff. Could have been a new version of iTunes for all I knew. (Maybe it was, doesn’t matter.) All I know is that I got email from a student saying my course schedule page was coming up mostly blank.

Installing PHP support for PostgreSQL on an OS X Leopard Server

OS X Leopard Server runs apache2 as a 64-bit application, which means that if you want to be able to run a PostgreSQL server that you can access from PHP web pages, PostgreSQL has to be built as a 64-bit binary, and PHP has to be re-built (with PostgreSQL) as a 64-bit binary as well. After some googling around, I started by using a script by Marc Liyanage for building a universal binary PostgreSQL. That was a good start, but didn't work on my Leopard server. What follows is a description of how I finally got it all to work.

Setting up Drupal and PHP on Dreamhost

I have been using Drupal for the first version of this blog on my own computer, so I was pleased to see that the hosting company for ChristopherVickery.com (Dreamhost) was offering a one-click install of it for sites that they host. I like Drupal because it is FOSS, and especially because the default theme passes both XHTML and CSS validation. But the one-click installer didn’t let me customize Drupal as much as I would like, so I decided to download and install the package myself.

Syndicate content