MSSQL slow on IIS 6

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • php-taz

    #1

    MSSQL slow on IIS 6

    I built a PHP website on Windows 2000 (using IIS) that connects to a
    SQL Server 2000 database using the mssql functions. I migrated the
    website and the database onto a Windows 2003 machine, and now the mssql
    functions are significantly slower. On the Windows 2000 machine, the
    mssql_connect takes .03 seconds to run, and the odbc_connect takes the
    same amount of time. On Windows 2003, the mssql_connect takes a full
    second to run, but odbc_connect only takes .017 seconds. I have tried
    both ISAPI and CGI for the php configuration in IIS, and I have
    experimented with different values for the output_bufferin g parameter
    in php.ini, but neither of these seem to make a difference. Why would
    the mssql commands be so much slower on IIS 6? I would rather not have
    to change all the database calls to be odbc instead of mssql

  • Chung Leong

    #2
    Re: MSSQL slow on IIS 6

    php-taz wrote:
    I built a PHP website on Windows 2000 (using IIS) that connects to a
    SQL Server 2000 database using the mssql functions. I migrated the
    website and the database onto a Windows 2003 machine, and now the mssql
    functions are significantly slower. On the Windows 2000 machine, the
    mssql_connect takes .03 seconds to run, and the odbc_connect takes the
    same amount of time. On Windows 2003, the mssql_connect takes a full
    second to run, but odbc_connect only takes .017 seconds. I have tried
    both ISAPI and CGI for the php configuration in IIS, and I have
    experimented with different values for the output_bufferin g parameter
    in php.ini, but neither of these seem to make a difference. Why would
    the mssql commands be so much slower on IIS 6? I would rather not have
    to change all the database calls to be odbc instead of mssql
    How do you authenticate? SQL user/password or secured connection?

    Comment

    • Jerry Stuckle

      #3
      Re: MSSQL slow on IIS 6

      php-taz wrote:
      I built a PHP website on Windows 2000 (using IIS) that connects to a
      SQL Server 2000 database using the mssql functions. I migrated the
      website and the database onto a Windows 2003 machine, and now the mssql
      functions are significantly slower. On the Windows 2000 machine, the
      mssql_connect takes .03 seconds to run, and the odbc_connect takes the
      same amount of time. On Windows 2003, the mssql_connect takes a full
      second to run, but odbc_connect only takes .017 seconds. I have tried
      both ISAPI and CGI for the php configuration in IIS, and I have
      experimented with different values for the output_bufferin g parameter
      in php.ini, but neither of these seem to make a difference. Why would
      the mssql commands be so much slower on IIS 6? I would rather not have
      to change all the database calls to be odbc instead of mssql
      >
      I think an mssql newsgroup might be a better place to ask this. I
      suspect it's going to be in some parameters in mssql.

      There shouldn't be any difference from the PHP end.

      --
      =============== ===
      Remove the "x" from my email address
      Jerry Stuckle
      JDS Computer Training Corp.
      jstucklex@attgl obal.net
      =============== ===

      Comment

      • php-taz

        #4
        Re: MSSQL slow on IIS 6

        I am using a secured connection:

        $sqlconnect=mss ql_connect("10. 4.61.156","","" ) or die ("unable to
        connect");


        Chung Leong wrote:
        How do you authenticate? SQL user/password or secured connection?

        Comment

        • Chung Leong

          #5
          Re: MSSQL slow on IIS 6


          php-taz wrote:
          I am using a secured connection:
          >
          $sqlconnect=mss ql_connect("10. 4.61.156","","" ) or die ("unable to
          connect");
          >
          >
          Chung Leong wrote:
          How do you authenticate? SQL user/password or secured connection?
          Try it with SQL Server authentication instead and see what happens.

          Comment

          • php-taz

            #6
            Re: MSSQL slow on IIS 6

            Same thing, it takes a full second to connect. Another difference
            between the two servers is that SQL Server on the old machine is set up
            to use just Windows Authentication, while this new server uses Mixed.
            Would this effect connection speed?

            Chung Leong wrote:
            Try it with SQL Server authentication instead and see what happens.

            Comment

            • php-taz

              #7
              Re: MSSQL slow on IIS 6

              Fixed. In IIS, the web site was not set to Integrated Windows
              authentication. It was using the anonymous user account

              Comment

              • php-taz

                #8
                Re: MSSQL slow on IIS 6

                Actually this is not quite fixed. I need to use Integrated Windows
                authentication, and that is what's slow. When I enabled Anonymous
                Access with a username that is in the local Administrator's group,
                connection was fast. When I remove anonymous access, and the user
                accessing the web site is a local Administrator, it is still fast. Any
                non-admin has a slow connection with Windows authentication. How can I
                use just Windows authentication and have the connection be fast for
                users who are not local Administrators?

                Comment

                • Jerry Stuckle

                  #9
                  Re: MSSQL slow on IIS 6

                  php-taz wrote:
                  Actually this is not quite fixed. I need to use Integrated Windows
                  authentication, and that is what's slow. When I enabled Anonymous
                  Access with a username that is in the local Administrator's group,
                  connection was fast. When I remove anonymous access, and the user
                  accessing the web site is a local Administrator, it is still fast. Any
                  non-admin has a slow connection with Windows authentication. How can I
                  use just Windows authentication and have the connection be fast for
                  users who are not local Administrators?
                  >
                  Sounds like you need to follow up in a Windows related newsgroup. This
                  definitely isn't a PHP problem.

                  --
                  =============== ===
                  Remove the "x" from my email address
                  Jerry Stuckle
                  JDS Computer Training Corp.
                  jstucklex@attgl obal.net
                  =============== ===

                  Comment

                  Working...