sqlsrv

Cannot access columns with german umlauts in Laravel 5 using sqlsrv

拟墨画扇 提交于 2019-12-12 18:12:21
问题 I use an existing db on our SQL-Server 2008 with Laravel 5. Many tables and columns contain german umlauts. I've set the charset of the connection to "utf8" and can access tables like Läger without problems. But I couldn't access columns with umlauts. Every query returns something like ["Stra�e"]=> string(15) "Mainzer Str. 97" instead of ["Straße"] I've tested it with charset utf8 and latin1 but it's always the same result. Any idea how to fix this without changing the existing db? 来源: https:

Call to undefined function sqlsrv_connect() in xampp

不羁的心 提交于 2019-12-12 15:02:26
问题 When I tried to connect sqlsrv server in codeigniter, I got this error message. Call to undefined function sqlsrv_connect() in xampp Below is codes from database.php $db['default'] = array( 'dsn' => '', 'hostname' => 'MainDS\WTInfoUnit', 'username' => 'sa', 'password' => 'crafter', 'database' => 'BioStar_DoorLog', 'dbdriver' => 'sqlsrv', 'dbprefix' => '', 'pconnect' => FALSE, 'db_debug' => (ENVIRONMENT !== 'production'), 'cache_on' => FALSE, 'cachedir' => '', 'char_set' => 'utf8', 'dbcollat'

Microsoft sqlsrv extension for php 5.5.x

穿精又带淫゛_ 提交于 2019-12-12 12:00:21
问题 We are running php 5.3.27 on Windows, nts. We just failed a PCI scan due to a session fixation vulnerability in PHP and need to regain PCI compliance. It is a little frustrating, as we use session_regenerate_id() after login, so in my eyes (perhaps I am wrong) our application is not vulnerable even if php is. To pass the scan we need to upgrade to php 5.5.2. We use the sqlsrv driver extension from Microsoft, and I notice that they have not released a build for php 5.5.x Does anyone have a

connect to mssql database via sqlsrv_connect() - PHP

心不动则不痛 提交于 2019-12-12 08:55:54
问题 I'm attempting to connect to a 2005 Microsoft sql database using PHP by using the sqlsrv_connect() function. alas, the function returns false, and im not sure why. <?php $myServer = "MAZE.jpc.wa.edu.au.local"; $myUser = "myUsername"; $myPass = "myPassword"; $myDB = "John Paul College"; $connectionInfo = array("Database"=>$myDB, "UID" => $myUser, "PWD" => $myPass); $conn = sqlsrv_connect($myServer, $connectionInfo); //returns false if( $conn === false ) { echo "failed connection"; } $sql =

Connecting php 7.2 to MS SQL using sqlsrv

不羁岁月 提交于 2019-12-12 08:42:09
问题 I'm trying to get a connection to MS SQL up and running via PHP on my machine. I'm running IIS, have PHP 7.2 installed and MS SQL Express 2017. I have my basic web page running but when I click to open the PHP page, the connection does not work. session_start(); echo "Hello "; if (isset($_POST['submit'])) { $_SESSION["server"] = $_POST['server']; $_SESSION["database"]= $_POST['database']; $_SESSION["username"] = $_POST['username']; $_SESSION["password"] = $_POST['password']; echo $_SESSION[

SQL Server not Connecting nor Tossing Errors

自闭症网瘾萝莉.ら 提交于 2019-12-12 03:42:37
问题 I am attempting to connect to an already established database here at work. We don't have access to the back-end, but we do have the server address and the login information to connect to it - I was able to connect last year using PDO and dblib, but dblib is no longer supported in PHP 7 so I am attempting to use the sql server driver. I set up a basic connection string to test it and am not getting any specified errors, nor am I getting any results: <?php //Display All Errors ini_set('display

Call to undefined function sqlsrv_connect()

左心房为你撑大大i 提交于 2019-12-12 03:09:30
问题 i wish to fire select query for login on user table . i am using php and ms msql server 2005 as backend my php code is correct but my database is on other p.c in network. i need to know is there any configuration setting needed to be done. i am using xampp V 1.8.3 including php 5.5.1 回答1: To install SQLSRV 3.0 to Apache (I assume) in Windows platform, here are the steps: Put the driver file in your PHP extension directory. Modify the php.ini file to include the driver. For example: extension

Issues connecting to Microsoft SQL from PHP

折月煮酒 提交于 2019-12-11 23:26:56
问题 I am building a website using PHP on Somee Server(somee.com) and Microsoft SQL . Now I have a problem making connection between php and SQL. Here is my connection code: <?php $serverName = "mssql.somee.com"; //serverName\instanceName // Since UID and PWD are not specified in the $connectionInfo array, // The connection will be attempted using Windows Authentication. $connectionInfo = array( "Database"=>"myDB","UID"=>"myusername","PWD"=>"mypassword"); $conn = sqlsrv_connect( "mssql.somee.com",

MYSQL to sqlsrv

爱⌒轻易说出口 提交于 2019-12-11 21:14:15
问题 Working on converting my mysql php code to sqlsrv, but having issue finding the same functions. This is the code: $result=sqlsrv_query($conn,$sql) or die("Couldn't execute query:<br>" . sqlsrv_error(). "<br>" . sqlsrv_errno()); $file_ending = "xls"; $reals=array(); //header info for browser header("Content-Type: application/xls"); header("Content-Disposition: attachment; filename=$filename.xls"); header("Pragma: no-cache"); header("Expires: 0"); /*******Start of Formatting for Excel*******/ /

My table has two timestamp values and remaining are string value. I want to display entire table in html using php

≯℡__Kan透↙ 提交于 2019-12-11 06:48:35
问题 I want to display entire sql table without knowing column names of that table. This table contains emp_id,emp_name,joining date,resignation_date,emp_address,emp_phone. $conn = sqlsrv_connect($serverName, $connectionInfo); if ($conn) { echo "Connection established"; if (isset($_POST['submit'])) { $selected_table = $_POST['cycle']; $query = "SELECT * FROM ".$selected_table; $result = sqlsrv_query($conn, $query); if (!$result) { $message = 'ERROR:'.mysql_error(); return $message; } else { $i = 0