Find the answer to your Linux question:
Results 1 to 3 of 3
Hello, I recently installed Apache, PHP and MySQL from Suse Linux 9.3 Professional CD but I found PHP was compiled with '--disable-session' When I try to login to a page ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Jun 2005
    Posts
    4

    Recompile PHP


    Hello,

    I recently installed Apache, PHP and MySQL from Suse Linux 9.3 Professional CD but I found PHP was compiled with '--disable-session'

    When I try to login to a page I get this error:
    Fatal error: Call to undefined function: session_start() in /srv/www/htdocs/login.php on line 35

    Now I think I have to recompile PHP with '--enable-session' but I have no idea how to do that. Can anyone help me with this please?

  2. #2
    Linux Newbie
    Join Date
    Aug 2005
    Posts
    214
    Once I had to compile PHP with oci8 and freetds support, which is not available as an extension on SuSE cd's and I had to compile it from sources. So I gave up an idea of installing php and apache from SuSE CD's. I would recommend download sources from www.php.net and www.apache.org and configure them the way you want.
    Apache:
    Code:
    ./configure --with-prefix=/www
    make
    make install
    PHP:
    Code:
    ./configure --with-apxs2=/www/bin/apxs --enable-session
    make
    make install
    in httpd.conf add 2 lines to load php module and add php mime type
    Code:
    LoadModule php5_module        modules/libphp5.so
    AddType application/x-httpd-php .php .phtml

  3. #3
    Just Joined!
    Join Date
    Jun 2005
    Posts
    4
    Actually I tried that before installing from CD but installing MySQL is extra pain for me. But now I'll give it another try. Thanks for your reply.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •