0

I have a problem with one website on my server. In error log show me this error:

[11-May-2020 09:55:20 UTC] PHP Fatal error:  Uncaught Error: Call to undefined function mysql_connect() in /home/laminor/public_html/include/config.php:14
Stack trace:
#0 /home/laminor/public_html/index.php(2): include()
#1 {main}
  thrown in /home/laminor/public_html/include/config.php on line 14

Website is: laminor.ro

Have you an idea about resolving this problem? In chrome, website generate error 500, PHP version si set at php 5.6

Thanks!

  • 1
    because mysql_* has been deprecated and removed, Thank Goodness – Rotimi May 13 '20 at 10:18
  • If you are still using PHP 5 I strongly recommend to upgrade as soon as possible. This version is no longer supported. [Let Rasmus Lerdorf explain it to you](https://youtu.be/wCZ5TJCBWMg?t=2434) – Dharman May 13 '20 at 11:41

2 Answers2

1

The mysql_* extension has been deprecated in verion 5.5, and it is removed in 7.0.

Is this site on some webhosting service? Maybe prior to its deprecation they didn't even installed this extension. There are plenty of reasons for the removing of this extension, so is better to forget about it.

Your only way is to use mysqli_ or PDO.

Zechy
  • 55
  • 12
1

As Zechy answered, the mysql_* was deprecated and recently removed, however you're stating you're running php 5.6. You should check if you are indeed running an older php and if you have installed the php-mysql package.

briskola
  • 66
  • 4