A message for Linux.com registered users: We are in the process of making changes to the Linux forums. Starting Monday, 8/13/18 at 6:00 PM PT, you will be unable to access the forums. They will re-launch as soon as possible on Wednesday, 8/15/18 with new features and improved functionality. Thank you for your patience and stay tuned for the new improved forums.

March 13, 2017

Strange things while migrating to a new hosting

Hello, people!

The task is to move PHP + mySQL site from Hosting 1 (gthost.com) to Hosting 2 (GoDaddy VPS).

On Hosting 1 I created a test file hello.php:



 <Title> PHP Test </ title>

</ Head>


<? Php echo '<p> Hello Ya. </ P>'; ?>

</ Body>

</ Html>


I opened it with Google Chrome successfully:


Then I deleted it.

Next I put together an archive of webpages and databases and transferred them to a new hosting, deployed DNS on a new server.

The site itself sorta opens after these manipulations. It is closed for public access and can be opened only by admin on a special secret link.

nslookup mydomain.com says that the site opens on the new hosting, as planned.

But I can’t understand what's going on here: When I create file hello.php in the webfolder on hosting 2, it doesn’t open in Chrome, saying that there is no such file. With file permissions everything’s okay: rwx-r-x-r-x, owner is cPanel of hosting 2, as well as on all other php files.

What can be a showstopper?

Maybe it's a .htaccess file? (I transferred it point-blank).

When I changed the rights to the folder:

Chown -R hosting-B-account-name: hosting-B-account-name htdocs / *

It seems to be hidden, and the owner is still admin from hosting 1.

Click Here!