[PHP-users 5338] コマンドライン版実行時のオプションエラー

HAYAKAWA Hiroshi php-users@php.gr.jp
Sun, 10 Feb 2002 16:14:26 +0900


早川と申します。

PHP4のコマンドライン版を使用して、
以下のようなエラーがでて原因が掴めなくて困っています。
(プログラムはcronで起動してます)

Error in argument 1, char 3: option not found
Error in argument 1, char 4: option not found -
Error in argument 1, char 3: option not found
Usage: php [-q] [-h] [-s [-v] [-i] [-f <file>] |  {<file> [args...]}
  -q             Quiet-mode.  Suppress HTTP Header output.
  -s             Display colour syntax highlighted source.
  -f <file>      Parse <file>.  Implies `-q'
  -v             Version number
  -C             Do not chdir to the script's directory
  -c <path>      Look for php.ini file in this directory
  -a             Run interactively
  -d foo[=bar]   Define INI entry foo with value 'bar'
  -e             Generate extended information for debugger/profiler
  -z <file>      Load Zend extension <file>.
  -l             Syntax check only (lint)
  -m             Show compiled in modules
  -i             PHP information
  -h             This help


OSはVineLinux2.0、実行するプログラムは以下のようになっています。

#!/usr/local/bin/php -q -d max_execution_time=0
<?php
    
    // ここに処理を書く
    
?>


オプションが見つからないといわれてますが、
記述が間違っているようには思えないのです。
この表記は#4162でいわきりさんが書かれているものと同じですし。
ちなみに -q オプションのみの場合にはエラーにはなりません。


PHP4のコマンドライン版のインストールの手順は以下の通りです。

$ tar zxvf php-4.1.1.tar.gz
$ cd php-4.1.1
$ ./configure --with-pgsql=/usr --without-mysql --enable-track-vars \
    --enable-force-cgi-redirect --enable-mbregex --enable-mbstring \
    --enable-mbstr-enc-trans
$ make
# make install


何かご存じorお気づきになられる方がいらっしゃいましたら
ご指摘いただければ幸いです。


-----
>>>  With your dreaming,           ☆彡  Hayakawa,Hiroshi          <<<
>>>          with your smile.    ☆彡    hayakawa@sam.hi-ho.ne.jp  <<<
>>>                            ☆彡      Nagoya,Aichi,JAPAN        <<<