Tag Archive: php

Nov 18

If you want to use Sendmail, install it, dummy!

Right…I must have forgotten to install sendmail, because mail wasn't working for WordPress. First, to verify that sendmail wasn't working I ran this PHP script (thanks to phpeasystep.com) <? // send e-mail to … $to="me@localhost"; // Your subject $subject="Test"; // From $header="from: your name <your email>"; // Your message $message="Hello rn"; $message.="This is testrn"; $message.="Test …

Continue reading »

Sep 20

Strip out a bracketed piece of text using PHP

In WordPress I have a free, third-party theme that is displaying my image captions in article excerpts for some reason. The captions show up as a sort of bracketed markup. I tracked down the part of code that prepares the article excerpts and ran this regular expression to strip out any square-bracketed text: The 'Us' …

Continue reading »

Jul 09

Hrmph, you mean GD wasn't installed?

I couldn't embed thumbnail sizes on my new WordPress install on my new Ubuntu server; I could only embed the original size (which was 3072×2048). The options to embed other sizes were just grayed out. It turns out that the default LAMP install doesn't include php-gd, the graphics library that creates thumbnails. Well… I guess …

Continue reading »

Jun 29

Weather Underground XML API

Weather Underground has a nice XML API to get at their data, and I recently used it to create a small weather page for my friend's new HTC Hero. This little page turned into a learning exercise for me on both the Weather Underground API and SimpleXMLElement in PHP. SimpleXMLElement: What a great way to …

Continue reading »

Jun 15

Automated IIS WordPress Installer from Microsoft

Now that I know how to do it, I'm getting fed up with LAMP as a web platform. I much prefer Windows. (What can I say? I'm a Windows guy!) And I recently stumbled into the Microsoft Web Platform Installer. It makes installing WordPress embarrassingly simple. Just run the installer and it does everything for …

Continue reading »

Jun 10

Setup FastCGI on your web server to make PHP sing!

I was setting up the forums for the Pioneer, which are pretty much done, and I noticed that the forums were acting really sluggishly. It's a phpbb3 forum. I've used them before and they've seemed pretty snappy to me, so I figured our webserver, which recently got moved to a server with less resources (but …

Continue reading »

Apr 08

Enabling PHP5 on IIS6

This is a quick note for me so I don't forget how I did it (if I have to do it again in the future). PHP5 doesn't automatically enable itself on IIS6. You have to do it by hand for each website you create. The first step, and I'm not positive it's necessary, is to …

Continue reading »

Apr 08

PHP Notice:

I got an error when trying to move one of our old PHP sites to the new server: PHP Notice: Use of undefined constant php – assumed ‘php’ in… Basically it means that the php ending tag should be ?> and not php?> Thanks, ClickFire, for the PHP help