PHP Fatal error: Call to undefined function mysql_connect()
PHP 개발팀 공식 원문에 표시된 PHP Fatal error: Call to undefined function mysql_connect() 항목의 문구를 확인하는 문서입니다.
빠른 답변
- 확인 범위
- PHP Fatal error: Call to undefined function mysql_connect() 문구가 표시되면 이 문서에서 PHP 개발팀 공식 원문의 같은 항목과 일치하는지 확인할 수 있습니다. 원문에 없는 원인이나 수정 방법은 이 문서만으로 단정하지 마십시오.
- 먼저 확인할 항목
- 현재 화면 또는 로그에서 `PHP Fatal error: Call to undefined function mysql_connect()` 문구를 확인합니다.
- 적용 범위
- 화면 또는 로그에 같은 오류 메시지·상태명이 표시된 경우
- 출처
- PHP 개발팀
- 출처 확인일
- 2026-08-07
- 최종 검토
- 2026-08-07
- 정정 이력
- 2026-07-29 이후 기록 없음
- 관련 기술
이 문서의 범위
현재 증상
- 애플리케이션 오류 메시지
먼저 확인할 항목
현재 화면 또는 로그에서 `PHP Fatal error: Call to undefined function mysql_connect()` 문구를 확인합니다.
수집 원문의 발췌문과 현재 문구를 비교합니다.
피해야 할 조치
주의
- 이 문서는 원문 문구의 일치만 확인합니다. 원문에 없는 원인이나 변경 절차를 단정하지 않습니다.
오류 메시지·상태명 확인 범위
확인 범위
이 문서는 화면 또는 로그에 표시된 PHP Fatal error: Call to undefined function mysql_connect() 문구가 PHP 개발팀 공식 원문의 항목과 일치하는지 확인합니다.
원문 발췌
, "$dbPass") or die("Could not connect"); print "Connected successfully"; mysql_select_db("$dbName") or die("Could not select database"); print "Database selected successfully"; mysql_close($link); ?> Expected result: ---------------- I expected to see: Connected successfully Database selected successfully Actual result: -------------- The IE7 HTTP 500 error screen and the following entry in the Apache error.log file: [Fri May 09 22:03:08 2008] [error] [client 127.0.0.1] PHP Fatal error: Call to undefined function mysql_connect() in C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\sql.php on line 14 Patches Pull Requests History AllCommentsChangesGit/SVN commitsRelated reports [2008-05-10 22:57 UTC] jani@php.net (새 창에서 열림) Assigned to the installer maintainer. [2008-05-14 07:22 UTC] sudakadam at gmail dot com Here is another test case. 1. Installed IIS first. 2. Installed MySql second. 3. used installer php-5.2.5-win32-installer.msi to install and chose to configure IIS. (And selected extra and additional things too) 4. Tried all known options to enable mysql support (edit php.ini, environment variables, php_mysql.dll etc) Tested with simple phpMyAdmin installation. It shows clearly that PHP is not configured with MySql support. [2008-05-14 13:04 UTC] jmertic@php.net (새 창에서 열림) When using the mysqli extension together with the mysql extension you have to use the same libraries and include files. mysqli extension requires the location of mysql_config file, mysql extension requires the path of your mysql installation. If you installed MySQL 4.1 for example with prefix /usr/local/mysql-4.1 your configure settings should be --with-mysql=/usr/local/mysql-4.1 --with-mysqli=/usr/local/mysql-4.1/bin/mysql_config Tested used the steps listed and it worked fine for me. [2008-05-14 21:04 UTC] Zian dot Choy at gmail dot com >your configure settings should be What are "configure settings"? >mysqli extension requires the location of mysql_config file, mysql >extension requires the path of your mysql installation. Then this should be clearly stated somewhere in the installation process. Copyright © 2001-2026 The PHP Group All rights reserved. Last updated: Fri Aug 07 22:00:01 2026 UTC
확인 절차
- 현재 화면 또는 로그에서
PHP Fatal error: Call to undefined function mysql_connect()문구를 확인합니다. - 위 원문 발췌와 문구를 비교합니다.
- 문구가 일치하면 이 문서의 출처 링크에서 적용 환경과 원문 전체를 확인합니다.
주의
이 문서는 문구 식별 범위로 제한합니다. 출처가 직접 설명하지 않는 원인, 설정 변경, 권한 변경 또는 복구 절차를 이 문서만으로 실행하지 마십시오.
참고 자료
PHP 개발팀 · 공식 자료 · 확인 범위: 공식 원문에 오류 문구와 해당 항목의 발췌문이 있습니다. · 확인일: 2026-08-07