Fix phpsh

Closes issue #995