Page 2 of 2

Posted: Sun Aug 11, 2002 5:05 pm
by w3cynic
I get "Could not open input file." which is what I expected, are you sure you are using -f option?

You pass arguments the same way as for any command so;

Code: Select all

php clitest.php -q with chesse
Would output;

Array
{
[0]=>clitest.php
[1]=>with
[2]=>cheese
}

None of which helps me:( Did you compile this yourself or was it pre-packaged for your distro?

Posted: Sun Aug 11, 2002 9:03 pm
by daemorhedron
I get "Could not open input file." which is what I expected, are you sure you are using -f option?
If you look at my original post and the test script, I was using -f originally, but another test without it yields the same results.

Code: Select all

#!/usr/local/bin/php 
<?php
        print_r($_SERVER&#1111;'argv']);
?>
[daemorhedron@obsidian daemorhedron]$ ./clitest.php spank me
Content-type: text/html

Array
(
[0] => ./clitest.php
[1] => spank
[2] => me
)
Did you compile this yourself or was it pre-packaged for your distro?
I compiled this myself.
None of which helps me:(
Maybe I am not understanding. I thought your problem is that you are not able to pass command line arguments to your script?

Posted: Sun Aug 11, 2002 9:07 pm
by daemorhedron
Not that it should matter at all, but here is my configure line for my cgi version of php on linux.

./configure --prefix=/usr/local --with-config-file-path=/usr/local/bin --enable-ftp --with-pgsql --enable-inline-optimization --with-pspell --with-mcrypt --with-mhash --enable-sockets --with-openssl --with-zlib --with-zlib-dir=/usr/local/lib

I know, it's massive, but there you go nonetheless.

HTH =)