PHP configuration on Ubuntu

Hal Burgiss hal at burgiss.net
Mon Nov 11 23:43:18 UTC 2013


On Mon, Nov 11, 2013 at 1:56 PM, Valter Nogueira <valter at fastway.com.br>wrote:

> I am using PHP5 on Ubuntu and by default when I access
>
> http://localhost/mypage
>
> It returns the content of
>
> http://localhost/mypage.php
>
> instead of 404 error.
>
> Where is this behavior configured and how can I turn it off?
>
>
>
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).

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.

I would uninstall what you have and install it all this way:

 sudo apt-get install lamp-server^

That should install and configure all the php, etc stuff.  Or google on the
php displaying contents and find the correct handlers and settings.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ubuntu.com/archives/ubuntu-users/attachments/20131111/5022308f/attachment.html>


More information about the ubuntu-users mailing list