Page 1 of 1

DB connection fatal error. Developer not answered support emails for 3 weeks.

Posted: Mon Mar 25, 2019 8:05 pm
by brussell
Hi,

I purchased a mod from a developer, but they seem to have disappeared. No reply to any support emails after 3 weeks.

I am hoping that I can find some suggestions with resolving the issue.

It is a database connection issue. Using PHP 7.0.33, mysqli database. OC version 2.3.0.2.

The code the developer has used for the db connection is:

Code: Select all

<?php
include './../config.php';
$connection = mysql_connect(DB_HOSTNAME, DB_USERNAME, DB_PASSWORD)
or die ('I can not connect to the database');
mysql_select_db(DB_DATABASE) or die ('I can not select database');
$con=mysqli_connect(DB_HOSTNAME,DB_USERNAME,DB_PASSWORD,DB_DATABASE);
mysql_query("SET NAMES 'utf8'");
?>
The following error occurs:

Code: Select all

Fatal error: Uncaught Error: Call to undefined function mysql_connect() in [path redacted]:6 Stack trace: #0 [path redacted](15): include() #1 {main} thrown in [path redacted]on line 6
Can anyone suggest what might work?

Thanks to anyone taking time out to reply :)

Re: DB connection fatal error. Developer not answered support emails for 3 weeks.

Posted: Mon Mar 25, 2019 8:19 pm
by thekrotek
mysql was deprecated a long time ago, mysqli should be used everywhere.

Re: DB connection fatal error. Developer not answered support emails for 3 weeks.

Posted: Mon Mar 25, 2019 9:30 pm
by brussell
Hi Thanks for your reply. Yes, requires amends to the code, so wondering if you or anyone else has any ideas what code might work?

Re: DB connection fatal error. Developer not answered support emails for 3 weeks.

Posted: Mon Mar 25, 2019 10:21 pm
by thekrotek
brussell wrote:
Mon Mar 25, 2019 9:30 pm
Hi Thanks for your reply. Yes, requires amends to the code, so wondering if you or anyone else has any ideas what code might work?
But I just told you what you need to do...

Re: DB connection fatal error. Developer not answered support emails for 3 weeks.

Posted: Mon Mar 25, 2019 11:03 pm
by brussell
Sorry, I see what you mean. Had already tried changing the mysql references to mysqli but gives the following error:

Code: Select all

Warning: mysqli_select_db() expects exactly 2 parameters, 1 given in [path redacted] on line 8
I can not select database

Re: DB connection fatal error. Developer not answered support emails for 3 weeks.

Posted: Mon Mar 25, 2019 11:34 pm
by thekrotek
brussell wrote:
Mon Mar 25, 2019 11:03 pm
Sorry, I see what you mean. Had already tried changing the mysql references to mysqli but gives the following error:

Warning: mysqli_select_db() expects exactly 2 parameters, 1 given in [path redacted] on line 8
I can not select database
You can always open php.net and search for desired function to see, which parameters it requires.

Re: DB connection fatal error. Developer not answered support emails for 3 weeks.

Posted: Tue Mar 26, 2019 12:17 am
by brussell
Thanks for your suggestion, but I'm not a coder so wouldn't know where to start. If you or anyone else has any suggestions what parameters are required then it would be a great help.

Re: DB connection fatal error. Developer not answered support emails for 3 weeks.

Posted: Tue Mar 26, 2019 1:44 am
by thekrotek
brussell wrote:
Tue Mar 26, 2019 12:17 am
Thanks for your suggestion, but I'm not a coder so wouldn't know where to start. If you or anyone else has any suggestions what parameters are required then it would be a great help.
If you're not a coder, you can always request a commercial support.

Re: DB connection fatal error. Developer not answered support emails for 3 weeks.

Posted: Tue Mar 26, 2019 2:32 am
by xxvirusxx
brussell wrote:
Mon Mar 25, 2019 8:05 pm
I purchased a mod from a developer, but they seem to have disappeared. No reply to any support emails after 3 weeks.
What extension?
Worked before?

Re: DB connection fatal error. Developer not answered support emails for 3 weeks.

Posted: Tue Mar 26, 2019 3:15 am
by brussell
@thekrotek: I've already spent $60 on an extension that does not work. Was hoping there might be someone who could suggest a fix. If it's not an easy fix, then yes, I'd look to commercial support. However, I've used this forum in the past and there were posters who used to help with minor fixes.
@ xxvirusxx: Installed the extension and it did not work as it could not connect to the database.

Re: DB connection fatal error. Developer not answered support emails for 3 weeks.

Posted: Tue Mar 26, 2019 3:45 am
by xxvirusxx
Extension name is secret?

Re: DB connection fatal error. Developer not answered support emails for 3 weeks.

Posted: Tue Mar 26, 2019 3:55 am
by IP_CAM
One of them should probably be changed:
either:

Code: Select all

$connection = mysql_connect(DB_HOSTNAME, DB_USERNAME, DB_PASSWORD)
or:

Code: Select all

$con=mysqli_connect(DB_HOSTNAME,DB_USERNAME,DB_PASSWORD,DB_DATABASE);
---
Same here, only one of them might work:
mysql_query("SET NAMES 'utf8'");
or:
mysqli_query....
---
But I am really not a DB Pro ... :-\
Ernie

Re: DB connection fatal error. Developer not answered support emails for 3 weeks.

Posted: Tue Mar 26, 2019 3:56 am
by brussell
I don't want to advertise the name of the extension as the there may be a good reason the Developer hasn't replied in the past 3 weeks. Naming the extension would risk bad publicity for the Developer. Is anyone else able to help? Thanks.

Re: DB connection fatal error. Developer not answered support emails for 3 weeks.

Posted: Tue Mar 26, 2019 3:57 am
by brussell
@ IP_CAM: thank you so much, much appreciated. I will try your suggestion tomorrow :)

Re: DB connection fatal error. Developer not answered support emails for 3 weeks.

Posted: Tue Mar 26, 2019 4:44 am
by xxvirusxx
brussell wrote:
Tue Mar 26, 2019 3:56 am
I don't want to advertise the name of the extension as the there may be a good reason the Developer hasn't replied in the past 3 weeks. Naming the extension would risk bad publicity for the Developer.
lol, but for you isn't bad to spend 60$ and that extension doesn't work?

Or for 50 users if buy that extension?

Write 2.3.0.2 compatibility on extension page? or is for old version?

Re: DB connection fatal error. Developer not answered support emails for 3 weeks.

Posted: Tue Mar 26, 2019 6:20 pm
by brussell
xxvirusxx wrote:
Tue Mar 26, 2019 4:44 am
lol, but for you isn't bad to spend 60$ and that extension doesn't work?

Or for 50 users if buy that extension?

Write 2.3.0.2 compatibility on extension page? or is for old version?
OC has been made aware of it. Developer was answering comments a week before I purchased the extension. As frustrating as it is, I'd rather give the guy a chance. Compatibility includes 2.3.0.2 and up to 3.1. Other versions have the same db connect code.

@IP_CAM: The code below has stopped the errors, at least the errors are now referencing another file. I'll try working through them or hiring a developer if no luck. Thanks again for trying to help.

Code: Select all

<?php
include './../config.php';
$connection = mysqli_connect(DB_HOSTNAME, DB_USERNAME, DB_PASSWORD)
or die(mysqli_error($con));
mysqli_select_db($connection, DB_DATABASE) or die(mysqli_error($con));
?>

Re: DB connection fatal error. Developer not answered support emails for 3 weeks.

Posted: Wed Jan 08, 2020 11:14 pm
by gabriel10
I'm taken with this plugin for 59 USD
Same problem, connection error

What if some help?
Have you solved the connection problem?

The seller does not respond and the money is not received back
A scam the seller
Thank you very much
https://www.opencart.com/index.php?rout ... n_id=21992 (Automatic Feed Dropshop Warrior)