Posts Tagged ‘dreamhost’

Dreamhost流量虚惊一场

Wednesday, November 15th, 2006

前些天,收到dreamhost的信,说流量超过2048G了,超过1G一个美元,总共就是500多美元。

我都懵了,怎么可能啊,第一反应就是到后台先把网站给关了。谁知第三天又收到dreamhost的信说是又超标了,

总共1000多美元。当时不知道怎么办了,那么多dollar,想了下还是先把信用卡给取消了。然后给dreamhost客服

email了,等了一天终于收到信,原文内容如下:

I apologize for the inconvenience that this has caused you. This was
likely caused by a bug in our Apache installation which counted partial
downloads as full downloads. I’ve just removed your bandwidth overage
charges and you do not currently owe us any money.

忐忑不安的心终于是定下来了,看来dreamhost还是不太稳定啊。。

恩,要重点感谢下我的校友VeryWord,从他那知道还有个人跟我的情况差不多,不过他是4000多美元。

Dreamhost是害人不浅啊。。

dreamhost空间优惠

Monday, October 9th, 2006

放假回来,打开dreamhost后台管理界面,发现空间容量和流量都增大了10倍,如下图:

原来是有这样一个优惠活动。可以使用“9999”的优惠代码,不过现在不清楚是不是还有效。

当初,我买这个空间的时候也创建了一个优惠码MANBOO

dreamhost偶尔是会上不去,速度慢,但是总的来说还是比较好的,我想我会继续使用下去的。

Dreamhost空间如何自动解压?

Saturday, August 5th, 2006

今天会用Telnet远程登录到Dreamhost了,并且会用unzip命令来解压缩zip文件了。

首先,要在Dreamhost设置界面里为你的FTP登录帐号启用Shell功能,

然后将需要压缩的zip文件用FTP上传到空间。

然后,开始->运行->cmd

在DOS界面,输入 telnet lifesaver.dreamhost.com

接下来输入用户名和密码(FTP帐号)就可以登录了。

下面就可以用cd, dir ,等命令到相应的文件夹,

再运行 unzip ***.zip 即可。

其实用webftp也可以自动解压缩,而且速度应该更快。
上传的时候支持zip, tar, tgz, gz格式的压缩文件,自动给你解压缩了。
美中不足的是最大只可以7M。


Technorati : ,
Del.icio.us : ,
Ice Rocket : ,

extern.php,Dreamhost,curl

Friday, July 28th, 2006

我的论坛是用的punbb导入数据以后,发现在其它页面要显示最新帖子的代码不行了,
错误如下:
Warning: include() [function.include]: URL file-access is disabled in the server configuration in /home/.freight/topcool/blog.manboo.info/wp-content/themes/manboo/sidebar.php on line 351
原来下面这句话已经不能用了:


include('http://forums.manboo.info/extern.php?action=active');
?>

原因是Dreamhost将allow_url_fopen设为off了。
punbb和google搜索了下,解决方法是使用$curl用下面的代码,注意根据情况修改红色那句。


$curl_handle = curl_init();
// Where should we get the data?
curl_setopt ($curl_handle, CURLOPT_URL, 'http://forums.manboo.info/extern.php?action=active');
// This says not to dump it directly to the output stream, but instead
// have it return as a string.
curl_setopt ($curl_handle, CURLOPT_RETURNTRANSFER, 1);
// the following is optional, but you should consider setting it
// anyway. It prevents your page from hanging if the remote site is
// down.
curl_setopt ($curl_handle, CURLOPT_CONNECTTIMEOUT, 1);
// Now, YOU make the call.
$buffer = curl_exec($curl_handle);
// And tell it to shut down (when your done. You can always make more
// calls if you want.)
curl_close($curl_handle);
// This is where i’d probably do some extra checks on what i just got.
// Paranoia pays dividends.
print $buffer;
?>

来源:http://blog.unitedheroes.net/archives/p/1630/

我恼火的是开始改了上面那个代码,并没有显示出来,我以为代码不对,就又去找其它方法。浪费了好多时间,其实是要在论坛里新发一个帖子,激活下才可以显示。