close ad
Install the LAtest Updates to Work with CC 2017 and CC 2018
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Parse error: syntax error, unexpected T_VARIABLE

Thread began 7/08/2013 10:22 am by Heckie | Last modified 7/08/2013 11:34 am by Heckie | 687 views | 6 replies |

Heckie

Parse error: syntax error, unexpected T_VARIABLE

I am getting the following error on some product pages:
Parse error: syntax error, unexpected T_VARIABLE in /home/eagle/public_html/concierge/groceries/beer-cider.php on line 1

They work fine on local testing server, but not on remote server.

I cannot see any syntax error on the first line (attached), as it is just the standard WA require once lines.

I am using Dreamweaver CC on Mac.

Sign in to reply to this post

Jason ByrnesWebAssist

I dont see anything obvious.

I'll need to troubleshoot directly, see the private message section.

Sign in to reply to this post

Heckie

Randomly if I 'save as' to a different folder (one level up) updating links, then 'save as' again (updating links again), overwriting the original, it seems to work fine! Maybe a DW bug?

I have noticed strange behaviour using the Server Behaviours panel i.e. when you select a behaviour, it select random lines in the HTML, and if you make changes it can insert the code into random lines.

Has anyone else noticed this?

I have provided the details below.

Sign in to reply to this post

Jason ByrnesWebAssist

What are you using to upload the files to the Server?

when i download a file from the FTP Server, the code has been compressed to one line and corrupted. for example:

php:
<?php//WA eCart Includerequire_once("../WA_eCart/cartEagleBrae_PHP.php");?><?php require_once('../../Connections/connEagleBrae.php'); ?><?php$cartEagleBrae->GetContent();?><?phpif (!function_exists("GetSQLValueString")) {function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "") {  if (PHP_VERSION < 6) {    $theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;  }  $theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);  switch ($theType) {    case "text":      $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";      break;        case "long":    case "int":      $theValue = ($theValue != "") ? intval($theValue) : "NULL";      break;    case "double":      $theValue = ($theValue != "") ? doubleval($theValue) : "NULL";      break;    case "date":      $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";      break;    case "defined":      $theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;      break;  }  return $theValue;}}mysql_select_db($database_connEagleBrae, $connEagleBrae);$query_rsProducts = "SELECT * FROM Products WHERE ProductCat = 2";$rsProducts = mysql_query($query_rsProducts, $connEagleBrae) or die(mysql_error());$row_rsProducts = mysql_fetch_assoc($rsProducts);$totalRows_rsProducts = mysql_num_rows($rsProducts);?



Try using a 3rd party ftp program like File Zilla.

Sign in to reply to this post

Heckie

I was using Dreamweaver CC, but Ive re-uploaded with 3rd party software and seems to work.

Thanks.

Sign in to reply to this post

Jason ByrnesWebAssist

Perhaps a Setting in Dreamweaver is causing the issue. Under DW Settings, go to Code Format and set the Line Break type to LF (Unix).

If you continue to have problems, i would contact Adobe support.

Sign in to reply to this post

Heckie

Thanks. I deleted the folder from the server, and re-uploaded with DW CC to test, and it seem to work fine now.

Sign in to reply to this post

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...