Weird problems running scripts on different platforms.
| From: | Ivanoff Jari | Date: | Thu, 16 Nov 2000 12:00:37 +0000 |
| Subject: | Weird problems running scripts on different platforms. | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-25679@lists.php.net to get a copy of this message | ||
Hi!
I have an Apache server running on an NT box as an development server and an
IIS server as an publication server on our Intranet.
I run the same script on both of them, with the same version of PHP (
4.0.3pl1)
Both scripts connect to the same MS SQL server and the same database.
When I run it on the Apache server it works great but when i run the same
script ( identical ) on the IIS I get this errormessage:
Warning: MS SQL message: Line 1: Incorrect syntax near ')'. (severity 15) in
D:\Inetpub\intranet.autonova.se\uddevalla\dev\news\newsin.php on line 9
Warning: MS SQL: Query failed in
D:\Inetpub\intranet.autonova.se\uddevalla\dev\news\newsin.php on line 9
Invalid Query
This is the script:
<?php
$db = mssql_connect("seanua02","www","www");
mssql_select_db("intranet",$db);
$tid = date("H:i:s");
$dag = date("d");
$manad = date("m");
$ar = date("Y");
$datum="$ar-$manad-$dag";
mssql_query("insert into tbl_news (date,time,head,content,urgent) values
(\"$datum\",\"$tid\",\"$head\",\"$content\",$urgent);")
or die("Invalid
Query");
printf("<a href=\"form.html\">Åter till inmatningen</a> <a
href=\"http://intranet\"> Till
Huvudsidan</a>");
?>
I get the $head,$content and $urgent from a form. $head and $content are
both text and $urgent is a bit value ( 1 or 0 ) from a radiobutton.
I would appreciate any help I can get!
With My Best Regards / Med Vänlig Hälsning
Jari Ivanoff
IS/IT
Volvo Cars Uddevalla
Phone/Tel: +46-(0)522-80671
Fax: +46-(0)522-80427
Pbx/Växel: +46-(0)522-80000