Hi!
I need a little help here, I've looked everywhere I can think of: FAQs, forums, php.net, bug reports, but can't find any answer to this.
Situation:
I created a site that uses sessions with EasyPHP 1.8 (easyphp.org : Apache 1.3.31, PHP 4.3.10, MySQL 4) and by following the material in the "PHP and MySQL Web Development 3rd ed" book. Everything worked perfectly in both IE and Firefox: my site recognized when I logged in, I remained logged from page to page, basically no problem...
...until I decided I wished to learn everything "by myself", no more EasyPHP. I made sure all references to EasyPHP on disk and in the registry were deleted before I installed a clean version of Apache 1.3.34, PHP 5.1.2 and MySQL 5.
Problem:
Now my sessions are "broken". The site won't let me "stay logged in": going from one page to the next writes a new temporary session file (not cookies, the files are named like this: sess_51750b1e0969abddac6eaccfeb9b24e5). Session variables aren't available from one page to the other because of that, so nothing works.
Every site I have on my local machine behaves like that now: for example, I installed BlackNova Traders yesterday, and that one won't let me stay logged in either.
I don't think I'm doing anything strange with my code, but please correct me if I'm wrong:
- I use $_SESSION
- register_globals is OFF
- I'm not manipulating session IDs voluntarily at all
- I have session_start() on every page that uses session variables
What's missing/wrong here? Any ideas on what to check?
If it can help, here are my php.ini variables:
engine = On
zend.ze1_compatibility_mode = Off
short_open_tag = off
asp_tags = Off
precision = 12
y2k_compliance = On
output_buffering = Off
zlib.output_compression = Off
implicit_flush = Off
unserialize_callback_func=
serialize_precision = 100
allow_call_time_pass_reference = On
safe_mode = Off
safe_mode_gid = Off
safe_mode_include_dir =
safe_mode_exec_dir =
safe_mode_allowed_env_vars = PHP_
safe_mode_protected_env_vars = LD_LIBRARY_PATH
disable_functions =
disable_classes =
expose_php = On
max_execution_time = 30
max_input_time = 60
memory_limit = 8M
error_reporting = E_ALL
display_errors = On
display_startup_errors = On
log_errors = Off
log_errors_max_len = 1024
ignore_repeated_errors = Off
ignore_repeated_source = Off
report_memleaks = On
track_errors = On
variables_order = "EGPCS"
register_globals = off
register_long_arrays = off
register_argc_argv = off
auto_globals_jit = On
post_max_size = 8M
magic_quotes_gpc = On
magic_quotes_runtime = Off
magic_quotes_sybase = Off
auto_prepend_file =
auto_append_file =
default_mimetype = "text\html"
doc_root = "K:\webtree\www"
user_dir =
extension_dir = "X:\apps\php\ext"
enable_dl = On
file_uploads = On
upload_max_filesize = 2M
allow_url_fopen = On
default_socket_timeout = 60
extension=php_mbstring.dll
extension=php_gd2.dll
extension=php_imap.dll
extension=php_mcrypt.dll
extension=php_mysql.dll
extension=php_mysqli.dll
define_syslog_variables = Off
SMTP = localhost
smtp_port = 25
sql.safe_mode = Off
session.save_handler = files
session.save_path = "0;K:\webtree\sessions"
session.use_cookies = false
session.name = PHPSESSID
session.auto_start = 0
session.cookie_lifetime = 0
session.cookie_path = \
session.cookie_domain =
session.serialize_handler = php
session.gc_probability = 1
session.gc_divisor = 100
session.gc_maxlifetime = 1440
session.bug_compat_42 = 1
session.bug_compat_warn = 1
session.referer_check =
session.entropy_length = 0
session.entropy_file =
session.cache_limiter = public
session.cache_expire = 180
session.use_trans_sid = 0
session.hash_function = 0
session.hash_bits_per_character = 4
url_rewriter.tags = "a=href,area=href,frame=src,input=src,fieldset="
I left out the database stuff so it wouldn't be too long...
Help, please?
Thanks for your time,
Gen