You are here:  » Moved server, now only PHP code is visible on live site?


Moved server, now only PHP code is visible on live site?

Submitted by crepublic on Mon, 2009-07-20 09:00 in

Hi all,

Thanks very much in advance for your expertise.

We are in the process of moving our website over to a new server (both Linux). Previously, we had MagicParser working great to show a summary of news items on our home page.

Since moving the site, unfortunately we aren't able to get the code to work and now only the PHP source code shows instead of the feed content?

{links saved}

We haven't made any changes to the code... does anyone know what's gone wrong, please?

Thanks again!

Blake

Submitted by support on Mon, 2009-07-20 09:10

Hello Blake,

I am seeing an identical page on both URLs - is it perhaps working now since you posted your message?

If you're still seeing different pages could you check you are not looking at a cached version - perhaps empty your browser cache before reloading both pages again...

When PHP code is displayed "raw", it basically just means that the web server is not configured correctly, and does not know to process .php files as PHP, so that would be all it is; and would probably need your host to check it out if you are not on a dedicated server...

Cheers,
David.

Submitted by crepublic on Mon, 2009-07-20 09:11

Hi all,

Just wanted to report that we have now solved this problem! We needed to add something to our .htaccess file to ensure PHP were rendered. The code is:

AddType application/x-httpd-php .htm .html

Thanks again,

Blake

Submitted by crepublic on Mon, 2009-07-20 09:11

Thanks very much, David... Sorry to trouble you, I should have search Google a bit more before posting!