ubuntu - debugging a php.ini syntax error -


i have vm ubuntu 12.04 , running apache2 web server. i've installed php 5.3.10 , every time run php application, php.ini throws error:

php:  syntax error, unexpected bool_false in /etc/php5/cli/php.ini on line 1020 

i'd expect wasn't commented out correctly in php.ini when @ it, can't see what's wrong:

1007 [pcre] 1008 ;pcre library backtracking limit. 1009 ; http://php.net/pcre.backtrack-limit 1010 ;pcre.backtrack_limit=100000 1011  1012 ;pcre library recursion limit. 1013 ;please note if set value high number may consume 1014 ;the available process stack , crash php (due reaching 1015 ;stack size limit imposed operating system). 1016 ; http://php.net/pcre.recursion-limit 1017 ;pcre.recursion_limit=100000 1018  1019 [pdo] 1020 ; whether pool odbc connections. can 1 of "strict", "relaxed" or "off" 1021 ; http://php.net/pdo-odbc.connection-pooling 1022 ;pdo_odbc.connection_pooling=strict 1023  1024 ;pdo_odbc.db2_instance_name 1025  1026 [pdo_mysql] 1027 ; if mysqlnd used: number of cache slots internal result set cache 1028 ; http://php.net/pdo_mysql.cache_size 1029 pdo_mysql.cache_size = 2000 1030  1031 ; default socket name local mysql connects.  if empty, uses built-in 1032 ; mysql defaults. 1033 ; http://php.net/pdo_mysql.default-socket 1034 pdo_mysql.default_socket= 

does weird this?

the applications run i'm tired of seeing error , not knowing what's causing it.

short answer:

don't trust line numbers, syntax error in lines before line mentioned in error.

long answer:

i had error too, turned out missing quotation mark around timezone.

my orignal error was:

php:  syntax error, unexpected bool_false in /etc/php5/cli/php.ini on line 929 

on line 876 had:

[date] ; defines default timezone used date functions ; http://php.net/date.timezone date.timezone = europe/madrid" 

after lots of commented out lines, next uncommented line on 938. original error said there error on line 929, made things nicely cryptic. presume difference in line numbers has way php.ini file parsed, point line numbers can't trusted.

after corrected missing quotation mark on line 876 error dissappeared.


Comments

Popular posts from this blog

c++ - Creating new partition disk winapi -

Android Prevent Bluetooth Pairing Dialog -

php - joomla get content in onBeforeCompileHead function -