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 TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

session_name() undefined

Status
Not open for further replies.

tanderso

IS-IT--Management
Aug 9, 2000
981
US
I'm trying to run dotproject, but I'm getting an error:

Code:
Fatal error: Call to undefined function session_name() in /home/sites/dotproject/htdocs/dotproject/index.php on line 52

I commented out the "session_name" line, and it gave a similar error on "session_write_close". I grep'ed the /usr/include directory, and found that both of those functions are in php_session.h. After reinstalling, I noted that php_session.h was indeed compiled.

Anyone know what I'm missing?

Sincerely,

Tom Anderson
Order amid Chaos, Inc.
 
Session support is turned on by default in PHP. It must be turned off using the "--disable-session" directive to the configure script at compile time.

If you run a script consisting entirely of:

<?php
phpinfo();
?>

What does the output section on sessions say?

Want the best answers? Ask the best questions!

TANSTAAFL!!
 
I've read that elsewhere too, but it seems that Gentoo's default config options are at odds with the normal behavior. Even though php_session.h was compiled, it seems to have been disabled by the default Gentoo install. I've changed my USE variable to include "session" which enables it. I'm presently recompiling, but I anticipate this will solve it. Thanks for the help.

Sincerely,

Tom Anderson
Order amid Chaos, Inc.
 
Nope that didn't work. Even though "emerge info" clearly shows "session", the phpinfo script still shows "--disable-session". I even tried setting the environment variable USE="session", but that didn't do it either. I finally added it to "/etc/portage/package.use" and did an "emerge --newuse mod_php" and it finally got rid of the "--disable-session" flag. So now that works. Turns out dotproject had another problem wherein the clone() function now became a reserved word, so I renamed it and all seems to be working now.

Sincerely,

Tom Anderson
Order amid Chaos, Inc.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top