Web Hosting Talk


Go Back   Web Hosting Talk : Web Hosting Main Forums : Programming Discussion : Warning: Unexpected character in input: '\' (ASCII=92) HELP
Reply

Programming Discussion Discussions related to web programming languages and other related issues. Topics may include configuration, optimization, practical usage and database connectivity.

 
Thread Tools Search this Thread Display Modes
  #1  
Old 08-04-2007, 04:05 AM
haleyhosting_com haleyhosting_com is offline
View Beta Profile
WHT Addict
 
Join Date: Aug 2004
Posts: 106
Warning: Unexpected character in input: '\' (ASCII=92) HELP

Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /home/xxxxxx/public_html/index.php on line 1

Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /home/xxxxxx/public_html/index.php on line 1

Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /home/xxxxxx/public_html/index.php on line 1

Parse error: syntax error, unexpected T_CHARACTER, expecting T_STRING or T_VARIABLE or T_NUM_STRING in /home/xxxxxx/public_html/index.php on line 2

i have no clue what went wrong.. what did i do...can anyone help me..
my site is http://upithere.info. im getting this error on my front page. the index.php ...

__________________
HaleyHosting.com


Last edited by haleyhosting_com; 08-04-2007 at 04:15 AM.
Reply With Quote
Sponsored Links
  #2  
Old 08-04-2007, 04:35 AM
easytouch easytouch is offline
View Beta Profile
Newbie
 
Join Date: Aug 2005
Location: Vienna, Austria
Posts: 17
HowTo PHP - avoid the slashes problem

maybe somewhere in your database data are slashes ' ?

If you move from one server to another the PHP Version and php.ini settings can differ from the old one.

I hope the following article can give you ideas how to master the magic quotes and stripslashes/addslashes problem:
http://lists.evolt.org/archive/Week-...12/120447.html

Reply With Quote
  #3  
Old 08-04-2007, 06:50 AM
GHDpro GHDpro is offline
View Beta Profile
Junior Guru
 
Join Date: Nov 2000
Location: Holland
Posts: 198
Afaik that error simply means you got a stray backslash where PHP doesn't expect it.

Check line 1 of that script and remove any backslashes that seem out of place.

PS. a text editor with PHP syntax highlighting is great for these kind of issues.

PS 2: Note that PHP interprets "\" as an unterminated string containing just a quote ("). A backslash is an escape character. To get a backslash in this case, enter it twice: "\\" is a string with a single backslash.

Reply With Quote
Sponsored Links
  #4  
Old 08-04-2007, 01:00 PM
Steve_Arm Steve_Arm is offline
View Beta Profile
Community Guide
 
Join Date: Jan 2006
Location: Athens, Greece
Posts: 1,311
I would a guess a \"

Reply With Quote
  #5  
Old 08-05-2007, 04:06 AM
haleyhosting_com haleyhosting_com is offline
View Beta Profile
WHT Addict
 
Join Date: Aug 2004
Posts: 106
thanks guys you were all right.. there were a bunch of slashes in the file. until this i never knew anything about php but now im interested. thanks again guys

__________________
HaleyHosting.com

Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes
Postbit Selector

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

Forum Jump
Login:
Log in with your username and password
Username:
Password:



Forgot Password?
Advertisement: