Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

brandnewen

Uncaught Error: Call to undefined function mysql_connect()

Recommended Posts

dear friends

hope you are all well.

my oscommerce shop was outdated ,now I get this kind of problem whenever visiting this site.

I know its because of the old scripts doesnt support newest php7  and will try to update it later.but in the meantime,i hope to solve this problem to let the oscommerce shop run ,could you kindly give me some advice how to solve it ? im not good at scripting,so simpler the better.:)

thanks.

Fatal error: Uncaught Error: Call to undefined function mysql_connect() in /home/customer/www/mysite.com/public_html/catalog/includes/functions/database.php:19 Stack trace: #0 /home/customer/www/mysite.com/public_html/catalog/includes/application_top.php(65): tep_db_connect() #1 /home/customer/www/mysite.com/public_html/catalog/index.php(13): require('/home/customer/...') #2 {main} thrown in /home/customer/www/mysite.com/public_html/catalog/includes/functions/database.php on line 19

 

 

I attahced all mentioned file.could you have a check for me.thanks so much for your support.

application_top.php

database.php

index.php

Share this post


Link to post
Share on other sites

@brandnewen The simplest solution, although temporary, is to ask your host if they can roll back to a prior version of PHP. Some will, some won't. It doesn't hurt to ask.

Beyond that, you have a couple of options. None will be quick and easy, though ...

1) Find another host that will allow you to use a prior version of PHP, and move your site to them

2) Choose one of the several osC forks that does run under newer versions of PHP, and migrate your site to the new version. You can do this with your existing host.

3) Try to update the code on your existing site to run under newer versions of PHP. If you are not a coder, this may be difficult. Plus, recognize that you would be making your own fork of osC, and no one else would be able to support it for you,

4) Move your site to another shopping cart.

5) Wait until osC v4 is released. We don't know when that will be, though. Can you wait?

If any of this sounds too difficult to do yourself, you may need to hire a developer to do it for you.

Good luck!

Malcolm

Share this post


Link to post
Share on other sites
On 5/22/2022 at 7:49 PM, Hotclutch said:

You're not going to get support for the version you still have.

 

thank you.

Share this post


Link to post
Share on other sites
18 hours ago, ArtcoInc said:

@brandnewen The simplest solution, although temporary, is to ask your host if they can roll back to a prior version of PHP. Some will, some won't. It doesn't hurt to ask.

Beyond that, you have a couple of options. None will be quick and easy, though ...

1) Find another host that will allow you to use a prior version of PHP, and move your site to them

2) Choose one of the several osC forks that does run under newer versions of PHP, and migrate your site to the new version. You can do this with your existing host.

3) Try to update the code on your existing site to run under newer versions of PHP. If you are not a coder, this may be difficult. Plus, recognize that you would be making your own fork of osC, and no one else would be able to support it for you,

4) Move your site to another shopping cart.

5) Wait until osC v4 is released. We don't know when that will be, though. Can you wait?

If any of this sounds too difficult to do yourself, you may need to hire a developer to do it for you.

Good luck!

Malcolm

thank you.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×