dpli36193 2013-04-20 11:13
浏览 20

PHP意外'(',但没有'('[关闭]

I'm getting many of these errors in my apache logging file:

PHP:  syntax error, unexpected '(' in /etc/php5/apache2/php.ini on line 3

But these are the first 15 lines of /etc/php5/apache2/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

The first uncommented lines of php.ini:

engine = On

short_open_tag = Off

asp_tags = Off

precision = 14

y2k_compliance = On

I thought it would be a caching problem, but I've just disabled my PHP caching (it was APC)

I can't find any (s that aren't in comments in the entire file.

How else could PHP think that there is a ( in the file when there isn't?

  • 写回答

2条回答 默认 最新

  • dpir3950 2013-04-20 11:28
    关注

    ; in php.ini means comment line . Message does not count comment lines. So line 3 means 3rd line after top comments.

    EDIT 1 : Be sure your are opening right php.ini file which PHP really use

    EDIT 2 : use phpinfo(); and at the result page see Loaded Configuration File value. it shows you php.ini file which currently using. Note: restart your apache

    评论

报告相同问题?

悬赏问题

  • ¥15 求帮我调试一下freefem代码
  • ¥15 R语言Rstudio突然无法启动
  • ¥15 关于#matlab#的问题:提取2个图像的变量作为另外一个图像像元的移动量,计算新的位置创建新的图像并提取第二个图像的变量到新的图像
  • ¥15 改算法,照着压缩包里边,参考其他代码封装的格式 写到main函数里
  • ¥15 用windows做服务的同志有吗
  • ¥60 求一个简单的网页(标签-安全|关键词-上传)
  • ¥35 lstm时间序列共享单车预测,loss值优化,参数优化算法
  • ¥15 Python中的request,如何使用ssr节点,通过代理requests网页。本人在泰国,需要用大陆ip才能玩网页游戏,合法合规。
  • ¥100 为什么这个恒流源电路不能恒流?
  • ¥15 有偿求跨组件数据流路径图