Forum Moderators: coopster

Message Too Old, No Replies

Errors with php pages

         

jazzyhorn

6:54 pm on Mar 27, 2011 (gmt 0)

10+ Year Member



Hi,

I have just installed Apache2 and php5 on a ubuntu box. I've set up userdir to point to /home/*public_html so that I can test multiple websites on the server.

If I create a file e.g. index.php in the document root /var/www all is well but any .php file served out of a home diectory gets me this message:


Warning: Unknown: failed to open stream: Permission denied in Unknown on line 0

Fatal error: Unknown: Failed opening required '/home/lonetree/public_html/TMP7pt3hz.php' (include_path='.:/inc:./inc:../inc:../../inc:../../../inc:../../../../inc:/usr/share/php') in Unknown on line 0


I've been playing with config files for the last few days but have got the point where I don't know what else to try. Could you please advise me of what I should be looking for.
Many thanks

Matthew1980

8:55 pm on Mar 27, 2011 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Hi there jazzyhorn,

Welcome to WebmasterWorld!

This rings a bell to me: TMP7pt3hz.php I don't suppose that you're using a plain text editor, or are using something like dream weaver.

Only reason I ask, is because with some IDE's you get an option that you can check/uncheck to test a temp file, or the actual one being worked on, consequently, this may cause some ambiguity when trying to run a temp file.

Of course I may have got totally the wrong end of the stick - if so, ignore what I suggested!

Cheers,
MRb

jazzyhorn

5:39 pm on Mar 28, 2011 (gmt 0)

10+ Year Member



Hi Matthew1980, Thanks for your reply. You are correct that this file was created with Dreameaver but this is not the issue. Even if I try to serve a file e.g index.php which I access via a browser by using [[servername]...] I still get the same error. This does not happen with [[servername]...]

I've played around with most of the conf files for apache, userdir and php and am now getting completely confused.

Regards

Simon

jazzyhorn

6:43 pm on Mar 28, 2011 (gmt 0)

10+ Year Member



Eeep! Didn't realise what [] does to text.

Hi Matthew1980, Thanks for your reply. You are correct that this file was created with Dreameaver but this is not the issue. Even if I try to serve a file e.g index.php which I access via a browser by using servername/~username/index.php I still get the same error. This does not happen with servername/index.php

I've played around with most of the conf files for apache, userdir and php and am now getting completely confused.

Regards

Simon