parse-error

PHP Parse Error

I am trying to add an echo statement after the line: echo '<td class="today" valign="top"><a class="monthnav" href="dayPlanner.php?d='.$day.'">'.$day.'</a></td>'; It is just a simple echo ''; (Really I am trying to break the line up to not include the in the same echo statement, so I can insert some more code later. I however am ge...

PHP parse error when referencing a string

I have the following constant defined in my PHP script: define("MODULE_PATH", "D:\\modules\\"); Whenever I try and assign the constant to a variable or as a function argument, I get a PHP parse error (with no explanation). var $jim = MODULE_PATH; var $fh = fopen(MODULE_PATH . "module1.xml"); Both above lines throw the parse erro...

Parser error using Perl XML::DOM module, "reference to invalid character number"

I am a complete Perl newb, but I am certain that learning Perl will be easier than figuring out how to parse XML in awk. I would like to parse the .sgm files from this dataset: http://kdd.ics.uci.edu/databases/reuters21578/reuters21578.html This is a collection of 20,000 Reuters articles from newswire from a decade ago, and is a stand...

Moving MVC from Dev to Prod causes Parse Error

In moving my MVC app from dev to prod, I get a parse error on the server. The only message I get is the following: Parser Error Message: Could not load type 'System.Web.Mvc.ViewPage<TYPE of View Model>'. Line 1: <%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<TYPE o...

How to set ASP.NET label text to current user name

I am trying to set a user name to a label, but not sure if this is the right syntax - adding following markup generates a parse error <asp:Label ID="userNameLabel" runat="server" Text='<%= User.Identity.Name.Split(new char[]{'\\'})[1] %>' /> The main problem here is that, I do not know what <%= %> or <%# %> are called, thus cann...

PHP : Custom error handler - handling parse & fatal errors

How can i handle parse & fatal errors using a custom error handler? ...

parse error in php code

I just started php and I want to know how to make this parse error work. This is the error: Parse error: parse error in E:\wamp\www\PHP\create.php on line 22 And here is my code, by the way I'm making a database manipulating system. And I use wampserver and dreamweaver. <?php include 'E:\wamp\www\PHP\connection.p...

php parse error always on the last line

I'm trying to read a comment that is stored in a mysql table. For some reason I always get a parse error on the last line of the file even if the last line is blank. I'm not sure if it's relevant but the connect.php works for putting the comment into the database. I'm using wampserver to host it and coding it by hand. I think that's it'...

XML Parsing Error: junk after document element

I am using the following script to generate a RSS feed for my site: <?php class RSS { public function RSS() { $root = $_SERVER['DOCUMENT_ROOT']; require_once ("../connect.php"); } public function GetFeed() { return $this->getDetails() . $this->getItems(); } private function dbCo...

Logging fatal/parse errors in PHP5

I'm writing an error logging service that will be integrated into websites running on my server, that will email me error batches, etc. So I've been trying to find out if there's a way to handle fatal and parse errors, however not using the tricks to handle it in PHP code (output buffer, shutdown function). I'm quite happy to write some...

Custom Control in ASP.NET C#

Hello all, I created a simple custom control that only inherits from the Literal control, and doesn't have any extensions yet, code is empty. Namespace: CustomControls Class name: Literal : System.Web.UI.WebControls.Literal Next thing I do is registering this control in the aspx page as following: <%@ Register TagPrefix="web" Namesp...

Parse error when concat'ing a defined variable and string in a class!

Hi guys, I have defined a variable in a separate config file: define('URL', 'someurl.co.uk'); However, when I try to use it to concat with a string inside a class: class AdminEmail extends Email { private $from = "jsmith".URL; I get the following error: Parse error: parse error, expecting `','' or `';'' But if I echo it ou...

PHP endforeach parse error

Hi folks, I'm learning PHP and CakePHP and I have a problem with the following code. When I execute it (with WAMP: PHP 5.3.0, Apache 2.2.11 and MySql 5.1.36) appears a parse error in the line of endforeach. Somebody knows what is happend? All the documentation I read it says that the endforeach; is legal but... I have a problem :-( Tha...

How to tell when a PHP Fatal Error is really a veiled Syntax Error, and when do they happen?

Considering the following PHP class: class someObject { public function broken(){ return isset($this->something()) ? 'worked' : 'didnt'; } public function something(){ return true; } public function notBroken(){ print('worked'); } } Let's say I now do: $obj= new someObject(); $obj->br...

PHP doesn't like creating an array of objects..

Hey, I am writing a customer management system in PHP, for use offline (i.e. on the clients computer). I have considered using Java or C# but have come to the conclusion that it is easier to let the browser do all the layout for me, and just have the company install wamp on their computers. Through this interface they will also be able...

Parse Error - Concatinating string PHP

Hi, I am trying to concatinate the following: (I'm just including snippets of code to demonstrate where the variables are coming from) $realexdate = date('Ymdhis', strtotime($date)); $currency = "EUR"; while($row = mysql_fetch_array($sql2, MYSQL_ASSOC)) { $cost_record = $row['cost']; } while($row = mysql_fetch_array($sql4, MY...

PHP Version 5.2.14 / Parse error: syntax error, unexpected T_FUNCTION, expecting ')'

Hi, I have a certain piece of code that I'm trying to use with PHP Version 5.2.14 . Is it incompatible?? I run the following, jailshell-3.2$ php -l /XYZ/functions.php And it gives: Parse error: syntax error, unexpected T_FUNCTION, expecting ')' in /XYZ/functions.php on line 2115 Errors parsing /XYZ/functions.php The code...

Please help me to recover parse error in my code

Hello, I have this weird problem, I know how to select and insert, BUT I don't know how to UPDATE, well at least I thought I did. And all of the code from tutorials brings back errors. Here's the error I'm getting: ...