Call to undefined function mysql_connect()

Try checking to see if the PHP MySQL extension module is being loaded:

<?php
    phpinfo();
?>

If it's not there, add the following to the php.ini file:

extension=php_mysql.dll

Save and Restart You Apache HTTP Server

3.4
5

                                    sudo apt install php-mysqli

3.4 (5 Votes)
0
3.67
3

                                    In case, you are using PHP7 already, the formerly deprecated functions
mysql_* were removed entirely, so you should update your code using the
PDO-functions or mysqli_* functions instead.

If that's not possible, as a workaround, rubo77 created a small PHP include
file, that recreates the old mysql_* functions with mysqli_*()-functions:
https://github.com/rubo77/php-mysql-fix

3.67 (3 Votes)
0
Are there any code examples left?
Create a Free Account
Unlock the power of data and AI by diving into Python, ChatGPT, SQL, Power BI, and beyond.
Sign up
Develop soft skills on BrainApps
Complete the IQ Test
Relative searches
Fatal error: Uncaught Error: Call to undefined function mysql_connect() Fatal error: Uncaught Error: Call to undefined function mysql_connect() in Fatal error: Uncaught Error: Call to undefined function mysql_connect() i Error: Call to undefined function mysql_connect() uncaught error call to undefined function mysql_connect() windows Uncaught Error: Call to undefined function mysql_connect( Uncaught Error: Call to undefined function mysql_connect() in php cli Call to undefined function mysql_connect() Call to undefined function mysqli_connect() in Fatal error: Uncaught Error: Call to undefined function mysqli_connect() Fatal error: Call to undefined function mysql_connect() PHP Fatal error: Uncaught Error: Call to undefined function mysqli_connect() Uncaught Error: Call to undefined function mysqli_connect() Undefined function 'mysql_connect'. PHP &quot;Uncaught Error: Call to undefined function mysql_connect() in&quot; mysql_connect undefined function Fatal error: Uncaught Error: Call to undefined function mysqli_connect() i Uncaught Error: Call to undefined function mysql_connect() call to undefined function mysql_connect() in php 7 fatal error call to undefined function mysqli_connect() in php 5.6 Fatal error: Call to undefined function mysqli_connect() in Error: Call to undefined function mysqli_connect() Fatal error: Uncaught Error: Call to undefined function mysqli_connect() in Call to undefined function mysql_connect() php 8 call to undefined function mysql_connect() Call to undefined function mysql_query() apache 7.2 Uncaught Error: Call to undefined function mysql_connect() Undefined function 'mysqli_connect' Uncaught Error: Call to undefined function mysqi_connect() Undefined function 'mysql_connect' call to undefined function mysql_connect() in php 5.4 Call to undefined function mysqli_connec Call to undefined function mysql_connect() undefined function mysql_connect Call to undefined function mysql_connect() in Call to undefined function sqlsrv_connect() Fatal error: Uncaught Error: Call to undefined function mysql_connect() php enable mysql_connect PHP Fatal error: Uncaught Error: Call to undefined function mysqli_connect() php Call to undefined function mysqli_connect PHP Fatal Error&lt;||&gt;1604295843&lt;||&gt;Call to undefined function mysqli_connect() undefined function mysqli_connect() undefined function mysql_connect() php install mysqli_connect Call to undefined function mysqli_connect() mysql_connect undefined php call to undefined function mysqli_connect() php appache Call to undefined function mysql_connect() Uncaught Error: Call to undefined function mysqli_connect() Call to undefined function mysql_connect
Made with love
This website uses cookies to make IQCode work for you. By using this site, you agree to our cookie policy

Welcome Back!

Sign up to unlock all of IQCode features:
  • Test your skills and track progress
  • Engage in comprehensive interactive courses
  • Commit to daily skill-enhancing challenges
  • Solve practical, real-world issues
  • Share your insights and learnings
Create an account
Sign in
Recover lost password
Or log in with

Create a Free Account

Sign up to unlock all of IQCode features:
  • Test your skills and track progress
  • Engage in comprehensive interactive courses
  • Commit to daily skill-enhancing challenges
  • Solve practical, real-world issues
  • Share your insights and learnings
Create an account
Sign up
Or sign up with
By signing up, you agree to the Terms and Conditions and Privacy Policy. You also agree to receive product-related marketing emails from IQCode, which you can unsubscribe from at any time.
Creating a new code example
Code snippet title
Source