User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the PHP section within the Web Development category of DaniWeb, a massive community of 456,611 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 3,409 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our PHP advertiser: Lunarpages PHP Web Hosting
Views: 780 | Replies: 8
Reply
Join Date: Nov 2007
Posts: 3
Reputation: mercuryserve is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
mercuryserve mercuryserve is offline Offline
Newbie Poster

PHP Parse Error

  #1  
Nov 7th, 2007
Hi. I have extraordinarily limited knowledge of (in?) PHP. Anyway I was trying to fiddle with my website and I did something such that when I click on a menu item on my website I get this message:

Parse error: parse error, unexpected ':' in /home/mercurys/public_html/preview.php on line 46

Other than sit down, shut up, and hire an expert what advice can anyone give me on how to fix this problem asap?

Thanks in advance....
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Sep 2007
Location: Buenos Aires
Posts: 30
Reputation: chmazur is an unknown quantity at this point 
Rep Power: 2
Solved Threads: 2
chmazur's Avatar
chmazur chmazur is offline Offline
Light Poster

Re: PHP Parse Error

  #2  
Nov 7th, 2007
Can you show your script?
Probably you must write ';' instead of ':'

ch.-
Reply With Quote  
Join Date: Nov 2007
Posts: 3
Reputation: mercuryserve is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
mercuryserve mercuryserve is offline Offline
Newbie Poster

Re: PHP Parse Error

  #3  
Nov 7th, 2007
thanks, here it is. I appreciate your assistance.

<?include("inc/site_defenitions.inc");?>

<html>
<head>
<title>Florida Process Server Process Serving Service of Process</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link href="includes/global.css" rel="stylesheet" type="text/css">

</head>

<script src="http://www.google-analytics.com/urchin.js" type="text/javascript">
</script>
<script type="text/javascript">
_uacct = "UA-2778641-2";
urchinTracker();
</script>

<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0"><TABLE height="100%" cellSpacing=0 cellPadding=0 width="100%" align=center border=0>
<TBODY>
<TR>
<TD vAlign=top>
<TABLE cellSpacing=0 cellPadding=0 width="100%" border=0>
<TBODY>
<TR>
<TD><FONT face="times new roman,times,serif" size=4><STRONG>MercuryServe, Inc. - Tampa and St. Petersburg Florida</STRONG> <STRONG>Civil Process Server and Investigator.</STRONG> Tampa headquarters with offices in St. Petersburg offering local, regional, national and international reach.</FONT></TD></TR>
<TR>
<TD><FONT face="times new roman,times,serif" size=4><STRONG><IMG height=5 src="images/1x1.gif" width=5></STRONG></FONT></TD>
<TD vAlign=bottom><FONT face="times new roman,times,serif" size=4><STRONG><IMG height=5 src="images/1x1.gif" width=5></STRONG></FONT></TD></TR></TBODY></TABLE>
<TABLE style="BORDER-COLLAPSE collapse" borderColor=#111111 cellSpacing=0 cellPadding=0 width="100%" background=images/img_blue.jpg border=0>
<TBODY>
<TR>
<TD><FONT face="times new roman,times,serif" size=4><STRONG>&nbsp;</STRONG></FONT></TD></TR></TBODY></TABLE>
<TABLE style="BORDER-COLLAPSE collapse" borderColor=#111111 cellSpacing=0 cellPadding=0 width="100%" border=0>
<TBODY>
<TR>
<TD vAlign=top><FONT face="times new roman,times,serif" size=4><STRONG><IMG height=1 src="images/1x1.gif" width=1></STRONG></FONT></TD></TR>
<TR>
<TD vAlign=top bgColor=#eeeeee height=600>
<TABLE cellSpacing=0 cellPadding=3 width="100%" border=0>
<TBODY>
<TR>
<TD vAlign=top width="20%" bgColor=#000000 height=600>
<P><FONT face="times new roman,times,serif"><FONT size=4><STRONG><IMG height=72 src="images/menuHead.gif" width=160 border=0></STRONG></FONT></FONT></P>
<P>&nbsp;</P></TD>
<TD class=normal vAlign=top width="60%"><FONT face="times new roman,times,serif"><FONT size=4>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt"><?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /><o:p><FONT size=3>&nbsp;</FONT></o:p></P></FONT></FONT></TD>
<TD vAlign=top width="20%"><FONT face="times new roman,times,serif"><FONT size=4><STRONG></STRONG></FONT></FONT></TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE></body>
</html>
Reply With Quote  
Join Date: Sep 2007
Location: Budapest
Posts: 252
Reputation: fatihpiristine has a little shameless behaviour in the past 
Rep Power: 0
Solved Threads: 14
fatihpiristine's Avatar
fatihpiristine fatihpiristine is offline Offline
Posting Whiz in Training

Re: PHP Parse Error

  #4  
Nov 8th, 2007
this code has no sense.. it s html.. even u ve mistakes browser ll show up... send your codes in
site_defenitions.inc
Reply With Quote  
Join Date: Nov 2007
Posts: 3
Reputation: mercuryserve is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
mercuryserve mercuryserve is offline Offline
Newbie Poster

Re: PHP Parse Error

  #5  
Nov 8th, 2007
Here is that defenitions file - I imagine the misspelling does not matter...

<? import_request_variables(gP);?>
<?include ("includes/dbconnection.php");?>
<?if($menuid=="" && $newsid=="" && $flag!=1)
include("includes/news.php");
else
include("includes/previewnews.php");
?>
<script language="javascript" src="includes/global.js"></script>



thanks.
Bert
Reply With Quote  
Join Date: Jun 2007
Location: Valley Center, Kansas
Posts: 643
Reputation: kkeith29 is on a distinguished road 
Rep Power: 3
Solved Threads: 72
kkeith29's Avatar
kkeith29 kkeith29 is online now Online
Practically a Master Poster

Re: PHP Parse Error

  #6  
Nov 8th, 2007
which line is number 46, that would help a lot.
Reply With Quote  
Join Date: Sep 2007
Location: Budapest
Posts: 252
Reputation: fatihpiristine has a little shameless behaviour in the past 
Rep Power: 0
Solved Threads: 14
fatihpiristine's Avatar
fatihpiristine fatihpiristine is offline Offline
Posting Whiz in Training

Re: PHP Parse Error

  #7  
Nov 8th, 2007
thats what i asked
Reply With Quote  
Join Date: Sep 2007
Location: Buenos Aires
Posts: 30
Reputation: chmazur is an unknown quantity at this point 
Rep Power: 2
Solved Threads: 2
chmazur's Avatar
chmazur chmazur is offline Offline
Light Poster

Re: PHP Parse Error

  #8  
Nov 8th, 2007
I think that the line 46 is on file news.php, or previewnews.php (after being included on site_defenitions.inc ).

On the other hand, your have an mistake with your Analitycs script.
It must be just before the </body> tags.
Example:
<google script>
</body>
</html>

ch.-
Reply With Quote  
Join Date: Oct 2007
Posts: 145
Reputation: hopalongcassidy is an unknown quantity at this point 
Rep Power: 2
Solved Threads: 13
hopalongcassidy's Avatar
hopalongcassidy hopalongcassidy is offline Offline
Junior Poster

Re: PHP Parse Error

  #9  
Nov 9th, 2007
The colon ( that the error message is referring to might be in your include file. How about sharing that with us as well?

Hoppy
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

DaniWeb PHP Marketplace
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

Thread Tools Display Modes

Similar Threads
Other Threads in the PHP Forum

All times are GMT -4. The time now is 7:19 am.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC