PHP Fatal error: Call to undefined function: session_name()

PHP Fatal error: Call to undefined function: session_name()

by Peter DeBruyn -
Number of replies: 1

I am having a php configuration problem but can't figure out what it is.  Any ideas?  Below is the complete error statement and my phpinfo output.

The error:

Fatal error: Call to undefined function: session_name() in /home/pdebruy1/public_html/moodle/install.php on line 29

PHPinfo:

PHP Version 4.3.8


System Linux xxxx 2.6.8-24.17-smp #1 SMP Tue Jul 19 08:56:33 UTC 2005 i686
Build Date Jul 5 2005 19:21:18
Configure Command './configure' '--prefix=/usr' '--datadir=/usr/share/php' '--mandir=/usr/share/man' '--bindir=/usr/bin' '--libdir=/usr/share' '--includedir=/usr/include' '--sysconfdir=/etc' '--with-_lib=lib' '--with-config-file-path=/etc' '--with-exec-dir=/usr/lib/php/bin' '--disable-debug' '--enable-inline-optimization' '--enable-memory-limit' '--enable-magic-quotes' '--enable-safe-mode' '--enable-sigchild' '--disable-ctype' '--disable-session' '--without-mysql' '--disable-cli' '--without-pear' '--with-openssl' '--with-apxs2=/usr/sbin/apxs2-prefork' 'i586-suse-linux'
Server API Apache 2.0 Handler
Virtual Directory Support disabled
Configuration File (php.ini) Path /etc/php.ini
PHP API 20020918
PHP Extension 20020429
Zend Extension 20021010
Debug Build no
Thread Safety disabled
Registered PHP Streams php, http, ftp, https, ftps, compress.zlib, compress.bzip2

Zend logo This program makes use of the Zend Scripting Language Engine:
Zend Engine v1.3.0, Copyright (c) 1998-2004 Zend Technologies


PHP Credits

Configuration

PHP Core

DirectiveLocal ValueMaster Value
allow_call_time_pass_referenceOnOn
allow_url_fopenOnOn
always_populate_raw_post_dataOffOff
arg_separator.input&&
arg_separator.output&&
asp_tagsOffOff
auto_append_fileno valueno value
auto_prepend_fileno valueno value
browscapno valueno value
default_charsetno valueno value
default_mimetypetext/htmltext/html
define_syslog_variablesOffOff
disable_classesno valueno value
disable_functionsno valueno value
display_errorsOnOn
display_startup_errorsOffOff
doc_rootno valueno value
docref_extno valueno value
docref_rootno valueno value
enable_dlOnOn
error_append_stringno valueno value
error_logno valueno value
error_prepend_stringno valueno value
error_reporting20392039
expose_phpOnOn
extension_dir/usr/lib/php/extensions/usr/lib/php/extensions
file_uploadsOnOn
gpc_orderGPCGPC
highlight.bg#FFFFFF#FFFFFF
highlight.comment#FF8000#FF8000
highlight.default#0000BB#0000BB
highlight.html#000000#000000
highlight.keyword#007700#007700
highlight.string#DD0000#DD0000
html_errorsOnOn
ignore_repeated_errorsOffOff
ignore_repeated_sourceOffOff
ignore_user_abortOffOff
implicit_flushOffOff
include_path.:.:
log_errorsOffOff
log_errors_max_len10241024
magic_quotes_gpcOnOn
magic_quotes_runtimeOffOff
magic_quotes_sybaseOffOff
max_execution_time3030
max_input_time6060
memory_limit8M8M
open_basedirno valueno value
output_bufferingno valueno value
output_handlerno valueno value
post_max_size8M8M
precision1212
register_argc_argvOnOn
register_globalsOffOff
report_memleaksOnOn
safe_modeOffOff
safe_mode_exec_dirno valueno value
safe_mode_gidOffOff
safe_mode_include_dirno valueno value
sendmail_fromno valueno value
sendmail_path/usr/sbin/sendmail -t -i /usr/sbin/sendmail -t -i
serialize_precision100100
short_open_tagOnOn
SMTPlocalhostlocalhost
smtp_port2525
sql.safe_modeOffOff
track_errorsOffOff
unserialize_callback_funcno valueno value
upload_max_filesize2M2M
upload_tmp_dirno valueno value
user_dirno valueno value
variables_orderEGPCSEGPCS
xmlrpc_error_number00
xmlrpc_errorsOffOff
y2k_complianceOnOn

apache2handler

Apache Version Apache/2.0.50 (Linux/SUSE)
Apache API Version 20020903
Server Administrator [no address given]
Hostname:Port xxxx.mscd.edu:0
User/Group wwwrun(30)/8
Max Requests Per Child: 0 - Keep Alive: on - Max Per Connection: 100
Timeouts Connection: 300 - Keep-Alive: 15
Virtual Server No
Server Root /srv/www
Loaded Modules core prefork http_core mod_so mod_suexec mod_access mod_actions mod_alias mod_auth mod_auth_dbm mod_autoindex mod_cgi mod_dir mod_env mod_expires mod_include mod_log_config mod_mime mod_negotiation mod_setenvif mod_userdir mod_ssl sapi_apache2 mod_perl

DirectiveLocal ValueMaster Value
engine11
last_modified00
xbithack00

Apache Environment

VariableValue
HTTP_ACCEPT image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/x-shockwave-flash, application/vnd.ms-excel, application/vnd.ms-powerpoint, application/msword, */*
HTTP_ACCEPT_LANGUAGE en-us
HTTP_ACCEPT_ENCODING gzip, deflate
HTTP_USER_AGENT Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Maxthon; .NET CLR 1.1.4322)
HTTP_HOST xxxx.mscd.edu
HTTP_CONNECTION Keep-Alive
PATH /usr/local/sbin:/sbin:/bin:/usr/sbin:/usr/bin
SERVER_SIGNATURE <address>Apache/2.0.50 (Linux/SUSE) Server at xxxx.mscd.edu Port 80</address>
SERVER_SOFTWARE Apache/2.0.50 (Linux/SUSE)
SERVER_NAME xxxx.mscd.edu
SERVER_ADDR 147.153.1.20
SERVER_PORT 80
REMOTE_ADDR 67.176.24.95
DOCUMENT_ROOT /srv/www/htdocs
SERVER_ADMIN [no address given]
SCRIPT_FILENAME /home/pdebruy1/public_html/phpinfo.php
REMOTE_PORT 1214
GATEWAY_INTERFACE CGI/1.1
SERVER_PROTOCOL HTTP/1.1
REQUEST_METHOD GET
QUERY_STRING no value
REQUEST_URI /~pdebruy1/phpinfo.php
SCRIPT_NAME /~pdebruy1/phpinfo.php

HTTP Headers Information

HTTP Request Headers
HTTP Request GET /~pdebruy1/phpinfo.php HTTP/1.1
Accept image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/x-shockwave-flash, application/vnd.ms-excel, application/vnd.ms-powerpoint, application/msword, */*
Accept-Language en-us
Accept-Encoding gzip, deflate
User-Agent Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Maxthon; .NET CLR 1.1.4322)
Host xxxx.mscd.edu
Connection Keep-Alive
HTTP Response Headers
X-Powered-By PHP/4.3.8
Keep-Alive timeout=15, max=100
Connection Keep-Alive
Transfer-Encoding chunked
Content-Type text/html; charset=ISO-8859-1

bz2

BZip2 Support Enabled
BZip2 Version 1.0.2, 30-Dec-2001

gd

GD Support enabled
GD Version 2.0 or higher
FreeType Support enabled
FreeType Linkage with freetype
T1Lib Support enabled
GIF Read Support enabled
GIF Create Support enabled
JPG Support enabled
PNG Support enabled
WBMP Support enabled

mysql

MySQL Supportenabled
Active Persistent Links 0
Active Links 0
Client API version 4.0.21
MYSQL_MODULE_TYPE none
MYSQL_SOCKET /var/lib/mysql/mysql.sock
MYSQL_INCLUDE no value
MYSQL_LIBS no value

DirectiveLocal ValueMaster Value
mysql.allow_persistentOffOff
mysql.connect_timeout6060
mysql.default_hostno valueno value
mysql.default_passwordno valueno value
mysql.default_portno valueno value
mysql.default_socketno valueno value
mysql.default_userno valueno value
mysql.max_linksUnlimitedUnlimited
mysql.max_persistentUnlimitedUnlimited
mysql.trace_modeOffOff

openssl

OpenSSL support enabled
OpenSSL Version OpenSSL 0.9.7d 17 Mar 2004

overload

User-Space Object Overloading Support enabled

pcre

PCRE (Perl Compatible Regular Expressions) Support enabled
PCRE Library Version 4.5 01-December-2003

posix

Revision $Revision: 1.51.2.2 $

standard

Regex Library Bundled library enabled
Dynamic Library Support enabled
Path to sendmail /usr/sbin/sendmail -t -i

DirectiveLocal ValueMaster Value
assert.active11
assert.bail00
assert.callbackno valueno value
assert.quiet_eval00
assert.warning11
auto_detect_line_endings00
default_socket_timeout6060
safe_mode_allowed_env_varsPHP_PHP_
safe_mode_protected_env_varsLD_LIBRARY_PATHLD_LIBRARY_PATH
url_rewriter.tagsa=href,area=href,frame=src,input=src,form=,fieldset=a=href,area=href,frame=src,input=src,form=,fieldset=
user_agentno valueno value

tokenizer

Tokenizer Support enabled

xml

XML Support active
XML Namespace Support active
EXPAT Version 1.95.6

zlib

ZLib Support enabled
Compiled Version 1.2.1
Linked Version 1.2.1

DirectiveLocal ValueMaster Value
zlib.output_compressionOffOff
zlib.output_compression_level-1-1
zlib.output_handlerno valueno value

Additional Modules

Module Name

Environment

VariableValue
CONSOLE /dev/console
TERM linux
SHELL /bin/sh
get_module_list_done true
INIT_VERSION sysvinit-2.85
REDIRECT /dev/tty1
COLUMNS 158
get_includes_done true
PATH /usr/local/sbin:/sbin:/bin:/usr/sbin:/usr/bin
vga 0x31a
RUNLEVEL 5
PWD /
SPLASHCFG /etc/bootsplash/themes/SuSE/config/bootsplash-1280x1024.cfg
PREVLEVEL N
LINES 57
HOME /
SHLVL 2
splash silent
SPLASH yes
_ /sbin/startproc
DAEMON /usr/sbin/httpd2-prefork

PHP Variables

VariableValue
_SERVER["HTTP_ACCEPT"]image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/x-shockwave-flash, application/vnd.ms-excel, application/vnd.ms-powerpoint, application/msword, */*
_SERVER["HTTP_ACCEPT_LANGUAGE"]en-us
_SERVER["HTTP_ACCEPT_ENCODING"]gzip, deflate
_SERVER["HTTP_USER_AGENT"]Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Maxthon; .NET CLR 1.1.4322)
_SERVER["HTTP_HOST"]xxxx.mscd.edu
_SERVER["HTTP_CONNECTION"]Keep-Alive
_SERVER["PATH"]/usr/local/sbin:/sbin:/bin:/usr/sbin:/usr/bin
_SERVER["SERVER_SIGNATURE"]<address>Apache/2.0.50 (Linux/SUSE) Server at xxxx.mscd.edu Port 80</address>
_SERVER["SERVER_SOFTWARE"]Apache/2.0.50 (Linux/SUSE)
_SERVER["SERVER_NAME"]xxxx.mscd.edu
_SERVER["SERVER_ADDR"]147.153.1.20
_SERVER["SERVER_PORT"]80
_SERVER["REMOTE_ADDR"]67.176.24.95
_SERVER["DOCUMENT_ROOT"]/srv/www/htdocs
_SERVER["SERVER_ADMIN"][no address given]
_SERVER["SCRIPT_FILENAME"]/home/pdebruy1/public_html/phpinfo.php
_SERVER["REMOTE_PORT"]1214
_SERVER["GATEWAY_INTERFACE"]CGI/1.1
_SERVER["SERVER_PROTOCOL"]HTTP/1.1
_SERVER["REQUEST_METHOD"]GET
_SERVER["QUERY_STRING"]no value
_SERVER["REQUEST_URI"]/~pdebruy1/phpinfo.php
_SERVER["SCRIPT_NAME"]/~pdebruy1/phpinfo.php
_SERVER["PHP_SELF"]/~pdebruy1/phpinfo.php
_SERVER["PATH_TRANSLATED"]/home/pdebruy1/public_html/phpinfo.php
_SERVER["argv"]
Array
(
)
_SERVER["argc"]0
_ENV["CONSOLE"]/dev/console
_ENV["TERM"]linux
_ENV["SHELL"]/bin/sh
_ENV["get_module_list_done"]true
_ENV["INIT_VERSION"]sysvinit-2.85
_ENV["REDIRECT"]/dev/tty1
_ENV["COLUMNS"]158
_ENV["get_includes_done"]true
_ENV["PATH"]/usr/local/sbin:/sbin:/bin:/usr/sbin:/usr/bin
_ENV["vga"]0x31a
_ENV["RUNLEVEL"]5
_ENV["PWD"]/
_ENV["SPLASHCFG"]/etc/bootsplash/themes/SuSE/config/bootsplash-1280x1024.cfg
_ENV["PREVLEVEL"]N
_ENV["LINES"]57
_ENV["HOME"]/
_ENV["SHLVL"]2
_ENV["splash"]silent
_ENV["SPLASH"]yes
_ENV["_"]/sbin/startproc
_ENV["DAEMON"]/usr/sbin/httpd2-prefork
Average of ratings: -
In reply to Peter DeBruyn

Re: PHP Fatal error: Call to undefined function: session_name()

by Howard Miller -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
You don't have PHP session support installed. A common complaint with SuSE. Dig through the installation rpms (in Yast) searching for the ones with PHP in the name. Make sure you install the session one.

Hopefully that's all it is!