1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

No session support in default PHP installation

Discussion in 'Installation and Maintenance of Ports or Packages' started by aurora72, Mar 22, 2010.

  1. aurora72

    aurora72 Member

    Thanks Received:

    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:

    './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:

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

  2. DutchDaemon

    DutchDaemon Administrator Staff Member Administrator Moderator

    Thanks Received:
  3. aragon

    aragon New Member

    Thanks Received:
    realtime thanks for this.