PHP Parse Error: syntax error, unexpected $end PHP Parse Error: syntax error, inesperada $ final
In PHP 5, the following error may appears as an error entry in Apache error log or simply displays on PHP web page, even if calling to php scripts with php_info() works perfectly and successfully returns information on PHP configurations: No PHP 5, o seguinte erro pode aparecer como um erro na entrada Apache erro login ou simplesmente exibe a página da web PHP, mesmo que apelar para scripts php com php_info () funciona perfeitamente com sucesso e retorna informações sobre configurações PHP:
Parse Error: syntax error, unexpected $end in ….. Parse Error: syntax error, no final inesperado $… .. scripts.php on line … scripts.php em linha…
The error may caused by a missing curly bracket in PHP script coding. O erro pode faltar curly causada por um suporte em PHP script codificação. Beside, it may also caused by error in PHP coding in class definition, as in PHP, a class definition cannot be broke up and distributed into multiple files, or into multiple PHP blocks, unless the break is within a method declaration. Ao lado, pode também causada por erro no código PHP em sala de aula definição, como em PHP, uma classe definição não pode ser rompeu-se e distribuído em vários arquivos, ou em vários blocos PHP, a menos que a quebra seja dentro de um método declaração.
But more commonly, the error is often caused by the use of Short Open tags in PHP, Mas, mais comumente, o erro é muitas vezes causada pelo uso de tags Open Curto em PHP, instead of full tag,
To use short open tags, it must be enabled in PHP.INI. Para usar tags curtas aberto, deve ser ativado no php.ini. Search for short_open_tag in PHP.INI, and change the value to On. Buscar short_open_tag no php.ini, e altere o valor para Ligado. The line should look line: A linha deve procurar linha:
short_open_tag = On Em short_open_tag =
IMPORTANT : This is a machine translated page which is provided "as is" without warranty. IMPORTANTE: Esta é uma página traduzida máquina que é fornecida "como está" sem garantia. Machine translation may be difficult to understand. A tradução automática pode ser difícil de compreender. Please refer to Por favor, consulte a original English article Inglês original article whenever possible. sempre que possível.
Share and contribute or get technical support and help at Compartilhe e contribuir ou obter suporte técnico e ajudar a My Digital Life Forums Minha vida digital Fóruns .
Related Articles Artigos relacionados
- WordPress MySQL SQL Query Error in WPDB Class WordPress MySQL consulta SQL erro na classe WPDB
- gmmktime Error in WordPress and MagpieRSS gmmktime Erro em WordPress e MagpieRSS
- PHP Allowed Memory Size Exchausted Fatal Error PHP memória tamanho permitido Exchausted erro fatal
- Install Web Server in Windows XP with Apache2, PHP5 and MySQL4 - Part 3 Instalar Web Server no Windows XP com Apache2, PHP5 e MySQL4 - Parte 3
- How to Customize, Modify or Change WordPress Database Connection Error Page How to customize, modificar ou alterar WordPress database Erro de conexão página
- Oracle Database Import Error 3113/3114 Banco de dados Oracle importação erro 3113/3114
- Comments and Comment Blocks in PHP Observações e comentários Blocos em PHP
- Oracle ORA-14074 Create or Add New Partition Fails Error Oracle ORA-14074 criar ou adicionar novas partições falhar erro
- Oracle EXP-00091 Error When Export Database Oracle EXP-00091 erro ao exportar Database
- Starting Apache HTTPD Failed Due to Cannot Open or No Such mod_bwlimited, mod_log_bytes or mod_bandwidth Files Iniciando o Apache HTTPD falhou devido a Não consigo abrir ou no Tais mod_bwlimited, mod_log_bytes ou mod_bandwidth Files

































May 14th, 2006 23:30 14 de maio de 2006 23:30
thanks a lot, agradecimento muito,
short_open_tag = On solved that problem for me short_open_tag = A resolvido esse problema para mim
August 22nd, 2006 22:49 22 de agosto de 2006 22:49
Thanks for this post…saved me a lot of time! Graças a este post… salvou-me um monte de tempo!
December 20th, 2006 04:57 20 de dezembro de 2006 04:57
I saw your posting and made the change to the php.ini file and I’m still getting the error the is being run with Fedora Core 5 with MySql 5. Eu vi o seu destacamento e fez a mudança para o arquivo php.ini e ainda estou recebendo o erro está sendo executado com o Fedora Core 5 com o MySQL 5.
Can someone please help Por favor alguém pode ajudar
0)
{ (
while ($row = mysql_fetch_assoc($result)) while ($ row = mysql_fetch_assoc ($ result))
{ (
print $row(’cust_id’) . print $ row ( 'cust_id'). ‘-’ . '-'. $row(’cust_url_desc’) ; $ row ( 'cust_url_desc');
} )
} )
else diferente
{ (
echo ‘No rows found!’; echo 'Não linhas encontrado! ";
} )
mysql_free_result($result); mysql_free_result ($ result);
mysql_close($connection); mysql_close ($ ligação);
?>
February 5th, 2007 07:41 5 de fevereiro de 2007 07:41
Hello. Olá. I have a problem with a PHP file that shows the “PHP Parse Error: syntax error, unexpected $end” error and I followed the instructions in this page and corrected the php.ini from OFF to ON. Eu tenho um problema com um arquivo PHP que mostra o "PHP Parse Error: syntax error, inesperada $ final" erro e eu seguidas as instruções nesta página e corrigido o php.ini de OFF para ON.
Now, the file don’t give any feedback when I open it. Agora, o arquivo não dão qualquer comentário quando eu abri-lo. It only gives me a blank page and no info! É só me dá uma página em branco e não há informações! O_o O_O
It’s strange… Can you help me please? É estranho… pode ajudar-me, por favor? Thanks. Obrigado.
March 29th, 2007 22:29 29 de março de 2007 22:29
This might be due to a missing quote also Isto poderá ser devido a uma citação também ausente
August 30th, 2007 19:39 30 de agosto de 2007 19:39
Thanks a ton, I’ve been trying to figure this out for the last few hours. Graças a tonelada, eu tenho estado a tentar este valor também para as últimas horas.
September 15th, 2007 20:20 15 de setembro de 2007 20h20
thhanx a lot short_open_tag = On solved my problem. thhanx um lote short_open_tag = A resolvido meu problema. ypu are helpful ypu são úteis
September 30th, 2007 12:07 30 de setembro de 2007 12:07
wow! Wow! thanks for your useful guidance… obrigado pela sua valiosa orientação…
October 23rd, 2007 18:52 Outubro 23o, 2007 18:52
Very useful, thanks. Muito útil, obrigado. I just upgraded to openSuse 10.3 from 10.2 which had reset my php.ini. Eu apenas atualizado a partir de 10,2 para 10,3 openSUSE que tinha redefinir meu php.ini.
February 27th, 2008 20:22 27 de fevereiro de 2008 20:22
Thanks for your time, But for me Its really didfficult to find a missing curly bracket. Obrigado por sua vez, mas para mim Sua realmente didfficult para encontrar um suporte curly desaparecidos.
Is there any easiest way to findout with MISSING CURLY BRACKET. Existe alguma maneira mais fácil de findout com FALTA Curly suporte. Any editor can do it for us. Qualquer editor pode fazer isso por nós.
Please Help. Por favor Ajuda.
Rana
March 8th, 2008 14:27 8 de março de 2008 14:27
syntax error, unexpected $end in C:\wamp\www\login.php on line 49 erro de sintaxe, inesperada $ fim em C: \ wamp \ www \ login.php on line 49
March 17th, 2008 00:32 17 de março de 2008 00:32
Thank you, Obrigado,
Been searching for ages for solution to this. Foi à procura de idades para a solução para este problema.
short_open_tag = On solved that problem for me. short_open_tag = A resolvido esse problema para mim.
Finally I can open templates Finalmente posso abrir templates
May 10th, 2008 14:10 10 de maio de 2008 14:10
Thank you very much ….. Muito obrigado… ..
September 12th, 2008 23:57 12 de setembro de 2008 23:57
Rana, any source code editor that supports Find / Replace with Regular Expressions can help you balance braces. Rana, qualquer editor de código fonte que suporte Localizar / substituir com expressões regulares podem ajudar você a balança suspensórios.
Example: in Macrodobe Dreamweaver (any non-absolutely-ancient version), do [Ctrl]+[F] to activate Find/Replace, tell it: Exemplo: em Macrodobe Dreamweaver (qualquer não-absolutamente antiga versão), fazer [Ctrl] + [F] para ativar a Localizar / Substituir, dizer-lhe:
Find in: Current Document Localizar em: documento atual
Search: Source Code Pesquisa: Código Fonte
Find: [{}] Localizar: [()]
Replace: (leave blank) Substituir: (deixe em branco)
Options: “Use Regular Expression” checked, all others unchecked. Opções: "Use Expressão regular" marcada, todos os outros desmarcada.
Then simply do Find Next. Depois, basta fazer Localizar seguinte. This will find both opening and closing braces. Isto irá encontrar tanto abertura e encerramento suspensórios. For each opening brace you find, count them starting at 1. Para cada abertura cinta você encontrar, eles contam com início em 1. For each closing brace, subtract 1 from the current count. Para cada fechamento cinta, subtrair 1 a partir do atual contagem. You should wind up at 0 just before it wraps around back to the beginning (also in any specific function, block, etc. ). Você deve encerrar a 0 pouco antes que envolve cerca de voltar para o início (também em qualquer função específica, blocos, etc.)
Eg Eg
foreach ($array as $value) { // 1foreach ($ array as $ valor) (/ / 1if ($value > 100) { // 2if ($ valor> 100) (/ / 2echo "$value too big!\n";echo "$ valor muito grande! \ n";} // 1) / / 1} // 0) / / 0