I'm using SqlSrv to connect to a Microsoft SQL Server. So far I was struggling to get SqlSrv to work, but that's ok now. On a Windows 2012R2 machine with XAMPP (PHP 5.5.19) I'm trying to connect to the database using Windows Authentication.
According to the documentation I'm using SQL Server Authentication when I'm providing UID and PWD in the connection options. So I left those options out but now the server tries to connect to the database as Domain\ServerName instead of Domain\MyWindowsUserAccountName. How can I set up the script to connect with my user credentials? Maybe I'm missing out on something obvious in the documentation...
According to document you should set Trusted_Connection to "yes"
Related
I have been trying to access an MSSQL Database in a server inside my network, it seems to be able to find the database, but does not accept the authentication.
I get the following error:
"mssql_connect(): message: Login failed. The login is from an untrusted domain and cannot be used with Windows authentication."
I have been trying to solve this for a few days now, with no success...
I tried adding the MAMP server into the hosts file in the windows machine, I know the account I am using works since I am able to access the database with those credentials while logging in through a Database Client (AquaData Studio) and of course while logging in locally via the SQL Server Management Studio.
I read that by default mssql_connect uses Windows Authentication (mssql.secure.connection Off in the php.ini) That is the authentication method I am using under the AquaData Studio client.
I have the freeTDS libary installed under the mssql as well...
Can anyone shed some light on this matter?
I believe it should be working since It finds the server, but fails on the authentication... Please help!
Dou you have Trusted_Connection=true in the connection string?
I am newbie to cloud hosting. My Client has created his domain in digitalocean. He then provided me with the username and password to access the site. Through filezilla I am able to ftp the site with the credentials he had provided. He had also stated MariaDB has been installed for mysql; but I am unable to login to my mysql server. I tried to initiate a mysql connection using the MySQL Workbench but it failed. Would appreciate any help on how I can access the mysql server using my Windows Machine.
This article might be of interest to you: http://www.cyberciti.biz/tips/how-do-i-enable-remote-access-to-mysql-database-server.html
I want to run a website on a server (actually only part of the server) I have a very limited access to. The only two things I can do is to connect via FTP to my part in the server and to connect to one MySQL database.
On this server I want to run some PHP code which uses PDO. The problem is that PDO is not enabled on this server.
So what can I do to have PDO on this server with the access I have?
Some more information on the server: It is a Windows server which runs Microsoft IIS 6.0. It has PHP 5.2.3.
If PDO isn't enabled (check <? phpinfo(); ?>) there's not much you can do... It can't be enabled without access to the PHP configuration on server level.
Did you mean: permissions?
When you connect the database with pdo, then you set the user. If in the phpmyadmin create the user with low permissions, then you can connect with this user in php pdo.
Example, if you created the user name of: readonly, and set readonly user password and permissions, then in connection you can use this user and password.
Sry for my english!
I'm trying to connect to a remote server's mysql instance from PHP on my main server.
The main server itself has no mysql installed but the server I'm trying to connect to has mysql installed.
PHP is installed on both servers but I was wondering if it would connect when mysql isn't installed locally.
You only need a client mysql library specific to your database connection stack, not a mysql server installation.
There's no reason that I can see for it not working. Keep in mind that you'll need the hostname of the server and the server will have to have remote_access configured.
All you need is to have the second server's URL and SQL info such as username and password.
no reason for it not to work.
I need to connect from a web LAMP (PHP) environment to a remote Navision installation which has ODBC drivers on the server.
Does the web server need the ODBC drivers on it locally as well? Or does PHP connect to the Navision server environment with it's own local drivers?
Also, can I drop SSL on this connection for security - if so which component is it dropped onto? The ODBC connection?
Any help appreciated.
This depends on how you connect to Navision. Does Navision provide some kind of API by which you can access it (Webservices or something)? In that case, the LAMP server can use that API.
If you need to access the database behind Navision, then PHP needs access to the database. Either over ODBC or directly if possible (like FreeTDS if the database in question is a MS-SQL Server)