Linux Php Fatal 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
Call To Undefined Function Mysql_connect() Windows
Learn more about Stack Overflow the company Business Learn more about hiring developers call to undefined function mysql_pconnect or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack
Call To Undefined Function Mysql_connect() Php 7
Overflow Community Stack Overflow is a community of 6.2 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 call to undefined function mysql_connect() codeigniter function mysql_connect() up vote 19 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 fatal error call to undefined function mysql_connect() xampp 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
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
Call To Undefined Function Mysql_connect() Ubuntu
hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges fatal error: uncaught error: call to undefined function mysqli_connect() Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 6.2 million programmers, just like you, helping each other.
Call To Undefined Function Mysql_connect() Linux
Join them; it only takes a minute: Sign up Linux PHP Fatal error: Call to undefined function mysqli_connect() up vote 4 down vote favorite 1 I have a problem regarding connecting the database it is giving this error http://stackoverflow.com/questions/15346605/php-apache-php-fatal-error-call-to-undefined-function-mysql-connect Fatal error: Call to undefined function mysqli_connect() Which, I have spend the past 4 hours trying to figured out and I already did these steps: Change extension=mysql.so and extension=mysqli.so extension_dir=/PATH for php.ini Checked which modules are loaded or install with php - m I JUST PUT MY INFOPHP() IN PASTEBIN SORRY, MY WEBSITE IS RUNNING UNDER USERNAME AND PASSWORD PROTECTING BECAUSE IS A PRIVATE UNIVERSITY SERVER.. http://pastebin.com/dKKdwWTb I am not too sure what else I can do about, http://stackoverflow.com/questions/19719719/linux-php-fatal-error-call-to-undefined-function-mysqli-connect just in case I have added the link for paste bin for my php.ini file http://pastebin.com/QNK6mGqV Well, I hope someone could see what I have been able to see and could help me out. php mysql apache mysqli share|improve this question edited Oct 7 '14 at 1:53 Timothy Jones 13.2k23259 asked Nov 1 '13 at 2:05 valbu17 35117 What if you were to post your actual code that's producing the error *?* –Fred -ii- Nov 1 '13 at 2:10 Fred, this type of error does not really require code example. –Itay Moav -Malimovka Nov 1 '13 at 2:13 @ItayMoav-Malimovka Ok, I thought I could help, seeing the subject line Call to undefined function mysqli_connect() –Fred -ii- Nov 1 '13 at 2:15 yah, its not error code.. its actually some problem with the apache server or mysql installation.. or something regarding not having the right path to get php.ini or some modules.. –valbu17 Nov 1 '13 at 2:17 fred - your comment is correct, unless the function is one that comes from an extension, and a famous one at that, (so no misspelling is possible here) –Itay Moav -Malimovka Nov 1 '13 at 2:23 | show 1 more comment 2 Answers 2 active oldest votes up vote 3 down vote Check output of phpinfo() in web page. php -m is for cli,
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 http://stackoverflow.com/questions/10615436/fatal-error-call-to-undefined-function-mysql-connect 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 6.2 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up Fatal error: Call to undefined function call to 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 16 '12 at 9:16 pepsicode 1472310 Did call to undefined 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 6 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,06712430 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. Searc