手机浏览 RSS 2.0 订阅 膘叔的简单人生 , 腾讯云RDS购买 | 超便宜的Vultr , 注册 | 登陆
浏览模式: 标准 | 列表2013年04月7日的文章

proftpd 问答

Frequently Asked Questions
Question: Why do I see the following when my proftpd starts up?

  getaddrinfo 'hostname' error: No address associated with hostname   warning: unable to determine IP address of 'hostname' 

Answer: This error is ProFTPD's way of reporting that it was unsuccessful in resolving hostname to an IP address. Fixing this is a matter of configuring DNS for that hostname: properly set up an IP address for that DNS name in your DNS server, use a DNS name that has an IP address, or (as a quick fix/last resort) add that DNS name to your /etc/hosts file. The proper solution depends largely on the circumstances.

Question: If proftpd resolves any DNS names to IP addresses when it starts up, and I am using dynamic IP addresses which change after my proftpd has started, will proftpd see my new IP addresses?
Question: Unfortunately not. ProFTPD has no easy way of handling dynamic IP addresses by itself. One way of dealing with this situation is to restart proftpd periodically, which will force it to re-parse its configuration and thus re-resolve all IP addresses.

Question: What if I do not want proftpd to use DNS to resolve the hostname to an IP address because I am in an environment where there is no DNS at all?
Answer: In ProFTPD 1.3.3rc1, support for a new -S command-line option was added. This option can be used to specify the IP address of the host machine. By default, proftpd attempts to resolve the host IP address by using DNS resolution of the hostname. However, in cases where DNS is not configured for the host machine, this approach does not work.

To specify the desired IP address, use -S when starting proftpd, e.g.:

  /usr/local/sbin/proftpd -S 1.2.3.4 ... 

And if you want proftpd to listen on all interfaces, you can specify a wildcard socket using an IP address of 0.0.0.0:

/usr/local/sbin/proftpd -S 0.0.0.0 ...

Note that will also mean that, in your proftpd.conf, any <VirtualHost> sections will need to use IP addresses, not DNS names.

Tags: proftpd

PHP 飞信类

偷了个懒,代码扔在github上了。
用法也很简单:

    $fetion = new PHPFetion('用户名','密码');     $fetion->send('对方手机','信息');     会自动识别自己还是对方。(非好友不能发哦)

也实现了$fetion->multiSend,但我偷了个懒,直接循环用send发送了。
事实上,可以在刚登录的时候,利用group先将好友列表拉回来,然后就方便了。但觉得这样就复杂了。何必呢。。一般在用飞信的时候,也很少会用到群发功能吧。所以,我还是循环的send。黑黑

代码地址:https://github.com/neatstudio/yiiextension
欢迎围观

Tags: 飞信, fetion