简体   繁体   中英

mssql_execute causing Error code: ERR_EMPTY_RESPONSE

I am having an issue with a site that I am moving onto a new server. This site is connected to a SQL Server database, and is working correctly in it's current location. However, the new location is having problems with a single mssql_execute . Here is a sample of the code:

function get_customer_select_info() {
    $link = get_db_link();

    $customer_all_command_text = "dbo.Customer_All";
    $customer_all_stmt = mssql_init($customer_all_command_text, $link);
    $search = "%";

    mssql_bind($customer_all_stmt, "@parm1", $search, SQLVARCHAR, false, false, 15);

    $result = mssql_execute($customer_all_stmt);

    mssql_free_statement($customer_all_stmt);

    return $result;
}

Calling the above function results in

Unable to load the webpage because the server sent no data.
Error code: ERR_EMPTY_RESPONSE

from Chrome.

get_db_link retrieves a new connection to the database, or returns the current one if it already exists. It is functioning correctly. I have tried just closing the link and creating a new one if one already exists, which had no effect on the error.

This is not a problem connecting to the database because before this stored procedure is executed, three others are called and executed correctly.

Another complication is that running a trace on the given database results in this stored procedure getting called on the database and being successful!

Commenting out the mssql_execute makes the page load correctly (minus the information that this function returns).

Again, the same exact code on the current server works correctly, but the code on the new server is causing problems. I can't obtain any debugging information from apache or php because it is not actually sending anything.

If you facing ERR_EMPTY_RESPONSE then i will suggest you to follow these steps

  • Refresh page and restart browser
  • Clean your cache and browser cookies
  • Check internet connection
  • Update Google Chrome
  • Check router

I am also sharing video tutorial where you will find the complete solution of given steps to resolve your problem here is the link

http://vimeo.com/60824619

Best of luck

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM