PHP Parse Error: syntax error, unexpected $end PHP Parse Error: syntax error, tak terduga $ akhir
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: Di PHP 5, kesalahan berikut mungkin muncul sebagai kesalahan entri di Apache error log atau hanya menampilkan pada halaman web PHP, bahkan bila Anda menelepon ke script php dengan php_info () bekerja dengan sempurna dan berhasil mengembalikan informasi tentang konfigurasi PHP:
Parse Error: syntax error, unexpected $end in ….. Parse Error: syntax error, tak terduga $ berakhir dengan ... .. scripts.php on line … scripts.php on line ...
The error may caused by a missing curly bracket in PHP script coding. Kesalahan mungkin disebabkan oleh Braket keriting yang hilang dalam naskah PHP coding. 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. Disamping, hal itu mungkin juga disebabkan oleh kesalahan dalam pengkodean di dalam kelas PHP definisi, seperti di PHP, sebuah definisi kelas tidak dapat pecah dan didistribusikan ke dalam beberapa file, atau ke beberapa blok PHP, kecuali istirahat adalah sebuah metode dalam deklarasi.
But more commonly, the error is often caused by the use of Short Open tags in PHP, Tetapi yang lebih umum, kesalahan sering kali disebabkan oleh penggunaan tag pendek Buka di PHP, instead of full tag,
To use short open tags, it must be enabled in PHP.INI. Untuk menggunakan tag terbuka pendek, itu harus diaktifkan pada php.ini. Search for short_open_tag in PHP.INI, and change the value to On. Cari short_open_tag dalam php.ini, dan mengubah nilai ke Aktif. The line should look line: Garis akan terlihat baris:
short_open_tag = On short_open_tag = On
IMPORTANT : The page is machine translated and provided "as is" without warranty. PENTING: Halaman ini adalah mesin diterjemahkan dan diberikan "sebagaimana adanya" tanpa jaminan. Machine translation may be difficult to understand. Terjemahan mesin mungkin sulit untuk mengerti. Please refer to Silakan merujuk ke original English article artikel asli bahasa Inggris whenever possible. bila memungkinkan.
Related Articles Artikel Terkait
- Robocopy Syntax, Command Line Switches and Examples Robocopy Sintaks, Saklar Baris Perintah dan Contoh
- PHP Allowed Memory Size Exchausted Fatal Error PHP Allowed Memory Size Exchausted Fatal Error
- Internal Error 2739 Error in Vista (32 or 64-bit) When Install Adobe Photoshop CS3 and Reflector Related Programs Internal Error 2739 Error in Vista (32 atau 64-bit) Ketika Instal Adobe Photoshop CS3 dan Reflector Program Terkait
- Failed or Missing Dependency of glibc-common Error Gagal atau Hilang dependensi dari glibc-common Error
- WordPress MySQL SQL Query Error in WPDB Class Wordpress MySQL Query SQL WPDB Kesalahan dalam Kelas
- Fix Internal Server Error When Accessing Easy Apache in cPanel WebHosting Manager Perbaiki Internal Server Error Ketika Mengakses Mudah Apache di cPanel WebHosting Manager
- PHP Scripts open_basedir Restriction in Effect Error PHP Scripts open_basedir Restriction di Efek Kesalahan
- Oracle Database Import Error 3113/3114 Kesalahan Impor Oracle Database 3113/3114
- Gmail Email Message Corrupted Error Gmail Email Pesan Corrupted Kesalahan
- Spb Finance Synchronization Error in Microsoft ActiveSync SPB Finance Sinkronisasi Kesalahan dalam Microsoft ActiveSync










































October 29th, 2009 22:19 29 Oktober 2009 22:19
3 years later, I found the real problem. 3 tahun kemudian, saya menemukan masalah yang sebenarnya. Somewhere in the code is written %>, like in a table . Suatu tempat di kode ditulis%>, seperti dalam sebuah tabel.
If your asp_tags = On, in ASP it means closing. Jika Anda asp_tags = On, dalam ASP itu berarti menutup. It's amongst your HTML code. Ini antara kode HTML Anda. I got many hours to solve this problem. Saya mendapat banyak jam untuk menyelesaikan masalah ini.
October 3rd, 2009 17:59 3 Oktober 2009 17:59
Thanks Buddy your information helped me from hell of headache(spcly whn the code is not written by youself and u have to make your changes into it..phewww)….but thanks your suggestions helped me to locate and remove errors…..making <? Thanks Buddy informasi Anda membantu saya dari neraka sakit kepala (spcly whn kode ini tidak ditulis oleh diri sendiri dan u harus membuat perubahan Anda ke dalamnya .. phewww) .... Tapi berkat saran Anda membantu saya untuk menemukan dan menghapus kesalahan ... .. membuat <? to <?php solved my prob..:) untuk <? php dipecahkan prob saya ..:)
July 9th, 2009 14:15 9 Juli 2009 14:15
Also, some Webserver does not support the tag <? Juga, beberapa Webserver tidak mendukung tag <? for php files, change them to <?php and it can work. untuk php file, ubah link tersebut menjadi <? php dan bisa bekerja. (Dar Es Salaam, Tanzania) (Dar Es Salaam, Tanzania)
January 25th, 2009 12:42 25 Januari 2009 12:42
It was very much helpful in solving my problem of the same kind of error. Hal itu sangat membantu dalam memecahkan masalah saya dari jenis yang sama kesalahan.
December 11th, 2008 11:26 11 Desember 2008 11:26
Thank you for this awesome tip about short_open_tags! Terima kasih untuk tip tentang short_open_tags awesome! Would have never found that by myself. Tidak akan pernah menemukan bahwa dengan diriku sendiri.
September 12th, 2008 23:57 12 September 2008 23:57
Rana, any source code editor that supports Find / Replace with Regular Expressions can help you balance braces. Rana, editor kode sumber yang mendukung Cari / Ganti dengan Regular Expressions dapat membantu Anda menyeimbangkan kawat gigi.
Example: in Macrodobe Dreamweaver (any non-absolutely-ancient version), do [Ctrl]+[F] to activate Find/Replace, tell it: Contoh: dalam Macrodobe Dreamweaver (semua non-mutlak-versi kuno), lakukan [Ctrl] + [F] untuk mengaktifkan Cari / Ganti, katakan itu:
Find in: Current Document Cari di: Current Document
Search: Source Code Search: Source Code
Find: [{}] Cari: [()]
Replace: (leave blank) Ganti: (biarkan kosong)
Options: “Use Regular Expression” checked, all others unchecked. Pilihan: "Gunakan Regular Expression" dicentang, semua orang lain dicentang.
Then simply do Find Next. Lalu, lakukan Find Next. This will find both opening and closing braces. Ini akan menemukan keduanya membuka dan menutup kawat gigi. For each opening brace you find, count them starting at 1. Untuk setiap pembukaan penjepit Anda menemukan, menghitung mereka dimulai dari 1. For each closing brace, subtract 1 from the current count. Untuk setiap penutupan penjepit, kurangi 1 dari perhitungan saat ini. You should wind up at 0 just before it wraps around back to the beginning (also in any specific function, block, etc. ). Anda harus angin sampai pada 0 sesaat sebelum wraps sekitar kembali ke awal (juga dalam fungsi tertentu, blok, dll).
Eg Eg
foreach ($array as $value) { // 1if ($value > 100) { // 2
echo "$value too big!\n";
} // 1
} // 0
May 10th, 2008 14:10 10 Mei 2008 14:10
Thank you very much ….. Terima kasih banyak ... ..
March 17th, 2008 00:32 17 Maret 2008 00:32
Thank you, Terima kasih,
Been searching for ages for solution to this. Sudah lama sekali untuk mencari solusi untuk ini.
short_open_tag = On solved that problem for me. short_open_tag = On memecahkan masalah bagi saya.
Finally I can open templates Akhirnya aku bisa membuka template
March 8th, 2008 14:27 8 Maret 2008 14:27
syntax error, unexpected $end in C:\wamp\www\login.php on line 49 kesalahan sintaks, tak terduga $ akhir di C: \ Wamp \ www \ login.php on line 49
February 27th, 2008 20:22 27 Februari 2008 20:22
Thanks for your time, But for me Its really didfficult to find a missing curly bracket. Terima kasih atas waktu Anda, Tapi bagi saya Its really didfficult untuk menemukan yang hilang Braket keriting.
Is there any easiest way to findout with MISSING CURLY BRACKET. Apakah ada cara termudah untuk findout dengan BRACKET keriting HILANG. Any editor can do it for us. Editor apapun bisa melakukannya untuk kita.
Please Help. Tolong Bantuan.
Rana Rana
October 23rd, 2007 18:52 23 Oktober 2007 18:52
Very useful, thanks. Sangat berguna, terima kasih. I just upgraded to openSuse 10.3 from 10.2 which had reset my php.ini. Aku hanya upgrade ke openSuse 10.3 dari 10,2 yang telah ulang php.ini saya.
September 30th, 2007 12:07 30 September 2007 12:07
wow! wowl thanks for your useful guidance… terima kasih atas bimbingan berguna ...
September 15th, 2007 20:20 15 September 2007 20:20
thhanx a lot short_open_tag = On solved my problem. thhanx banyak short_open_tag = On memecahkan masalah saya. ypu are helpful YPU sangat membantu
August 30th, 2007 19:39 30 Agustus 2007 19:39
Thanks a ton, I've been trying to figure this out for the last few hours. Thanks a ton, aku sudah mencoba untuk mencari hal ini selama beberapa jam.
March 29th, 2007 22:29 29 Maret 2007 22:29
This might be due to a missing quote also Hal ini mungkin disebabkan karena adanya kutipan yang hilang juga
February 5th, 2007 07:41 5 Februari 2007 07:41
Hello. Halo. 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. Aku punya masalah dengan file PHP yang menunjukkan "PHP Parse Error: syntax error, tak terduga $ akhir" kesalahan dan aku mengikuti petunjuk di halaman ini dan dikoreksi php.ini dari OFF ke ON.
Now, the file don't give any feedback when I open it. Sekarang, file tidak memberikan umpan balik ketika aku membukanya. It only gives me a blank page and no info! Hanya memberikan saya sebuah halaman kosong dan tidak ada info! O_o O_O
It's strange… Can you help me please? Aneh ... Can you help me please? Thanks. Terima kasih.
December 20th, 2006 04:57 20 Desember 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. Aku melihat posting Anda dan membuat perubahan ke file php.ini dan aku masih mendapatkan error yang sedang dijalankan dengan Fedora Core 5 dengan MySql 5.
Can someone please help Dapatkah seseorang please help
0) 0)
{ (
while ($row = mysql_fetch_assoc($result)) while ($ row = mysql_fetch_assoc ($ hasil))
{ (
print $row('cust_id') . print $ row ( 'cust_id'). '-' . '-'. $row('cust_url_desc') ; $ row ( 'cust_url_desc');
} )
} )
else lain
{ (
echo 'No rows found!'; echo 'Tidak ada baris yang ditemukan!';
} )
mysql_free_result($result); mysql_free_result ($ result);
mysql_close($connection); mysql_close ($ koneksi);
?> ?>
August 22nd, 2006 22:49 22 Agustus 2006 22:49
Thanks for this post…saved me a lot of time! Terima kasih untuk posting ini ... menyelamatkan saya banyak waktu!
May 14th, 2006 23:30 14 Mei 2006 23:30
thanks a lot, thanks a lot,
short_open_tag = On solved that problem for me short_open_tag = On memecahkan masalah bagi saya