473,799 Members | 2,822 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Problem with mssql driver

Hello,
I have a strange problem while using mssql server driver:
when i update/insert in/delete a table and want to redirect after, i have
the following error message:

CGI Error
The specified CGI application misbehaved by not returning a complete set of
HTTP headers. The headers it did return are:

The strange thing is that if i do a select or use mysql driver (with select,
insert, delete or update) i have no problem. Also if i update a none
existant row (ie usId = -1) there is no problem.
Here is a sample code that produce the error :

<?php
$conn = mssql_connect($ server, $user, $password);
mssql_select_db ($db);
$result = mssql_query("UP DATE Users SET usFirstName = 'Guillaume' WHERE usId
= 20");
mssql_close();

header("Locatio n: $redirect");
exit();
?>

When i call this page, the database is updated and my browser goes to the
$redirect page but displays the aboved error message instead of the page.

System infos:
os : windows 2k server sp3
web: iis 5.0
php: 4.3.2
db : sql server 2000 entreprise sp2

Anyone knows the cause of this problem and/or how to resolve it ?

Thanks,
Guillaume


Jul 16 '05 #1
3 5462
Hi Guillaume!

On Sun, 24 Aug 2003 10:38:30 +0200, "Guillaume"
<no************ **********@free .fr> wrote:
Hello,
I have a strange problem while using mssql server driver:
when i update/insert in/delete a table and want to redirect after, i have
the following error message:

What is the output of

mssql_error() and error_reporting (E_ALL); before the redirect? Most
probably there is a problem with your query.

When you then redirect, the server thinks the error messages are part
of the HTTP headers.

HTH, Jochen
--
PHP DB Edit Toolkit -- PHP scripts for building
database editing interfaces.
http://sourceforge.net/projects/phpdbedittk/
Jul 16 '05 #2
Hi Jochen,
There is no mssql_error() function but i found this function in the doc :

mssql_get_last_ message -- Returns the last message from server

This function returns the string "Changed database context to 'Agenda'."
which is the message generated by the mssql_select_db () function. So there
is no error during the update (i also tested the return value of
mssql_query() and it isn t FALSE).
The error_reporting (E_ALL); function doesn t change anything (no error
reported).
I also sets theis 2 functions :

mssql_min_error _severity(0)
mssql_min_messa ge_severity(0)

So i have all mssql messages but there is none.

Guillaume

"Jochen Daum" <jd@jdaum.de> wrote in message
news:v8******** *************** *********@4ax.c om...
Hi Guillaume!

On Sun, 24 Aug 2003 10:38:30 +0200, "Guillaume"
<no************ **********@free .fr> wrote:
Hello,
I have a strange problem while using mssql server driver:
when i update/insert in/delete a table and want to redirect after, i have
the following error message:

What is the output of

mssql_error() and error_reporting (E_ALL); before the redirect? Most
probably there is a problem with your query.

When you then redirect, the server thinks the error messages are part
of the HTTP headers.

HTH, Jochen
--
PHP DB Edit Toolkit -- PHP scripts for building
database editing interfaces.
http://sourceforge.net/projects/phpdbedittk/

Jul 16 '05 #3
Hi Guillaume!

On Sun, 24 Aug 2003 11:14:30 +0200, "Guillaume"
<no************ **********@free .fr> wrote:
Hi Jochen,
There is no mssql_error() function but i found this function in the doc :

mssql_get_last _message -- Returns the last message from server
Right. I have to look up everything on www.php.net
This function returns the string "Changed database context to 'Agenda'."
which is the message generated by the mssql_select_db () function. So there
is no error during the update (i also tested the return value of
mssql_query( ) and it isn t FALSE).
The error_reporting (E_ALL); function doesn t change anything (no error
reported).
I also sets theis 2 functions :

mssql_min_erro r_severity(0)
mssql_min_mess age_severity(0)

So i have all mssql messages but there is none.
What about a var_dump of the resource you get with mssql_open_db() ;?

HTH, Jochen
Guillaume

"Jochen Daum" <jd@jdaum.de> wrote in message
news:v8******* *************** **********@4ax. com...
Hi Guillaume!

On Sun, 24 Aug 2003 10:38:30 +0200, "Guillaume"
<no************ **********@free .fr> wrote:
>Hello,
>I have a strange problem while using mssql server driver:
>when i update/insert in/delete a table and want to redirect after, i have
>the following error message:
>

What is the output of

mssql_error() and error_reporting (E_ALL); before the redirect? Most
probably there is a problem with your query.

When you then redirect, the server thinks the error messages are part
of the HTTP headers.

HTH, Jochen
--
PHP DB Edit Toolkit -- PHP scripts for building
database editing interfaces.
http://sourceforge.net/projects/phpdbedittk/


--
PHP DB Edit Toolkit -- PHP scripts for building
database editing interfaces.
http://sourceforge.net/projects/phpdbedittk/
Jul 16 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
23877
by: mj | last post by:
Hello, thanks for the help. I am running a WinXP Pro w/ SP2 (my home computer, with ZoneAlarm firewall) Apache 2.0.52 MySQL 4.1.7 PHP 5.1.0-dev I have developed a PHP/MySQL web app that tracks jobs for me, and we
7
1912
by: John Fabiani | last post by:
Hi, Since this is (sort of) my second request it must not be an easy solution. Are there others using Python to connect MsSQL? At the moment I'd accept even a windows solution - although, I'm looking for a Linux solution. John
6
4569
by: Murtix Van Basten | last post by:
HI all, I am trying to migrate a database from mysql to mssql2k. I use myODBC to connect to mysql server to pull the database from DTS and insert in to sql server. But in mysql server, there is one huge table. Size of it is 1.3 GB and more than 12 million rows. While I try with DTS, it transfers all tables in the database except this huge table. First I thought it would be the resources of the computer not enough (512MB physical ram...
6
7259
by: Swami | last post by:
Hi, I have installed MQ SQL Server 2000 on my laptop and trying to use SPRINTA 2000 JDBC Driver (inetmssql.jar) to connect to the local db. I wrote a sample Java app to test the connection and I get the following error trace, DriverManager.initialize: jdbc.drivers = null JDBC DriverManager initialized SQLException: SQLState(08S01) {sql7=true, port=1433, user=sa, url=jdbc:inetdae7:US0211737-WP01:1433,
16
1766
by: davemateer | last post by:
Hi We have a current system: Linux / Apache / PHP4.x talking to Microsoft SQL 2000 Thinking about going to: Windows 2003 / PHP4.x talking to the same Microsoft SQL 2000 box...
9
4418
by: dunleav1 | last post by:
Does enabling/disabling Data Execution Prevention have a performance impact on SQL 2000 or SQL 2005? For SQL best performance - how should I configure for: Processor Scheduling: Programs or Background services Memory Usage: Programs or System Cache
0
1630
by: doron.almog | last post by:
anybody know which driver to use to make a linked server connection between MSSQL 2005 and Access 2007
1
2662
by: mkepick | last post by:
migrated databases from sybase to mssql, migration exported sybase written queries written with the application build in query tool and imported to mssql databases. all db and tables migrated without errors. Regular queries without outer joins work fine but the outer join queries are failing with the following message: Microsoft ODBC SQL Server Driver SQL Server Query contain an outer-join request that is not permitted. I think the MSSQL...
0
1776
by: Gosth in the shell | last post by:
Hi there, i need some help I got a software to backend is MSSQL 2005, but a provider software requires an UPDATE on his table with MySQL 5.0.56a backend, so i made the next: download and install ODBC MySQL 3.51 configuring system DSN add a linked server on MSSQL 2005
0
10495
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10248
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10032
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9085
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6811
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5597
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4148
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3764
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2942
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.