Do you have a question? Post it now! No Registration Necessary. Now with pictures!
- Posted on
September 13, 2005, 4:12 am
rate this thread
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
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!
Re: Why are my PHP files are not being executed (PHP keywords/syntax being ignored)
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
- » Unable to load dynamic library 'C:/php/ext/php_mysql.dll'
- — Previous thread in » PHP Scripting Forum