mssql_connect on Linux server with PHP 5.3 - php

I know that mssql_connect will not work on windows server with PHP 5.3 or later, but will it work on Linux?

mssql_connect = Connect to a MS SQL Server
mysql_connect = Connect to a MySQL Server (open source database server) usually on linux
You can get MySQL on windows platforms

Related

Will upgrading mysql server on one machine affect connection to another machine?

I have a web server set up on machine TXAP1. My mysql server is set up on another machine called TXDATA.
I also have a test mysql server on TXAP1. I am going to use it to upgrade the version of mysql to test the upgrade process.
Will upgrading the version of mysql on TXAP1 affect the ability to connect to the mysql server on TXDATA?
OS: SUSE Linux Enterprise Server 11
Apache: 2.2.10
PHP: 5.2.6
MySQL: 5.0.67
Will upgrading the version of mysql on TXAP1 affect the ability to connect to the mysql server on TXDATA?
Well, no. Connection to the TXDATA MySQL server will never be affected. However, you won't be able to use new mysql functions on the TXDATA for obvious reasons

Access MS SQL from Php 5.5

I am using Php to connect the SQL server using these code:
$dbhandle = mssql_connect($server,$username,$password);
or die("Could not connect to SQL server");
$selected = mssql_select_db($database,$dbcon)
or die("Could not open database $database");
However, I found that the code does not run. No error message and cannot do any mssql_query() with this.
After some research, I found that mssql is not default supported by Php 5.5 like mysql. However, I do not find the sulotion.
I found this from Microsoft but they are for Php on Windows. I cannot find the one for Linux
http://www.microsoft.com/en-us/download/details.aspx?id=20098
What should I do to install the SQL driver for PHP 5.5 in Ubuntu.
My Server
PHP 5.5.9 on Ubuntu
SQL server 2012 on Microsoft server 2012R2
Below is the reference for connecting to a MSSQL Server database wtih LAMP.
Microsoft-SQL-Server-Database
Ubuntu Server – Connect to MSSQL via PHP
Its work on my PC.

mssql_connect slow (linux server)

Does anyone know why mssql_connect would be slow? PHP is running on a Linux server with FreeTDS. I am trying to connect to a remote database. When I connect from PHP it takes about 3 seconds, but if I use the FreeTDS tsql command from the shell it connects in under a second, so it is able to connect faster. Is there a setting I can change or a different driver I should use?
You should start using PDO with MSSQL driver support.
More info on:
http://php.net/manual/en/ref.pdo-dblib.php
And some examples:
Connecting to mssql using pdo through php and linux

Connect a Unix server to a Windows 2008 database with PHP

I have access to a Unix server (hosted, not mine) on which I want to run a PHP file that will retrieve information from a Windows 2008 server. In the past I have had no problem connecting with MySQL databases, but I am a little lost working with a Windows DB.
My goal: run a SELECT query on the Windows 2008 server and return the results.
The problem: My server does not have ODBC and I do not expect my host to be willing to add a driver for me.
Is there anything I can do within a PHP script to make this happen?
Thanks in advance for your help!
Edit: the Windows 2008 server is running MS SQL

Connect to Mssql 2008 sever remotely through php

Quick question: I am having issues while trying to connect to a mssql 2008 server through php. The php script is located on a different server. Does the mssql server have to have php installed on it? or only the server which I am running the script from?
Only the server you are running PHP on. If there's a connection error, you may be having issues with you connection string or with the raw networking (for instance, the port you are trying to connect to is blocked on the remote server).
If you take a look at the documentation for mssql in PHP, you can see that it accepts both local and external addresses (computer or server, port).
The server running mssql, to which you're connecting, doesn't need PHP enabled.

Categories