Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

PHPix problem 1

Status
Not open for further replies.

DZeta

Technical User
Dec 21, 2002
5
AR
Hi,
I am trying to configure a simple php web photo album downloaded fron phpix.org and I am having problems to display it. When I browse the site instead of displaying the content it displays the code.

Any help will be appreciate.
 
Hmm.. why don't you try renaming the file to an extension as .php? If that doesn't work, you may have to check if PHP is enabled.

Oh yeah, and start each script with <?php and end it with ?>.
 
That would almost certainlly work... the other fix depends on what webserver you're running... somewhere in the configuration file for your webserver it tells it which files to run the PHP preprocessor on, phtml is not one of the defaults as far as I'm aware... (I believe .php and php3 are the two defaults).

You can add phtml to that list if you like and that should do it as well.

And then if phtml is used by any other preprocessors like VB or whatnot, make sure to included the php after the opening <?

If you're not in charge of the webserver, email your webmaster and ask them about using php, not all services let you...

quickest test would be to make a page called test.php which just contains

<?php
phpinfo();
?>

and see what comes up.

-Rob
 
Thanks for your help.

I have added this line to httpd.conf but it's still not working. Yes!!! :) I have restarted the service.

AddType application/x-httpd-php .phtml

I have created this test page

Please make me know if I must do something else.

Thank U
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top