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/ 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


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

That’s it.


CentOS: lsb_release: command not found

First let me declare that I’m new to CentOS. The folowing is a note to self which demonstrates how we search for a package that provides some commands and intall it using yum on CentOS.

When I ran ‘lsb_release -a’, the following message is returned:

-bash: lsb_release: command not found

To fix it, we need to install the package which provides lsb_release command.

# yum provides */lsb_release
redhat-lsb-4.0-3.el6.centos.i686 : LSB base libraries support for CentOS
Repo        : base
Matched from:
Filename    : /usr/bin/lsb_release

redhat-lsb-4.0-3.el6.centos.x86_64 : LSB base libraries support for CentOS
Repo        : base
Matched from:
Filename    : /usr/bin/lsb_release

dkms- : Dynamic Kernel Module Support Framework
Repo        : epel
Matched from:
Filename    : /usr/lib/dkms/lsb_release

So, let’s install redhat-lsb package:

# yum install redhat-lsb

Transaction Summary
Install     106 Package(s)

Total download size: 86 M
Installed size: 246 M
Is this ok [y/N]: 

Wow, the insalled size of 246 M? No, it’s not ok.

Update (6/01/14):
Corrected typo in this post, thanks to Shawn:
lbs_release lsb_release: command not found