[wplug] php scripts won't run

Jonathan S. Billings wbanguna at gmail.com
Wed Feb 20 06:43:26 EST 2008


On Tue, Feb 19, 2008 at 07:46:49PM -0500, Zach wrote:
> I'm having a vexing problem getting php scripts to load.
> 
> When I try to load one locally such as /var/www/phpsysinfo/index.php
> it opens a dialog box asking me whether I'd like to download it or
> open with an editor, it never renders the PHP script. I also tried
> remotely by loading http://www.club.cc.cmu.edu/~chaos/foo.php in my
> browser and it just prints out the file contents.

Well, PHP doesn't work unless it's sent through a parser, so just
loading the php file through the filesystem with a browser isn't going
to work.

It looks like the computer club's web server isn't running PHP,
either:
Server: Apache/2.0.58 (Unix) mod_ssl/2.0.58 OpenSSL/0.9.7e
mod_pubcookie/3.2.1a


> I verified that apache2 has the php module loaded:
> [...]
> Running Debian lenny. So apache is passing the php files as if they
> were just normal text files or something. They are never passed off to
> the php module and executed for some reason. Any help would be greatly
> appreciated. As far as I can tell it *should* work but doesn't
> obviously.

It sounds like you do have apache running with mod_php.  

You might want to check to make sure that the current httpd instance
running on your computer has been started with this configuration.
Try running:

curl --head http://localhost/

(assuming you're running on port 80)

There should be a Server: line, with all the modules you have loaded.

-- 
Jonathan Billings <wbanguna at gmail.com>


More information about the wplug mailing list