NamePros
Welcome, Guest! Ready to make a name for yourself in the domain business? We welcome both the hobbyist and professional domainer to join the discussion as part of the NamePros community.

Click here to create your profile to start earning reputation for posting, and trader ratings for buying & selling in our free e-marketplace. Build your trader rating with each successful sale. Our system has tracked over 100,000 sales and counting!
FAQ & TOS Register Search Today's Posts Mark Forums Read

Go Back   NamePros.com > Website Development Discussion Forums > Programming
Reload this Page Parse error

Programming PHP, Perl, Ruby on Rails, AJAX, HTML, XHTML, CSS, JavaScript, MySQL and any other coding topics.

Advanced Search


Closed Thread
 
LinkBack Thread Tools
Old 02-21-2007, 04:30 AM THREAD STARTER               #1 (permalink)
First Time Poster!
Join Date: Feb 2007
Posts: 1
amsbake is an unknown quantity at this point
 



Parse error


Please allow me to use this medium to ask..if am inthe right place ..i uploaded a file to my webserver and when i try calling the file from my website it gives me an error like this below what could be the possible problem .

Parse error: parse error, unexpected T_STRING in D:\Domains\beaverbox.net\wwwroot\windowsdoc.php on line 1
amsbake is offline  
Old 02-21-2007, 09:10 AM   #2 (permalink)
NamePros Regular
 
beaver6813's Avatar
Join Date: May 2005
Location: England
Posts: 392
beaver6813 is a jewel in the roughbeaver6813 is a jewel in the roughbeaver6813 is a jewel in the rough
 




Okay can you paste the top few lines of code from windowsdoc.php so we can help better please
beaver6813 is offline  
Old 02-21-2007, 09:50 AM   #3 (permalink)
NamePros Expert
 
Peter's Avatar
Join Date: Nov 2003
Location: Scotland
Posts: 5,069
Peter has a reputation beyond reputePeter has a reputation beyond reputePeter has a reputation beyond reputePeter has a reputation beyond reputePeter has a reputation beyond reputePeter has a reputation beyond reputePeter has a reputation beyond reputePeter has a reputation beyond reputePeter has a reputation beyond reputePeter has a reputation beyond reputePeter has a reputation beyond repute
 


Child Abuse Save The Children Save The Children Help The Homeless - Holiday 2009 Help The Homeless - Holiday 2009 Help The Homeless - Holiday 2009 Help The Homeless - Holiday 2009
es as beaver6813 states post your code that is in windowsdoc.php and we will be able to help, without seeing code it is somewhat difficult to know what you have done. It is strange however that the error is on line 1.
Peter is offline  
Old 02-21-2007, 10:14 AM   #4 (permalink)
Senior Member
 
Barrucadu's Avatar
Join Date: Aug 2005
Location: East Yorkshire, England
Posts: 2,689
Barrucadu is a splendid one to beholdBarrucadu is a splendid one to beholdBarrucadu is a splendid one to beholdBarrucadu is a splendid one to beholdBarrucadu is a splendid one to beholdBarrucadu is a splendid one to beholdBarrucadu is a splendid one to behold
 




Originally Posted by filth@flexiwebhost
It is strange however that the error is on line 1.
I've occasionally cause that error by missing out the '.' when using a variable in the middle of a string. So that is likely to be the cause if it is on line 1.
Barrucadu is offline  
Old 02-21-2007, 10:18 AM   #5 (permalink)
NamePros Expert
 
Peter's Avatar
Join Date: Nov 2003
Location: Scotland
Posts: 5,069
Peter has a reputation beyond reputePeter has a reputation beyond reputePeter has a reputation beyond reputePeter has a reputation beyond reputePeter has a reputation beyond reputePeter has a reputation beyond reputePeter has a reputation beyond reputePeter has a reputation beyond reputePeter has a reputation beyond reputePeter has a reputation beyond reputePeter has a reputation beyond repute
 


Child Abuse Save The Children Save The Children Help The Homeless - Holiday 2009 Help The Homeless - Holiday 2009 Help The Homeless - Holiday 2009 Help The Homeless - Holiday 2009
Originally Posted by Mikor
I've occasionally cause that error by missing out the '.' when using a variable in the middle of a string. So that is likely to be the cause if it is on line 1.
But that would cause an error on line 2.

For example the scenario you propose is as follows (although not using a variable):-

PHP Code:
<?php
echo "test" "test";
?>
This produces the following error:-

Quote:
Parse error: parse error, unexpected T_CONSTANT_ENCAPSED_STRING, expecting ',' or ';' in PHPDocument1 on line 2
php sees <?PHP as line 1
Peter is offline  
Old 02-21-2007, 10:22 AM   #6 (permalink)
Senior Member
 
Barrucadu's Avatar
Join Date: Aug 2005
Location: East Yorkshire, England
Posts: 2,689
Barrucadu is a splendid one to beholdBarrucadu is a splendid one to beholdBarrucadu is a splendid one to beholdBarrucadu is a splendid one to beholdBarrucadu is a splendid one to beholdBarrucadu is a splendid one to beholdBarrucadu is a splendid one to behold
 




Originally Posted by filth@flexiwebhost
But that would cause an error on line 2.

For example the scenario you propose is as follows (although not using a variable):-
????: NamePros.com http://www.namepros.com/programming/296823-parse-error.html

PHP Code:
<?php
echo "test" "test";
?>
Not if it was like this, I assume:

PHP Code:
<?php echo "test" "test"?>
Barrucadu is offline  
Old 02-21-2007, 10:23 AM   #7 (permalink)
Senior Member
Join Date: Dec 2006
Location: England
Posts: 1,568
Matthew. has much to be proud ofMatthew. has much to be proud ofMatthew. has much to be proud ofMatthew. has much to be proud ofMatthew. has much to be proud ofMatthew. has much to be proud ofMatthew. has much to be proud ofMatthew. has much to be proud ofMatthew. has much to be proud of
 


Adoption Breast Cancer Breast Cancer Cancer Survivorship
Edit: Another reason for me to refresh, beaten to it heh.

It's not uncommon for people to just do this:
PHP Code:
<?php $this =...
It shouldn't be done, but i've seen it - It would explain the line 1 error anyway.
????: NamePros.com http://www.namepros.com/showthread.php?t=296823

Perhaps we should just wait for the code
Last edited by Matthew.; 02-21-2007 at 10:29 AM.
Matthew. is offline  
Old 02-21-2007, 10:28 AM   #8 (permalink)
NamePros Expert
 
Peter's Avatar
Join Date: Nov 2003
Location: Scotland
Posts: 5,069
Peter has a reputation beyond reputePeter has a reputation beyond reputePeter has a reputation beyond reputePeter has a reputation beyond reputePeter has a reputation beyond reputePeter has a reputation beyond reputePeter has a reputation beyond reputePeter has a reputation beyond reputePeter has a reputation beyond reputePeter has a reputation beyond reputePeter has a reputation beyond repute
 


Child Abuse Save The Children Save The Children Help The Homeless - Holiday 2009 Help The Homeless - Holiday 2009 Help The Homeless - Holiday 2009 Help The Homeless - Holiday 2009
Originally Posted by Mikor
Not if it was like this, I assume:
????: NamePros.com http://www.namepros.com/showthread.php?t=296823

PHP Code:
<?php echo "test" "test"?>
Just checked and you are right. I was personally expecting it to say it was on line 2 still as php does not tend to care about white space.

Originally Posted by Matthew.
Perhaps we should just wait for the code
Perhaps you are right was just wondering why an error occured on line 1 and now i know
Peter is offline  
Closed Thread


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


Liquid Web Smart Servers  
All times are GMT -7. The time now is 07:45 AM.

Managed Web Hosting by Liquid Web
Domain name forum recommended by Domaining.com Powered by: vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.6.0 Ad Management plugin by RedTyger