Categories
05/06/2014
Install curl Module under Nginx+FastCGI (Nginx+FastCGI环境安装curl插件)
By dch1 in Web Log No Comments Tags: VPS, Web Design
Situation: I had an issue today when I was trying to upgrade the “WordPress Mobile Pack” plugin from WordPress. The wp-admin page remained blank so I was wondering something went wrong. I tried to delete the WMP plug-in and re-install it, but it was still the same problem.
Action: After I read the error_logs under my website folder, I grabbed the information as follows:
2014/06/05 16:00:26 [error] 13539#0: *1 FastCGI sent in stderr: “PHP Fatal error: Call to undefined function curl_init() in /****/wp-content/plugins/wordpress-mobile-pack/core/class-admin.php on line 41″ while reading response header from upstream, client: 108.162.249.186, server: www.blog.bjdch.org, request: “GET /wp-admin/ HTTP/1.1”, upstream: “fastcgi://127.0.0.1:9000”, host: “blog.bjdch.org”
I made a note on official website to let them know:
http://wordpress.org/support/topic/makes-my-wp-admin-page-because-of-a-php-error-in-the-plugin-files
There were multiple error_logs but they just got repetitively. It said that curl_init() is undefined. Now everything came to a turning point.
Result: I did some research and I realised that CURL is a function of PHP so I need to get it installed.
sudo apt-get install php5-curl
However, I tried to restart the php5-fpm and Nginx service in Debian but nothing happened (I got a PHP probe installed to check whether the module installed correctly). I tried to reboot the machine and everything was working again!
Hint: Do NOT try to edit the php.ini (put “extension=curl.so“) after you get curl module installed. The module package will automatically put a file called “20-curl.ini” under /etc/php5/cgi/conf.d so the curl module will start with the program.
The probe program is found to be very useful during troubleshooting, however you can use phpinfo instead.
07/06/2014
Frozen in Winter – Just in Time (《冰雪奇缘》)
By dch1 in Just Notes No Comments
这几天娱乐活动很丰富啊,基本上一天一部电影,而且还都是用4G网络(传说中的免流量费)。平均一部一个半小时的电影,需要2G左右的流量,这流量要是收费估计就没人能看得起了。
Telstra的网络有个特点,每天凌晨大概12点左右会对前一天傍晚产生的流量进行归类,目的是确定免费和收费流量,所以看完电影超流量系统也暂时不限速(因为系统不知道用过的流量是不是收费部分的),一切都等午夜算账。所以要想疯狂下载,选择早上开始还是正确的选择,疯狂挂下来估计也得有N个G了,我上个月最后一天晚上疯狂看youtube,干掉接近2G,凌晨才发来限速邮件,但已经是新的一个月了。
话说想看Frozen这部电影已经很久了,赶在去年圣诞节上映的《霍比特人-2》就看到了Frozen的海报,一直想去影院看,谁知过了一段时间就下架了。之前看过Frozen的电子书,当然就是给小孩子看的有声书(前几天苹果商店限免),对大致故事情节还是了解的。
总体迪士尼和皮克斯工作室出品的电影都还是比较细腻的,之前看的那个Brave一个套路的作品(个人感觉),但丝毫没有乏味的重复。《冰雪奇缘》这部动画片应该也是属于全年龄段都能看的片子,在片中是不是穿插一些歌曲,拓展故事情节,更加生动、形象。
这几天看的电影,包括《冰雪奇缘》这部一共是三部,前两部都是Telstra免费送的,这种营销模式还不错,等用户看上瘾了,自然会掏腰包的。就是不知道Mac系统播放Bigpond电影为何强制窄屏,很不解,三部都是这样。