tags:

views:

28

answers:

2

One of my php website is not working fully. Its showing me only home page and when i try to open up any present link it shows me the php code of the file that is called in for that link.

PHP is installed properly. Same server is hosting more than 10 other websites of PHP. No .htaccess parameters etc.. Same site is working on some other server with same settings and same code... I am unable to find the reason..

It seems very weired prb to me. If anybody wants to see the site I can give the live link for my site.

Thanks & Regards Ramesh Kumar http://linuxtrove.com

+2  A: 

Make sure you are using

<?php .. ?> 

tags everywhere, you might know this, but I am pointing it out just in case.

In earlier versions, apache would pick up and compile anything with

<? ... ?> 

tags and it was a mistake since it was getting confused with the xml file versions.

so they changed it to complie only stuff in

<?php ... ?>

Also, again, you might know this, make sure you are hosting it on a php supported server.

There is also this "feature" that you can configure in your .htaccess to ignore certain files. make sure your .htaccess is not having exceptions for php compilation.

I cant think of anything else right now :)

iamserious
All the pages are in php tags only.
ramesh.mimit
A: 

Make sure everything of your PHP-Code is between the php tags like iamserious has written upstairs.

Make sure you're filename's extension is .php index.php for example. Make sure it's in the path to the file is ok! Make sure you're webserver is working perfectly with PHP!

Jordy
I forgot to mention that the pages should ALWAYS end with .php extension. good one.
iamserious
All the code is in PHP tags. I have used <? phpinfo(); ?> function to get the info about my php. Its showing me all the settings. Also same code is working on diff server. One more thing, this server currently hosting more than 10 php sites all are working fine except this(http://new.sourcecomm.net). You can see here (http://new.sourcecomm.net) for reff.
ramesh.mimit
I really don't understand why it's not working like it should be =/
Jordy
Yes I can see your server misbehaving @Jordy, though I dont understand why. I'm sorry.
iamserious