# Running PHP scripts via the CLI for testing sake

**URL:** <https://forum.kirupa.com/t/running-php-scripts-via-the-cli-for-testing-sake/149216>\
**Category:** Uncategorized\
**Created:** [May 26, 2005, 10:47pm UTC](https://forum.kirupa.com/t/running-php-scripts-via-the-cli-for-testing-sake/149216 "2005-05-26T22:47:49Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![cadmiumgreen](https://avatars.discourse-cdn.com/v4/letter/c/ba8739/32.png) [@cadmiumgreen](https://forum.kirupa.com/u/cadmiumgreen)\
**Post date:** [May 26, 2005, 10:47pm UTC](https://forum.kirupa.com/t/running-php-scripts-via-the-cli-for-testing-sake/149216/1 "2005-05-26T22:47:49Z")

</div>

hello forum,

i’ve run into a problem that has me stumped.

first off, i am trying to run a php script on the unix-based command line interface. Easy enough, the script is as follows:

\<?php

require ‘HTML/QuickForm.php’; //from PEAR::HTML\_QuickForm  
echo ‘hello world’;

?\>

i type the following at the prompt to see if this script works on the command line:

root# /usr/local/php5/bin/php /Users/cadmiumgreen/Sites/index.php

and the results are as follows…

PHP Warning: main(HTML/QuickForm.php): failed to open stream: No such file or directory in /Users/cadmiumgreen/Sites/index.php on line 3  
PHP Fatal error: main(): Failed opening required ‘HTML/QuickForm.php’ (include\_path=’.:/usr/local/php5/lib/php:/usr/local/php5/lib/php/HTML:php/includes:/usr/lib/php’) in /Users/cadmiumgreen/Sites/index.php on line 3

But it displays perfectly without errors on the browser.  
The path seems to be very correct.  
Anyone experience the same problem?

-cadmiumgreen
