Forums / Installing on a Linux/Unix Server / PHP code showing on screen after moving to new server

PHP code showing on screen after moving to new server

Views: 2,405

Results 1 to 8 of 8
8 Jun 2012, 4:55 PM
#1
4jdesigns avatar

4jdesigns

Zen Follower

Join Date:
Jul 2011
Posts:
106
Plugin Contributions:
0

PHP code showing on screen after moving to new server

Hi,

I have just moved my site to a new server, but afterwards i go to the domain it shows up blank and when I go into the admin I get this...(see attched image).

Please if someone could give me some sort of direction. I have done a move a couple of times, the only difference is on 1and1.com server (if it makes a difference).

Any help would be greatly appreciated.

Attachment 10590

9 Jun 2012, 2:54 AM
#2
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,515
Plugin Contributions:
176

Re: PHP code showing on screen after moving to new server

Looks like corrupt files and missing files ... such as one would see if the FTP upload encountered problems and didn't complete properly.

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

9 Jun 2012, 8:23 AM
#3
4jdesigns avatar

4jdesigns

Zen Follower

Join Date:
Jul 2011
Posts:
106
Plugin Contributions:
0

Re: PHP code showing on screen after moving to new server

Thanks for info, but tried redoing it over twice again and still does the same thing. I'm using Filezilla as my FTP software and it does not alert me of any failed transfers.

From what I can tell the code that is getting displayed is all the code that is relevant to executing the database, if this makes any difference. I have also been in contact with the hosting company and they said it may be because it's on a shared hosting packaging, would this make a difference as the physical path and the virtual path are correct according to them. Would shared hosting make a difference to the way the database is executed?

9 Jun 2012, 8:59 AM
#4
schoolboy avatar

schoolboy

Totally Zenned

Join Date:
Jun 2005
Location:
Cumbria, UK
Posts:
10,327
Plugin Contributions:
0

Re: PHP code showing on screen after moving to new server

Aside from the fact that 1&1 is perhaps the WORST possible choice for a host for an eCommerce site (with the exception of GoDaddy, of course), your problem appears to be corrupted files.

These may have been corrupted when you took them off the previous server.

You need to get a copy of the version of Zc you are using, unzip it on your machine, then use WINMERGE (or similar) to check your files against that copy of ZC.

And think about getting good hosting... 1&1 are hopeless.

20 years a Zencart User

9 Jun 2012, 9:09 AM
#5
4jdesigns avatar

4jdesigns

Zen Follower

Join Date:
Jul 2011
Posts:
106
Plugin Contributions:
0

Re: PHP code showing on screen after moving to new server

Hey, thanks for the reply.

Could not agree with you more about the worst hosts, had my experience with GoDaddy, first time with 1and1 and I'm learning fast. In my defense these were customers choices.

I have both copies of ZC already on PC and WinMerge, but am I able to a complete file / directory cross check or are there specific files that I would need to look at? Just asking as its a comparison of a new install versus my fully edited new site.

9 Jun 2012, 9:39 AM
#6
4jdesigns avatar

4jdesigns

Zen Follower

Join Date:
Jul 2011
Posts:
106
Plugin Contributions:
0

Re: PHP code showing on screen after moving to new server

Win merge, came up with 'carriage return different' on most files, would this even make a difference?

9 Jun 2012, 4:35 PM
#7
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,515
Plugin Contributions:
176

Re: PHP code showing on screen after moving to new server

Yes, line-endings can make a difference if the server doesn't recognize them properly.

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

12 Jun 2012, 10:31 AM
#8
4jdesigns avatar

4jdesigns

Zen Follower

Join Date:
Jul 2011
Posts:
106
Plugin Contributions:
0

Re: PHP code showing on screen after moving to new server

Sorry, but nothing was corrupt except the fact that it was hosted by 1and1. I got the client to change hosts, did exactly as I did before (even used the exact same files) and WHAM... working first time as expected. Thanks for the input anyways.

BTW, if anyone does finds this thread.......... DON'T USE $*%£ HOSTING COMPANIES..AS MENTIONED ABOVE...YOU WILL WASTE YOUR TIME!!!!