Welcome Guest, Not a member yet? Register   Sign In
moving my site to new host
#1

[eluser]Bob Puzld[/eluser]
Hi I am moving my site over to a new host server. Also, I am using another domain name on the new server, so that I can make sure everything is copacetic before taking down the old server.

Here is what I've done so far...

1. I have moved the MySQL database tables and data over to the new server.
2. I have copied all codeigniter files over to the new server using FTP
3. I have updated the config.php file to the new MySQL database server info


Now, when I go to the new server home page (index.php) it shows up properly, as it does on the old server. This is a good start. But once I log-in on this home page it directs me to the older server opening user page. Also, when I log out, it logs me out and directs me to the old server home page. Now, I am not a proficient codeigniter user yet, but does anyone have any ideas on what I might have missed? I am sure it's something simple... :roll:

-Bob
#2

[eluser]mi6crazyheart[/eluser]
As u've told, u r using a another domain name in the new server.. have u changed the CI's base url path(new domain name) present in config.php in new server...
#3

[eluser]Bob Puzld[/eluser]
I just changed the base url in config.php and now when I try to log-in I get the following error...

404 Not Found

The requested URL /login/log_in was not found on this server.

Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.
Apache Server at www.mysite.com Port 80


I intentionally changed the Apache Server from my domain to "mysite.com".

Any other advise would be great. Thanks.
#4

[eluser]tomcode[/eluser]
Apparently the site was configured to hide the index.php in the URL.

Check
- the .htaccess file at the site's root
- the index_page entry in the config/config.php
#5

[eluser]Cesar Kohl[/eluser]
When you change the location of the code,

Quote: From:
projects/folder01
To:
projects/folder02

You have to make two modifications:

Quote: 1. /system/application/config/config.php
$config['base_url'] = "projects/folder02";
2. /.htaccess
RewriteBase /projects/folder02/

I don't know if you have an .htaccess file, but I have one and that's what I do.

When it's necessary to reconfigure the database in config/database.php, I do this:

Code:
$active_group = "home";
#$active_group = "remote_testes";
$active_record = TRUE;

/* Localhost Home */

$db['home']['hostname'] = "localhost";
$db['home']['username'] = "root";
$db['home']['password'] = "";
$db['home']['database'] = "db_project";
$db['home']['dbdriver'] = "mysql";
$db['home']['dbprefix'] = "";
$db['home']['pconnect'] = TRUE;
$db['home']['db_debug'] = TRUE;
$db['home']['cache_on'] = FALSE;
$db['home']['cachedir'] = "";
$db['home']['char_set'] = "utf8";
$db['home']['dbcollat'] = "utf8_general_ci";

/* Remote Server de Testes */

$db['remote_testes']['hostname'] = "ftp.example.com";
$db['remote_testes']['username'] = "username";
$db['remote_testes']['password'] = "password";
$db['remote_testes']['database'] = "db_example";
$db['remote_testes']['dbdriver'] = "mysql";
$db['remote_testes']['dbprefix'] = "";
$db['remote_testes']['pconnect'] = TRUE;
$db['remote_testes']['db_debug'] = TRUE;
$db['remote_testes']['cache_on'] = FALSE;
$db['remote_testes']['cachedir'] = "";
$db['remote_testes']['char_set'] = "utf8";
$db['remote_testes']['dbcollat'] = "utf8_general_ci";
#6

[eluser]Bob Puzld[/eluser]
"tomcode" and "Cesar Kohl" thanks for your advice. I have tried everything that you have said and neither has helped. I am wondering if has to do with the fact that I am using a GoDaddy shared (virtual host) directory. In other words, I share the hosting space with another one of my websites, and the domain is pointed to a folder. Do you think this might be the problem?
#7

[eluser]tomcode[/eluser]
Bob,

Yes GoDaddy requires special treatment for .htaccess files. You'll find loads of threads on the forum and there're articles on the Wiki.

I would first try to get the site up without .htaccess, i.e. set the index_page in the config file, comment all lines in .htaccess and get the site up.

Then You can worry about clean URL's.
#8

[eluser]Cesar Kohl[/eluser]
Maybe.

If I was you I would try to install the site in another server. If the problem persists so it's the CI. If not, it's the server.




Theme © iAndrew 2016 - Forum software by © MyBB