Re: phpinfo returns a permission error

From: Date: Mon, 13 Feb 2006 14:09:04 +0000
Subject: Re: phpinfo returns a permission error
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-230309@lists.php.net to get a copy of this message
Dave M G wrote:
PHP list, I wanted to adjust my register global settings in my php.ini file. I found instructions on this page: http://www.dmcinsights.com/phpmysql/phpini.php The first thing it says to do is take a look at the results of phpinfo(); to see where the php.ini file actually is. So I created a phpinfo.php file, put in the following code: <?php phpinfo(); ?> ... and then accessed it through FireFox at localhost. To my surprise, I got the following error message: Warning: Unknown(/home/dave/web_sites/phpinfo.php): failed to open stream: Permission denied in Unknown on line 0 Warning: (null)(): Failed opening '/home/dave/web_sites/phpinfo.php' for inclusion (include_path='.:/usr/share/php:/usr/share/pear') in Unknown on line 0 It looks to be a permissions issue. But who has permission if not me, and how is permission an issue when I'm just looking at the file through a browser? By the way, I'm using PHP 4.4.0-3 on Ubuntu 5.10. Any advice or help would be much appreciated. Thank you. -- Dave M G
So, what does this say: $umask and this: $ ls -l /home/dave/web_sites/phpinfo.php and are you using the browser to view the file via a server (e.g., the browser address bar says "http://"), or via the filesystem (you've opened it from an "explorer" type window and the address bar says "file:///").... Is PHP running as mod_php in apache, or CGI? Finally, can you view other files in the same directory via similar means? Kevin Kinsey -- Stult's Report: Our problems are mostly behind us. What we have to do now is fight the solutions.

« previous php.general (#230309) next »