...

View Full Version : Basic php file question



a4udi
11-18-2007, 06:11 PM
I've got 2 websites on different servers.

One of them I can take an html file and just add .php as the extension and it will display the page no problem.

The other site, I add .php and it will give me a 500 error (I tried setting permissions already).

Is there something I need to set in apache or something?
Basically I would like to have all my .html pages with a .php extension so I can add php in later - and I don't want to have to leave them as html and then change the URL's when I decide to go add php code and have anyone linking to my html files now have a broken links

croatiankid
11-18-2007, 06:30 PM
Are you sure that server has PHP installed? Is it possible you have something in an .htaccess file that relies on the extension being .html? Sorry I can't be of more help.

a4udi
11-18-2007, 06:59 PM
Yes, I've got a form that uses php and that is working...

I also tried coding the page using <?php echo " site content.... just to test it and that seems to work fine. Only thing is that I wanted to avoid having to do that to every page, because I am not adding any php right now... just want to have the page extensions ready for later.

CFMaBiSmAd
11-18-2007, 07:08 PM
My guess is that the page contains <?xml and that php short open tags are enabled and you end up getting a fatal php parse error, giving the HTTP 500 page.

Check your web server log for errors and/or turn on full php error reporting.

You would need to post the content of the page to get specific help with what it might be doing that is causing the symptoms.

a4udi
11-18-2007, 08:10 PM
You sir are a gentleman, and a scholar! :thumbsup:

It was a problem with the tags, all is well now! Thanks both for your help.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum