0

I can't login to any of my PHP applications now (phpmyadmin, mediaWiki) after using yum to update PHP to 5.3.3

I've looked at other posts but there doesn't seem to be a general fix to the problem, lots of individual fixes and I've not had any luck with them.

I'm running CentOS 6.5, these are my session vars as listed by php -i

session.auto_start => Off => Off
session.bug_compat_42 => Off => Off
session.bug_compat_warn => Off => Off
session.cache_expire => 180 => 180
session.cache_limiter => nocache => nocache
session.cookie_domain => no value => no value
session.cookie_httponly => Off => Off
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 => 1000 => 1000
session.gc_maxlifetime => 1440 => 1440
session.gc_probability => 1 => 1
session.hash_bits_per_character => 5 => 5
session.hash_function => 0 => 0
session.name => PHPSESSID => PHPSESSID
session.referer_check => no value => no value
session.save_handler => files => files
session.save_path => /var/lib/php/session => /var/lib/php/session
session.serialize_handler => php => php
session.use_cookies => On => On
session.use_only_cookies => On => On
session.use_trans_sid => 0 => 0

And these are the permissions on the session folder:

$ ls -la  /var/lib/php
drwxrwxr-x   2 root apache 4096 Jan 14 11:28 session

And I've emptied that folder out as I'd read that older sessions could cause a problem.

I haven't actively changed any of these or the other php.ini settings, sessions just stopped working after the update.

UPDATE: I get this error when I run tail -f /var/log/httpd/error_log, when I try to log into mediawiki

[Wed Jan 14 13:57:55 2015] [error] [client 82.35.29.174] PHP Warning:  
    Unknown: open(/var/lib/php/session/sess_dcd2969717a424ac082cab71376423f6, O_RDWR) 
    failed: Permission denied (13) in Unknown on line 0, 
    referer: [REMOVED BY OP]

[Wed Jan 14 13:57:55 2015] [error] [client 82.35.29.174] PHP Warning:  
    Unknown: Failed to write session data (files). Please verify that the current 
    setting of session.save_path is correct (/var/lib/php/session) in Unknown on line 0, 
    referer: [REMOVED BY OP]
Pete
  • 293
  • 1
  • 5
  • 20
  • 1
    You say you "*upgraded*" to 5.3.3, but PHP in C6.5 has always been at 5.3.3. You didn't do anything *else* you haven't mentioned, like an entire OS upgrade, as well, did you? – MadHatter Jan 14 '15 at 12:34
  • It was 5.3.29, until I ran "sudo yum update php" – Pete Jan 14 '15 at 13:43
  • If you turn on `error_reporting(E_ALL);` then do you get anything useful? – MonkeyZeus Jan 14 '15 at 13:46
  • Ah, I wasn't for ***phpMyAdmin*** but ***mediawiki*** is giving me errors - let me take a look, I'll post them up here – Pete Jan 14 '15 at 13:55
  • So `/var/lib/php/session` is there, it has 775 permissions set, root:apache ownership. I don't really want to add 777 perms to the folder, that doesn't seem like a good idea. The first error I guess is coming from my browser trying to re-establish an old session, although I thought I'd cleared my cookies. – Pete Jan 14 '15 at 14:01
  • Ok - found the answer on another SF post: http://serverfault.com/a/226457/65594. Switching to apache:apache 700 fixed it. Will post as an answer then I can, thanks for your help MonkeyZeus – Pete Jan 14 '15 at 14:24
  • 1
    Error logs are a beautiful thing, good luck! – MonkeyZeus Jan 14 '15 at 14:26

0 Answers0