Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

help!!! website relocation problem


Recommended Posts

Posted

Hi,

 

I am reclocating my store from a shared server to a dedicated server. I did a home back up for both data files and databases. I restored it to the new server. and updated the nameserver. now it seems the store front is working but not the admin.

 

if you go

 

http://www.oriental-ideas.com it's fine, but if you go

 

http://www.oriental-ideas.com/admin, here is what I get

 

Warning: session_start(): Cannot send session cookie - headers already sent by (output started at /home/oriental/public_html/admin/includes/configure.php:47) in /home/oriental/public_html/admin/includes/functions/sessions.php on line 67

 

Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at /home/oriental/public_html/admin/includes/configure.php:47) in /home/oriental/public_html/admin/includes/functions/sessions.php on line 67

 

Warning: Cannot modify header information - headers already sent by (output started at /home/oriental/public_html/admin/includes/configure.php:47) in /home/oriental/public_html/admin/includes/functions/general.php on line 86

 

 

my configure file

 

for store front

----------------------------------------------------------------------------------------------

define('HTTP_SERVER', 'http://www.oriental-ideas.com'); // eg, http://localhost - should not be empty for productive servers

define('HTTPS_SERVER', 'https://www.oriental-ideas.com'); // eg, https://localhost - should not be empty for productive servers

define('ENABLE_SSL', true); // secure webserver for checkout procedure?

define('HTTP_COOKIE_DOMAIN', 'www.oriental-ideas.com');

define('HTTPS_COOKIE_DOMAIN', 'www.oriental-ideas.com');

define('HTTP_COOKIE_PATH', '/');

define('HTTPS_COOKIE_PATH', '/');

define('DIR_WS_HTTP_CATALOG', '/');

define('DIR_WS_HTTPS_CATALOG', '/');

define('DIR_WS_IMAGES', 'images/');

define('DIR_WS_ICONS', DIR_WS_IMAGES . 'icons/');

define('DIR_WS_INCLUDES', 'includes/');

define('DIR_WS_BOXES', DIR_WS_INCLUDES . 'boxes/');

define('DIR_WS_FUNCTIONS', DIR_WS_INCLUDES . 'functions/');

define('DIR_WS_CLASSES', DIR_WS_INCLUDES . 'classes/');

define('DIR_WS_MODULES', DIR_WS_INCLUDES . 'modules/');

define('DIR_WS_LANGUAGES', DIR_WS_INCLUDES . 'languages/');

 

define('DIR_WS_DOWNLOAD_PUBLIC', 'pub/');

define('DIR_FS_CATALOG', '/home/oriental/public_html/');

define('DIR_FS_DOWNLOAD', DIR_FS_CATALOG . 'download/');

define('DIR_FS_DOWNLOAD_PUBLIC', DIR_FS_CATALOG . 'pub/');

-----------------------------------------------------------------------------------------------

for admin

-----------------------------------------------------------------------------------------------

define('HTTP_SERVER', 'http://www.oriental-ideas.com'); // eg, http://localhost - should not be empty for productive servers

define('HTTP_CATALOG_SERVER', 'http://www.oriental-ideas.com');

define('HTTPS_CATALOG_SERVER', 'https://www.oriental-ideas.com');

define('ENABLE_SSL_CATALOG', true); // secure webserver for catalog module

define('DIR_FS_DOCUMENT_ROOT', '/home/oriental/public_html/'); // where the pages are located on the server

define('DIR_WS_ADMIN', '/admin/'); // absolute path required

define('DIR_FS_ADMIN', '/home/oriental/public_html/admin/'); // absolute pate required

define('DIR_WS_CATALOG', '/'); // absolute path required

define('DIR_FS_CATALOG', '/home/oriental/public_html/'); // absolute path required

define('DIR_WS_IMAGES', 'images/');

define('DIR_WS_ICONS', DIR_WS_IMAGES . 'icons/');

define('DIR_WS_CATALOG_IMAGES', DIR_WS_CATALOG . 'images/');

define('DIR_WS_INCLUDES', 'includes/');

define('DIR_WS_BOXES', DIR_WS_INCLUDES . 'boxes/');

define('DIR_WS_FUNCTIONS', DIR_WS_INCLUDES . 'functions/');

define('DIR_WS_CLASSES', DIR_WS_INCLUDES . 'classes/');

define('DIR_WS_MODULES', DIR_WS_INCLUDES . 'modules/');

define('DIR_WS_LANGUAGES', DIR_WS_INCLUDES . 'languages/');

define('DIR_WS_CATALOG_LANGUAGES', DIR_WS_CATALOG . 'includes/languages/');

define('DIR_FS_CATALOG_LANGUAGES', DIR_FS_CATALOG . 'includes/languages/');

define('DIR_FS_CATALOG_IMAGES', DIR_FS_CATALOG . 'images/');

define('DIR_FS_CATALOG_MODULES', DIR_FS_CATALOG . 'includes/modules/');

define('DIR_FS_BACKUP', DIR_FS_ADMIN . 'backups/');

-----------------------------------------------------------------------------------------------

here is another thread on this issue.

 

http://www.oscommerce.com/forums/index.php?sho...=0entry352490

 

really need help!!!!!!!!!!

Posted

If you read the error you will see the following

 

Warning: session_start(): Cannot send session cookie - headers already sent by (output started at /home/oriental/public_html/admin/includes/configure.php:47) in /home/oriental/public_html/admin/includes/functions/sessions.php on line 67

 

The problem is in configure.php

 

Remove the blank line at the end and your problem will be solved.

Mark Evans

osCommerce Monkey & Lead Guitarist for "Sparky + the Monkeys" (Album on sale in all good record shops)

 

---------------------------------------

Software is like sex: It's better when it's free. (Linus Torvalds)

Posted

Mark,

 

thanks a lot, it works fine now!!! :P

 

can you help me with another question?

 

I have some other oscommerce based stores. I'm moving them one by one. I want to reduce the downtime and do a smooth transaction.

 

here is what I've done

 

1. make the previous one down for maintainance.

2. copy all data files and database and restore them to the new server.

3. change the nameserver.

 

Now in order to reduce down time, I modified the configure files to a ip address in stead of actual domain name, and did a redirect from the previous server.

 

the configure file I modified are

---------------------------------------------------------------------------------------------

define('HTTP_SERVER', 'http://www.oriental-ideas.com'); // eg, http://localhost - should not be empty for productive servers

define('HTTP_CATALOG_SERVER', 'http://www.oriental-ideas.com');

define('HTTPS_CATALOG_SERVER', 'https://www.oriental-ideas.com');

---------------------------------------------------------------------------------------------

define('HTTP_SERVER', 'http://ip); // eg, http://localhost - should not be empty for productive servers

define('HTTP_CATALOG_SERVER', 'http://ip');

define('HTTPS_CATALOG_SERVER', 'https://ip');

 

I did it for both store front and admin.

 

the store front works fine, but for admin

 

when I enter http://ip/admin, it automatically jump to

 

http://oriental-ideas.com/admin(previous server)

 

you have any idea?

 

Thanks

 

Kevin

Posted

if i get the jist of what you are doing,

 

server A is the old one, which is being transferred

 

server B is the new one, which has the database, live, up and running with all the data

 

DNS has not propogated

 

thus, Server A configure.php files point to the database on Server B

 

Server B configure.php files stay the way they should be, ie the alias or localhost

 

when DNS propogates, at times sales may come from Server A, others will come from Server B but all use the same database.

 

DNS takes from 24 to 72 hours to propogate.

 

The way I do it is get a store going on Server B, fully loaded, tested, etc with the same database name, username and password as on Server A. Then, in the middle of the night, I backup the database on Server A, and immediately restore to Server B. During this time, I rename index.php, until the database is working on Server B. Make the changes to Server A configure.php files, rename the index.php back to original and away you go

Posted

Hi, John,

 

I modified my server A configure.php file,

 

// define our database connection

define('DB_SERVER', '67.18.68.134'); // this ip is my server B ip.

define('DB_SERVER_USERNAME', 'usrname');

define('DB_SERVER_PASSWORD', 'password');

define('DB_DATABASE', 'dbname');

define('USE_PCONNECT', 'false'); // use persistent connections?

define('STORE_SESSIONS', 'mysql'); // leave empty '' for default handler or set to 'mysql'

 

 

but here is what I get

 

Warning: mysql_connect(): Host 'quela.farciert.net' is not allowed to connect to this MySQL server in /home/szscoot/public_html/includes/functions/database.php on line 19

Unable to connect to database server!

 

any idea?

Posted

you'll have to check with your host ( of server B ) to see if they allow remote mysql connections.

 

Do you use cPanel? If so, you can add a remote host (the ip of server A) by going to the mysql databases section.

 

James

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...