When you start php error pops up

syntax error, unexpected END_OF_LINE, expecting '=' in C:\WebServers\local\PHP\php.ini on line 340 

Here is the 340 line:

 ;Нужно или нет определять различные переменные Syslog, такие как 

archive with file: http://www.ex.ua/321647604110

Closed due to the fact that off-topic participants Dmitriy Simushev , andreymal , Sasha Omelchenko , Qwertiy , Streletz Jun 5 '17 at 21:34 .

It seems that this question does not correspond to the subject of the site. Those who voted to close it indicated the following reasons:

  • “Questions asking for help with debugging (“ why does this code not work? ”) Should include the desired behavior, a specific problem or error, and a minimum code for playing it right in the question . Questions without an explicit description of the problem are useless for other visitors. See How to create minimal, self-sufficient and reproducible example . " - Qwertiy, Streletz
  • "The question is caused by a problem that is no longer reproduced or typed . Although similar questions may be relevant on this site, solving this question is unlikely to help future visitors. You can usually avoid similar questions by writing and researching a minimum program to reproduce the problem before publishing the question. " - Dmitriy Simushev, andreymal, Sasha Omelchenko
If the question can be reformulated according to the rules set out in the certificate , edit it .

  • An error is higher somewhere; give a few non-empty lines above. The assignment is done incorrectly. - user31688
  • @Regent, yes, five to ten lines in front of 300sorocove will be, I think, quite enough. - aleksandr barakin
  • there are recording comments. - lol
  • one
    @Lol, please insert these lines into the question itself (by editing it with the “edit” button). The comment does not show where the end and the beginning of the line. - aleksandr barakin
  • one
    Paste text data on pastebin.com and the like. - user31688

2 answers 2

basic error:

at the beginning of the file there are three characters with hexadecimal codes ef bb bf .

the second error found:

syntactic - in 411 lines. Here are the lines from 409 to 411:

 mysql.default_socket= ; Хост по умолчанию для mysql_connect() (не работает в безопасном режиме). 

as you can see, the 411th line is not commented out. need to put ; at its beginning.

third (estimated) error:

the file has dos -endings of lines and, perhaps, a mixture of different endings of lines, with which, theoretically, there may be problems.

I deleted these first three characters and laid out an archive with two versions of the file: with dos -endings of lines and with unix- endings. the second is for the case if php does not understand dos non-native dos endings for it.


The first and third errors can be corrected by two commands of the form (in the gnu / linux operating system):

 $ dos2unix файл $ unix2dos файл 

“unreadable” characters will be removed from the file (inserted by some editors at the beginning of the file), and line endings (if they are mixed inside one file by some editors) will be “reduced to the same denominator”.

  • Exactly, but the error still pops up in the same place ... - Lol
  • lay out, please, as I requested, the entire file. the easiest way to do this is by archiving it with any archiver, and laying out the archive. - aleksandr barakin
  • through which site do you prefer to throw off? - lol
  • through the one where you do not need to register and / or install flash-player. - aleksandr barakin

Faced a similar problem

E: \ tools \ php-7.1> php -m

PHP: syntax error, unexpected END_OF_LINE, expecting '=' in E: \ tools \ php-7.1 \ php.ini on line 2

Looked kong and compared two default:

 php.ini-development php.ini-production 

At the beginning of lines in php.ini after renaming! there were fv[PHP] strings fv[PHP] instead, just [PHP]

It was decided to delete at the beginning of these most obscure letters "fv"