Error Call To Undefined Function Mysql_connect
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 fatal error call to undefined function mysql_connect() xampp Learn more about Stack Overflow the company Business Learn more about hiring developers fatal error call to undefined function mysql_connect() windows or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow
Fatal Error: Call To Undefined Function Mysql_query()
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() up
Fatal Error: Uncaught Error: Call To Undefined Function Mysql_connect() Xampp
vote 21 down vote favorite 6 I have set up PHP, MySQL, and Apache. localhost() for PHP and it is working well. But after I downloaded MySQL, it reports: Fatal error: Call to undefined function mysql_connect() How can I fix this? php mysql share|improve this question edited Jun 10 at 7:19 Tirthraj Barot 1,3092622 asked May 16 '12 at 9:16 pepsicode 1472310 Did you restart fatal error: call to undefined function mysql_select_db() apache after you installed the packages? –Devator May 16 '12 at 9:17 nz.php.net/manual/en/mysql.installation.php –zerkms May 16 '12 at 9:17 1 You tagged your question [mysql-error-1064] - how do you get that if your script can't communicate with MySQL? –Repox May 16 '12 at 9:20 5 If mysqli or PDO works then you're better off using them instead anyway. –GordonM May 16 '12 at 9:21 6 @GordonM is quite right. The mysql_* functions are deprecated. There are better alternatives that support parameterized queries. –pilcrow Jul 7 '12 at 14:03 | show 1 more comment 10 Answers 10 active oldest votes up vote 22 down vote Open your terminal and run bellow command. sudo apt-get install mysql-server If you are running PHP you will also need to install the php module for mysql 5: sudo apt-get install php5-mysql share|improve this answer edited Sep 13 at 7:11 answered Feb 14 '13 at 12:19 Nanhe Kumar 5,01712430 add a comment| up vote 6 down vote Verify that your installation of PHP has been compiled with mysql support. Create a test web page containing and load it in your browser. Search the page for MySQL. If
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss
Uncaught Error Call To Undefined Function Mysql_connect() In Xampp
the workings and policies of this site About Us Learn more about uncaught error: call to undefined function mysql_select_db() Stack Overflow the company Business Learn more about hiring developers or posting ads with us Stack Overflow fatal error: uncaught error: call to undefined function mysql_select_db() 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 http://stackoverflow.com/questions/10615436/fatal-error-call-to-undefined-function-mysql-connect other. Join them; it only takes a minute: Sign up Fatal error: Call to undefined function mysql_connect() error up vote 0 down vote favorite I am using Red Hat Enterprise Linux Server release 6.5 (Santiago) I faced the below mentioned error: Fatal error: Call to undefined function mysql_connect() in /var/www-live/muthoot/include/load_config.php on line 10 How can I fix this ? http://stackoverflow.com/questions/22837582/fatal-error-call-to-undefined-function-mysql-connect-error php mysql share|improve this question edited Apr 3 '14 at 16:59 Fred -ii- 69.4k93973 asked Apr 3 '14 at 12:19 Mian Anjum 991113 possible duplicate of Undefined function mysql_connect() error –kba Apr 3 '14 at 12:21 And on top of that: the mysql_* functions have been deprecated for a long time. You should either use the mysqli_* functions or PDO. –kba Apr 3 '14 at 12:22 add a comment| 2 Answers 2 active oldest votes up vote 1 down vote The problem is most likely caused by MySQL module being disabled in PHP. As mysql module is deprecated you should use mysqli or PDO, I would suggest using mysqli_connect() instead. To do that, make sure you have php-pdo and php-mysqli packages installed and make sure that php.ini contains this (for PDO): extension=pdo.so extension=pdo_mysql.so extension=pdo_sqlite.so Or this (for mysqli): extension=mysqli.so share|improve this answer answered Apr 3 '14 at 12:20 phoops 2,08841230 i just move my application to new server .I want to use mysql_connect.how can this possible? –Mi
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 http://board.phpbuilder.com/showthread.php?10371200-RESOLVED-i-am-Fatal-error-Call-to-undefined-function-mysql_connect()-using-php5-2-mysql-4-1 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 call to 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 call to undefined 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 Images 3.jpg (92.2 KB, 3132 views) "Speak your truth quietly and clearly, and lis
phpinfo();
?>