Bug #76344 [Opn]: "Cannot open source device" error should be clearer

From: Date: Tue, 15 May 2018 22:37:22 +0000
Subject: Bug #76344 [Opn]: "Cannot open source device" error should be clearer
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-215272@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=76344&edit=1 ID: 76344 Updated by: requinix@php.net Reported by: andy dot speagle at wichita dot edu -Summary: Can't create session file at session_start() under Apache 2.2 chroot +Summary: "Cannot open source device" error should be clearer Status: Open Type: Bug -Package: Session related +Package: *General Issues Operating System: RHEL 6.9 PHP Version: 7.1.17 Block user comment: N Private report: N New Comment: "Cannot open source device" is fairly generic. It could use an adjustment to indicate it's talking about reading randomness from wherever. There's also a "Error reading from source device" that should get the same treatment. Previous Comments: ------------------------------------------------------------------------ [2018-05-15 17:28:24] andy dot speagle at wichita dot edu Duh... just like magic. Thanks for the tip. That fixed it up for me. ------------------------------------------------------------------------ [2018-05-15 17:19:45] spam2 at rhsoft dot net just fix your chroot so that it contains /dev/urandom and /dev/random PHP is only the messenger that in your existing setup any from of encryption was worthless because of no proper random sources - chroots needs some thoughts in general ------------------------------------------------------------------------ [2018-05-15 17:16:26] andy dot speagle at wichita dot edu Description: ------------ After upgrading from php 5.6.x to 7.1.17, we're no longer able to start sessions. Digging through the logs, it seems to be an issue creating session files. I get this generic error: "Cannot open source device in ..." Digging through the stack trace, it tells me clearly that it can't create the session ID file. I'm using Apache 2.2 on RHEL 6.9 and we're using the "ChrootDir" feature of Apache 2.2 ... I can see with php 5.6.x it was able to use the directory we set in php.ini inside the chroot ... but php 7.1.x doesn't seem to be able to use either the session directory inside or outside of the chroot. The logs say that it's using /var/lib/php/session that we set... but, it seems to be unable to actually write a file. Permissions haven't changed since php 5.6.x ... so, they should still be good. ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=76344&edit=1

« previous php.bugs (#215272) next »