Mysql_connect Print Error
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 Business Learn call to undefined function mysql_connect() more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags mysql_connect deprecated Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 6.2 million programmers, just like you, fatal error: call to undefined function mysql_connect() helping each other. Join them; it only takes a minute: Sign up mysql_connect error up vote 4 down vote favorite In the following code I see echo1 statement, after which I do not see anything printed on the
Mysql_select_db
UI.The username and password is correct. But PHP doesn't seem to connect to MySQL. Don't even see the die statement what am I doing wrong. After mysql_connect is encountered the rest of the code doesn't work: php share|improve this question edited Oct 30 '12 at 7:59 asked Oct 27 '12 at 13:21 Rajeev 9,78442119206 1 Try uncaught error: call to undefined function mysql_connect() to use ' instead of ", e.g. mysql_connect('localhost', 'mysql_user', 'mysql_password'); Try it and let me know! I will elaborate! –Ilia Rostovtsev Oct 27 '12 at 13:23 Do you have your error reporting turned on? –Ghazanfar Mir Oct 27 '12 at 13:23 Also try ..or die(mysql_error()); to get more information.. –intelis Oct 27 '12 at 13:24 2 @Ilia Rostovtsev: it doesn't matter. The problem is that the error reporting is turned off. Rajeev, turn on the error reporting then you will se what is the problem but please do not use the mysql_ stuffess, try PDO or mysqli_ –Peter Kiss Oct 27 '12 at 13:27 2 Please, don't use mysql_* functions in new code. They are no longer maintained and the deprecation process has begun on it. See the red box? Learn about prepared statements instead, and use PDO or MySQLi - this article will help you decide which. If you choose PDO, here is a good tutorial. –Madara Uchiha♦ Oct 27 '12 at 14:00 | show 7 more comments 5 Answers 5 active oldest votes up vote 2 down vote You should be mising an error. Add : ini_set('display_errors', 1); error_reporting(E_ALL); at the beggining of your script share|improve this answer answered Oct 27 '12 at 13:24 Cétia 7,66433065 1 This only helps in diagnosis, it is not really
and Objects Namespaces Errors Exceptions Generators References Explained Predefined Variables Predefined Exceptions Predefined Interfaces and Classes Context options and parameters Supported Protocols and Wrappers Security Introduction General considerations Installed as mysqli_connect CGI binary Installed as an Apache module Session Security Filesystem Security Database
Fatal Error: Uncaught Error: Call To Undefined Function Mysql_connect()
Security Error Reporting Using Register Globals User Submitted Data Magic Quotes Hiding PHP Keeping Current Features HTTP authentication
Php Mysql Query
with PHP Cookies Sessions Dealing with XForms Handling file uploads Using remote files Connection handling Persistent Database Connections Safe Mode Command line usage Garbage Collection DTrace Dynamic Tracing Function http://stackoverflow.com/questions/13100557/mysql-connect-error Reference Affecting PHP's Behaviour Audio Formats Manipulation Authentication Services Command Line Specific Extensions Compression and Archive Extensions Credit Card Processing Cryptography Extensions Database Extensions Date and Time Related Extensions File System Related Extensions Human Language and Character Encoding Support Image Processing and Generation Mail Related Extensions Mathematical Extensions Non-Text MIME Output Process Control Extensions Other Basic Extensions Other Services Search http://php.net/manual/en/function.mysql-error.php Engine Extensions Server Specific Extensions Session Extensions Text Processing Variable and Type Related Extensions Web Services Windows Only Extensions XML Manipulation Keyboard Shortcuts? This help j Next menu item k Previous menu item g p Previous man page g n Next man page G Scroll to bottom g g Scroll to top g h Goto homepage g s Goto search(current page) / Focus search box mysql_escape_string » « mysql_errno PHP Manual Function Reference Database Extensions Vendor Specific Database Extensions MySQL MySQL (Original) MySQL Functions Change language: English Brazilian Portuguese Chinese (Simplified) French German Japanese Korean Romanian Russian Spanish Turkish Other Edit Report a Bug mysql_error (PHP 4, PHP 5)mysql_error — Returns the text of the error message from previous MySQL operation Warning This extension was deprecated in PHP 5.5.0, and it was removed in PHP 7.0.0. Instead, the MySQLi or PDO_MySQL extension should be used. See also MySQL: choosing an API guide and related FAQ for more information. Alternatives to this function include: mysqli_error() PDO::errorInfo() Description string mysql_error ([ resource $link_identifier = NULL ] ) Re
Learn Bootstrap Learn Graphics Learn Icons Learn How To JavaScript Learn JavaScript Learn jQuery Learn jQueryMobile Learn AppML Learn AngularJS http://www.w3schools.com/php/func_mysqli_connect.asp Learn JSON Learn AJAX Server Side Learn SQL Learn PHP Learn https://forums.iis.net/t/prev/1230334 ASP Web Building Web Templates Web Statistics Web Certificates XML Learn XML Learn XML AJAX Learn XML DOM Learn XML DTD Learn XML Schema Learn XSLT Learn XPath Learn XQuery × HTML HTML Tag Reference HTML Event Reference HTML Color Reference HTML Attribute Reference call to HTML Canvas Reference HTML SVG Reference Google Maps Reference CSS CSS Reference CSS Selector Reference W3.CSS Reference Bootstrap Reference Icon Reference JavaScript JavaScript Reference HTML DOM Reference jQuery Reference jQuery Mobile Reference AngularJS Reference XML XML Reference XML Http Reference XSLT Reference XML Schema Reference Charsets HTML Character Sets HTML ASCII HTML ANSI HTML call to undefined Windows-1252 HTML ISO-8859-1 HTML Symbols HTML UTF-8 Server Side PHP Reference SQL Reference ASP Reference × HTML/CSS HTML Examples CSS Examples W3.CSS Examples Bootstrap Examples JavaScript JavaScript Examples HTML DOM Examples jQuery Examples jQuery Mobile Examples AngularJS Examples AJAX Examples XML XML Examples XSLT Examples XPath Examples XML Schema Examples SVG Examples Server Side PHP Examples ASP Examples Quizzes HTML Quiz CSS Quiz JavaScript Quiz Bootstrap Quiz jQuery Quiz PHP Quiz SQL Quiz XML Quiz × PHP Tutorial PHP HOME PHP Intro PHP Install PHP Syntax PHP Variables PHP Echo / Print PHP Data Types PHP Strings PHP Constants PHP Operators PHP If...Else...Elseif PHP Switch PHP While Loops PHP For Loops PHP Functions PHP Arrays PHP Sorting Arrays PHP Superglobals PHP Forms PHP Form Handling PHP Form Validation PHP Form Required PHP Form URL/E-mail PHP Form Complete PHP Advanced PHP Arrays Multi PHP Date and Time PHP Include PHP File Handling PHP File Open/Read PHP File Create/Write PHP File Upload PHP Cookie
Web Platform Installer Get Help: Ask a Question in our Forums More Help Resources Blogs Forums Home IIS.NET Forums Partner and Community Forums PHP Community PHP Fatal error: Call to undefined function mysql_connect() PHP Fatal error: Call to undefined function mysql_connect() RSS 3 replies Last post Mar 22, 2016 07:42 PM by DropPhone ‹ Previous Thread|Next Thread › Print Share Twitter Facebook Email Shortcuts Active Threads Unanswered Threads Unresolved Threads Advanced Search Reply PacoRenteria 1 Post PHP Fatal error: Call to undefined function mysql_connect() Jan 22, 2015 05:43 PM|PacoRenteria|LINK Greetings Fellows, I am having this problem in just one page! PHP Fatal error: Call to undefined function mysql_connect() I am using IIS8.0 with PHP 5.3, the problem is ONLY on one page and I have tried everything that has come to my mind. Even replaced the code with other copied from a working page and surprisingly, it doesn't work. I have checked and double checked the page sintaxis and still doesn't work. ¿any ideas? Thx in advance. mysql mssql_connect php Reply DropPhone 297 Posts MicrosoftModerator Re: PHP Fatal error: Call to undefined function mysql_connect() Jan 26, 2015 05:44 PM|DropPhone|LINK Just checking: is the extension=php_mysql.dll enabled inyour php.ini file? You may also need to uncomment the extension=php_pdo_mysql.dll and the extension=php_mysqli.dll lines as well. Thx! --E. mysql mssql_connect php Reply Onret 1 Post Re: PHP Fatal error: Call to undefined function mysql_connect() Mar 09, 2016 07:30 AM|Onret|LINK I have the same problem (exept running on iis10 and have php 7.0.3). I could only find "extension=php_mysqli.dll" in my .ini file and have tried to write in "extension=php_mysql.dll" and paste a downloaded php_mysql.dll in the /ext/ directory. Didn't work. I have also uncommented the lines you suggested. I would really appreciate your help. Reply DropPhone 297 Posts MicrosoftModerator Re: PHP Fatal error: Call to undefined function mysql_connect() Mar 22, 2016 07:42 PM|DropPhone|LINK Onret I hav