PHP Fatal error: Call to undefined function utf8_decode()

This occurs on a FreeBSD server. According to this post[1], I need to install php5-xmlphp5-xml. [1] http://hi.baidu.com/ericyangbj/item/8289a32771e4171d09750856

December 25, 2012 · 1 min · 17 words · kenno

FreeBSD: Fatal error: Call to undefined function session_name()

I just setup Apache and PHP on FreeBSD 9, configured a vhost, then when I tried to access it, I got the following error: Fatal error: Call to undefined function session_name() in /srv/www/sugaku.domain.com/inc/init.php on line 144 so apparently, the “session” support is missiong from php5 installation. To fix it, I need to install php5-session port. Let’s do it. # whereis php5-session<br /> php5-session: /usr/ports/www/php5-session<br /> portmaster www/php5-session If the installation is successful, then we can restart apache....

December 25, 2012 · 1 min · 89 words · kenno

PHP: number of days between two dates

It’s Saturday, what am I doing in front of the computer? I should be out and enjoy life. ^o^ A colleague asked to customize a theme for his blog using WordPress. Because I didn’t have any good plan this Saturday, learning PHP sound like a logical and useful choice. Well, I bribed myself with a bottle of Tui. Then, I found an interesting PHP related post by Chorn Sokun entitled “PHP date diff“....

July 4, 2009 · 2 min · 240 words · kenno