<div dir="ltr"><br><div class="gmail_extra"><div class="gmail_quote">On Mon, Nov 11, 2013 at 1:56 PM, Valter Nogueira <span dir="ltr"><<a href="mailto:valter@fastway.com.br" target="_blank">valter@fastway.com.br</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr">I am using PHP5 on Ubuntu and by default when I access<div>

<br></div><div><a href="http://localhost/mypage" target="_blank">http://localhost/mypage</a></div><div><br></div><div>It returns the content of </div><div><br></div>
<div><a href="http://localhost/mypage.php" target="_blank">http://localhost/mypage.php</a><br></div><div><br></div><div>instead of 404 error.</div><div><br></div><div>Where is this behavior configured and how can I turn it off?</div>


<div><br></div><div><br></div></div></blockquote><div><br></div><div style>There are two issues: the apache multiviews option is what's causing apache to find mypage.php when you don't want it to. That is either set in an .htaccess file somewhere, or the main apache conf file /etc/apache2/apache.conf (in default Ubuntu installations).</div>

<div style><br></div><div style>The reason the contents are being displayed is that your system is not recognizing it as a php script, because php is not installed or misconfigured. </div><div style><br></div><div style>
I would uninstall what you have and install it all this way: </div>
<div style><br></div><div style> sudo apt-get install lamp-server^</div><div style><br></div><div style>That should install and configure all the php, etc stuff.  Or google on the php displaying contents and find the correct handlers and settings.</div>

<div style><br></div></div></div></div>