• Hello Fabrik Community

    Fabrik is now in the hands of the development team that brought you Fabrik for Joomla 4. We have recently transitioned the Fabrik site over to a new server and are busy trying to clean it up. We have upgraded the site to Joomla 4 and are running the latest version of Fabrik 4. We have also upgraded the Xenforo forum software to the latest version. Many of the widgets you might have been used to on the forum are no longer operational, many abandoned by the developers. We hope to bring back some of the important ones as we have time.

    Exciting times to be sure.

    The Fabrik 4.0 Official release is now available. In addition, the Fabrik codebase is now available in a public repository. See the notices about these in the announcements section

    We wish to shout out a very big Thank You to all of you who have made donations. They have really helped. But we can always use more...wink..wink..

    Also a big Thank You to those of you who have been assisting others in the forum. This takes a very big burden off of us as we work on bugs, the website and the future of Fabrik.

Can't connect to distant database with ip:port

fujitsuDev

New Member
Hi,

In Fabrik connection tab, I can't connect to distant server with IP and custom port 3308 according the scheme **.**.**.**:3308.
And I don't find any log to diagnose where is the problem... :(

76be73196922ac75ddc9f8cc1a73b07d.jpg


On the other hand, I can connect to standard host (distant too) with domain but without specifying port (beacause standard: 3306).

89e8570d8c02a6cc961815b25c7feb4f.jpg


Can you help me to fix this?
Thanks.
 
Yes. To make sure, I installed a phpmyadmin from another domain and the access to the this distant DB makes without problem.
 
I just walked through the code for using a port, and Fabrik is doing everything right. We just pass the string as-is, with the port (x.x.x.x:3308) to J!'s database driver, which (at least for MySQLi) then checks to see if there is a port suffix, and correctly parses it, and calls mysqli_connect() with the right arguments.

As for logging, there really isn't anything to log. The only error error J! reports is "Could not connect to MySQL server", if mysqli_connect() returns false. It never calls mysqli_connect_error() to get the actual connection error from PHP.

So all I can say is that it's not a Fabrik problem. Joomla is unable to connect, using mysqli_connect(), with the IP, port, user, password you are providing.

This of course assumes you are using MySQLi, rather than PDO?

-- hugh
 
Distant server works with MySQLi. The connection use an DB user registered from another server (same that Fabrik DB), not in the destination distant DB server.
This screenshot shows the PMA installed from another domain that access to the distant DB server (successfully):

aab9e882af07668d5771d5635d514813.jpg


Can this be related?
Because I'm certain that the username/password combo is right.
If PMA works with this configuration, I don't see any other reason at thit connection issue from J!/Fabrik... And there is no detailed log :(

Thanks.
 
I'm not sure what you mean by "installed from another domain" and "different IPs".

Are you running phpMyAdmin on the same server J! is running on? If not, then that only proves that the host phpMyAdmin is running on has access. You have to add remote host/user combinations individually to the access controls for the database server.

And there is no detailed log

Correct. As I explained, J!'s database drivers don't do any logging, they just tell you "could not connect".

-- hugh
 
That works finally...
Problem was that the login was entered with a space at the end of the string.

I suggest to add trim() of they fields for avoid this issue.
 
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top