Forums

On opening Chronoforms 5 get "Could not connect to MySQL"

amsharma 24 Apr, 2015
Hello,

Ever since I shifted my whole website from one server to another including databases, my Chronoforms 5 installation has stopped working. Neither the administrator's Forms Manager works nor the Chronoform on the website work. I only get "Could not connect to MySQL". Rest of Joomla works ok. The user / password in configuration.php is correct as the rest of the site is working fine. The only thing that has changed on the server is that "mysql" driver is not supported, only "mysqli" is supported. Does CF5 has the driver name hard coded somewhere. I did a string search - found "mysql" in chronoforms5.xml and db_read.php, db_save.php in actions directory. I even tried changing those to "mysqli". Hasn't made much difference.

Any idea why its not working.

Regards
Amal
GreyHead 25 Apr, 2015
Hi Amal,

I haven't seen this problem reported before so I suspect it is something in your site settings. ChronoForms v5 runs OK on MSQLi here.

What do you have in your site Global Configuration for the Database Type?

Bob
amsharma 28 Apr, 2015
Bob,

Sorry I missed your post as I didn't get any email. The "Database Type" contains MySQLi and I can see a corresponding "mysqli" in configuration.php. I reset the password as that seemed to be an issue in one case. I am PMing you the user / pass if you want to have a look. I can't figure out what could be the issue.

Amal
Max_admin 28 Apr, 2015
Hi,

Please try to download the latest CF update and install it OVER your existing install, try also to click the "delete cache" button in the forms manager.

Regards,
Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
GreyHead 29 Apr, 2015
Hi Amal & Max,

I just logged in and can confirm that you can't see the Forms Manager - just the MySQL error message. I re-installed the latest ChronoForms and that made no difference. The Site DB settings look OK and I can't see anything to explain what is happening :-(

Bob
relliott 11 Sep, 2015
Hello,

I am having this same issue. I am running Joomla 3.4.4 and I have updated my ChronoForms to most current updated (28-07-2015).

I get this error by switching my PHP from 5.3 to 5.5.

When I specify in my htaccess file to use 5.3 the form works without a problem. As soon as I switch to 5.5 I get this error: "Could not connect to MySQL".

Has anyone figured out a work around?
GreyHead 12 Sep, 2015
Hi relliott,

I've been running a test site on Joomla! 3,4.3 with PHP 5.5 for a while with no errors, I just updated to Joomla! 3.4.4 and no errors there either.

Is your form running any custom code? It could be that there is something left over that no longer runs??

Bob
foxy202 17 Sep, 2015
1 Likes
Hi

I have same problem and able to fix it only with change of Joomla Configuration -> "Database Type" to MySQL (PDO)


Emil
:Fox: 18 Sep, 2015
@GreyHead
To replicate the problem uninstall the php5-mysql driver from the system and install php5-mysqlnd driver instead.
Place a breakpoint in \GCore\Libs\DatabaseObject::getTableColumns()
You'll see that JDatabaseDriverMysql::isSupported() returns false, which causes the exception mentioned raised by JDatabaseDriverMysql::connect().

I'm not affiliated with or endorsed by "foxy202".
GreyHead 18 Sep, 2015
Hi,

You need Max to look at this - if you are still having a problem please use the Contact Us menu above and link to this thread.

Bob
amsharma 12 Nov, 2015
Hello,

Did this get solved. I am still getting this error. Is there an issue Joomla core as @:Fox: pointed out - but I couldn't find the code he mentioned. Even if I try to upgrade to Chronoforms 5.0.10, it still gives same error.

I found a work around though - Even if I am not using MySQL driver, its presence is required. My server only gives option MySQLi. If I go into CPanel -> PHP Configuration and tick option for MySQL, everything starts working. I think this is the same as @:Fox: pointed out. @ccondo has also raised the same issue in http://www.chronoengine.com/forums/posts/t100523/p352062.html. We should find the primary code where this error is occurring. Does Chronoforms code check for presence of "MySQL" (not MySQLi) driver anywhere?

Amal
Max_admin 12 Nov, 2015
Please check:
http://www.chronoengine.com/faqs/70-cfv5/5265-could-not-connect-to-mysql.html

Regards,
Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
amsharma 13 Nov, 2015
Max,

Thanks. The only issue is that I don't see the option for MySQL(PDO) in my Joomla installation even though that is ON in the PHP Configuration of CPanel. After I switched On MySQL, that does appear as an option. Maybe I should talk to my hosting provider.

Regards
Amal
This topic is locked and no more replies can be posted.