note 76157 added to function.mssql-execute
| From: | mark dot vanrossum at bris dot ac dot uk | Date: | Tue, 03 Jul 2007 12:47:58 +0000 |
| Subject: | note 76157 added to function.mssql-execute | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-128176@lists.php.net to get a copy of this message | ||
I was pulling my hair out getting the error:
"stored procedure execution failed"
when trying to run mssql_execute but you could run:
$results = mssql_query('sp_test');
fine.
I was connecting using the string:
$dbserver="xxx.xxx.xxx.xxx:1433";
$cn = mssql_connect($dbserver, $dbuser, $dbpass);
where xxx is the IP address.
It seems that this doesn't work, you need to do the following:
edit your freetds.conf file and add the connection in here, eg:
[YourServer]
host =xxx.xxx.xxx.xxx
port = 1433
tds version = 8.0
Then try and connect as:
$cn = mssql_connect('YourServer', $dbuser, $dbpass);
And it should work. No idea why it doesn't work before, took me hours to find this out!
----
Server IP: 194.145.210.3
Probable Submitter: 137.222.72.176
----
Manual Page -- http://www.php.net/manual/en/function.mssql-execute.php
Edit -- https://master.php.net/note/edit/76157
Del: integrated -- https://master.php.net/note/delete/76157/integrated
Del: useless -- https://master.php.net/note/delete/76157/useless
Del: bad code -- https://master.php.net/note/delete/76157/bad+code
Del: spam -- https://master.php.net/note/delete/76157/spam
Del: non-english -- https://master.php.net/note/delete/76157/non-english
Del: in docs -- https://master.php.net/note/delete/76157/in+docs
Del: other reasons-- https://master.php.net/note/delete/76157
Reject -- https://master.php.net/note/reject/76157
Search -- https://master.php.net/manage/user-notes.php