Page 1 of 1

PHP Setup

Posted: Tue Dec 14, 2004 9:43 pm
by WebTrooper
Not sure if this is the right forum or if I should post in the installation forum, cuz I arrived here looking for help with the infamous "Fatal error: Call to undefined function session_start()" error. Here's my situation...

I have a rented Linux box (RH9, PHP4, MySQL, WHM/cPanel) and when attempting to install Serendipity I immediately ran into that session_start() error. The couple of topics I found that address the issue implied that I have PHP misconfigured. I'm relatively new to PHP and web programming in general but I'm always up to a challenge.

So, what I did is reinstalled php with all the options checked via WHM but to no avail. I still get the error. Here's my phpinfo output:

----------------------------------------
Configuration
PHP Core
Directive Local Value Master Value
allow_call_time_pass_reference On On
allow_url_fopen On On
always_populate_raw_post_data Off Off
arg_separator.input & &
arg_separator.output & &
asp_tags Off Off
auto_append_file no value no value
auto_prepend_file no value no value
browscap no value no value
default_charset no value no value
default_mimetype text/html text/html
define_syslog_variables Off Off
disable_classes no value no value
disable_functions no value no value
display_errors On On
display_startup_errors Off Off
doc_root no value no value
docref_ext no value no value
docref_root no value no value
enable_dl On On
error_append_string no value no value
error_log no value no value
error_prepend_string no value no value
error_reporting 2039 2039
expose_php On On
extension_dir /usr/lib/php4 /usr/lib/php4
file_uploads On On
gpc_order GPC GPC
highlight.bg #FFFFFF #FFFFFF
highlight.comment #FF9900 #FF9900
highlight.default #0000CC #0000CC
highlight.html #000000 #000000
highlight.keyword #006600 #006600
highlight.string #CC0000 #CC0000
html_errors On On
ignore_repeated_errors Off Off
ignore_repeated_source Off Off
ignore_user_abort Off Off
implicit_flush Off Off
include_path .:/usr/local/lib/php .:/usr/local/lib/php
log_errors Off Off
log_errors_max_len 1024 1024
magic_quotes_gpc On On
magic_quotes_runtime Off Off
magic_quotes_sybase Off Off
max_execution_time 30 30
max_input_time 60 60
open_basedir /home/xxxxxxx:/usr/lib/php:/usr/local/lib/php:/tmp no value
output_buffering no value no value
output_handler no value no value
post_max_size 8M 8M
precision 14 14
register_argc_argv On On
register_globals Off Off
report_memleaks On On
safe_mode Off Off
safe_mode_exec_dir no value no value
safe_mode_gid Off Off
safe_mode_include_dir no value no value
sendmail_from me@localhost.com me@localhost.com
sendmail_path /usr/sbin/sendmail -t -i /usr/sbin/sendmail -t -i
serialize_precision 100 100
short_open_tag On On
SMTP localhost localhost
smtp_port 25 25
sql.safe_mode Off Off
track_errors Off Off
unserialize_callback_func no value no value
upload_max_filesize 2M 2M
upload_tmp_dir no value no value
user_dir no value no value
variables_order EGPCS EGPCS
xmlrpc_error_number 0 0
xmlrpc_errors Off Off
y2k_compliance Off Off


apache
APACHE_INCLUDE no value
APACHE_TARGET no value
Apache Version Apache/1.3.33 (Unix) mod_gzip/1.3.26.1a mod_jk/1.2.6 mod_auth_passthrough/1.8 mod_log_bytes/1.2 mod_bwlimited/1.4 PHP/4.3.9 FrontPage/5.0.2.2635 mod_ssl/2.8.22 OpenSSL/0.9.7a PHP-CGI/0.1b
Apache Release 10333100
Apache API Version 19990320
Hostname:Port www.xxxxxx.com:80
User/Group nobody(99)/99
Max Requests Per Child: 0 - Keep Alive: on - Max Per Connection: 100
Timeouts Connection: 300 - Keep-Alive: 15
Server Root /usr/local/apache
Loaded Modules mod_gzip, mod_jk, mod_auth_passthrough, mod_log_bytes, mod_bwlimited, mod_php4, mod_frontpage, mod_ssl, mod_setenvif, mod_so, mod_expires, mod_auth, mod_access, mod_rewrite, mod_alias, mod_userdir, mod_actions, mod_imap, mod_asis, mod_cgi, mod_dir, mod_autoindex, mod_include, mod_status, mod_negotiation, mod_mime, mod_log_config, mod_env, http_core

Directive Local Value Master Value
child_terminate 0 0
engine 1 1
last_modified 0 0
xbithack 0 0


Apache Environment
Variable Value
DOCUMENT_ROOT /home/xxxxxxx/public_html
HTTP_ACCEPT image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/x-shockwave-flash, */*
HTTP_ACCEPT_ENCODING gzip, deflate
HTTP_ACCEPT_LANGUAGE en-us
HTTP_CONNECTION Keep-Alive
HTTP_COOKIE cprelogin=no
HTTP_HOST xxxxxxx.com
HTTP_USER_AGENT Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0)
PATH /bin:/usr/bin:/sbin:/usr/sbin:/usr/local/bin:/usr/local/sbin
REDIRECT_STATUS 200
REDIRECT_URL /phpinfo.php
REMOTE_ADDR 66.77.888.99
REMOTE_PORT 1517
SCRIPT_FILENAME /home/xxxxxxx/public_html/phpinfo.php
SERVER_ADDR 66.77.888.99
SERVER_ADMIN webmaster@xxxxxxx.com
SERVER_NAME www.xxxxxxx.com
SERVER_PORT 80
SERVER_SIGNATURE <ADDRESS>Apache/1.3.33 Server at www.xxxxxxx.com Port 80</ADDRESS>
SERVER_SOFTWARE Apache/1.3.33 (Unix) mod_gzip/1.3.26.1a mod_jk/1.2.6 mod_auth_passthrough/1.8 mod_log_bytes/1.2 mod_bwlimited/1.4 PHP/4.3.9 FrontPage/5.0.2.2635 mod_ssl/2.8.22 OpenSSL/0.9.7a PHP-CGI/0.1b
GATEWAY_INTERFACE CGI/1.1
SERVER_PROTOCOL HTTP/1.1
REQUEST_METHOD GET
QUERY_STRING no value
REQUEST_URI /phpinfo.php
SCRIPT_NAME /phpinfo.php


HTTP Headers Information
HTTP Request Headers
HTTP Request GET /phpinfo.php HTTP/1.1
Accept image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/x-shockwave-flash, */*
Accept-Encoding gzip, deflate
Accept-Language en-us
Connection Keep-Alive
Cookie cprelogin=no
Host xxxxxxx.com
User-Agent Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0)
HTTP Response Headers
X-Powered-By PHP/4.3.9
Keep-Alive timeout=15, max=100
Connection Keep-Alive
Transfer-Encoding chunked
Content-Type text/html


bcmath
BCMath support enabled


calendar
Calendar support enabled


ctype
ctype functions enabled


curl
CURL support enabled
CURL Information libcurl/7.12.0 OpenSSL/0.9.7a zlib/1.1.4


domxml
DOM/XML enabled
DOM/XML API Version 20020815
libxml Version 20611
HTML Support enabled
XPath Support enabled
XPointer Support enabled
DOM/XSLT enabled
libxslt Version 1.1.8
libxslt compiled against libxml Version 2.6.11
DOM/EXSLT enabled
libexslt Version 1.1.8


exif
EXIF Support enabled
EXIF Version 1.4 $Id: exif.c,v 1.118.2.27 2003/12/17 09:08:37 helly Exp $
Supported EXIF Version 0220
Supported filetypes JPEG,TIFF


ftp
FTP support enabled


gd
GD Support enabled
GD Version bundled (2.0.28 compatible)
FreeType Support enabled
FreeType Linkage with freetype
GIF Read Support enabled
GIF Create Support enabled
JPG Support enabled
PNG Support enabled
WBMP Support enabled
XBM Support enabled


gettext
GetText Support enabled


imap
IMAP c-Client Version 2001
SSL Support enabled
Kerberos Support enabled


mbstring
Multibyte Support enabled
Japanese support enabled
Simplified chinese support enabled
Traditional chinese support enabled
Korean support enabled
Russian support enabled
Multibyte (japanese) regex support enabled

mbstring extension makes use of "streamable kanji code filter and converter", which is distributed under the GNU Lesser General Public License version 2.1.

Directive Local Value Master Value
mbstring.detect_order no value no value
mbstring.encoding_translation Off Off
mbstring.func_overload 0 0
mbstring.http_input pass pass
mbstring.http_output pass pass
mbstring.internal_encoding ISO-8859-1 no value
mbstring.language neutral neutral
mbstring.substitute_character no value no value


mcrypt
mcrypt support enabled
version >= 2.4.x
Supported ciphers cast-128 gost rijndael-128 twofish arcfour cast-256 loki97 rijndael-192 saferplus wake blowfish-compat des rijndael-256 serpent xtea blowfish enigma rc2 tripledes
Supported modes cbc cfb ctr ecb ncfb nofb ofb stream

Directive Local Value Master Value
mcrypt.algorithms_dir no value no value
mcrypt.modes_dir no value no value


mhash
MHASH support Enabled
MHASH API Version 20020524


ming
Ming SWF output library enabled
Version 0.3beta1


mysql
MySQL Support enabled
Active Persistent Links 0
Active Links 0
Client API version 4.0.22
MYSQL_MODULE_TYPE external
MYSQL_SOCKET /var/lib/mysql/mysql.sock
MYSQL_INCLUDE -I/usr/include/mysql
MYSQL_LIBS -L/usr/lib -lmysqlclient

Directive Local Value Master Value
mysql.allow_persistent On On
mysql.connect_timeout 60 60
mysql.default_host no value no value
mysql.default_password no value no value
mysql.default_port no value no value
mysql.default_socket no value no value
mysql.default_user no value no value
mysql.max_links Unlimited Unlimited
mysql.max_persistent Unlimited Unlimited
mysql.trace_mode Off Off


openssl
OpenSSL support enabled
OpenSSL Version OpenSSL 0.9.7a Feb 19 2003


overload
User-Space Object Overloading Support enabled


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


pgsql
PostgreSQL Support enabled
PostgreSQL(libpq) Version 7.3.4
Multibyte character support enabled
SSL support enabled
Active Persistent Links 0
Active Links 0

Directive Local Value Master Value
pgsql.allow_persistent On On
pgsql.auto_reset_persistent Off Off
pgsql.ignore_notice Off Off
pgsql.log_notice Off Off
pgsql.max_links Unlimited Unlimited
pgsql.max_persistent Unlimited Unlimited


posix
Revision $Revision: 1.51.2.2 $


pspell
PSpell Support enabled


session
Session Support enabled
Registered save handlers files user

Directive Local Value Master Value
session.auto_start Off Off
session.bug_compat_42 On On
session.bug_compat_warn On On
session.cache_expire 180 180
session.cache_limiter nocache nocache
session.cookie_domain no value no value
session.cookie_lifetime 0 0
session.cookie_path / /
session.cookie_secure Off Off
session.entropy_file no value no value
session.entropy_length 0 0
session.gc_divisor 100 100
session.gc_maxlifetime 1440 1440
session.gc_probability 1 1
session.name PHPSESSID PHPSESSID
session.referer_check no value no value
session.save_handler user user
session.save_path /tmp /tmp
session.serialize_handler php php
session.use_cookies On On
session.use_only_cookies Off Off
session.use_trans_sid Off On


sockets
Sockets Support enabled


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

Directive Local Value Master Value
assert.active 1 1
assert.bail 0 0
assert.callback no value no value
assert.quiet_eval 0 0
assert.warning 1 1
auto_detect_line_endings 0 0
default_socket_timeout 60 60
safe_mode_allowed_env_vars PHP_ PHP_
safe_mode_protected_env_vars LD_LIBRARY_PATH LD_LIBRARY_PATH
url_rewriter.tags a=href,area=href,frame=src,input=src,form=fakeentry a=href,area=href,frame=src,input=src,form=fakeentry
user_agent no value no value


swf
swf support enabled


tokenizer
Tokenizer Support enabled


wddx
WDDX Support enabled
WDDX Session Serializer enabled


xml
XML Support active
XML Namespace Support active
EXPAT Version 1.95.6


xmlrpc
core library version xmlrpc-epi v. 0.51
php extension version 0.51
author Dan Libby
homepage http://xmlrpc-epi.sourceforge.net
open sourced by Epinions.com


xslt
XSLT support enabled
Backend Sablotron
Sablotron Version 1.0.1
Sablotron Information Cflags: -g -O2 Libs: -L/usr/lib -lexpat Prefix: /usr


zip
Zip support enabled


zlib
ZLib Support enabled
Compiled Version 1.1.4
Linked Version 1.1.4

Directive Local Value Master Value
zlib.output_compression Off Off
zlib.output_compression_level -1 -1
zlib.output_handler no value no value


Additional Modules
Module Name


Environment
Variable Value
PATH /bin:/usr/bin:/sbin:/usr/sbin:/usr/local/bin:/usr/local/sbin
PWD /
SHLVL 1
_ /usr/local/apache/bin/httpd


PHP Variables
Variable Value
_REQUEST["cprelogin"] no
_COOKIE["cprelogin"] no
_SERVER["DOCUMENT_ROOT"] /home/xxxxxxx/public_html
_SERVER["HTTP_ACCEPT"] image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/x-shockwave-flash, */*
_SERVER["HTTP_ACCEPT_ENCODING"] gzip, deflate
_SERVER["HTTP_ACCEPT_LANGUAGE"] en-us
_SERVER["HTTP_CONNECTION"] Keep-Alive
_SERVER["HTTP_COOKIE"] cprelogin=no
_SERVER["HTTP_HOST"] xxxxxxx.com
_SERVER["HTTP_USER_AGENT"] Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0)
_SERVER["PATH"] /bin:/usr/bin:/sbin:/usr/sbin:/usr/local/bin:/usr/local/sbin
_SERVER["REDIRECT_STATUS"] 200
_SERVER["REDIRECT_URL"] /phpinfo.php
_SERVER["REMOTE_ADDR"] 66.77.888.99
_SERVER["REMOTE_PORT"] 1517
_SERVER["SCRIPT_FILENAME"] /home/xxxxxxx/public_html/phpinfo.php
_SERVER["SERVER_ADDR"] 66.77.888.99
_SERVER["SERVER_ADMIN"] webmaster@xxxxxxx.com
_SERVER["SERVER_NAME"] www.xxxxxxx.com
_SERVER["SERVER_PORT"] 80
_SERVER["SERVER_SIGNATURE"] <ADDRESS>Apache/1.3.33 Server at www.xxxxxxx.com Port 80</ADDRESS>
_SERVER["SERVER_SOFTWARE"] Apache/1.3.33 (Unix) mod_gzip/1.3.26.1a mod_jk/1.2.6 mod_auth_passthrough/1.8 mod_log_bytes/1.2 mod_bwlimited/1.4 PHP/4.3.9 FrontPage/5.0.2.2635 mod_ssl/2.8.22 OpenSSL/0.9.7a PHP-CGI/0.1b
_SERVER["GATEWAY_INTERFACE"] CGI/1.1
_SERVER["SERVER_PROTOCOL"] HTTP/1.1
_SERVER["REQUEST_METHOD"] GET
_SERVER["QUERY_STRING"] no value
_SERVER["REQUEST_URI"] /phpinfo.php
_SERVER["SCRIPT_NAME"] /phpinfo.php
_SERVER["PATH_TRANSLATED"] /home/xxxxxxx/public_html/phpinfo.php
_SERVER["PHP_SELF"] /phpinfo.php
_SERVER["argv"] Array
(
)

_SERVER["argc"] 0
_ENV["PATH"] /bin:/usr/bin:/sbin:/usr/sbin:/usr/local/bin:/usr/local/sbin
_ENV["PWD"] /
_ENV["SHLVL"] 1
_ENV["_"] /usr/local/apache/bin/httpd
-----------------------------------------------

Sorry for such a long post but I'm not sure which information you need. Does this give any clues as to why I can't get past that error? I don't mind configuring manually if there's something WHM isn't doing correctly. Done the ./configure thing before, no big deal.

Oh and yes, I did restart apache :wink:

Posted: Wed Dec 15, 2004 12:56 am
by WebTrooper
Hi, It's me again.

Having never been the most patient person, I commented out session_start() in index.php and serendipity_admin.php. I'm now in the process of installing.

Q - Did I create a security hole or will I probably run into problems later? This is just a temporary installation so I can get a feel for things, but when I do a permanent install later I'd like to do it right.

Posted: Wed Dec 15, 2004 5:19 pm
by garvinhicking
Hm, that is indeed strange. The function "session_start" should be found for you, because in your config output it does say the session module is loaded. How is your PHP configure string? That one is also shown in a <?php phpinfo(); ?> script...and what is your exact PHP version?

Anyways - commenting out the session_start()s will do no good - you will not be able to log into your blog and properly adminstrate it...

Regards,
Garvin

Posted: Wed Dec 15, 2004 5:35 pm
by WebTrooper
Thanks for getting back to me on this. However, I'm afraid I have my server totally screwed up :roll: and rather than spending days on end trying to fix it, I'm just going to have them reinstall it for the $30 fee. (Server Beach, great folks to do business with. Very Accomodating) Then I won't mess around with it anymore. I think s9y should run okay once that's done.

Every day is a winding road, la, la, la.... :wink: