No session support in default PHP installation

Installing and maintaining the FreeBSD Ports Collection or FreeBSD Packages (i.e. third party software).

No session support in default PHP installation

Postby aurora72 » 22 Mar 2010, 23:25


I've just installed PHP from ports collection and it installed itself as PHP 5.2.12. Now everything seems fine because when I type several basic PHP lines (e.g. <?php phpinfo(); ?>)
it works.

But later when I attempted to install a CMS program called MODx, because it contained the function session_cache_limiter() in its install script, the PHP gave this error:

Fatal error: Call to undefined function session_start() in /Library/WebServer/modx/install/index.php on line 12

and so I stopped there and examined the phpinfo page. Another PHP (5.2.12) installation which works correctly in another server (Mac OS X 10.5.8), I noticed a section called Session and it started with "Session Support: enabled"

In my FreeBSD PHP, there's no mention of such a support at the phpinfo page.

For your information here is the Configure Command of my FreeBSD server:

Code: Select all
'./configure' '--with-layout=GNU' '--with-config-file-scan-dir=/usr/local/etc/php'
 '--disable-all' '--enable-libxml' '--with-libxml-dir=/usr/local' '--enable-reflection'
'--program-prefix=' '--enable-fastcgi' '--with-apxs2=/usr/local/sbin/apxs' '--with-
regex=php' '--with-zend-vm=CALL' '--prefix=/usr/local' '--mandir=/usr/local/man'
'--infodir=/usr/local/info/' '--build=i386-portbld-freebsd7.2'

And for the purpose of comparison, here's the Configure Command of the other server (MAC OS X 10.5.8) on which PHP is working without any problem:

Code: Select all
'/SourceCache/apache_mod_php/apache_mod_php-44.2/php/configure' '--prefix=/usr'
'--mandir=/usr/share/man' '--infodir=/usr/share/info' '--disable-dependency-tracking'
'--with-apxs2=/usr/sbin/apxs' '--with-ldap=/usr' '--with-kerberos=/usr' '--enable-cli'
'--with-zlib-dir=/usr' '--enable-trans-sid' '--with-xml' '--enable-exif' '--enable-ftp'
'--enable-mbstring' '--enable-mbregex' '--enable-dbx' '--enable-sockets' '--with-
iodbc=/usr' '--with-curl=/usr' '--with-config-file-path=/etc' '--sysconfdir=/private/etc'
'--with-mysql-sock=/var/mysql' '--with-mysqli=/usr/bin/mysql_config' '--with-mysql=/usr'
'--with-openssl' '--with-xmlrpc' '--with-xsl=/usr' '--without-pear'

I think I will have to recompile the PHP to support the "session" but I don't know how to do it, i.e. which configuration option to use or should I use anything else?

FreeBSD 7.4 on PII 400 Mhz 100 Mhz FSB, 512MB PC100 SDRAM, 80GB HDD, 100Mb Ethernet, PCI Wireless.
Posts: 236
Joined: 17 May 2009, 23:51
Location: Türkiye

Postby DutchDaemon » 22 Mar 2010, 23:40

It's a config option in [port]lang/php5-extensions[/port].
User avatar
Old Fart
Posts: 10466
Joined: 16 Nov 2008, 20:17
Location: The Netherlands

Postby aragon » 23 Mar 2010, 01:05

Or [port]www/php5-session[/port].
Giant Locked
Posts: 2031
Joined: 16 Nov 2008, 17:04
Location: Cape Town, South Africa

Return to Installation and Maintenance of FreeBSD Ports or Packages

Who is online

Users browsing this forum: Bing [Bot], dougs, trh411 and 0 guests