LoginSignup
0
0

More than 5 years have passed since last update.

php_browscap.iniでの文法エラーの解決法

Last updated at Posted at 2015-02-14

php 5.3からphp5.4にバージョンアップすると、下記のようなエラーが表示されるようになった。

$ php -v
PHP:  syntax error, unexpected $end, expecting ']' in /etc/php.d/lite_php_browscap.ini on line 59

色々調べて分かったことは、どうも文中のセミコロン以降がコメントとして扱われてしまい、エラーが出現しているようであった。

そのため、下記のように正規表現でファイルを置換して対応。

検索文字列: ([^\n\r|\n\r][^;]);
置換文字列: $1\\;
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0