I am using GoDaddy to host my website and it says in php that I have a Fatal error: Uncaught Error: Call to undefined function

There is a problem when I use "mysqli_connect()" function in my php file. That being said, I am 100% sure the function itself is correct, so there is something going on as far as what I need to do outside this document that is preventing me to run the function.

I am not using word press which means there is no conflation for passwords for my database. I do not believe I need to do anything with php.ini as I am running 7.4 php. I have restarted different things and nothing works.

How is it that you connect to "mysqli_connect" using GoDaddy? I watched several videos but they were from years ago. There has to be something that others use to get information stored in database. I have looked at PDO's, yet still there is always this connection problem with the sql that I am having. I get an error on my webpage every time I get to the connection php part and it says HTTP ERROR 500, and that my domain is unable to handle the request. What should I do?

enter image description here

  • I don't use companies whose CEOs kill elephants, but I would write a quick page to output phpinfo() and check if php is seeing the mysqli extension. If its not maybe its something you need to ask Gidaddy about.
    – davidgo
    Dec 12, 2020 at 4:18
  • What are you looking for in the phpinfo()? Because I did that. Should I post the whole file? Or just a part of it? What do you use out of curiosity?
    – W. G.
    Dec 12, 2020 at 4:20
  • 1
    I'm an extremist - I colocate my own hardware in a couple of data centers, and use Ubuntu VM's running a LAMP stack. I notice that the current PHP version you have set as per your image above (7.4) does not match the one on your phpinfo - 7.3.23 - I do, however, see that MySQLI IS enabled which is what I was wondering about. How do you know the error is in mysqli_connect? Also, if you add "ini_set('display_errors',1); error_report(E_ALL)" does it give you a specific error message? Are you certain you spelt mysqli_connect correctly?
    – davidgo
    Dec 12, 2020 at 5:34
  • @davidgo I was running it on 7.3.23 earlier when I ran the info part. I am using 7.4 now. My database is "idk" and the table inside of it is called "jk". The table has two rows that are called username and password. Here are the exact files I am using now: drive.google.com/drive/folders/…
    – W. G.
    Dec 12, 2020 at 16:06
  • 1
    I can't tell you the answer but the issue would appear to relate to the lack of availability of the mysqli_connect class to your Apache instance. You should ask Godaddy for assistance if they are providing you with the service.
    – davidgo
    Dec 12, 2020 at 23:09


Browse other questions tagged or ask your own question.