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

About these ads

2 thoughts on “FreeBSD: Fatal error: Call to undefined function session_name()

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s