Page 1 of 1

Problem with moving a site from remote server to localhost

Posted: Sun Oct 03, 2010 2:35 pm
by willowone
Hey guys,

i want to run a site that runs in a remote server to my server (apache).I extracted the database and took all the php files,but of course it doesnt run.It does not show an error in any line,it just shows the php code between html.I can see that it starts showing php from this line of code:

Code: Select all

if ($thecandidate->get("id") == 0)
so the first line when i open it in the browser is get("id") == 0) and then it cotinues with the rest of the code.

As this is the first time i am doing something like this i dont know where to start looking for the problem!Was the whole procedure of copy/paste the files wrong?Any other suggestions? Thanks in advance!

Re: Problem with moving a site from remote server to localho

Posted: Sun Oct 03, 2010 5:40 pm
by John Cartwright
A few quick questions you need to ask yourself:

Is PHP installed on my local server?
Are short tags being used in my scripts? --- <? vs <?php
Are short tags disabled on my local server?
Do the files you copied the code to end in .php
- or -
Is my server configured to treat the extension I've used as PHP.