Save your fingers when using PHP-CLI

2021 Update

The instructions in this blog post contain outdated paths and file names.

To learn the modern way to “save your fingers”—plus additional tips for setting up PHP on IBM i—refer to these two articles in our PHP Documentation library.

In Batch PHP I showed how to call PHP from a command line. For example, with Zend Server 6 or 7 on IBM i, one would launch a PASE command line using the command CALL QP2TERM, or launch QShell using QSH, then type a command such as this:

For those of us who use PHP-CLI often, the above command can be a finger-buster. Let’s shorten the path by creating a symbolic link:

I created the symbolic link in /usr/bin, a directory that is likely to be in any user’s path.

Now try the shortened command:

To test the shortcut without a PHP script, use the -v switch, which requests version information (‘v’ for version) about your PHP installation.

The above command will return version information that starts out something like this:

By creating a symbolic link to the PHP-CLI binary, practitioners of PHP can speed their work while saving their fingers.

For more about symbolic links, see my article Link up with QShell.

Protect Your Eyes Against Computer Vision Syndrome (CVS)

Eye strain is a common complaint from computer users, but eyes aren’t the only part of the body that can hurt. Neck pain and backaches can also result from poor visual ergonomics.

In my latest article, Protect Your Eyes Against Computer Vision Syndrome (CVS) (requires free registration after about May 18, 2007), I show several ways to keep your eyes comfortable at the computer.

People who wear bifocals or trifocals should consider occupational progressive lenses, glasses that are made especially for daily computer use. These special glasses can resolve painful postural problems.

Money-saving tip: if you need to buy special (occupational) glasses for computer use, you may not need to buy new frames. Your optician will be happy to use old frames that you might have saved from old prescriptions.

Arrange Your Workstation to Protect Yourself Against Repetitive Strain Injury (RSI)

If you’re reading this blog, you need to protect yourself against Repetitive Strain Injury (RSI). As we work and explore the internet, we accumulate little stresses and habits that can hurt us over time.

MC Press just published my piece on how to arrange your computer workstation to avoid injury.

For my research, I interviewed Steve Shostack, former ergonomics consultant to NASA, and Paul Linden, Ph.D. Paul, an aikido teacher and Feldenkrais practitioner, wrote Comfort at Your Computer. I also recommend Paul’s free e-book, Reach Out: Body Awareness Training for Peacemaking, downloadable from

Space did not permit me to write about my conversation with Mary Barbe, Ph.D., a researcher at Temple University. According to Dr. Barbe, recent human studies show that repetitive work causes the release of cytokines, proteins that trigger inflammation. The inflammation is not limited to the local area of overwork, but spreads throughout the body, potentially exacerbating conditions such as heart disease. The cytokines also help the body to rest by causing sensations of lethargy or even depression. Not good for productivity! In future articles, I will write about such hidden effects of RSI.

Meanwhile, read how to arrange your computer workstation to avoid injury. Stay healthy!