Sunday Aug 01
Open WebApps Forums Please login or register if you would like to post
Welcome, Guest
Forums > Joomla - Vtiger > Joomla - Vtiger Lead Capturing > Remote MySQL server access
Post ReplyJoomla - Vtiger Lead Capturing
No Avatar uehle
Open WebApps Forum - Newbie
Posts: 1
Open WebApps Forum - Newbie
Registered
Joined Board
Feb, 19.2010 13:08

Offline User is Offline
View all users posts

Hello,

Your appl. works great with a localhost database on the same server where the Joomla installation resides.

But when I try to use a remote MySQL database I'm having problems.

When I replace "localhost" with my remote MySQL database server webaddress in the form of "24.24.24.24:2424" I get a database connection error.

I checked with my hoster so I have the correct database webaddress. I also set my server to allow remote MySQL access from the IP where my Joomla with the login form is residing.

Is there anything wrong in the .php script with using the form "24.24.24.24:2424" ?

Also does the app. work with vTiger version 5.0.4 ?

Thanks,
Uwe

The Moderator The Moderator
Open WebApps Forum - Experienced
Posts: 62
Open WebApps Forum - Experienced
Administrator
Joined Board
Oct, 28.2008 06:45

Offline User is Offline
View all users posts

Hello Uwe,
Or if you are a German then "gruss got" :-). Thank you for employing our extension.
It works very well with Vtiger 5.0.4 .
I think the database connection is due to your unusual MySql port number, the default number is 3306. If you want to use a non default MySql port number the add it as an integer parameter in mysqli_connect in v_connect . It should be added as the last parameter, and remove it from the host definition, 24.24.24.24 instead of 24:24:24:24:2424
Cheers

No Avatar Herrera
Open WebApps Forum - User
Posts: 30
Open WebApps Forum - User
Registered
Joined Board
Feb, 10.2010 06:19

Offline User is Offline
View all users posts

Well, v_connect show us that in order to establish a connection between client side (Joomla) and vTiger's database "mysqli_connect" function is used. Far as I can remember you have to configure v_connect as follows:

// In the following line Replace vtiger_database_user_name with UserNameToAccessYourMysqlVitigerDatabase
$vtigerdb['username']="user";
// In the following line Replace vtiger_database_user_password with PasswordToAccessYourMysqlVitigerDatabase
$vtigerdb['password']="pass";
// In the following line Replace ip_address_or_url_of_mysql_vtiger_database_server with YourVtigerMysqlServerWebAddress
$vtigerdb['host']="ip";
// In the following line Replace vtiger_database_name with YourVtigerDatabaseName
$vtigerdb['database']="dbname";
//
// Do not modify the fallowing lines
//
@$vtdb = mysqli_connect($vtigerdb['host'], $vtigerdb['username'], $vtigerdb['password'], $vtigerdb['database'],yourport);

As you can see, despite the warning "Do not modify the 'fallowing' lines", you actually have to add your port number. I suggest you to add it as an integer (without quotation marks) because a number is requiered by the function. Hope it helps you.

No Avatar Pfeiffer
Open WebApps Forum - Newbie
Posts: 2
Open WebApps Forum - Newbie
Registered
Joined Board
Mar, 05.2010 13:22

Offline User is Offline
View all users posts

I am getting:
Error
Vtiger database connection error

Having read the prior posts, I think I have the username, password, and URL correct. However, I don't think I have 'YourVtigerDatabaseName' correct. I have tried the mySQL DB name in my system, with and without 'vtiger' as a prefix.

FYI, my URL is of the form '23.23.244.244', I have also tried the IP the :1234 suffix. I have also tried it as 'http://23.23.244.244'

My host is hostgator.com. I have experienced hostgator requiring whitelisting. Please advise, thanks

No Avatar Herrera
Open WebApps Forum - User
Posts: 30
Open WebApps Forum - User
Registered
Joined Board
Feb, 10.2010 06:19

Offline User is Offline
View all users posts

I am getting:
Error
Vtiger database connection error

Having read the prior posts, I think I have the username, password, and URL correct. However, I don't think I have 'YourVtigerDatabaseName' correct. I have tried the mySQL DB name in my system, with and without 'vtiger' as a prefix.

FYI, my URL is of the form '23.23.244.244', I have also tried the IP the :1234 suffix. I have also tried it as 'http://23.23.244.244'

My host is hostgator.com. I have experienced hostgator requiring whitelisting. Please advise, thanks

I wonder if you add port number. I suggest you to take a look at mysqli_connect documentation Remember that port number is int, hence, you don´t need to add any kind of quotes.

Hope this solves the issue.

No Avatar Pfeiffer
Open WebApps Forum - Newbie
Posts: 2
Open WebApps Forum - Newbie
Registered
Joined Board
Mar, 05.2010 13:22

Offline User is Offline
View all users posts

I am getting:
Error
Vtiger database connection error

Having read the prior posts, I think I have the username, password, and URL correct. However, I don't think I have 'YourVtigerDatabaseName' correct. I have tried the mySQL DB name in my system, with and without 'vtiger' as a prefix.

FYI, my URL is of the form '23.23.244.244', I have also tried the IP the :1234 suffix. I have also tried it as 'http://23.23.244.244'

My host is hostgator.com. I have experienced hostgator requiring whitelisting. Please advise, thanks

I wonder if you add port number. I suggest you to take a look at mysqli_connect documentation Remember that port number is int, hence, you don´t need to add any kind of quotes.

Hope this solves the issue.

I read the information, I believe I have the syntax correct. Hostgator requires that I add Remote Database Access Hosts, in the form 192.168.1.%. Could that be the problem, and if so, what is your address?

No Avatar Herrera
Open WebApps Forum - User
Posts: 30
Open WebApps Forum - User
Registered
Joined Board
Feb, 10.2010 06:19

Offline User is Offline
View all users posts

How did your config ended up???? May I see the params?



Our Mission


Open WebApps is focused on propelling business efficiency and profitability by assisting corporations in leveraging Open Source, web-based technologies.

Our professional and service oriented staff will help you deploy, integrate, and even train your people on these incredibly powerful, feature rich, secure and stable systems. Our solution and service offering is broad, extending through Sales / Marketing Automation, Customer Relationship Management (CRM) Solutions, E-Learning Solutions, Open Source Consulting, Custom Software Development & Support, and Training. We have the unified goal of bringing outrageous value to your business paradigm, by advancing harmony & intelligibility within your enterprise.