Fatal Error Call To Undefined Function Mysql_connect In /var/www/html
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 fatal error call to undefined function mysql_connect() xampp this site About Us Learn more about Stack Overflow the company Business Learn fatal error: uncaught error: call to undefined function mysql_connect() xampp more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question
Fatal Error Call To Undefined Function Mysql_connect() Windows
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
Fatal Error Call To Undefined Function Mysql_connect() In Php
error: Call to undefined function mysql_connect() up 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 uncaught error call to undefined function mysql_connect() in xampp 16 '12 at 9:16 pepsicode 1472310 Did you restart 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,05712430 add a comment| up vote 6 down vote Verify that your installation of PHP has been compiled with mysql support.
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
Call To Undefined Function Mysql_query() In Php
this site About Us Learn more about Stack Overflow the company Business Learn uncaught error: call to undefined function mysql_select_db() more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question fatal error: uncaught error: call to undefined function mysql_select_db() 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 http://stackoverflow.com/questions/10615436/fatal-error-call-to-undefined-function-mysql-connect Error installing DVWA in xampp up vote 0 down vote favorite When i try to open localhost/dvwa i get this: Fatal error: Uncaught Error: Call to undefined function mysql_connect() in C:\xampp\htdocs\dvwa\dvwa\includes\dvwaPage.inc.php:461 Stack trace: #0 C:\xampp\htdocs\dvwa\login.php(8): dvwaDatabaseConnect() #1 {main} thrown in C:\xampp\htdocs\dvwa\dvwa\includes\dvwaPage.inc.php on line 461 and if i go to localhost/dvwa/setup.php i get to the database setup but when i click Create/Reset Database i http://stackoverflow.com/questions/34686201/error-installing-dvwa-in-xampp get this Fatal error: Uncaught Error: Call to undefined function mysql_connect() in C:\xampp\htdocs\dvwa\dvwa\includes\DBMS\MySQL.php:9 Stack trace: #0 C:\xampp\htdocs\dvwa\setup.php(17): include_once() #1 {main} thrown in C:\xampp\htdocs\dvwa\dvwa\includes\DBMS\MySQL.php on line 9 i already change $_DVWA[ 'db_password' ] = ''; and my config.inc.php looks like this
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 http://stackoverflow.com/questions/13825108/undefined-function-mysql-connect 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 Undefined function mysql_connect() up vote 11 down vote favorite 7 call to I have ran aptitude install php5-mysql (and restarted MySQL/Apache 2), but I am still getting this error: Fatal error: Call to undefined function mysql_connect() in /home/validate.php on line 21 phpinfo() says the /etc/php5/apache2/conf.d/pdo_mysql.ini file has been parsed. php mysql ubuntu mysql-connect undefined-function share|improve this question edited Feb 26 at 14:39 Peter Mortensen 10.2k1369107 asked Dec 11 '12 at 17:12 user1765369 1282213 How about other built in call to undefined PHP/MySql functions? Do they work? –samayo Dec 11 '12 at 17:16 Perhaps not, as I have tried entering incorrect user/pass and my 'or die' statement is not showing! –user1765369 Dec 11 '12 at 17:22 add a comment| 10 Answers 10 active oldest votes up vote 18 down vote accepted Well, this is your chance! It looks like PDO is ready; use that instead. Try checking to see if the PHP MySQL extension module is being loaded: If it's not there, add the following to the php.ini file: extension=php_mysql.dll share|improve this answer edited Feb 26 at 14:40 Peter Mortensen 10.2k1369107 answered Dec 11 '12 at 17:13 wanovak 4,5981424 Is this a better way to connect to a database? I will look into it but I would really like to get this working first as it worked previously until I moved to a new server. –user1765369 Dec 11 '12 at 17:15 1 It is. mysql_* functions are dangerous and deprecated as of PHP 4.1. Check your Apache error logs and restart the server. Does that work? –wanovak Dec 11 '12 at 17:16 I've tried restarting the server, still happens. –user1765369 Dec 11 '12 a