Forum Moderators: phranque

Message Too Old, No Replies

Weird php problem

         

burrows1980

11:09 pm on Jan 2, 2008 (gmt 0)

10+ Year Member



Hi,

I used to host my site with pipex, and used php scripts for the photo album section. It worked fine, no probs. But, I have installed php5 on the apache server, tried my site and it loaded fine until I goto the photo album section, and this doesnt work! I cant understand why? the code I use is:

<?php require("filename.php");?>

Ive made a new basic page requiring a .php into itself and it works, so I take it php is installed correctly!

In httpd.conf I added these lines:

# Action lets you define media types that will execute a script whenever
# a matching file is called. This eliminates the need for repeated URL
# pathnames for oft-used CGI file processors.
# Format: Action media/type /cgi-script/location
# Format: Action handler-name /cgi-script/location
#
Action application/x-httpd-php /php/php.exe

AddType application/x-httpd-php .php

ScriptAlias /php/ "C:/Program Files/PHP5/"

Im running apache 2.2.6

Seems strange as I havent changed any of the code and it worked fine before.

The album code is quite complex and requires other php files to be called into it, for example:

index.php requires - <?php require("../pic/popgal_jim2000.php");?>

popgal_jim2000.php requires - <?php include("_vars.php");?>

All the file locations are correct, all checked in dreamweaver, so some what clueless! tried to call these files into a new php file I made and it still woudnt load.

Is there anything else I need to do to configure apache to run php? can I install something to check for error messages in the script?

Thanks

Gareth