I was working with an application platform that I had just downloaded today. I just wanted to check it out and play with it a bit. In the application framework was an executable script that provided some command line utility. I fired up the script and received an error like “PHP Fatal error: require_once(): Failed opening required…”. Of course non of the files from the downloaded archived were in the include path for my system, but I didn’t want to just go adding it to my php.ini file just to play around with it short term. What to do.
Command Line Options
First I wanted to see if there was a command line option that I could pass to PHP to tell it what
include_path to use for just this one execution. If you execute the following you’ll see the usage:
There is no
include_path command line option, but there is the
-d foo[=bar] option which allows us to modify any of the INI entries by key/value.