Some facts.
Tried it on Debian and Fedora Core 6
Tried both ctlib and freetds compiled and also tried it with rpms/debian packages
The exact queries work fine under php 4 on a debian server, as soon as you run the site on linux php 5 all the stored procedures fail but the rest of the site works perfectly.
The stored procedures work fine, have always worked, and are used by other platforms and languages throughout an enterprise.
Here is the error
Code: Select all
Cannot insert the value NULL into column 'NewOrderID', table
'tempdb.dbo.#Orders__________________00010002FA09';
column does not allow nulls. INSERT fails. (severity 16, procedure N/A) in
/var/home/slc.ironkeep.net/includes/class/class.gardenweasel.inc.php on
line 634
Warning: mssql_query() [function.mssql-query]: Sybase: Server message:
Cannot insert the value NULL into column '', table ''; column does not
allow nulls. INSERT fails. (severity 16, procedure psp_ProcessOrders) in
/var/home/slc.ironkeep.net/includes/class/class.gardenweasel.inc.php on
line 634
Warning: mssql_query() [function.mssql-query]: Sybase: Server message:
Procedure 'psp_AssocAccountInsertOrdDetail' expects parameter '@Orderid',
which was not supplied. (severity 16, procedure
psp_AssocAccountInsertOrdDetai) in
/var/home/slc.ironkeep.net/includes/class/class.gardenweasel.inc.php on
line 634Here is a simple example of the code that is failing. Note, we have tried this in every way possible, using every mssql command in the book including passing the variable and type wtih bind. We are 100% certain that the query as below is coming out correct, when we echo the $sql and paste it into a query manager it works fine.
Code: Select all
$conn =& get_conn();
$sql ="exec psp_ProcessOrders {$weborderkey}";
$result = mssql_query( $sql, $conn );