Anyone know exaclty what's going wrong, I'm running Ubuntu (server) and have apache 2.2.14-5 and php 5.3.2-1 installed. When accessing the test.php file I get a HTTP 500 error. Here's what I get in my error.log
[Thu Oct 27 16:15:41 2011] [error] [client myip] PHP Warning: Unknown: failed to open stream: Permission denied in Unknown on line 0
[Thu Oct 27 16:15:41 2011] [error] [client myip] PHP Fatal error: Unknown: Failed opening required '/blob/public_html/phpass-0.3/test.php' (include_path='.:/usr/share/php:/usr/share/pear') in Unknown on line 0
Anyone know how to setup PHPass?
EDIT: Made a much simpler test: http://pastebin.com/TWq3C9Km, produced the same errors as above.
EDIT2: I have narrowed down what causes these errors to the following lines of code:
if(is_readable('/dev/urandom') && ($fh = @fopen('/dev/urandom', 'rb'))) {
$output = fread($fh, $count);
fclose($fh);
}
EDIT3: Turns out I can't read error messages, whats actually happening is PHP can't read the file itself. A quick sudo chmod -R 777 phpass-0.3 temporarily fixes that, but here must be a better way.
That error message usually indicates file permission problems as already pointed out. Global read/write/execute permissions are certainly not required, but make sure to give Apache read access to the files. For example: