Current location: Hot Scripts Forums » Programming Languages » PHP » PHP coding error

PHP coding error

Reply
  #1 (permalink)  
Old 06-30-09, 10:12 AM
ehaitham ehaitham is offline
New Member
 
Join Date: Jun 2009
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
PHP coding error

Hello ,

it keeps saying the same problem while i think its not an error , error is as follows :

Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in /****/****/public_html/whmcs/dbconnect.php(0) : eval()'d code on line 777

and line 777 is

$_LANG['telesignphonecall'] = "مكالمة هاتفية";

text is in arabic language . please let me know if i need arabic to be recognized also on PHP?


Please help ,thanks in advance

Last edited by ehaitham; 06-30-09 at 10:18 AM.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Share on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #2 (permalink)  
Old 06-30-09, 10:03 PM
=OTS=G-Man =OTS=G-Man is offline
Newbie Coder
 
Join Date: Jun 2009
Posts: 55
Thanks: 0
Thanked 0 Times in 0 Posts
As far as I know, PHP 5 does not support unicode strings, there is some information about it here

mainly " A string is series of characters. Before PHP 6, a character is the same as a byte. That is, there are exactly 256 different characters possible. This also implies that PHP has no native support of Unicode. See utf8_encode() and utf8_decode() for some basic Unicode functionality."
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Share on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #3 (permalink)  
Old 07-01-09, 10:59 AM
ehaitham ehaitham is offline
New Member
 
Join Date: Jun 2009
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Hey this doesn't help me alot , i need to see if the script code is write or wrong
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Share on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #4 (permalink)  
Old 07-01-09, 12:22 PM
windows7 windows7 is offline
Newbie Coder
 
Join Date: Mar 2009
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Try do change the encode of the file to something like UTF-8
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Share on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #5 (permalink)  
Old 07-01-09, 04:56 PM
=OTS=G-Man =OTS=G-Man is offline
Newbie Coder
 
Join Date: Jun 2009
Posts: 55
Thanks: 0
Thanked 0 Times in 0 Posts
Quote:
Originally Posted by ehaitham View Post
Hey this doesn't help me alot , i need to see if the script code is write or wrong
The code is written right, its the fact that your passing Unicode text into a string thats reading it as ASCII. so PHP sees a bunch of 0x06 and 0x00, in the string witch are ACK and NULL in ASCII, this is why PHP is complaining.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Share on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #6 (permalink)  
Old 07-02-09, 09:06 AM
ehaitham ehaitham is offline
New Member
 
Join Date: Jun 2009
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Quote:
Originally Posted by windows7 View Post
Try do change the encode of the file to something like UTF-8
I 've done that , and i get error in line 1
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Share on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #7 (permalink)  
Old 07-02-09, 09:21 AM
Nico's Avatar
Nico Nico is offline
Community Leader
 
Join Date: Sep 2005
Location: Spain
Posts: 7,508
Thanks: 3
Thanked 11 Times in 11 Posts
And line 1 is...?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Share on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
XML causes PHP parse error greenpig PHP 6 08-21-08 02:54 PM
[SOLVED] 500 Internal Server Error - Please help Dawn Perl 15 07-08-08 12:08 PM
using PHP to handle MySQL error Alith7 PHP 1 05-09-07 10:59 AM
PHP delete from MySQL Error (PHP ERROR) _matt PHP 3 01-31-07 01:06 PM
php error plz help darkcarnival PHP 2 11-19-03 09:14 PM


All times are GMT -5. The time now is 08:44 PM.
vBulletin® Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.