Fatal Error Call To Undefined Function Mysql_connect Php 5.3.8
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 hiring developers or posting ads with us Stack 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 each other. Join them; it only takes a minute: Sign up PHP/Apache: PHP Fatal error: Call to undefined function mysql_connect() up vote 18 down vote favorite 2 I have MySQL (5.5.23 Community Server), Apache (2.2), and PHP (5.3.13) running on a Fedora 15 machine (64-bit). Each works with no problem on their own. I thought that PHP was configured/compiled to work with MySQL, but when I try to load any PHP web page which makes a MySQL call then I get the above noted fatal error (in the Apache error log). PHP works okay on its own though, through Apache and at the command line. When I run php -i from the command line then sure enough it shows all the MySQL bits and pieces, but when I load a page displaying phpinfo() then there are no MySQL modules mentioned. I've also tried un-commenting "extension=mysql.so" in php.ini, but PHP then complains with "PHP Startup: Unable to load dynamic library '/usr/lib64/php/modules/mysql.so'." (even though the module does reside there). But then I'm not entirely certain whether that line is required to be un-commented or not. [correction: the error stated was actually due to a typo, but running from the command line shows that the module is already loaded anyway - there is a warning from PHP that says so.] I've also disabled SELinux; stopped/restarted Apache numerous times; yummed MySQL-Devel, in case it made any difference; and, it seems, every other possible thing. If I run a little PHP test script from the command line, to access the MySQL database, then it works with no problem, so PHP does know about MySQL, but when it runs under Apache it seems to have no clue that MySQL even exists. I've been trying on and off for months to solve this problem, and seem to have tried everything, but nothing seems to work. I don't mind having to re-install PHP if I really have to, if somebody can demonstrate the proper way to configure/compile with MySQL su
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 hiring developers or posting ads with us Stack 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 each other. Join them; it only takes a minute: Sign up Fatal error: Call to undefined function mysql_connect() cannot solve http://stackoverflow.com/questions/15346605/php-apache-php-fatal-error-call-to-undefined-function-mysql-connect up vote 0 down vote favorite I have searched this error in Google and tried everything I found, but it still does not work. I have set in my php.ini extension_dir ="C:\php\ext\" uncommented extension=php_mysql.dll extension=php_mysqli.dll these files are present in the extension path, and I restarted Apache. But phpinfo(); still does not show anything about MySQL. So do you have any suggestions to load these modules? note: I http://stackoverflow.com/questions/12221364/fatal-error-call-to-undefined-function-mysql-connect-cannot-solve am using Windows 7 (64 bit), MySQL 5.5, Apache 2.0.49 and PHP 5.3.16 php mysql apache dll share|improve this question asked Aug 31 '12 at 19:19 void 90111527 1 Did you edit the correct php.ini? Look in phpinfo() to see which file path is actually being used for php.ini... –Michael Berkowski Aug 31 '12 at 19:20 5 The mysql_* functions are deprecated, if you're developing something new you should use mysqli_* functions or, better still, PDO. –Arjan Aug 31 '12 at 19:21 If I recall correct phpinfo tells you which configuration files got parsed. That might give you an additional hint. –arkascha Aug 31 '12 at 19:29 Yes Michael, i'm sure i'm in the correct file. thanks though. –void Aug 31 '12 at 19:48 Arjan, I tried, it gives the same error with mysqli. –void Aug 31 '12 at 19:49 | show 1 more comment 2 Answers 2 active oldest votes up vote 1 down vote Finally, I solved the same problem, so, here is my solution. I guess the last slash in the line extension_dir ="C:\php\ext\ could make troubles. Just let it as extension_dir ="C:\php\ext Moreover, try to approach the problem the foll
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 http://board.phpbuilder.com/showthread.php?10371200-RESOLVED-i-am-Fatal-error-Call-to-undefined-function-mysql_connect()-using-php5-2-mysql-4-1 you can post: click the register link above to proceed. To start https://www.youtube.com/watch?v=e3y57I63gCw 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… fatal error 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 fatal error call 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 solves your problem, l
phpinfo();
?>
Du siehst YouTube auf Deutsch. Du kannst diese Einstellung unten Ă€ndern. Learn more You're viewing YouTube in German. You can change this preference below. SchlieĂen 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 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 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 Autoplay aktiviert ist, wird die Wiedergabe automatisch mit einem der aktuellen Videov