Reason #13 I hate PHP

I'm making sure that the various branches of “Project: Leaflet [1]” are consistent when I notice that configuration.php, which allows one to change various settings, is not displaying at all. There are no errors, just a blank webpage. Usually, I just run the page at the command line to see what might be up:

>
```
[spc]XXXXXXXXX:~/projects/nlm/htdocs/nlm>php configuration.php
Content-type: text/html
X-Powered-By: PHP/4.3.9
[spc]XXXXXXXXX:~/projects/nlm/htdocs/nlm>
```

Okay, nothing there. Let's see if there's an option to PHP to tell me more:

>
```
[spc]XXXXXXXXX:~/projects/nlm/htdocs/nlm>php -h
Usage: php [-q] [-h] [-s] [-v] [-i] [-f <file>]
php <file> [args...]
-a Run interactively
-C Do not chdir to the script's directory
-c <path>|<file> Look for php.ini file in this directory
-n No php.ini file will be used
-d foo[=bar] Define INI entry foo with value 'bar'
-e Generate extended information for debugger/profiler
-f <file> Parse <file>. Implies '-q'
-h This help
-i PHP information
-l Syntax check only (lint)
-m Show compiled in modules
-q Quiet-mode. Suppress HTTP Header output.
-s Display colour syntax highlighted source.
-v Version number
-w Display source with stripped comments and whitespace.
-z <file> Load Zend extension <file>.
```

Hmm … that “lint [2]” option seems promising. Let's try that.

>
```
[spc]XXXXXXXXX:~/projects/nlm/htdocs/nlm>php -l configuration.php
Errors parsing configuration.php
[spc]XXXXXXXXX:~/projects/nlm/htdocs/nlm>
```

Well, that was spectacularly informative. Why even bother with the option if you aren't going to give any useful information [3]?

Sigh.

[1] /boston/2008/08/07.1

[2] http://en.wikipedia.org/wiki/Lint_programming_tool

[3] http://www.anvari.org/fortune/Quotations_-_Random/977_quote-96-ken-thompson-has-an-automobile-which-he-helped-design.html

Gemini Mention this post

Contact the author