Fatal Error Call To Undefined Function Mysql_connect In Windows 7
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 fatal error call to undefined function mysql connect Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation
Windows 7 Fatal Error C0000034
Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just
Fatal Error Call To Undefined Function Mysql_connect() Xampp
like you, helping each other. Join 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
Fatal Error Call To Undefined Function Mysql_connect() In Php
try to call function mysql_connect I get: 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 fatal error call to undefined function mysql_connect() windows Nikolas JíÅ¡a 3841521 2 Have you restarted apache after 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
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss fatal error: uncaught error: call to undefined function mysql_connect() in xampp the workings and policies of this site About Us Learn more uncaught error: call to undefined function mysql_select_db() about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Stack call to undefined function mysql_connect() php 7 Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping http://stackoverflow.com/questions/8551398/call-to-undefined-function-mysql-connect each other. Join them; it only takes a minute: Sign up Fatal error: Call to undefined function mysql_connect() in C:\Apache\htdocs\test.php on line 2 up vote 6 down vote favorite 3 Fatal error: Call to undefined function mysql_connect() in C:\Apache\htdocs\test.php on line 2 I've spent 11 hours today trying to get past this ONE problem. I have installed: MySQL http://stackoverflow.com/questions/5179535/fatal-error-call-to-undefined-function-mysql-connect-in-c-apache-htdocs-test 5.1 Apache 2.2.14 PHP 5.2.17 these were the versions referred to in the book "PHP and MySQL". When I run the script: where localhost, root and password are the REAL values for this given test system and all I have seen is: Fatal error: Call to undefined function mysql_connect() in C:\Apache\htdocs\test.php on line 2 php share|improve this question edited Mar 3 '11 at 10:36 Pekka 웃 304k93697913 asked Mar 3 '11 at 10:33 user389055 911513 add a comment| 3 Answers 3 active oldest votes up vote 14 down vote accepted Uncomment the line extension=php_mysql.dll in your "php.ini" file and restart Apache. Additionally, "libmysql.dll" file must be available to Apache, i.e., it must be either in available in Windows systems PATH or in Apache working directory. See more about installing MySQL extension in manual. P.S. I would advise to consider MySQL extension as deprecated and to use MySQLi or even PDO for working with databases (I prefer PDO). share|improve this answer answered Mar 3 '11
Du siehst YouTube auf Deutsch. Du kannst diese Einstellung unten ändern. Learn more You're viewing YouTube in https://www.youtube.com/watch?v=e3y57I63gCw German. You can change this preference below. Schließen http://board.phpbuilder.com/showthread.php?10371200-RESOLVED-i-am-Fatal-error-Call-to-undefined-function-mysql_connect()-using-php5-2-mysql-4-1 Ja, ich möchte sie behalten Rückgängig machen Schließen Dieses Video ist nicht verfügbar. WiedergabelisteWarteschlangeWiedergabelisteWarteschlange Alle entfernenBeenden Wird geladen... Wiedergabeliste Warteschlange __count__/__total__ Fatal error Call to undefined function mysql_connect().avi freehelpvideos AbonnierenAbonniertAbo beenden124124 Wird geladen... Wird call to geladen... Wird verarbeitet... Hinzufügen Möchtest du dieses Video später noch einmal ansehen? Wenn du bei YouTube angemeldet bist, kannst du dieses Video zu einer Playlist hinzufügen. Anmelden Teilen Mehr Melden Möchtest du dieses Video melden? Melde dich an, um unangemessene Inhalte zu call to undefined melden. Anmelden Transkript Statistik 60.025 Aufrufe 108 Dieses Video gefällt dir? Melde dich bei YouTube an, damit dein Feedback gezählt wird. Anmelden 109 25 Dieses Video gefällt dir nicht? Melde dich bei YouTube an, damit dein Feedback gezählt wird. Anmelden 26 Wird geladen... Wird geladen... Transkript Das interaktive Transkript konnte nicht geladen werden. Wird geladen... Wird geladen... Die Bewertungsfunktion ist nach Ausleihen des Videos verfügbar. Diese Funktion ist zurzeit nicht verfügbar. Bitte versuche es später erneut. Veröffentlicht am 16.06.2012If you have received the dreaded "Fatal error Call to undefined function mysql_connect()", this video may help.Here is the text from the video:Fatal error: Call to undefined function mysql_connect()php.iniC:\WINDOWSC:\WINDOWS\SYSTEM32extension_dir = "./"extension_dir = "C:\php\ext";extension=php_mysql.dllextension=php_mysql.dll Kategorie Bildung Lizenz Standard-YouTube-Lizenz Mehr anzeigen Weniger anzeigen Wird geladen... Anzeige Autoplay Wenn Aut
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 link above to proceed. To start viewing messages, select the forum that you want 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 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 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
phpinfo();
?>