Fatal Error Call To Undefined Function Mysql_connect Windows Xp
Contents |
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about fatal error call to undefined function mysql_connect() in php hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask
Fatal Error Call To Undefined Function Mysql_connect() Xampp
Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join fatal error: uncaught error: call to undefined function mysql_connect() in xampp them; it only takes a minute: Sign up Call to undefined function mysql_connect up vote 18 down vote favorite 2 I just installed PHP and Apache on my home PC. When I try to call function mysql_connect I get: call to undefined function mysql_select_db() fatal error: call to undefined function mysql_connect. I have loaded php.ini where I have uncommented lines extension=php_mysql.dll and extension=php_mysqli.dll and changed extension directory to extension_dir = "C:\php\ext" - which is the directory where files php_mysql.dll and php_mysqli.dll are. How can I fix this problem? Output of phpinfo(): http://jsfiddle.net/MMTwA/ windows php share|improve this question edited Nov 3 '15 at 9:02 Peter Mortensen 10.2k1369107 asked Dec 18 '11 at 11:28 Nikolas JíÅ¡a 3841521 2 Have you restarted apache after
Uncaught Error: Call To Undefined Function Mysql_select_db()
editing the php.ini? :) And do you also have MySQL installed? Maybe you should have a look at XAMPP (apachefriends.org/en/xampp-windows.html) which is an easy to use package containing apache, php and mysql. –Quasdunk Dec 18 '11 at 11:30 Yes I have restarted it. Yes I have MySQL installed though even if I hadn't I would still get "Undefined function...". I'll probably look at that XAMPP if I don't solve this, thanks. –Nikolas JíÅ¡a Dec 18 '11 at 11:56 Try copying the libmysql.dll to C:\Windows\System32. And, again, if you just need a development environment, have a look at XAMPP. It comes with everything integrated, has a GUI, works out of the box and will save you a lot of headache (especially under Windows!). –Quasdunk Dec 18 '11 at 12:23 I have libmysql.dll in C:\Windows\System32 already, I'll try that XAMPP if I dont solve this by evening, thanks. –Nikolas JíÅ¡a Dec 18 '11 at 12:28 Providing the contents of might help. –Bryan Dec 18 '11 at 12:32 | show 6 more comments 12 Answers 12 active oldest votes up vote 12 down vote accepted After looking at your phpinfo() output, it appears the mysql extensions are not being loaded. I suspect you might be editing the wrong php.ini file (there might be multiple copies). Make sure you are editing the php file at C:\php\php.ini (
45 comments. Current rating: (13 votes). Leave comments and/ or rate it. Question: I install Apache, php 4.1.2 and mysql on RedHat Linux. When calling a php call to undefined function mysql_connect() php 7 script that connects to the mysql database, I get this error message: Fatal error: Call call to undefined function mysql_connect() linux to undefined function: mysql_connect() in /var/www/html/buyersguides/global/system_globals.inc on line 12 Answer: Most likely mysql is not enabled on your php installation. You configured this
Call To Undefined Function Mysql_connect() Codeigniter
when you compiled the php sources. Create a dummy HTML page on your web server with the php code from below and call it through the web browser. It will tell you if mysql is enabled. (If http://stackoverflow.com/questions/8551398/call-to-undefined-function-mysql-connect you do not see a table with parameters for mysql, then mysql is not enabled in your php build.) How do I enable mysql in my php installation? If you have an RPM based system like Mandrake, then you need to install package php-mysql-4.3.2-3mdk.i586.rpm. You may need to resolve the requirement of libmysql12 - these are shared libraries needed to dynamically load and use MySQL. Visit libmysql on rpmfind.net and get the RPM there. Install it http://www.delphifaq.com/faq/php/f898.shtml?p=1 all then with and restart Apache: [root]#ls *.rpm -rw-r--r-- 1 nobody nogroup 22333 Jul 26 2004 php-mysql-4.3.2-3mdk.i586.rpm -rwxr--r-- 1 nobody nogroup 263560 Aug 9 10:55 libmysql12-4.0.23-2mdk.i586.rpm [root]#rpm --install libmysql12-4.0.23-2mdk.i586.rpm warning: libmysql12-4.0.23-2mdk.i586.rpm: V3 DSA signature: NOKEY, key ID 70771ff3 [root]#rpm --install php-mysql-4.3.2-3mdk.i586.rpm warning: php-mysql-4.3.2-3mdk.i586.rpm: V3 DSA signature: NOKEY, key ID 70771ff3 [root]#apachectl -k restart On a system that is not based on RPM installation you need to go to your php installer directory and call configure to create a new make file, then recompile: # ./configure --with-apxs=/usr/local/apache/bin/apxs --with-mysql=/usr/local/mysql # make # make install At the end do not forget to restart Apache. Send a message to Subject Comments: You are on page 2 of 3, other pages: 1 [2] 32007-06-25, 02:41:01 anonymous from India Hi, I tried everythink, but still don't work! I have installed PHP 5.0 MySQL Server 5.0 Apache 2 I still have this: Fatal error: Call to undefined function mysql_connect() after i make a lot of changes. using this forum. please anybody help my e-mail: kanesh_san@yahoo.com thank u, ganesh 2007-08-14, 16:04:23 anonymous from Norway For Windows users, reboot computer after installing php, as it makes some changes to your systems variables that isn't automatically loaded after install. (linux ftw!) 2007-10-24, 01:03:20 madanji_choudhary@yahoo.com from New Delhi, India Hi, I am using php5.2.4, mysql 5.0.27 a
using php5.2,mysql 4.1 If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register http://board.phpbuilder.com/showthread.php?10371200-RESOLVED-i-am-Fatal-error-Call-to-undefined-function-mysql_connect()-using-php5-2-mysql-4-1 link above to proceed. To start viewing messages, select the forum that you want http://www.devnetwork.net/viewtopic.php?f=2&t=84309 to visit from the selection below. Page 1 of 2 12 Last Jump to page: Results 1 to 15 of 21 Thread: [RESOLVED] i am Fatal error: Call to undefined function mysql_connect() using php5.2,mysql 4.1 Tweet Thread Tools Show Printable Version Email this Page… Subscribe to this Thread… Search Thread Advanced Search Display Linear Mode call to Switch to Hybrid Mode Switch to Threaded Mode 02-08-2010,10:06 AM #1 thread_PHP View Profile View Forum Posts Senior Member Join Date Jan 2006 Posts 323 [RESOLVED] i am Fatal error: Call to undefined function mysql_connect() using php5.2,mysql 4.1 hi all i am getting following error while i am using php 5.2.12 and mysql4.1 in windows Fatal error: Call to undefined function mysql_connect() please help me to solve my problem thanks in call to undefined advance "Speak your truth quietly and clearly, and listen to others, even the dull and ignorant, they too have their story. " Reply With Quote 02-08-2010,10:25 AM #2 halojoy View Profile View Forum Posts Visit Homepage phpMaster Join Date Jun 2005 Location Europe Posts 2,992 Run a phpinfo() to see if the php_mysql extension module is loaded. If it is not, you should activate mysql extension. For example in php.ini: extension=php_mysql.dll PHP Code:
Apache2.4.18 (Win64) / PHP5.6.19 / MySQL5.7.11 / phpMyAdmin4.6.0 Reply With Quote 02-08-2010,02:23 PM #3 bradgrafelman View Profile View Forum Posts Visit Homepage Pna lbh ernq guvf¿ Join Date Jul 2004 Location Kansas City area Posts 19,435 Moved to Install forum. If enabling the "extesion=" line in your php.ini file doesn't work, read over the FAQ stickied at the top of this forum (specifically, the post entitled "2. PHP5 :: Can't use mysql_*() functions"). If neither of those solves your problem, let us know. Reply With Quote 02-10-2010,05:03 AM #4 thread_PHP View Profile View Forum Posts Senior Member Join Date Jan 2006 Posts 323 hi halojoy i am sending you following files containing my phpinfo files Attached Imag
phpinfo();
?>
index All times are UTC - 5 hours Information The requested topic does not exist. Board index All times are UTC - 5 hours Powered by phpBB Forum Software © phpBB Group