Lỗi uncaught error call to undefined function mysql_connect năm 2024

Máy tính, Internet > Máy vi tính > Gõ rối trục trặc

Mọi ng` cho em hỏi khi em vào trang 360kpop.com thì bị lỗi này: Fatal error: Call to undefined function mysql_connect() xin chỉ em cách fix lỗi này ra sao cảm ơn

Lỗi uncaught error call to undefined function mysql_connect năm 2024

thuy linh

Trả lời 13 năm trước

Lỗi này do trang web đó liên quan đến CSDL của trang web đó . Chỉ có người quản lý trang web đó khắc phục được thôi.

mình đã sữa được. Lý do là mình sử dụng hệ điều hành windows 7, mình cài vào phân vùng ổ C chắc có lẻ do tính bảo mật của HĐH này nên nó ngăn k cho load các thư viện lên, mình cài qua bên ổ đĩa khác thì ok

Lỗi này thường thấy nếu ta dùng PHP 7 và vì PHP 7 không còn hỗ trợ hàm mysql_connect() nữa, thay vào đó nó có hàm mysqli_connect(). Thể hiện của lỗi này như sau:

This page isn’t working www.kindalog.com is currently unable to handle this request. HTTP ERROR 500

Fatal error: Uncaught Error: Call to undefined function mysql_connect() in /wp-includes/wp-db.php:1665 Stack trace:

0 /wp-includes/wp-db.php(632): wpdb->db_connect()

1 /wp-includes/load.php(425): wpdb->__construct('u', 'p', 'd', 'h')

2 /wp-settings.php(116): require_wp_db()

3 /wp-config.php(93): require_once('/home/kindalog')

4 /wp-load.php(37): require_once('/home/kindalog')

5 /wp-blog-header.php(13): require_once('/home/kindalog')

6 /index.php(17): require('/home/kindalog')

7 {main} thrown in ~/wp-includes/wp-db.php on line 1665

Fatal error: Uncaught Error: Call to undefined function wp_kses_normalize_entities() in /wp-includes/formatting.php:4316 Stack trace:

0 /wp-includes/class-wp-fatal-error-handler.php(190): esc_url('https://wordpre…')

1 /wp-includes/class-wp-fatal-error-handler.php(147): WP_Fatal_Error_Handler->display_default_error_template(Array, false)

2 /wp-includes/class-wp-fatal-error-handler.php(52): WP_Fatal_Error_Handler->display_error_template(Array, false)

3 [internal function]: WP_Fatal_Error_Handler->handle()

4 {main} thrown in /wp-includes/formatting.php on line 4316

Để khắc phục lỗi này, ta xóa hoặc gán giá trị false cho WP_USE_EXT_MYSQL trong file wp-config.php.

define( 'WP_USE_EXT_MYSQL', false );

Tiếp theo, mở trang quản lý PHP version trên web server và chọn mysqli.

Lỗi uncaught error call to undefined function mysql_connect năm 2024

Đây là lỗi WordPress phổ biến khi bạn cài đặt WordPress, phiên bản nâng cấp WordPress được tối ưu cho bản nâng cấp PHP mới như 7.0+ và nó không còn hỗ trợ cho phiên bản cũ (vd PHP 5.4). Do đó bạn gặp phải lỗi không tìm thấy hàm mysql_connect.

Lỗi PHP Fatal error: Uncaught Error: Call to undefined function mysql_connect()

Để khắc phục lỗi này bạn mở file wp-config.php & xóa dòng sau nếu tìm thấy:

define('WP_USE_EXT_MYSQL', true); Tiếp đến, bạn truy cập quản trị Hosting cPanel, trong danh sách extensions của phiên bản PHP hiện tại bạn kích hoạt, hãy bỏ chọn mysqli & thay vào đó kích hoạt nd_mysqli.

Lỗi uncaught error call to undefined function mysql_connect năm 2024
Lỗi undefined mysql_connect()

Để nhận được bài viết mới vui lòng đăng ký kênh kiến thức WordPress từ A-Z ở Form bên dưới. Bạn cũng có thể nhận được sự trợ giúp trên Twitter và Facebook