Uncaught Error: Call to undefined function mysql_connect() [duplicate] - php

This question already has answers here:
Why shouldn't I use mysql_* functions in PHP?
(14 answers)
Closed 7 years ago.
Uncaught Error: Call to undefined function mysql_connect() in C:\xampp\htdocs\phoenixproject\register.php:9 Stack trace: #0 {main} thrown in C:\xampp\htdocs\phoenixproject\register.php on line 9
How to solve this??

It is most likely MySql extensions are not being loaded. Open your php.ini file and check if extension=php_mysql.dll and extension=php_mysqli.dll is uncommented

Related

Fatal error: Uncaught PDOException when running php site [duplicate]

This question already has answers here:
PDOException “could not find driver”
(42 answers)
PHP Fatal error: Uncaught PDOException: could not find driver
(4 answers)
Closed 16 days ago.
I'm trying to run a php site that use mysql but i get error
Fatal error: Uncaught PDOException: could not find driver in C:\Users\aoshe\OneDrive\Desktop\test\includes\config.php:3 Stack trace: #0 C:\Users\aoshe\OneDrive\Desktop\test\includes\config.php(3): PDO->__construct('mysql:host=sql7...', 'sql7595523', Object(SensitiveParameterValue)) #1 C:\Users\aoshe\OneDrive\Desktop\test\account\login.php(3): include('C:\\Users\\aoshe\\...') #2 {main} thrown in C:\Users\aoshe\OneDrive\Desktop\test\includes\config.php on line 3
I'm running from windows

Call to undefined function mysqli_init() [duplicate]

This question already has answers here:
Codeigniter: fatal error call to undefined function mysqli_init()
(14 answers)
Closed 2 days ago.
An uncaught Exception was encountered
Type: Error
Message: Call to undefined function mysqli_init()
Filename: /home/sourcecars/public_html/carsonbarlcon.com/system/database/drivers/mysqli/mysqli_driver.php
Line Number: 135
Backtrace:
File: /home/sourcecars/public_html/carsonbarlcon.com/application/hooks/EloquentHook.php
Line: 31
Function: database
File: /home/sourcecars/public_html/carsonbarlcon.com/application/hooks/EloquentHook.php
Line: 46
Function: loadDatabase
File: /home/sourcecars/public_html/carsonbarlcon.com/index.php
Line: 316
Function: require_once
Install mysqli php extension
please check php-mysqli is installed?
check php.ini and make sure the extension is loaded.
extension=php_mysqli.dll
if it's a php framework make sure in the framework config.php file what driver you are using.

How Can I solve this problem in my WordPress site Fatal error [duplicate]

This question already has answers here:
PHP memcached Fatal error: Class 'Memcache' not found
(6 answers)
Closed 2 years ago.
I installed Memcached but unfortunately, I keep getting an error:
Fatal error: Uncaught Error: Class 'Memcache' not found in /home/bestassi/360assignments.com/wp-content/plugins/a2-w3-total-cache/lib/W3/Cache/Memcached.php:52 Stack trace: #0 /home/bestassi/360assignments.com/wp-content/plugins/a2-w3-total-cache/lib/W3/Cache.php(44): W3_Cache_Memcached->__construct(Array) #1 /home/bestassi/360assignments.com/wp-content/plugins/a2-w3-total-cache/lib/W3/ObjectCache.php(574): W3_Cache::instance('memcached', Array) #2 /home/bestassi/360assignments.com/wp-content/plugins/a2-w3-total-cache/lib/W3/ObjectCache.php(166): W3_ObjectCache->_get_cache(0, 'default') #3 /home/bestassi/360assignments.com/wp-content/plugins/a2-w3-total-cache/lib/W3/ObjectCacheBridge.php(32): W3_ObjectCache->get('is_blog_install...', 'default') #4 /home/bestassi/360assignments.com/wp-content/object-cache.php(51): W3_ObjectCacheBridge->get('is_blog_install...', 'default') #5 /home/bestassi/360assignments.com/wp-includes/functions.php(1700): wp_cache_get('is_blog_install...') #6 /home/bestassi/360assignments.com/wp-includes in /home/bestassi/360assignments.com/wp-content/plugins/a2-w3-total-cache/lib/W3/Cache/Memcached.php on line 52
please uninstall this plugin first (and if you wish, reinstall it later).

Fatal error: Uncaught Error: Call to undefined function mysql_connect() in php [duplicate]

This question already has answers here:
Undefined function mysql_connect() [duplicate]
(14 answers)
Closed 3 years ago.
Fatal error: Uncaught Error: Call to undefined function
mysql_connect() in F:\xampp\htdocs\hms\includes\database.php:7 Stack
trace: #0 F:\xampp\htdocs\hms\init.php(8): db_connect() #1
F:\xampp\htdocs\hms\index.php(61):
require_once('F:\xampp\htdocs...') #2 {main} thrown in
F:\xampp\htdocs\hms\includes\database.php on line 7
Acording to php.net:
This extension was deprecated in PHP 5.5.0, and it was removed in PHP 7.0.0. Instead, the MySQLi or PDO_MySQL extension should be used.

php fatal error while connecting it to database [duplicate]

This question already has answers here:
Why shouldn't I use mysql_* functions in PHP?
(14 answers)
Closed 4 years ago.
Uncaught Error: Call to undefined function mysql_connect() in
E:\newxmp\htdocs\schoolm\ss\service\mysqlcon.php:7 Stack trace: #0
E:\newxmp\htdocs\schoolm\ss\service\check.access.php(2):
include_once() #1 {main} thrown in
E:\newxmp\htdocs\schoolm\ss\service\mysqlcon.php on line 7
You are most likely using PHP 7.x which has this function removed.
Warning
This extension was deprecated in PHP 5.5.0, and it was removed
in PHP 7.0.0. Instead, the MySQLi or PDO_MySQL extension should be
used.
See http://php.net/manual/function.mysql-connect.php

Categories