Go Back   TechArena Community > Software > Software Development
Become a Member!
Forgot your username/password?
Tags Active Topics RSS Search Mark Forums Read

Reply
 
Thread Tools Search this Thread
  #1  
Old 20-08-2009
Member
 
Join Date: Jul 2009
Posts: 8
PHP Parse error: parse error unexpected $ in main.php on line 12

I am trying to make my project and i get don't understand why am i getting this error. The error says PHP Parse error: parse error unexpected $ in main.php on line 12. What does this error means? How do i correct the problem, Please help, I'm still a noob, hope i get some help... Thanks in advance...
Reply With Quote
  #2  
Old 20-08-2009
Member
 
Join Date: May 2008
Posts: 2,383
Re: PHP Parse error: parse error unexpected $ in main.php on line 12

The error you are receiving says that it detected "$" on the 12th line of main.php file where it should not be there. This can be due to typo error. Just have a look at the coding of main.php file and see it there is this dollar sign without it being used or it used where it is not necessary. For more help, go through the php help file regarding syntax of various php commands and instructions...
Reply With Quote
  #3  
Old 20-08-2009
Member
 
Join Date: Jan 2008
Posts: 1,515
Re: PHP Parse error: parse error unexpected $ in main.php on line 12

Which php version are you using, is it the older version or its PHP 5? Also check for this symbols in your file : "<?" If you have used it, try to change it to "<?php". Also open the php.in file and try to enable "register globals". See what you get. If you get any errors, do post back, if not then you got your problem solved. All the best!
Reply With Quote
  #4  
Old 20-08-2009
Member
 
Join Date: Jul 2009
Posts: 8
Re: PHP Parse error: parse error unexpected $ in main.php on line 12

Thanks a lot guys, for replying to my post, Well i will try out the thing both of you said as soon as i get home. Also i have just removed the older PHP version and installed PHP 5. I hope this works out, if it doesn't i will post back. Thanks again...
Reply With Quote
Reply

  TechArena Community > Software > Software Development
Tags: ,



Thread Tools Search this Thread
Search this Thread:

Advanced Search


Similar Threads for: "PHP Parse error: parse error unexpected $ in main.php on line 12"
Thread Thread Starter Forum Replies Last Post
Sysprep error: Windows could not parse or process the unattend answer file for pass WaseemA Operating Systems 6 13-08-2010 10:10 PM
How to add parse in scanner in java? MAGAR Software Development 5 02-03-2010 04:30 PM
How to parse XML in J2ME Abigail101 Software Development 5 19-02-2010 03:39 AM
How to Parse XML in ASP Dwarner Software Development 4 24-01-2010 04:27 AM
PHP WordPress Parse Error: syntax error, unexpected $end in Bisujaksha Software Development 2 22-05-2009 09:27 AM


All times are GMT +5.5. The time now is 06:26 AM.