Welcome Guest, Not a member yet? Register   Sign In
Fail when copying live site to localhost
#1

(This post was last modified: 03-13-2016, 07:11 PM by wlwan.)

Dears,
I'm running CodeIgniter 2.1.0 on Linux server with php and mysql enabled. 
Now would like to copy the live site to my localhost for development. 
Have double checked and the server, php and mysql version are all the same as the live site.

Then I import the database and paste all the source code there. 
Result: Server Error 500

------------------------
I did rename the database username, password and database name, 
hv updated all those field on config/database.php

Have created a test php file and it can show the fields in the database
---------------------------
Code:
$db['default']['hostname'] = 'localhost';
$db['default']['username'] = 'newname';
$db['default']['password'] = 'newpd';
$db['default']['database'] = 'newdb';
$db['default']['dbdriver'] = 'mysql';
$db['default']['dbprefix'] = '';
$db['default']['pconnect'] = TRUE;
$db['default']['db_debug'] = TRUE;
$db['default']['cache_on'] = FALSE;
$db['default']['cachedir'] = '';
$db['default']['char_set'] = 'utf8';
$db['default']['dbcollat'] = 'utf8_general_ci';
$db['default']['swap_pre'] = '';
$db['default']['autoinit'] = TRUE;
$db['default']['stricton'] = FALSE;


Code:
if(empty($_SERVER["HTTPS"])) {
   $config['base_url']    = 'index.php';
} else {
   $config['base_url']    = 'index.php';
}

Any idea what's going on? Thanks for your time.
Reply


Messages In This Thread
Fail when copying live site to localhost - by wlwan - 03-13-2016, 06:56 PM



Theme © iAndrew 2016 - Forum software by © MyBB