Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Squirrelmail on FreeBSD 5.3 1

Status
Not open for further replies.

ianicr

IS-IT--Management
Nov 4, 2003
230
GB
Hi
I've got apache2 and php 5.0.1 running on FreeBSD fine. phpinfo works fine and gives all the right responses. However I've tried to install squirrelmail and when I got to the index page all I get is a blank screen. If I try to run the file through command line I get the following:

PHP Fatal error: Call to undefined function session_id() in /usr/local/ on line 293


Is there a way to turn on error logging etc?
thanks
 
Questions:
1. Have you looked at the source of the "empty" page?
2. Is the application configured properly so it can find all required includes?
3. Error reporting can be set in the php.ini file according to the PHP manual:
 
Ok I checked the source of the blank page and its:

<html><body></body></html>

I'll try turning the error logging on.

Thanks
 
UPDATE: I turned on display_errors and I get this message on screen now:


Fatal error: Call to undefined function session_id() in /usr/local/ on line 293

lines around 293 of global.php are:

function sqsession_is_active() {

$sessid = session_id();
if ( empty( $sessid ) ) {
session_start();
}
}

Thanks
 
That seems really strange, since session_id() is a function that's PHP native and session support is enabled by default.

Check the phpinfo() output what it says about SESSION.
And here, a very dumb question: You aren't using PHP 3?
 
I can't find anything in phpinfo() that says anything about session. I'm using PHP 5.0.1.
 
That seems impossible. The manual states:
Installation

Session support is enabled in PHP by default. If you would not like to build your PHP with session support, you should specify the --disable-session option to configure. To use shared memory allocation (mm) for session storage configure PHP --with-mm[=DIR] .

The windows version of PHP has built in support for this extension. You do not need to load any additional extension in order to use these functions.

So, it either has the configuration option --disable-session or there will be some configuration directives that show how session is configures, e.g. the path where sessions are saved.

Can you look again or provide a link to the phpinfo() output?
 
I think I've noticed something. Here is the configure options:
./configure' '--enable-versioning' '--enable-memory-limit' '--with-layout=GNU' '--with-config-file-scan-dir=/usr/local/etc/php' '--disable-all' '--enable-libxml' '--with-libxml-dir=/usr/local' '--enable-spl' '--enable-track-vars' '--enable-force-cgi-redirect' '--with-gettext' '--with-mysql' '--with-regex=php' '--with-apxs2=/usr/local/sbin/apxs' '--enable-debug' '--prefix=/usr/local' 'i386-portbld-freebsd5.3'

will that disable-all do anything? Where abouts do I need to look for the session information in phpinfo()?
 
Yes, I think that is it. --disable-all will (according to Zend mailing list archive) disable all extensions unless specifically named.
 
Yeah, that would probably be it.

If you do:

./configure --help

the configure script will tell you "--disable-all Disable all extensions enabled by default".

If sessions are enabled, there will be a section titled "session" in the output of phpinfo().


Want the best answers? Ask the best questions!

TANSTAAFL!!
 
Thanks!!! I've got it sorted now!! It was that disable-all. I changed the Makefile and removed the --disable-all and it works now!!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top