私はあなたの状況を模倣しようとします:
~]$ php --ini
Configuration File (php.ini) Path: /etc
Loaded Configuration File: /etc/php.ini
Scan for additional .ini files in: /etc/php.d
Additional .ini files parsed: /etc/php.d/curl.ini,
/etc/php.d/fileinfo.ini,
/etc/php.d/json.ini,
/etc/php.d/mbstring.ini,
/etc/php.d/phar.ini,
/etc/php.d/zip.ini
そこで、/etc/php.ini に移動して、「(」で始まる行の 1 行のコメントを外します。
~]$ vi /etc/php.ini
[PHP]
;;;;;;;;;;;;;;;;;;;
; About php.ini ;
;;;;;;;;;;;;;;;;;;;
; PHP's initialization file, generally called php.ini, is responsible for
; configuring many of the aspects of PHP's behavior.
; PHP attempts to find and load this configuration from a number of locations.
; The following is a summary of its search order:
; 1. SAPI module specific location.
; 2. The PHPRC environment variable. (As of PHP 5.2.0)
; 3. A number of predefined registry keys on Windows (As of PHP 5.2.0)
; 4. Current working directory (except CLI)
; 5. The web server's directory (for SAPI modules), or directory of PHP
(otherwise in Windows)
; 6. The directory from the --with-config-file-path compile time option, or the
ここで、エラー通知があるかどうかを確認します。
~]$ php --ini
PHP: syntax error, unexpected '(' in /etc/php.ini on line 16
Configuration File (php.ini) Path: /etc
Loaded Configuration File: /etc/php.ini
はい、エラーですが、コメント行を無視せずに正しい行番号が表示されます。apache を再起動したときに、apache/error_log にも同じエラー メッセージが表示されました。
PHP: syntax error, unexpected '(' in /etc/php.ini on line 16
php ファイルは機能しましたが、ini に関するエラーはログに記録されませんでした。
では、/etc/php5/apache2/php.ini を編集してみませんか? いくつかの行を消去して、エラー メッセージが別の番号に移動するかどうかを確認してください。
変更後は必ずapacheを再起動してください。