Publishing to Readyhosting / Peltlaw.com

  • 1
  • Question
  • Updated 10 years ago
  • Answered
I'm stuck. Here is my error code

"Parse error: syntax error, unexpected '&', expecting T_VARIABLE or '$' in \\NAWINFS03\home\users\web\b1405\rh.dixeedog\index.php on line 16"

readyhosting say I should ensure that

"Path to your Web document root: /home/users/web/b1405/rh.dixeedog/nt
This is important, as most of your scripts will need to specify this location. For example, this is required if you'd like your PHP script to upload files."

I have no idea what this means.
Photo of Jason

Jason

  • 2 Posts
  • 0 Reply Likes
  • not sure just what to do next.

Posted 10 years ago

  • 1
Photo of Monique

Monique, VP of Customer Support

  • 6294 Posts
  • 446 Reply Likes
Hi Jason

I am sure someone will jump in who can help you with this. In the meantime could you check for me that your host is using at least php5.2.x ?

Thanks,
Monique
Photo of Kershnee1

Kershnee1

  • 20 Posts
  • 4 Reply Likes
Hi Jason,

There appears to be a minor PHP syntax error in your index.php file. There is possibly an unquoted string somewhere or a variable not prefixed with $ etc.
Will it be possible to copy and paste a code snippet of the index.php file (specifically around line 16)?

I don't think you need to be too concerned about "Path to your Web document root" for now - unless of-course your index.php runs some type of upload script that uploads files to the server.

Thanks
Photo of Jason

Jason

  • 2 Posts
  • 0 Reply Likes
Okay first problem solved, my host was set to php 4.4.7 and they have changed it to 5.1.x (that is there lastest version) Now I know what you are going to say, 5.2.x not 5.1.x. Is this going to stop everything? I have to reload the files via FTP and try again. See a copy of the code below

display('templates/Essence/template.html');
} else {
foreach ($masterComponentList as &$component) {
if ($_REQUEST['renderCSS'] == $component->getComponentProperty('id')) {
$component->renderCSS();
break;
}
}
}

?>
Photo of Jason

Jason

  • 2 Posts
  • 0 Reply Likes
Photo of Kershnee1

Kershnee1

  • 20 Posts
  • 4 Reply Likes
Hi Jason,

There is an error in the line: $smarty?>display('templates/Essence/template.html');
It should be:
$smarty->display('templates/Essence/template.html');

Here is the full corrected code (you will need to FTP it):

display('templates/Essence/template.html');
} else {
foreach ($masterComponentList as &$component) {
if ($_REQUEST['renderCSS'] == $component->getComponentProperty('id')) {
$component->renderCSS();
break;
}
}
}

?>

Thanks!
Photo of Monique

Monique, VP of Customer Support

  • 6294 Posts
  • 446 Reply Likes
Hi Kershnee
Thanks so much for your help on this one!
Good job!
Photo of Jason

Jason

  • 2 Posts
  • 0 Reply Likes
Okay fixed the error in the line. It now reads $smarty-> The Server is set to php 5.1 (I hope that is not still the problem) I have reloaded via ftp the packet
and now when I go the site it just completely blank? Nothing. Any more help would be great.
Photo of Wayne Koorts

Wayne Koorts

  • 36 Posts
  • 10 Reply Likes
Hi Jason,

The error you first encountered was definitely because you were not on PHP 5+. I won't go into too much detail but it's basically the following line that was the problem:

foreach ($masterComponentList as &$component)

PHP 4 doesn't like the "&" before "$component", PHP 5 does.

I've run a comparison between your index.php and a new test site I have just created and exported (which works after uploading to my web server) and they are identical, except of course for the theme name.

The fact that you had some partial corruption in this file (the "?" pointed out earlier) would lead me to suspect that there is possibly some corruption elsewhere in your exported SynthaSite after you uploaded it to your web server.

Would you mind please deleting the site that you have uploaded so far, re-export from SynthaSite and re-upload to your web server again?

Regards,
Wayne