Could not connect to MySQL.

stewart9643

New Member
Getting this on a new install J2.6 php5.4 when selecting connections
Could not connect to MySQL.

Also Notice: Undefined variable: k in /clientdata/apache-www/j/j/domain.com.au/www/administrator/components/com_fabrik/models/home.php on line 97

Assistance please.

 
that would suggest your connection details are incorrect.
Have you added a new connection in fabrik, or are you using the default one?

Check the connection details match up with what they should be.

Check that if you have a new connection set up and it is not on the same server as your website, that the mySQL database and user has rights to access the database via an IP addresse
 
Connecting to DB

Without appearing stupid. How do I connect to the new DB or where are the instructions. Every aspect of Fabrik seems to imply the DB is connected, but no plugin's etc offer the opportunity to configure a DB.

Thanks
Stewart
 
To me it seems like something strange is going on. Have you moved your site from one server to another? I wonder if mod_security is having an issue here and throwing 500 errors...Not really sure.
 
500 Errors

No. This is a clean install on a new site. I'll shut seo/sef and see if maybe that makes a difference.
This is the error displayed on the welcome screen.

Notice: Undefined variable: k in /clientdata/apache-www/j/j/jjsecurity.com.au/www/administrator/components/com_fabrik/models/home.php on line 97

Thanks
 
Still not working

Warning: Invalid argument supplied for foreach() in /clientdata/apache-www/j/j/jjsecurity.com.au/www/administrator/components/com_fabrik/views/home/tmpl/default.php on line 50

This comes up when clicking on Stats .
The 500 error is still showing and no options to configure DB.

Have shut down ACESef and cleaned all caches. Still no joy.

Thanks

 
Can you also check in ./libraries/joomla/database/database and make sure there is a mysql_fab.php and a mysqli_fab.php.

The only real unknown here is PHP 5.4. Neither Rob nor I have actually tried running Fabrik with 5.4.

But as Troester said, if you can upgrade to 3.0.6.3, or do a github update, so we are running the same code, that would help us diagnose this.

FYI, I've fixed that notice about "undefined variable $k", it has nothing to do with the main issue you are having, it just gets revealed as part of the fallout. The "invalid argument" looks like a knock on error from not being able to see the database.

-- hugh
 
Still no luck.

mysql_fab.php and a mysqli_fab.php. are both present.

Does Fabrik write to php.ini? I am on a cloud server and Php.ini can not be written to. I installed on a site using CPanel and installation went smoothly.

I possibly could move servers but I am tired of moving servers, downtime affects business and because I haven't used fabrik yet, I am yet to determine if it is worth moving. The cloud server gives much better performance than CPanel, but php.ini restrictions may cause issues.

The CPanel site uses everything my main site has plus more yet Fabrik works fine. The only difference I can see is the server platform.
 
We don't touch the php.ini file

I just updated to php 5.4.4 and can still connection.

Tripple tripple check your default database connections.

Ensure that you save them, even if they look correct - just to be really sure

I'm 99% sure this is where the issue lies.
 
Setting Database Connections

As stated before, there is no option I can see to configure or even view connections. The setup on the other machine displays possible connections but this one just says it cannot connect to MySQL. Is there someway to manually edit a file to enter my connections that way. I have cleaned all traces of Fabrik from my system and done a complete reinstall of the latest version but I get the same errors.
I have no doubt the problem is setting the DB connection, but I can't get that far.

Thanks
 
Do you see the 'can not connect to mySQL' notice on all fabrik administration pages or just the connection page?

Have you asked your hosting provider if they have any ideas?

Have you looked in #__fabrik_connections, with something like phpMyAdmin to see if the connection details are correct. I'm pretty sure they should be but best to check in case.

My guess is that there must be something host specific that is causing the issue, most likely in the mySQL configuration, which is defined in the file my.cnf, its location depends on your host enviroment.
 
We are in need of some funding.
More details.

Thank you.

Members online

No members online now.
Back
Top