Tom Horsley <horsley1953 <at> gmail.com> writes:

> 
> On my local system I have apache running so I can test web pages
> before I upload them to my ISP.
> 
> I have a sample .php script which I explicitly named with
> a .php.txt suffix so it would be treated as a plain text
> file, not a php script.
> 
> Yet apache is clearly running the php script rather than just
> uploading the plain text copy of the script when I click
> on the link to the .php.txt file.
> 
> Anyone have any clue what is causing this to happen?
> I can't imagine this is something that would be desirable
> behavior .
> 
> I made it stop by turning off php completely in the
> subdirectory holding the pages, but I still what to
> understand what on earth was making it run the script
> in the first place.

Just guessing but what is the first line of the file?  It's probably:

<?php

Apache reads the file, hits the <?php line and processes it as a php file.  It's
a feature.  *nix (not just Linux) don't use the file extension to determine what
to do with a file.

Cheers,
Dave

-- 
users mailing list
users@lists.fedoraproject.org
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
Have a question? Ask away: http://ask.fedoraproject.org

Reply via email to