Fatal Error Call To Undefined Function Mysql_connect Windows Apache
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 fatal error call to undefined function mysql_connect() xampp Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs fatal error call to undefined function mysql_connect() in php Documentation 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: uncaught error: call to undefined function mysql_connect() in 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 call to undefined function mysql_connect() codeigniter I 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
Call To Undefined Function Mysql_select_db()
at 11:28 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 susp
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() Ubuntu
Learn more about Stack Overflow the company Business Learn more about hiring developers or call to undefined function mysql_connect() php 7 posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow call to undefined function mysql_connect() linux 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 http://stackoverflow.com/questions/8551398/call-to-undefined-function-mysql-connect 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 http://stackoverflow.com/questions/15346605/php-apache-php-fatal-error-call-to-undefined-function-mysql-connect 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
Call to undefined function mysql_connect() in C:\wamp\www\testmysql.php on line 2 Posted by: sum_anand (---.60.162.122.airtelbroadband.in)Date: April 30, 2012 05:33AMI installed Wampserver on Windows 7. But cannot access Phpmy AdminI need to access http://forum.wampserver.com/read.php?2,84047,84207 it through localhost.As soon as i type the URL :: htttp://localhost/phpmyadmin, i get the following error::mysqli extension is missing, pls check php configuration.Advice??Options:Reply•QuoteRe: Fatal error: http://forums.mysql.com/read.php?52,69846 Call to undefined function mysql_connect() in C:\wamp\www\testmysql.php on line 2 Posted by: stevenmartin99 (Moderator)Date: April 30, 2012 06:34AMMaybe MySQL is not running - is the call to wamp icon Green or orange?U must have another SQL server running on port 3306Steven Martinstevenmartin99@gmail.comstevenmartin99@hotmail.comPampServer.com - [pampserver.com]Options:Reply•QuoteRe: Fatal error: Call to undefined function mysql_connect() in C:\wamp\www\testmysql.php on line 2 Posted by: sum_anand (---.184.68.182.airtelbroadband.in)Date: April 30, 2012 04:16PMHiIt looks like MySQL is not running. The Wamp Icon is green. How do i call to undefined check on the other SQL server?Any other possible fixup i should try?Options:Reply•QuoteRe: Fatal error: Call to undefined function mysql_connect() in C:\wamp\www\testmysql.php on line 2 Posted by: sum_anand (---.60.162.122.airtelbroadband.in)Date: May 01, 2012 02:20PMAnyone pls advice?Options:Reply•QuoteRe: Fatal error: Call to undefined function mysql_connect() in C:\wamp\www\testmysql.php on line 2 Posted by: RiggsFolly (---.as13285.net)Date: May 03, 2012 12:31PMHave you checked that you have not altered the default PHP configuration?click on wampmanager -> php -> extensionsand make sure that php_mysqli is ticked.If it is not, click that line in the menu and wait 20 seconds for wampmanager to change the php.ini file. The wampmanager icon will then go orange and then green again as wampmanager stops and then restarts apache to activate the config change.Then try phpmyadmin again.Options:Reply•QuoteRe: Fatal error: Call to undefined function mysql_connect() in C:\wamp\www\testmysql.php on line 2 Posted by: sum_anand (---.245.33.241.cdma-hyderabad.vsnl.net.in)Date: May 03, 2012 12:43PMphp_mysqli was always ticked, so that is not
Community Podcasts MySQL.com Downloads Documentation Section Menu: MySQL Forums :: PHP :: Fatal error: Call to undefined function mysql_connect() in C:\Program Files\Apache Group\Apache2\practice\testsql.php on line 17 New Topic Advanced Search Fatal error: Call to undefined function mysql_connect() in C:\Program Files\Apache Group\Apache2\practice\testsql.php on line 17 Posted by: Heidi -- () Date: February 13, 2006 12:38PM I am first time to use MySQL, Apache, and PHP. I installed both of them. I was doing with the config of Apache include php. I installed MySQL 4.0 but uninstall it because I was not know how to until I was some learned. I was tested PHP in Apache successfully but PHP is not work with MySQL. My active hard drives: F:\. I have two hard drives, so I put libmysql.dll, php_mysql.dll, and php_mysqli.dll to C:\WINDOWS\system32\ F:\WINDOWS\system32\ F:\WINDOWS\system\ C:\php\ext\ then I added php_mysql.dll and php_mysql.dll to php.ini in both C:\WINDOWS\ and F:\WINDOWS\. ;extension=php_mbstring.dll ;extension=php_bz2.dll ;extension=php_curl.dll ;extension=php_dba.dll ;extension=php_dbase.dll ;extension=php_exif.dll ;extension=php_fdf.dll ;extension=php_filepro.dll ;extension=php_gd2.dll ;extension=php_gettext.dll ;extension=php_ifx.dll ;extension=php_imap.dll ;extension=php_interbase.dll ;extension=php_ldap.dll ;extension=php_mcrypt.dll ;extension=php_mhash.dll ;extension=php_mime_magic.dll ;extension=php_ming.dll ;extension=php_mssql.dll ;extension=php_msql.dll ;extension=php_mysql.dll <---------added. ;extension=php_mysqli.dll <---------added. ;extension=php_oci8.dll ;extension=php_openssl.dll ;extension=php_oracle.dll ;extension=php_pgsql.dll ;extension=php_shmop.dll ;extension=php_snmp.dll ;extension=php_sockets.dll ;extension=php_sqlite.dll ;extension=php_sybase_ct.dll ;extension=php_tidy.dll ;extension=php_xmlrpc.dll ;extension=php_xsl.dll I logged in MySQL command, so I used mysql database then I created table: mysql> CREATE TABLE employees ( --->uname varchar(25) NOT NULL, --->fname varchar(100) NOT NULL, --->PRIMARY KEY (uname) --->); Query OK, 0 rows affected (0.13 sec) then mysql>INSERT INTO employees (uname, fname) VALUES ( 'john', 'John Doe'); Query OK, 1 row affected (0.00 sec) mysql>INSERT INTO employees (uname, fname) VALUES ( 'sarah', 'Sarah Jane'); Query OK, 1 row affected (0.00 sec) mysql>INSERT INTO employees (uname, fname) VALUES ( 'tim', 'Tim Shaw'); Query OK, 1