f



Why are my PHP files are not being executed (PHP keywords/syntax being ignored)

I have been hosting a website on the same server for roughly 2 years.
The entire site is based on a group of PHP scripts.  Today, without
changing a thing, the server stopped recognizing all PHP keywords and
syntax.  When I use firefox, the page simply displays a text/plain
version of my source code.  When I use IE, the page loads as text/html,
however, all lines of PHP code (between "<?" and "?>") are displayed as
text.

My assumption is that my host has stopped providing PHP extensions.
Can anybody confirm this or give me another explanation?

All help is greatly appreciated!

-JR

0
9/13/2005 4:12:57 AM
comp.lang.php 32646 articles. 0 followers. Post Follow

2 Replies
1513 Views

Similar Articles

[PageSpeed] 6

>I have been hosting a website on the same server for roughly 2 years.
>The entire site is based on a group of PHP scripts.  Today, without
>changing a thing, the server stopped recognizing all PHP keywords and
>syntax.  When I use firefox, the page simply displays a text/plain
>version of my source code.  When I use IE, the page loads as text/html,
>however, all lines of PHP code (between "<?" and "?>") are displayed as
>text.
>
>My assumption is that my host has stopped providing PHP extensions.
>Can anybody confirm this or give me another explanation?
>
>All help is greatly appreciated!

Your files are not being treated as PHP, but as text.  It is possible
that the Apache directive to treat .php files as PHP got lost.
(It's possible this was in one of YOUR .htaccess files, rather than
the Apache config file, but if the host is offering PHP, there's
not a lot of point in making it difficult to use.)

Or PHP is broken (I've managed to do this to myself upgrading some
of the libraries PHP uses.)  Or your host upgraded Apache and didn't
configure in PHP.  Ask your host what's going on.

Incidentally, it's just this sort of thing that makes it worthwhile
to keep stuff like DB passwords *OUTSIDE* the document tree.  If PHP
breaks, as it has apparently in your case, it still won't serve
the passwords.  If it's not broken, PHP can get to it, but it will
use it, not display it, assuming the code is written to do that.

					Gordon L. Burditt
0
9/13/2005 4:47:29 AM
jarrett.roberts@gmail.com wrote:

> I have been hosting a website on the same server for roughly 2 years.
> The entire site is based on a group of PHP scripts.  Today, without
> changing a thing, the server stopped recognizing all PHP keywords and
> syntax.  When I use firefox, the page simply displays a text/plain
> version of my source code.  When I use IE, the page loads as text/html,
> however, all lines of PHP code (between "<?" and "?>") are displayed as
> text.
> 
> My assumption is that my host has stopped providing PHP extensions.
> Can anybody confirm this or give me another explanation?
> 
> All help is greatly appreciated!
> 

Don't you use '<?php' to start your code blocks? Maybe the provider has
switched short_open_tag off.

C.
0
9/13/2005 9:47:27 AM
Reply: