database connection
-
mike24williams
- Posts: 57
- Joined: Mon May 23, 2011 10:34 pm
database connection
Hi I have uploaded my files to the remote server and I cannot conect to the database.
these are the details I am using, I have changed the user and password for this discussion:-
Your Server Name: customguitarworkscou.ipagemysql.com
Database Name: cgwshop
Database Username: user1
Database Password: password1
the Alegro cart config file is looking for more information:-
define('CONFIG_VERSION', '1.2.6');
define('DB_HOST', 'customguitarworkscou.ipagemysql.com');
define('DB_USER', 'user1');
define('DB_PASSWORD', 'password1');
define('DB_NAME', 'cgwshop');
define('DIR_BASE', 'CGWshop/');
define('HTTP_BASE', 'http://www.customguitarworks.co.uk/CGWshop/');
define('HTTPS_BASE', '');
anybody got any ideas, i have tryed numerous combinations and have written test script and can connect to the database via this. but not the cart script.
i have a feeling the problem lies with the DIR_BASE but I am not sure.
Thanks in advance
best regards
mike
these are the details I am using, I have changed the user and password for this discussion:-
Your Server Name: customguitarworkscou.ipagemysql.com
Database Name: cgwshop
Database Username: user1
Database Password: password1
the Alegro cart config file is looking for more information:-
define('CONFIG_VERSION', '1.2.6');
define('DB_HOST', 'customguitarworkscou.ipagemysql.com');
define('DB_USER', 'user1');
define('DB_PASSWORD', 'password1');
define('DB_NAME', 'cgwshop');
define('DIR_BASE', 'CGWshop/');
define('HTTP_BASE', 'http://www.customguitarworks.co.uk/CGWshop/');
define('HTTPS_BASE', '');
anybody got any ideas, i have tryed numerous combinations and have written test script and can connect to the database via this. but not the cart script.
i have a feeling the problem lies with the DIR_BASE but I am not sure.
Thanks in advance
best regards
mike
Re: database connection
Create a file called test.hp with the content:
Upload it to your server where the store is, then open it in your browser.
http://www.customguitarworks.co.uk/CGWshop/test.php
You will get the DIR_BASE if you add a / to the end of the path.
Code: Select all
<?php
echo getcwd();
?>
http://www.customguitarworks.co.uk/CGWshop/test.php
You will get the DIR_BASE if you add a / to the end of the path.
-
mike24williams
- Posts: 57
- Joined: Mon May 23, 2011 10:34 pm
Re: database connection
Hi Leo,
I will do this today and get back.
best Regards
mike
I will do this today and get back.
best Regards
mike
-
mike24williams
- Posts: 57
- Joined: Mon May 23, 2011 10:34 pm
Re: database connection
I added the file and got the responce from the database, entered it and it still did not work. my script now reads ass follows I have left the test.php on the server
<?php
define('CONFIG_VERSION', '1.2.6');
define('DB_HOST', 'customguitarworkscou.ipagemysql.com');
define('DB_USER', 'user1');
define('DB_PASSWORD', 'password1');
define('DB_NAME', 'cgwshop');
define('DIR_BASE', '/hermes/bosweb26c/b2955/ipg.customguitarworkscou/CGWshop');
define('HTTP_BASE', 'http://www.customguitarworks.co.uk/CGWshop/');
define('HTTPS_BASE', '');
?>
any thoughts
regards
mike
<?php
define('CONFIG_VERSION', '1.2.6');
define('DB_HOST', 'customguitarworkscou.ipagemysql.com');
define('DB_USER', 'user1');
define('DB_PASSWORD', 'password1');
define('DB_NAME', 'cgwshop');
define('DIR_BASE', '/hermes/bosweb26c/b2955/ipg.customguitarworkscou/CGWshop');
define('HTTP_BASE', 'http://www.customguitarworks.co.uk/CGWshop/');
define('HTTPS_BASE', '');
?>
any thoughts
regards
mike
Re: database connection
What do you mean by not connecting to database. What type of error are you getting and what process are you trying to do.
-
mike24williams
- Posts: 57
- Joined: Mon May 23, 2011 10:34 pm
Re: database connection
hi brent,
/hermes/bosweb26c/b2955/ipg.customguitarworkscou/CGWshop
I run the code and got the path to the database on the remote server but I forgot to add / to the end in my script, it now works. thank you once again for you great support.
best regards
mike
/hermes/bosweb26c/b2955/ipg.customguitarworkscou/CGWshop
I run the code and got the path to the database on the remote server but I forgot to add / to the end in my script, it now works. thank you once again for you great support.
best regards
mike
-
alanrobinsonleigh
- Posts: 2
- Joined: Sun Apr 22, 2012 2:40 am
Re: database connection
if i may add a reply. if you change DB_HOST to localhost it might connect to the database. it may be a silly reply.