| Previous topic :: Next topic |
| Author |
Message |
codyheit
Joined: 17 Jun 2006
Posts: 258
|
| Posted: Sun Jul 09, 2006 7:30 am Post subject: Question about setting up connection.php file on a hosted cp |
|
|
Hi
I'm currently trying to setup vtiger on a hosted cpanel account and are having problems setting up the connection.php file has I don't know where I can find the below information:
$mysql_username (I create this so it is easy to find)
$mysql_password (I create this so it is easy to find)
$mysql_port (Don't know where to find this)
$apache_port (Don't know where to find this)
Look forward to someone's response!
P.S Then I simply just run the connection.php fle don't I? |
|
| Back to top |
|
cabugs
Joined: 25 Apr 2006
Posts: 44
Location: Reims
|
| Posted: Mon Jul 10, 2006 12:07 pm Post subject: Question about setting up connection.php file on a hosted cp |
|
|
Hi,
to set up vtiger you can access the page : http://your_domain/vtiger_crm_directory/index.php, and then you will be asked for the requiered values, you don't have to edit the config file manually. Otherwise the default values are for mysql_port 3306 and for apache_port 80. |
|
| Back to top |
|
codyheit
Joined: 17 Jun 2006
Posts: 258
|
| Posted: Mon Jul 10, 2006 1:54 pm Post subject: Question about setting up connection.php file on a hosted cp |
|
|
Thanks
I have managed to get to step 2-3 but are having the following problem:
I believe that I have the database incorrectly listed as in step 3 it just says databasename and not username_databasename. (I'm on a hosted shared cpanel account) It will not let me click on the box to delete and enter the correct database name. Where else can I configure this file?
Thanks |
|
| Back to top |
|
cabugs
Joined: 25 Apr 2006
Posts: 44
Location: Reims
|
| Posted: Mon Jul 10, 2006 3:15 pm Post subject: Question about setting up connection.php file on a hosted cp |
|
|
You can find/set this information in the file conig.php (or config.inc.php). Otherwise the installation is made via the scripts in install/ directory.
But have you first created the database before the beginning of the installation ? |
|
| Back to top |
|
codyheit
Joined: 17 Jun 2006
Posts: 258
|
| Posted: Tue Jul 11, 2006 6:21 am Post subject: Question about setting up connection.php file on a hosted cp |
|
|
Where in the configure file can you change the settings:
<?php
/*********************************************************************************
* The contents of this file are subject to the SugarCRM Public License Version 1.1.2
* ("License"); You may not use this file except in compliance with the
* License. You may obtain a copy of the License at http://www.sugarcrm.com/SPL
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for
* the specific language governing rights and limitations under the License.
* The Original Code is: SugarCRM Open Source
* The Initial Developer of the Original Code is SugarCRM, Inc.
* Portions created by SugarCRM are Copyright (C) SugarCRM, Inc.;
* All Rights Reserved.
* Contributor(s): ______________________________________.
********************************************************************************/
/* Database configuration
db_host_name: MySQL Database Hostname
db_user_name: MySQL Username
db_password: MySQL Password
db_name: MySQL Database Name
*/
require_once("connection.php");
// To make MySQL run in desired port
$sock_path=":" .$mysql_port;
$H_NAME=gethostbyaddr($_SERVER['SERVER_ADDR']);
//All of these commented out values get populated by install.php
//$dbconfig['db_host_name'] = '$H_NAME.$sock_path';
//$dbconfig['db_user_name'] = 'vtigercrm';
//$dbconfig['db_password'] = '';
//$dbconfig['db_name'] = 'vtigercrm';
//$host_name = '';
//$site_URL = '';
//$root_directory = '';
// This is the full path to the include directory including the trailing slash
//$includeDirectory = $root_directory.'include/';
$list_max_entries_per_page = '10';
$history_max_viewed = '10';
//define list of menu tabs
//$moduleList = Array('Home', 'Dashboard', 'Leads', 'Contacts', 'Accounts', 'Opportunities', 'Cases', 'Notes', 'Calls', 'Emails', 'Meetings', 'Tasks');
$default_module = 'Home';
$default_action = 'index';
//set default theme
$default_theme = 'orange';
$databasetype = 'mysql';
// If true, the time to compose each page is placed in the browser.
$calculate_response_time = true;
// Default Username - The default text that is placed initially in the login form for user name.
$default_user_name = '';
// Default Password - The default text that is placed initially in the login form for password.
$default_password = '';
// Create default user - If true, a user with the default username and password is created.
$create_default_user = false;
// Login Message - If a message is provided, it will be placed on the login screen. This is for site specific special instructions
$login_message = 'Please login to the application.';
?> |
|
| Back to top |
|
cabugs
Joined: 25 Apr 2006
Posts: 44
Location: Reims
|
| Posted: Tue Jul 11, 2006 8:43 am Post subject: Question about setting up connection.php file on a hosted cp |
|
|
It's the variable $dbconfig which contains configuration settings to connect to the database. For example, if you have following configuration :
$dbconfig['db_host_name'] = '38.45.126.25';
$dbconfig['db_user_name'] = 'vtiger_user';
$dbconfig['db_password'] = 'passwrd';
$dbconfig['db_name'] = 'vtigercrm';
You must create a database vtigercrm on which the user vtiger_user must have all privileges.
And you need to be able to connect to the database with a command like :
mysql -h 38.45.126.25 -u vtiger_user -p vtigercrm
and give your password.
Note that setting up a special user for vtiger whith a password and allowing a connection only via the localhost host is surely more secure than using the default mysql login/passwd root/. |
|
| Back to top |
|
codyheit
Joined: 17 Jun 2006
Posts: 258
|
| Posted: Wed Jul 12, 2006 5:09 am Post subject: Question about setting up connection.php file on a hosted cp |
|
|
Thanks for helping it is much appreiated.
I have the following settings:
$H_NAME=gethostbyaddr($_SERVER['SERVER_ADDR']);
//All of these commented out values get populated by install.php
//$dbconfig['db_host_name'] = '$H_NAME.$sock_path';
//$dbconfig['db_user_name'] = 'vtigercrm';
//$dbconfig['db_password'] = '';
//$dbconfig['db_name'] = 'sacotech_vtigercrm42';
//$host_name = '';
So I have changed the db name to match the mysql database which I created but it isn't changing it when I go to install Vtiger at the URL below:
http://www.sacotech.com.au/vtiger_crm/
P.S I have created the mysql data base with these settings:
Users in vtigercrm42
sacotech_vtiger (Privileges: ALL PRIVILEGES)
Connection Strings
Perl $dbh = DBI->connect("DBI:mysql:sacotech_vtigercrm42:localhost","sacotech_vtiger","<PASSWORD HERE>");
PHP $dbh=mysql_connect ("localhost", "sacotech_vtiger", "<PASSWORD HERE>") or die ('I cannot connect to the database because: ' . mysql_error());
mysql_select_db ("sacotech_vtigercrm42"); |
|
| Back to top |
|
cabugs
Joined: 25 Apr 2006
Posts: 44
Location: Reims
|
| Posted: Wed Jul 12, 2006 9:24 am Post subject: Question about setting up connection.php file on a hosted cp |
|
|
Hi, I've just test the address you give and yea it's not possible to connect to the database. As it is written in the vtiger_CRM_Installation_Guide :
If you want to use different database then modify the 2setConfig.php file present under the <vtiger CRM Home>/install/ directory as given below in all the places.
$db_name = 'vtigercrm4_2'; to
$db_name = 'sacotech_vtigercrm42';
In the connection.php file present under the <vtiger CRM Home> directory, populate the values for the following variables:
$mysql_username
$mysql_password
$mysql_port
$apache_port
Example:
$mysql_username = 'root';
$mysql_password = 'public';
$mysql_port = '3306';
$apache_port = '0.0.0.0:80';
4. Start Web Browser and follow the procedure given in the "Configuring vtiger CRM Server" section for completing the vtiger CRM installation.
Note : be sure to change the password of the mysql user because it is displayed in the source code of the page you give the address. |
|
| Back to top |
|
codyheit
Joined: 17 Jun 2006
Posts: 258
|
| Posted: Wed Jul 12, 2006 3:37 pm Post subject: Question about setting up connection.php file on a hosted cp |
|
|
Hi
Thanks for helping
I'm very confused now on how to set it up. I would use the default database name, user name and password which I have just changed back to but as I'm installing on a hosted cpanel account I have to add my cpanel username in front of the database name and username don't I?
This is where I get confused as it simply doesn't let me change it when installing from my URL:
http://www.sacotech.com.au/vtiger_crm/
So I'm trying to work out exactly what files I have to edit to compensate for being on the hosted cpanel account. |
|
| Back to top |
|
cabugs
Joined: 25 Apr 2006
Posts: 44
Location: Reims
|
| Posted: Wed Jul 12, 2006 4:03 pm Post subject: Question about setting up connection.php file on a hosted cp |
|
|
| I see in the step 2 in the field "Host Name" the value "mercury.quikservers.net:MYSQLPORT". I think you haven't edited the connection.php file like I say before, you have to edit the value of the variable $mysql_port (normally the value is 3306). I can't be more precise because I don't know how works cpanel. |
|
| Back to top |
|
| |