RE: [PHP] phpinfo returns a permission error
| From: | Jay Blanchard | Date: | Mon, 13 Feb 2006 14:02:24 +0000 |
| Subject: | RE: [PHP] phpinfo returns a permission error | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-230308@lists.php.net to get a copy of this message | ||
[snip]
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
[/snip]
Where did you put the phpinfo.php file after you created it? Did you try
accessing like this; http://127.0.0.1/phpinfo.php ?