Fatal Error Call To Undefined Function Mssql_connect
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 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 Fatal error: Call to undefined function mssql_connect() in php up vote 3 down vote favorite I'm running Windows Server, MS Sql and IIS6. I am trying to connect php to ms sql database, and I keep getting the following error from the script Fatal error: Call to undefined function mssql_connect() in .... on line x I have install zend studio in C:\Program Files\Zend\ZendStudio-5.5.0 directory. Configure IIS server and set the path variable to ;C:\Program Files\Zend\ZendStudio-5.5.0\bin\php5 also. The zend studio folder contains php4 and php5 inside the bin dir. I have added extension=php_mssql.dll in the php.ini file which is inside the C:\Program Files\Zend\ZendStudio-5.5.0\bin\php5 folder. And added php_mssql.dll in the ext dir. php.ini file is placed in windows path C:\WINDOWS also. php sql-server share|improve this question edited Jun 16 '15 at 19:52 JackWhiteIII 9422622 asked Jul 13 '11 at 5:05 user99 1612 Have you restarted the server since changing the ini file? –cwallenpoole Jul 13 '11 at 5:08 yes, i have and restart system also –user99 Jul 13 '11 at 5:14 did you try stackoverflow.com/questions/17103751/… –Arpit Gupta Jul 24 '13 at 14:41 or you can try stackoverflow.com/questions/7402713/… –Arpit Gupta Jul 24 '13 at 14:48 add a comment| 2 Answers 2 active oldest votes up vote 0 down vote To get changes made to php.ini to take effect, you must stop and start the IIS web service. Also, mssql requires: ntwdblib.dll to be available on the Windows PATH. It is better to add the php folder to the Windows PATH instead of moving any files around. Re-logon or reboot your
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 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 Fatal error: Call to undefined function mssql_connect() or sqlsrv_connect() in xampp up vote -1 down vote favorite I did http://stackoverflow.com/questions/6674320/fatal-error-call-to-undefined-function-mssql-connect-in-php all the changes given here but I still not connect SQL server on my php 5.6 version. I tried with mssql_connect() and sqlsrv_connect() both. I changed ; On windows: extension_dir = "ext" to: ; On windows: extension_dir = "D:\xampp\php\ext" I have installed .dlls too. But result is still: Fatal error: Call to undefined function sqlsrv_connect() or Fatal error: Call to undefined function mssql_connect() can anyone help me?? php sql-server sqlsrv share|improve this question http://stackoverflow.com/questions/36543053/fatal-error-call-to-undefined-function-mssql-connect-or-sqlsrv-connect-in-x edited Apr 11 at 9:00 gofr1 10.5k61736 asked Apr 11 at 8:03 Hemant 34 add a comment| 1 Answer 1 active oldest votes up vote 1 down vote accepted mssql_connect() is no longer supported by PHP since PHP 7.0 and was depreciated in 5.3. Create a phpinfo.php file: Open the page, and on the first page that's opened, third from the bottom, check if the registered streams contains 'sqlsrv': Registered PHP Streams php, file, glob, data, http, ftp, zip, compress.zlib, phar, sqlsrv If it doesn't then you have to enable the module. Try uncomment this code that you changed: From: ; On windows: extension_dir = "D:\xampp\php\ext" " To: On windows: extension_dir = "D:\xampp\php\ext" And let us know the outcome. share|improve this answer answered Apr 11 at 8:17 Tommy 2279 Thanks Tommy for your great reply. It is working fine now. Thanks a lot. –Hemant Apr 12 at 10:15 Okay, great! Glad I could help. Mark as correct answer? For anyone else who visits this thread. –Tommy Apr 12 at 10:22 add a comment| Your Answer draft saved draft discarded Sign up or log in Sign up using Google Sign up using Facebook Sign up using Email and Password Post as a gues
is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register http://www.scriptcase.net/forum/forum/scriptcase-7/bugs/solved-bugs-issues/5404-solved-function-mssql_connect-is-not-working-in-new-version-of-scriptcase before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. Announcement Collapse No announcement https://forums.iis.net/t/prev/1174428 yet. [SOLVED]Function mssql_connect is not working in new version of Scriptcase Collapse X Collapse Posts Latest Activity Search Page of 1 Filter Time All Time Today Last Week Last Month fatal error Show All Discussions only Photos only Videos only Links only Polls only Filtered by: Clear All new posts SADALID23 Junior Member Join Date: Jul 2011 Posts: 10 #1 [SOLVED]Function mssql_connect is not working in new version of Scriptcase 11-27-2013, 09:38 PM HI, After the upgrade to php 5.4 ScriptCase the function mssql_connect not working, still doing it without problem coming, fatal error call which now shows the error is as follows: Fatal error: Call to undefined function mssql_connect () in C: \ Program Files \ NetMake \ v71 \ wwwroot \ ScriptCase \ app \ A. ..... db.php on line 1022 regards thanks Tags: None bartho Senior Member Join Date: Apr 2011 Posts: 2300 #2 11-28-2013, 12:27 AM Hello, What kind of SQL Server connection are you using? regards, Bernhard Bernsmann Comment Cancel Post John L. Santos Bug Tracker Team Join Date: Aug 2011 Posts: 2783 #3 11-28-2013, 11:42 AM Hello, In order to use Native SRV or PDO drivers on PHP 5.4, it is neccessary to download the SQL Server 2012 Native Client Microsoft® SQL Server® 2012 Native Client http://downloads.scriptcase.com.br/d...l/00-mssql.htm Best Regards, John L. Santos Bug Tracker Team NetMake - IT Solutions Comment Cancel Post SADALID23 Junior Member Join Date: Jul 2011 Posts: 10 #4 11-28-2013, 07:29 PM Hi, I use MS SQL SERVER 2005 and connect to database with ODBC, i have connection to the database, but i use this code in blank to make a backup of the database. thanks
Web Platform Installer Get Help: Ask a Question in our Forums More Help Resources Blogs Forums Home IIS.NET Forums IIS 7 and Above Configuration & Scripting Fatal error: Call to undefined function mssql_connect() Fatal error: Call to undefined function mssql_connect() [Answered]RSS 10 replies Last post Jan 12, 2011 06:53 PM by HCamper ‹ Previous Thread|Next Thread › Print Share Twitter Facebook Email Shortcuts Active Threads Unanswered Threads Unresolved Threads Advanced Search Reply smclintock 13 Posts Fatal error: Call to undefined function mssql_connect() Jan 11, 2011 04:40 PM|smclintock|LINK Hi there, hopefully someone can help on here. I've been tearing my hair out over this all week! I recently setup a server with Windows Server 2008 installed and have managed to get ASP.NET website using SQL Server 2008 Express working without any problems. However, I've setup FastCGI so I can run another PHP website I've got but I cannot get it working using MS SQL. I migrated the MySQL database into SQL Server Express and downloaded the 'SQL Server Driver for PHP' but I don't think it's installed properly, all I get is the error: Call to undefined function mssql_connect(). I've ran the phpinfo() function and 'sqlsrv' appears to be there, but when I test 'mssql_connect' using function_exists it comes back as false? Hoping someone can help, just ask if you need more information. Thanks. Reply HCamper 7929 Posts Re: Fatal error: Call to undefined function mssql_connect() Jan 11, 2011 04:56 PM|HCamper|LINK smclintock Hi there, hopefully someone can help on here. I've been tearing my hair out over this all week! I recently setup a server with Windows Server 2008 installed and have managed to get ASP.NET website using SQL Server 2008 Express working without any problems. However, I've setup FastCGI so I can run another PHP website I've got but I cannot get it working using MS SQL. I migrated the MySQL database into SQL Server Express and downloaded the 'SQL Server Driver for PHP' but I don't think it's installed properly, all I get is the error: Call to undefined function mssql_connect(). I've ran the phpinfo() function and 'sqlsrv' appears to be there, but when I test 'mssql_connect' using function_exists it comes back as false? Hoping someone can help, just ask if you need more information. Thanks. Hello, I suggest that you comment out the ;php_mssql.dll in the php.ini file and see if the error goes away. For the PHP SQL Server Driver you have to copy the correct dlls to the extension directory and addthem to the php.ini. Restart the web server and recyle the application pools after the changes. Ther