0

I am trying to run a live website built on Drupal on my PC XAMPP server. I copied the website's root directory and exported the database.

On second PC (Windows 10), I installed XAMPP server and created the database and imported the sql file and placed the website in the folder C:/xampp/htdocs/

I also changed the config file database settings to use my localhost database and its credentials.

Everything seem fine, but when I run the website as localhost/mysite. It is showing a fatal error.

I expected the drupal site will open normally. But it doesn't.

So, without going in to the technical details. I want to know that did I made any mistake or forget to correctly setting up the environment in my PC.

Does the Drupal meant to be first backed-up and then we need to restore it on a Drupal environment? in other words, Is it perfectly ok to just copy and paste the code and import database and it will run?

My XAMPP PHP version is 7.x. So will it be a problem? Note: My server is using PHP 5.6 version.

What are changes I need to do to make it run normally?

  • Yep, it's totally fine. In order to figure out what the actual problem is please read your webserwer's log first. Refer to https://stackoverflow.com/questions/3719549/where-does-phps-error-log-reside-in-xampp as a starting point – Dmytro Sukhovoy Dec 07 '17 at 07:10
  • This is what I am getting in error logs: [php7:error] [pid 13156:tid 1956] [client ::1:58551] PHP Fatal error: Uncaught Error: Call to undefined function ereg() in C:\\xampp\\htdocs\\... Any help? – Kaushal Shakya Dec 08 '17 at 10:54
  • You need to configure your xampp to use PHP 5.6 https://www.drupal.org/hosting-support/2016-10-12/site-doesnt-work-anymore – Dmytro Sukhovoy Dec 10 '17 at 13:33
  • OK i'll configure it and revert. I think this was the reason for my problem as I suspected. But thanks @Artreaktor for finding me the link that has the exact same problem as mine. – Kaushal Shakya Dec 10 '17 at 18:37
  • Thanks @Artreaktor it worked. The PHP version was the problem. – Kaushal Shakya Dec 14 '17 at 05:49

0 Answers0