I running Apache 2 and PHP 5 on a Linux host and everything seems to be working, except PHP.

I created the standard info file:

<? phpinfo(); ?>

But I get the following errors:

Warning: Unknown: failed to open stream: Permission denied in Unknown on line 0
Warning: Unknown: Failed opening '/web/mysite/info.php' for inclusion (include_path='.:/usr/local/lib/php') in Unknown on line 0

Any idea what is wrong? I can't seem to find the cause of this problem.

    I remember getting problems like that with windows. It eventually came down to two problems.

    php.ini settings
    and calling an invalid filename on the server.

    You may want to look at the include_path in the php.ini

      Here is my the php.ini variable...
      include_path = ".:/usr/local/lib/php"

      I can sucessfully get to my index.html file, but my index.php file returns these errors. I'm positive the file does exist and that it does not call any include() function.

      I found a post on LinuxQuestions.org that seems to be the same problem, but the solutions(s) don't seem to apply to my issue... http://www.linuxquestions.org/questions/history/211964

        Hi,

        are there any differences in the owner or the access rights between index.html and the php script ? Try to chmod the file to a+r and to change the owner of the script to the web server user.

        Thomas

          Write a Reply...