Please login or register.

Login with username, password and session length
Advanced search  

News:

Latest sNews - sNews 1.7 - with its own forums - for discussion and user mods.

Pages: [1] 2

Author Topic: T_CONSTANT_ENCAPSED_STRING in /home/myplanet/public_html/Earth/snews.php  (Read 8370 times)

impact

  • Newbie
  • *
  • Karma: 0
  • Posts: 11

Hello,
I am getting this error T_CONSTANT_ENCAPSED_STRING in /home/myplanet/public_html/Earth/snews.php on line 1198

This is my server configuration:
Apache version   1.3.39 (Unix)
PHP version   4.4.4
MySQL version   4.0.27-standard
Architecture   i686
Operating system   Linux


some one please help me on this.
Thank you,
« Last Edit: September 03, 2008, 04:35:07 am by impact »
Logged

Joost

  • Guest
Re: T_CONSTANT_ENCAPSED_STRING in /home/myplanet/public_html/Earth/snews.php
« Reply #1 on: September 03, 2008, 04:42:06 am »

It means you have an error (mistyped) on line 1198 or the line before.
You've probably forgotten a quote mark " or a semi colon (" ; ")
Logged

steerpike

  • Newbie
  • *
  • Karma: 13
  • Posts: 38
Re: T_CONSTANT_ENCAPSED_STRING in /home/myplanet/public_html/Earth/snews.php
« Reply #2 on: September 03, 2008, 04:42:33 am »

Are you navigating directly to ....Earth/snews.php in your browser?
Logged

impact

  • Newbie
  • *
  • Karma: 0
  • Posts: 11
Re: T_CONSTANT_ENCAPSED_STRING in /home/myplanet/public_html/Earth/snews.php
« Reply #3 on: September 03, 2008, 04:52:06 am »

Hello,
Thank you for replying.

well, I dint do any editing below the domain name and MYSQL settings.

When I try http://www.myplanet.in/Earth/snews.php or http://www.myplanet.in/Earth/index.php in both case it shows the same error.

Thank you again.
Logged

Joost

  • Guest
Re: T_CONSTANT_ENCAPSED_STRING in /home/myplanet/public_html/Earth/snews.php
« Reply #4 on: September 03, 2008, 05:01:46 am »

Can you tell us which sNews version you are using and post line 1198?

Logged

impact

  • Newbie
  • *
  • Karma: 0
  • Posts: 11
Re: T_CONSTANT_ENCAPSED_STRING in /home/myplanet/public_html/Earth/snews.php
« Reply #5 on: September 03, 2008, 05:04:52 am »

I am using this
# sNews 1.6 [zip] - Windows, Linux and Mac (minimal template) - UPDATED September 02, 2008

1197:        echo '<p><label for="dp">'.l('a_display_page').':</label> <select name="display_page" id="dp">';
1198:   echo '<option value="0"'.(s('display_page') ')')== 0 ? ' selected="selected"' : '').'>'.l('none').'</option>';
Logged

Joost

  • Guest
Re: T_CONSTANT_ENCAPSED_STRING in /home/myplanet/public_html/Earth/snews.php
« Reply #6 on: September 03, 2008, 05:18:09 am »

The file has been updated (bugfixed) yesterday. ;D

Replace line 1198 with the following:

echo '<option value="0"'.(s('display_page') == 0 ? ' selected="selected"' : '').'>'.l('none').'</option>';

It should work now. By the way, welcome to sNews. :)
Logged

impact

  • Newbie
  • *
  • Karma: 0
  • Posts: 11
Re: T_CONSTANT_ENCAPSED_STRING in /home/myplanet/public_html/Earth/snews.php
« Reply #7 on: September 03, 2008, 05:23:17 am »

Thank you  ;D

Looks like now the problem is here

Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING in /home/myplanet/public_html/Earth/snews.php on line 1203

1203: if (s('display_page') ')')== $r['id']) {echo ' selected="selected"';}

Thank you for your help.
Logged

Joost

  • Guest
Re: T_CONSTANT_ENCAPSED_STRING in /home/myplanet/public_html/Earth/snews.php
« Reply #8 on: September 03, 2008, 05:30:44 am »

Yes, I've watched it live. Someone has probably used search and replace for the whole file!

The red needs to be removed:
if (s('display_page') ')')== $r['id']) {echo ' selected="selected"';}

Use this instead
if (s('display_page')== $r['id']) {echo ' selected="selected"';}

There are a few more s('display_page') in the file, but these are the closest to the end, so I expect no issues any more.
Logged

impact

  • Newbie
  • *
  • Karma: 0
  • Posts: 11
Re: T_CONSTANT_ENCAPSED_STRING in /home/myplanet/public_html/Earth/snews.php
« Reply #9 on: September 03, 2008, 05:40:07 am »

Again,  :'(

This time
Parse error: syntax error, unexpected T_IS_EQUAL in /home/myplanet/public_html/Earth/snews.php on line 1203

Do you think I should any other older version ?

Thanks for your kind help.
Logged

Joost

  • Guest
Re: T_CONSTANT_ENCAPSED_STRING in /home/myplanet/public_html/Earth/snews.php
« Reply #10 on: September 03, 2008, 05:58:53 am »

I downloaded the package myself, and I could not find the errors that came with your package. So my guess is, you downloaded the package right after the wrong package was uploaded. It seems the administrator found out and uploaded the right package.
So I suggest to download the package again.
Logged

impact

  • Newbie
  • *
  • Karma: 0
  • Posts: 11
Re: T_CONSTANT_ENCAPSED_STRING in /home/myplanet/public_html/Earth/snews.php
« Reply #11 on: September 03, 2008, 06:10:00 am »

 :-X

This time it is here
Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING in /home/myplanet/public_html/Earth/snews.php on line 1215
Logged

Joost

  • Guest
Re: T_CONSTANT_ENCAPSED_STRING in /home/myplanet/public_html/Earth/snews.php
« Reply #12 on: September 03, 2008, 06:17:23 am »

You have downloaded a fresh package?  ???
Which editor do you use?
Logged

impact

  • Newbie
  • *
  • Karma: 0
  • Posts: 11
Re: T_CONSTANT_ENCAPSED_STRING in /home/myplanet/public_html/Earth/snews.php
« Reply #13 on: September 03, 2008, 06:19:30 am »

Yup, I download a fresh package. I use Macro Media dreamweaver MX 2004.

Right now I am trying with the sNews 1.5.31 [zip] - Windows and Linux

Thank you.
Logged

impact

  • Newbie
  • *
  • Karma: 0
  • Posts: 11
Re: T_CONSTANT_ENCAPSED_STRING in /home/myplanet/public_html/Earth/snews.php
« Reply #14 on: September 03, 2008, 06:21:29 am »

I think there is some problem with my server, because even that is giving me this error

Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING in /home/myplanet/public_html/Earth/snews.php on line 1012
Logged
Pages: [1] 2