Recent Articles

To Read - A List

2 comments. 10 November 2007

Norman Mailer died today.

It doesn’t matter much to me. I didn’t know him. I’d never read any of his books. I rarely read any of his articles or columns, and then only when we crossed paths on the internet.

A portrait of Norman Mailer as a young man.
Norman Mailer

But I have not been reading lately, and the death of such a well-known author did give me cause to think about literature and reading in general. Soon, if the next month goes well, I will suddenly find myself with more free time than I have had in the last 42 months: I will be a college graduate with a 9-5 job and a few friends still in class.

In those 42 months, I have developed a nasty habit of spending my free time idly at my computer; scouring the vast emptiness of the internet for interesting things to read or to see and occasionally talking to real-live humans. I want to break myself of this habit and nurture a new dependency on reading that other great invention: the book.

To that end, I’m starting a list of books I want to read, which is something I should have done years ago. Below I am reproducing this list as an open call for additions and suggestions. This is in no particular order and is based only on what I’ve read recently.

  • The Name of the Rose* Umberto Eco.
  • The 42nd Parallel John Dos Passos.
  • 1919 John Dos Passos.
  • The Big Money John Dos Passos.
  • The Naked and the Dead Norman Mailer.
  • Armies of the Night Norman Mailer.
  • The Executioner Norman Mailer.
  • One Flew Over the Cuckoo’s Nest Ken Kesey.
  • The Odyssey tr. Stanley Lombardon.
  • The Unbearable Lightness of Being* Milan Kundera.
  • Carrie Stephen King.
  • William Marshall* Georges Duby.
  • Studs Lonigan James T. Farrell.
  • Moby Dick* Herman Melville.
  • L’Étranger (in French) Albert Camus.
  • The Plague Albert Camus.
  • Pale Fire Vladimir Nabokov.
  • Camera Obscura Vladimir Nabokov.

An * means I’ve already started the book.

How to: Upgrade or Recompile PHP on RHEL5

2 comments. 3 November 2007

Upgrading PHP on RHEL 5 is difficult. Having done it on several servers, I’ve gotten it down to a 15 to 20 step process. It takes a while, but it’s straightforward. I thought I’d share, because help was sparse and noncontiguous at best.

RedHat Enterprise Linux: Hard to upgrade PHP.

RedHat Enterprise Linux 5 comes with PHP 5.1.6 and, as of this writing, this is the highest version available on yum. If you want to upgrade to 5.2.4, or even recompile 5.1.6 with a custom configuration, you’ll need to resolve several dependencies, first.

Unless otherwise specified, whenever I run ./configure, I always include --enable-shared and --enable-static.

The first step is to make sure you have a working APXS script installed. None of the servers on which I’ve done this had it. I installed Apache 2.2.4 over the default install, since it was the latest version. Be sure to enable APXS with --enable-so. Be careful configuring Apache, as it likes to install itself in /usr/local/apache2/ instead of /etc/httpd/, which you may prefer.

Now we start resolving the dependencies. I’d start with libtool and libiconv. The former you should be able to install via yum. The latter you may have to download, and after you configure it, from the source directory copy m4/iconv.m4 to /usr/local/share/aclocal/iconv.m4.

Use yum to make sure mysql-devel is installed, you’ll need it to link to mysql.

Then I’d do the image manipulation software, since it’s fairly easy. Use yum to install libjpeg, libpng and freetype. You can then use yum to make sure both gd and gd-devel are installed.

I installed libmcrypt, libmhash, and ming at this point. I’d say it’s a good time to get any of these more particular dependencies out of the way. I also installed Tidy, which you need to check out from their CVS repository. You can run build/gnuauto/setup.sh from the Tidy source directory to create the autoconf files.

Now we get to the crux of the matter: configuring PHP. All the major dependencies should have been taken care of. If you have other PHP options you’ll need, make sure those prerequisites are installed, as well. Run the configure script in the PHP source directory with everything you need enabled. I find it helpful to create a script like php.config with the following format:

'./configure' \
'--with-cgi' \
'--with-fastcgi' \
'--with-gd' \
...
'--with-xml' \
"$@"

You need to include the slashes \ at the end of every line. The last line, "$@" makes the script output the output of configure.

If you get an error running make, you may need to edit your Makefile. Find the EXTRA_LIBS section (in vi/vim, type <ctrl-c> /EXTRA_LIBS <return>) and add -liconv to the end of the line. Then try make clean && make and it should work.

You may or may not have to edit your httpd.conf, after running make install from the PHP source directory, to add the AddType or AddHandler directive for PHP.

That should be it. You can install extensions via PECL or Pear and everything should run. Save the source directory and your php.config (or config.nice) file, and you’ll be able to recompile at any time, in case you forgot something. (I, for example, forgot to add --with-mysql the first time!)

Let me know if you run into other problems. Most can be solved by typing yum install ###-devel to resolve a dependency, but if not, I’ve done this enough to be of some help.

More Posts

Subscribe

Tags

Popular Posts

Recent Comments

Search

Tweets

Links

Incoming Links