Parse error: syntax error [SOLVED]

For questions and problems with the CMS core. This board is NOT for any 3rd party modules, addons, PHP scripts or anything NOT distributed with the CMS made simple package itself.
unkone
Forum Members
Forum Members
Posts: 12
Joined: Fri Oct 29, 2010 12:48 am

Parse error: syntax error [SOLVED]

Post by unkone »

Just started to receive this error today, I have not edited anyfiles.. it just started to give this error.

Any Ideas, or have you seen this before?

Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in //my domain///index.php on line 62

On my admin page, it is working I can log in but when I select a page to edit I get this error:

Fatal error: Class 'sucre.php' not found in /mydomain/html/admin/editcontent.php  on line 289

thanks!!!!
Last edited by unkone on Tue Nov 02, 2010 3:41 pm, edited 1 time in total.
unkone
Forum Members
Forum Members
Posts: 12
Joined: Fri Oct 29, 2010 12:48 am

Re: Parse error: syntax error

Post by unkone »

OK after just poking around i found my index.php was somehow altered.
After the first echo there was a:   "
I changed it to: '

And now the site works.


How could my index.php be altered???

Code: Select all

}
else if (file_exists(TMP_CACHE_LOCATION.'/SITEDOWN'))
{
	echo "<__html><head><title>Maintenance</title></head></__body><p>Site down for maintenance.</p><__body></__html>';
	echo '<p>The following directories must be writable by the web server:<br />';
	echo 'tmp/cache<br />';
	echo 'tmp/templates_c<br /></p>';
	echo '<p>Please correct by executing:<br /><em>chmod 777 tmp/cache<br />chmod 777 tmp/templates_c</em><br />or the equivilent for your platform before continuing.</p>';
	echo '<__body></__html>';
	exit;
}

I still get the error when i try to edit a page.

Code: Select all

Fatal error: Class 'sucre.php' not found in /html/admin/editcontent.php on line 289
Last edited by unkone on Fri Oct 29, 2010 5:09 am, edited 1 time in total.
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am

Re: Parse error: syntax error

Post by Dr.CSS »

Almost sounds like your host has change PHP or something...

What version of CMSMS and PHP do you have...

If your index.php has been altered then you may have been hit by cracker, check your logs to see and upload a clean index.php from the folder on your PC from the same version of CMSMS...
cyberman

Re: Parse error: syntax error

Post by cyberman »

unkone wrote: On my admin page, it is working I can log in but when I select a page to edit I get this error:

Fatal error: Class 'sucre.php' not found in /mydomain/html/admin/editcontent.php  on line 289
Have you done any modifications on your CMSms install?

sucre.php is not a CMSMS file!
unkone
Forum Members
Forum Members
Posts: 12
Joined: Fri Oct 29, 2010 12:48 am

Re: Parse error: syntax error

Post by unkone »

Dr.CSS wrote: Almost sounds like your host has change PHP or something...

What version of CMSMS and PHP do you have...

If your index.php has been altered then you may have been hit by cracker, check your logs to see and upload a clean index.php from the folder on your PC from the same version of CMSMS...


CMS Version 1.8.2

Current PHP Version 5.2.14
--
I made a clean install on my site to a different directory, and the same thing happened again. After about an hour after install my index.php is getting changed somehow. I went back in and changed the  " to ' and it works again.
This is really wacky.
unkone
Forum Members
Forum Members
Posts: 12
Joined: Fri Oct 29, 2010 12:48 am

Re: Parse error: syntax error

Post by unkone »

Have you done any modifications on your CMSms install?

sucre.php is not a CMSMS file!
No, I have not... i cannot find where sucre.php is... driving me  ??? ??? ???
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am

Re: Parse error: syntax error

Post by Dr.CSS »

Sounds like someone is hacking your server, shared servers can be vulnerable from others on it with other types of scripts running, like j**** or some such...
unkone
Forum Members
Forum Members
Posts: 12
Joined: Fri Oct 29, 2010 12:48 am

Re: Parse error: syntax error

Post by unkone »

Dr.CSS wrote: Sounds like someone is hacking your server, shared servers can be vulnerable from others on it with other types of scripts running, like j**** or some such...
Why would someone go through the trouble of changing the same " to a '  ??

Could a virus/something be doing this on my host?
cyberman

Re: Parse error: syntax error

Post by cyberman »

unkone wrote:

Code: Select all

Fatal error: Class 'sucre.php' not found in /html/admin/editcontent.php on line 289
Please make a look at this file ... there must be a call for sucre.php
unkone
Forum Members
Forum Members
Posts: 12
Joined: Fri Oct 29, 2010 12:48 am

Re: Parse error: syntax error

Post by unkone »

Ok, I had everything working correctly again. And of course I check the site right now, and now I get a differnet error.

Code: Select all

Parse error: syntax error, unexpected '&', expecting T_VARIABLE or '$' in /site/lib/page.functions.php  on line 1395
I might have to install a different cms, These errors keep popping up.. so frustrating!! :P :P
I cannot tell if its someone hacking, or some malicious code. I replace the whole admin directory from a fresh copy, and still get the error.
Last edited by unkone on Mon Nov 01, 2010 11:37 pm, edited 1 time in total.
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am

Re: Parse error: syntax error

Post by Dr.CSS »

One last try...

Reupload all folders/files for CMSMS 1.8.2, overwriting all...
unkone
Forum Members
Forum Members
Posts: 12
Joined: Fri Oct 29, 2010 12:48 am

Re: Parse error: syntax error

Post by unkone »

Dr.CSS wrote: One last try...

Reupload all folders/files for CMSMS 1.8.2, overwriting all...

Ok, started absolutely fresh. downloaded fresh copy of cms. uploaded.. I try to go to /install get this:

Parse error: syntax error, unexpected T_STRING, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}' in /html/cms/lib/test.functions.php on line 36

tried to go to admin get this:

Parse error: syntax error, unexpected '&', expecting T_VARIABLE or '$' in html/cms/lib/page.functions.php on line 1395

??? ???
cyberman

Re: Parse error: syntax error

Post by cyberman »

Which php version do you are using?
unkone
Forum Members
Forum Members
Posts: 12
Joined: Fri Oct 29, 2010 12:48 am

Re: Parse error: syntax error

Post by unkone »

cyberman wrote: Which php version do you are using?
Thanks for making me check again. It said 5.2. in my CMS admin..but it was not the case. It was 4.. I had to make a .htaccess file to turn on php 5 using this code:

Action php5-script /gs-bin/php-5.2.6-1
AddHandler php5-script .php

FIXED

Its weird that the site it was working for about a week, then pooped out.

Thanks again.
cyberman

Re: Parse error: syntax error [SOLVED]

Post by cyberman »

Sometimes hosters are needing a little bit time to switch from php4 to php5 cause the cronjob runs only one time per hour on their servers.
Post Reply

Return to “CMSMS Core”