Redhat 8.0/Apache/Php session_start() Install Problem

Redhat 8.0/Apache/Php session_start() Install Problem

Mike Church - ން
Number of replies: 4
A solution, not a problem!

On a basic Redhat 8.0 installation, php is configured (in /etc/php.ini) to using the handler type "user" ie:

session.save_handler = user;

This is the "handler used to store/retrieve data", which on the http://php.net web site (which is a must, newbies ހިނިތުން ވުން, and we're all newbies, right?). Anyway, I read the default is type "files" which makes more sense, so I changed it to

session.save_handler = ;

And it worked. Be sure to restart your Apache server:

/etc/init.d/httpd restart


The page describing this directive is here:
http://www.php.net/manual/en/ref.session.php#ini.session.save-handler

Average of ratings: -
In reply to Mike Church

Re: Redhat 8.0/Apache/Php session_start() Install Problem

Mike Church - ން
OK, maybe I spoke too soon... now I can't login, no doubt because of my.... solution.

Grrrrr...
In reply to Mike Church

Re: Redhat 8.0/Apache/Php session_start() Install Problem

Martin Dougiamas - ން
ފޮޓޯ ފޮޓޯ ފޮޓޯ ފޮޓޯ ފޮޓޯ ފޮޓޯ
I recommend using:
session.save_handler = files


In reply to Martin Dougiamas

Re: Redhat 8.0/Apache/Php session_start() Install Problem

Mike Church - ން
Yes, the default is files, but stating it explicitly is always best, I agree.

It's still not storing login info,must be file ownership or mode.

Thanks.
In reply to Mike Church

Re: Redhat 8.0/Apache/Php session_start() Install Problem

Martin Dougiamas - ން
ފޮޓޯ ފޮޓޯ ފޮޓޯ ފޮޓޯ ފޮޓޯ ފޮޓޯ
Try checking session.save_path (eg mine is set to /tmp) and make sure Apache can write there. You should be seeing lots of files there with names like: sess_f852d0020f4dec5ac42a4d8b12f44139

You could also examining the httpd logs to see if there are any pertinent error messages.