Re: Re: cvs: php4 / run-tests.php
| From: | Stig S. Bakken | Date: | Mon, 15 Apr 2002 07:49:57 +0000 |
| Subject: | Re: Re: cvs: php4 / run-tests.php | ||
| References: | 1 2 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-82798@lists.php.net to get a copy of this message | ||
On Sun, 2002-04-14 at 22:30, Marcus Börger wrote:
[snip]
>
> Interesting is that i can call the test manually and when i add -C it works.
>
> [marcus@zaphod php4]$ /usr/src/php4/php -q ext/exif/tests/004.php
> /usr/src/php4/ext/exif/tests/004.php(8) : Warning - Unable to open
> './ext/exif/tests/test4.jpg'
> /usr/src/php4/ext/exif/tests/004.php(10) : Warning - Invalid argument
> supplied for foreach()
> /usr/src/php4/ext/exif/tests
> [marcus@zaphod php4]$ /usr/src/php4/php -C -q ext/exif/tests/004.php
> /usr/src/php4
>
> last line of test is expected directory.
>
> A solution would be to add the execution directory to the environment of
> the test:
> putenv("PHP_DIR=".getcwd());
> and change the directory in the test first
I guess this is because cgi ignores most command line options when the
CGI environment variables are set up, like run-tests.php does. Maybe
run-tests.php should not set up the CGI environment if there is no
--GET-- or --POST-- section?
- Stig