[advanced search]
 

Go Back   NamePros.com > Discussion > Web Design & Development > Programming

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


Closed Thread
 
LinkBack Thread Tools
Old 02-21-2007, 03:30 AM   #1 (permalink)
First Time Poster!
 
Join Date: Feb 2007
Posts: 1
0.00 NP$ (Donate)

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, 08:10 AM   #2 (permalink)
NamePros Regular
 
beaver6813's Avatar
 
Join Date: May 2005
Location: England
Posts: 349
65.50 NP$ (Donate)

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.com V5 Soon!
beaver6813 is offline  
Old 02-21-2007, 08:50 AM   #3 (permalink)
Senior Member
 
Peter's Avatar
 
Join Date: Nov 2003
Location: Scotland
Posts: 4,900
0.60 NP$ (Donate)

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, 09:14 AM   #4 (permalink)
Barru.
 
Barrucadu's Avatar
 
Join Date: Aug 2005
Location: East Yorkshire, England
Posts: 2,731
78.50 NP$ (Donate)

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


Quote:
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 online now  
Old 02-21-2007, 09:18 AM   #5 (permalink)
Senior Member
 
Peter's Avatar
 
Join Date: Nov 2003
Location: Scotland
Posts: 4,900
0.60 NP$ (Donate)

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
Quote:
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, 09:22 AM   #6 (permalink)
Barru.
 
Barrucadu's Avatar
 
Join Date: Aug 2005
Location: East Yorkshire, England
Posts: 2,731
78.50 NP$ (Donate)

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


Quote:
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):-

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

PHP Code:
<?php echo "test" "test"; ?>
Barrucadu is online now  
Old 02-21-2007, 09:23 AM   #7 (permalink)
Stud Sausage
 
Join Date: Dec 2006
Location: England
Posts: 1,546
34.41 NP$ (Donate)

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.

Perhaps we should just wait for the code
__________________
My NamePros Tools
(firefox plugin, google gadget etc)

Last edited by Matthew.; 02-21-2007 at 09:29 AM.
Matthew. is offline  
Old 02-21-2007, 09:28 AM   #8 (permalink)
Senior Member
 
Peter's Avatar
 
Join Date: Nov 2003
Location: Scotland
Posts: 4,900
0.60 NP$ (Donate)

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
Quote:
Originally Posted by Mikor
Not if it was like this, I assume:

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.

Quote:
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

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Site Sponsors
Advertise your business at NamePros

All times are GMT -7. The time now is 12:52 AM.


Powered by: vBulletin® Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0
Template-Modifications by TMS
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85