Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

How To Point Files To New Database Location


madstarr

Recommended Posts

Please Help. I have moved my database and files to a new server due to major problems with OLM.net hosting.

My database is moved or exported and imported and all my files in catalog have been uploaded to the site. Can anybody point me in the direction of instructions on how to make my pages go to the new database location.

 

Thank you.

Sitara :'(

Link to comment
Share on other sites

Only two files to edit:

 

includes/configure.php

admin/includes/configure.php

 

The only things you should need to edit are:

 

1. The database section

2. The DIR_FS pathways

 

Vger

Link to comment
Share on other sites

Thank you for your assistance.

 

I have done this to the best of my ability but i am getting this error when i go to the index.php page

 

Warning: mysql_pconnect() [function.mysql-pconnect]: Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2) in /data/9/1/40/98/1203750/user/1282751/htdocs/sofiapomana/catalog/includes/functions/database.php on line 17

Unable to connect to database server!

 

any ideas if this is because my path to my database is incorrect or if it is another problem.

 

Thanks again

Link to comment
Share on other sites

Make sure that use_pconnect is set to false in both configure.php files - as using Persistent Connections may actually be barred by your hosting company.

 

If you want to find out what your actual DIR_FS pathway to the root of your domain is, do this:

 

1. Create a text file on your desktop and rename it to cwd.php

2. Put this code in it and then upload it to the root of your website:

<?php
$p = getcwd();
echo $p;
?>

3. Go to http://www.yourdomain.com/cwd.php and it'll print out your root DIR_FS pathway on the screen.

4. Write it down and then delete the cwd.php file from your website.

 

Vger

Link to comment
Share on other sites

Make sure that use_pconnect is set to false in both configure.php files - as using Persistent Connections may actually be barred by your hosting company.

 

If you want to find out what your actual DIR_FS pathway to the root of your domain is, do this:

 

1. Create a text file on your desktop and rename it to cwd.php

2. Put this code in it and then upload it to the root of your website:

<?php
$p = getcwd();
echo $p;
?>

3. Go to http://www.yourdomain.com/cwd.php and it'll print out your root DIR_FS pathway on the screen.

4. Write it down and then delete the cwd.php file from your website.

 

Vger

 

Thank you that got me one step closer. I am not sure why this is escaping me at the time, but now i am gettting the error

 

Warning: mysql_connect() [function.mysql-connect]: Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2) in /data/9/1/40/98/1203750/user/1282751/htdocs/sofiapomana/catalog/includes/functions/database.php on line 19

Unable to connect to database server!

 

Line 19 in database.php is

$$link = mysql_connect($server, $username, $password);

 

 

within this code

 

if (USE_PCONNECT == 'true') {

$$link = mysql_pconnect($server, $username, $password);

} else {

$$link = mysql_connect($server, $username, $password);

}

 

if ($$link) mysql_select_db($database);

 

return $$link;

 

 

ANY HELP GREATLY APPRECIATED

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...