Save your fingers when using PHP-CLI

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:

/usr/local/zendsvr6/bin/php-cli myscript.php

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:

cd /usr/bin
ln -s /usr/local/zendsvr6/bin/php-cli phpc

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:

phpc myscript.php

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

phpc -v

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

PHP 5.3.6 (cli) (built: Apr  7 2011 09:37:14)                                
Copyright (c) 1997-2011 The PHP Group                                        
Zend Engine v2.3.0, Copyright (c) 1998-2011 Zend Technologies                
    with Zend Extension Manager v5.1, Copyright (c) 2003-2010, by Zend Techno
    - with Zend Data Cache v4.0, Copyright (c) 2004-2010, by Zend Technologie
s [loaded] [licensed] [disabled]                                             
    - with Zend Guard Loader v3.3, Copyright (c) 1998-2010, by Zend Technolog
ies [loaded] [licensed] [enabled]                                            
    - with Zend Job Queue v4.0, Copyright (c) 2004-2010, by Zend Technologies
 [loaded] [not licensed] [disabled]

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!