Post by brussell » Mon Mar 25, 2019 8:05 pm

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 :)
Last edited by straightlight on Thu Jan 30, 2020 9:16 am, edited 1 time in total.
Reason: Added code tags.

New member

Posts

Joined
Thu Jan 31, 2013 12:51 am

Post by thekrotek » Mon Mar 25, 2019 8:19 pm

mysql was deprecated a long time ago, mysqli should be used everywhere.

Professional OpenCart extensions, support and custom work.
Contact me via email or Skype by support@thekrotek.com


User avatar
Expert Member

Posts

Joined
Sun Jul 03, 2016 12:24 am


Post by brussell » 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?

New member

Posts

Joined
Thu Jan 31, 2013 12:51 am

Post by thekrotek » Mon Mar 25, 2019 10:21 pm

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...

Professional OpenCart extensions, support and custom work.
Contact me via email or Skype by support@thekrotek.com


User avatar
Expert Member

Posts

Joined
Sun Jul 03, 2016 12:24 am


Post by brussell » 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:

Code: Select all

Warning: mysqli_select_db() expects exactly 2 parameters, 1 given in [path redacted] on line 8
I can not select database
Last edited by straightlight on Thu Jan 30, 2020 9:16 am, edited 1 time in total.
Reason: Added code tags.

New member

Posts

Joined
Thu Jan 31, 2013 12:51 am

Post by thekrotek » Mon Mar 25, 2019 11:34 pm

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.

Professional OpenCart extensions, support and custom work.
Contact me via email or Skype by support@thekrotek.com


User avatar
Expert Member

Posts

Joined
Sun Jul 03, 2016 12:24 am


Post by brussell » 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.

New member

Posts

Joined
Thu Jan 31, 2013 12:51 am

Post by thekrotek » Tue Mar 26, 2019 1:44 am

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.

Professional OpenCart extensions, support and custom work.
Contact me via email or Skype by support@thekrotek.com


User avatar
Expert Member

Posts

Joined
Sun Jul 03, 2016 12:24 am


Post by xxvirusxx » Tue Mar 26, 2019 2:32 am

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?

Upgrade Service | OC 2.3.0.2 PHP 8 | My Custom OC 3.0.3.8 | Buy me a beer


User avatar
Expert Member

Posts

Joined
Tue Jul 17, 2012 10:35 pm
Location - România

Post by brussell » Tue Mar 26, 2019 3:15 am

@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.

New member

Posts

Joined
Thu Jan 31, 2013 12:51 am

Post by xxvirusxx » Tue Mar 26, 2019 3:45 am

Extension name is secret?

Upgrade Service | OC 2.3.0.2 PHP 8 | My Custom OC 3.0.3.8 | Buy me a beer


User avatar
Expert Member

Posts

Joined
Tue Jul 17, 2012 10:35 pm
Location - România

Post by IP_CAM » Tue Mar 26, 2019 3:55 am

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
Last edited by straightlight on Thu Jan 30, 2020 9:18 am, edited 1 time in total.

My Github OC Site: https://github.com/IP-CAM
5'200 + FREE OC Extensions, on the World's largest private Github OC Repository Archive Site.


User avatar
Legendary Member

Posts

Joined
Tue Mar 04, 2014 1:37 am
Location - Switzerland

Post by brussell » 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. Is anyone else able to help? Thanks.

New member

Posts

Joined
Thu Jan 31, 2013 12:51 am

Post by brussell » Tue Mar 26, 2019 3:57 am

@ IP_CAM: thank you so much, much appreciated. I will try your suggestion tomorrow :)

New member

Posts

Joined
Thu Jan 31, 2013 12:51 am

Post by xxvirusxx » Tue Mar 26, 2019 4:44 am

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?

Upgrade Service | OC 2.3.0.2 PHP 8 | My Custom OC 3.0.3.8 | Buy me a beer


User avatar
Expert Member

Posts

Joined
Tue Jul 17, 2012 10:35 pm
Location - România

Post by brussell » Tue Mar 26, 2019 6:20 pm

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));
?>

New member

Posts

Joined
Thu Jan 31, 2013 12:51 am

Post by gabriel10 » Wed Jan 08, 2020 11:14 pm

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)

Newbie

Posts

Joined
Wed Jan 08, 2020 11:06 pm
Who is online

Users browsing this forum: No registered users and 43 guests