Tag Archives: freebsd

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.

# whereis php5-xmlphp5-xml
php5-xml: /usr/ports/textproc/php5-xml
# portmaster textproc/php5-xml
...
# service apache22 restart

[1] http://hi.baidu.com/ericyangbj/item/8289a32771e4171d09750856

Tagged , , ,

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
php5-session: /usr/ports/www/php5-session
portmaster www/php5-session

If the installation is successful, then we can restart apache.

# service apache22 restart

or

# /usr/local/etc/rc.d/apache22 restart

That’s it.

Credit: http://forums.freebsd.org/showthread.php?t=12565

Tagged , , ,

FreeBSD: How to check version of installed packages

# pkg_version -v

Running pkg_version -v could take a while. If we only want a quick look:

# pkg_info -xI

If we want to see if some packages are out of date:

# pkg_version -v -X -s

And to check all out of date packages:

# pkg_version -vL "="

Tagged

Installing FreeBSD 9 source

Well, I need FreebSD 9 source to compile fusefs-kmod, which is required by gvfs, which’s in turn required by xfce.

A lot of people recommend to use sysinstall to add the so called userland sources.

sysinstall -> Configure -> Distribution -> src

However, it didn’t work!!

Thanks to wblock@[1] who pointed out that “sysinstall is mostly dead” and suggested a few ways to get the sources to your system. One of them is:

Download the tar file that matches the version you installed. In my case it’s amd64:
# wget ftp://ftp.freebsd.org/pub/FreeBSD/releases/amd64/9.0-RELEASE/src.txz

Unpack the archive to /usr/src:
# tar -C / -xvzf src.txz

[1] http://forums.freebsd.org/showthread.php?t=29172

Tagged

Change cursor theme in Xfce on Freebsd

1. Install the preferred cursor theme. I personally like dmz-cursor-theme.

# pkg_add -r cursor-dmz-theme

2. Then, Applications Menu -> Settings -> Mouse. Click on Theme tab, select the preferred theme and click Close.

3. Log out of the current Xfce session, then log back in.

Tagged , ,
Follow

Get every new post delivered to your Inbox.