Fatal Error Call To Undefined Function Mssql_connect 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
Call To Undefined Function Mssql_connect() Xampp
Overflow the company Business Learn more about hiring developers or posting ads with us Stack call to undefined function mssql_connect() ubuntu Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community
Call To Undefined Function Mssql_connect() Linux
of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up wamp php5.3.5 mssql_connect() Fatal error: Call to undefined function mssql_connect() up vote 0 down vote favorite 1 php fatal error: call to undefined function mssql_connect() linux I am using WampServer Version 2.1, php5.3.5 , Apeache2.2.17 I could not use mssql_connect(), "mssql_connect() Fatal error: Call to undefined function mssql_connect()" I went through googling but still not found solution. I have tried install SQLSRV30 and configure as tutor but still no luck, I also tried copy this ntwdblib.dll (version 2000.80.194.0) to directories php5.3.5/ext and still no luck. kindly help me. php sql-server share|improve this question asked Jun 14 '12 fatal error call to undefined function sqlsrv_connect() xampp at 8:45 Meas 901212 add a comment| 3 Answers 3 active oldest votes up vote 2 down vote According to here These functions allow you to access MS SQL Server database. This extension is not available anymore on Windows with PHP 5.3 or later. SQLSRV, an alternative driver for MS SQL is available from Microsoft: ยป http://msdn.microsoft.com/en-us/sqlserver/ff657782.aspx. share|improve this answer answered Jun 14 '12 at 8:49 Musa 66.1k106384 So no other solution beside SQLSRV because it need to modified code start with prefix sqlsrv_ –Meas Jun 14 '12 at 9:15 add a comment| up vote 1 down vote First download SQLSRV20.EXE from here Put the file "php_sqlsrv_53_ts_vc9.dll" in your "wamp\php\ext" folder. In php.ini add this line: extension=php_sqlsrv_53_ts_vc9.dll Restart apache. Then you should be able to connect with: $connectionInfo = array( "Database" => "dbname", "UID" => "username", "PWD" => "password", "CharacterSet" => "UTF-8"); $con = sqlsrv_connect("ipaddress", $connectionInfo); if( $con === false ) { die('Not working: ' . sqlsrv_errors()); } share|improve this answer answered Jun 14 '12 at 9:20 pikand 7452913 I still got error message "Call to undefined function sqlsrv_connect()"; –Meas Jun 14 '12 at 9:37 Now I can solve it by using old version of php and wamp. –Meas Jun 15 '12 at 7:32 H
database in SQL Server 2005 Express
Call To Undefined Function Mssql_connect() Centos
and some of information I will share is: I also php_sqlsrv_53_nts.dll download used: SQL Server 2005 ExpressIIS 6.0php 5.2.14 Server Type: Database EngineServer name: ComputerName\SQLEXPRESSAuthentication: Windows
Php 7 Mssql_connect
AuthenticationUsername: NETBIOS NAME\Administrator [hide]Password: [hide] My problem is I cannot connect to my database using php and I don't know what username and password http://stackoverflow.com/questions/11029626/wamp-php5-3-5-mssql-connect-fatal-error-call-to-undefined-function-mssql-conn I should use if the Username: NETBIOS NAME\Administrator Password: [no password] This is my php code: https://www.sitepoint.com/community/t/mssql-connection-call-to-undefined-mssql-connect/68045 to database $dbhandle = mssql_connect($server, $user, $pass) or die ("Cannot connect to Server"); //mssql_connect($server, 'sa', 'pass') or die("Cannot connect to server"); $selected = mssql_select_db($db_name, $dbhandle)or die("Cannot select DB"); $department = $_POST['department']; $username = $_POST['username']; $sql=mssql_query("SELECT `Department`, `Username` FROM `tbl_user` WHERE `Department` = '{$department}' AND Username = '{$username}'") or die(mssql_min_error_severity()); $ct = mssql_num_rows($sql); if($ct == 1) { // im guessing this means that the user is valid. $_SESSION['loggedin'] = true; // now that the user is valid we change the session value. $row = mssql_fetch_assoc($sql); //$_SESSION['username'] = $row['Username'] ; //$_SESSION['department'] = $row['Department']; $Departments=array('Accounting', 'Engineering', 'Finishing_Goods', 'HRAD', 'MIS', 'Packaging_and_Design', 'Production', 'Purchasing_Logistic', 'QA_and_Technical', 'Supply_Chain'); if (in_array($row['Department'], $Departments)){ header ('Location:company.php'); }else{ echo "Incorrect Username or Department"; header ('Location:index.php'); } } ?> I don't know if what configuration i need to do to work my connection. I configured php.ini like: I uncommented the following: extension_dir = "C:\php\ext"extension=php_sqlsrv_52_ts_vc6.dllextension=php_bz2.dllextension=php_curl.dllextension=php_dba.dllextension=php_exif.dllextension=php_gd2.dllextension=php_gettext.dll mssql.allow_persistent=Onmssql.max_persistent=-1mssql_max_links=-1mssql.min_error_severity=10mssql.compatibility_mode=Offmssql.connect_timeout=5mssql.timeout=60mssql.textlimit=4096mssql.textsize=4096mssql.batchsize=0mssql.datetimeconver
+ 1 hour Powered by Bitnami phpBB