Announcement

Collapse
No announcement yet.

SC project on XAMPP or UniformServer with MS SQL database

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • SC project on XAMPP or UniformServer with MS SQL database

    Hi,

    i have a project with a simple grid thats connect to a MS SQL server. In SC that works without any problem. Now i'am deploy this project to a (local) XAMPP or UniformServer.

    My grid starts and displays the first records. But when i use the quick search or go to next page this error occurs:

    SQLState: 28000
    Message: [Microsoft][ODBC Driver 11 for SQL Server][SQL Server][Login error for user 'sa'].

    I don't understand why the grid starts without problems and then crashed with this message ... Does anyone have an idea?
    Best regards: - Reinhard -

    I use ScriptCase 8 Enterprise Edition, Version 8.(latest)

  • #2
    I run my SC production on uniform and we have no issues at all, but we run MySQL. Since you are using ODBC you might be able to look at the odbc logs and debug from there. Is the user sa known? It looks like the session is corrupted.
    Albert Drent
    aducom software netherlands
    scriptcase partner, reseller, support and (turn-key) development
    www.scriptcase.eu / www.scriptcase.nl

    Comment


    • #3
      I'am not use the ODBC-Driver, but the MS SQL Native Driver PDO (look at: http://www.scriptcase.net/docs/en_us...native-srv-pdo)

      The strange this is: the simple grid works with this driver in SC. The i export the app and put now this at wwwroot from SC. And the above login error appears ...

      Whats the heck is the difference if the app running in SC direct or at the same wwwroot?
      Best regards: - Reinhard -

      I use ScriptCase 8 Enterprise Edition, Version 8.(latest)

      Comment


      • #4
        Just to throw ideas. PHP version maybe?
        /Giuseppe

        Professional Scriptcase Services
        Some Customers opinions

        Comment


        • #5
          The errormessage contains ODBC information, so appearantly odbc is used. Not sure why. Do you have other connection options like pdo to try? In Mysql you can choose from pdo, transactional, non transactional. I don't know regarding SQL Server. At the university running on Windows 2012 server we have Uniform running SC8 and it connects to a SQL server database w.o. problems, but I have no insight. 'rr' you?
          Albert Drent
          aducom software netherlands
          scriptcase partner, reseller, support and (turn-key) development
          www.scriptcase.eu / www.scriptcase.nl

          Comment


          • #6
            Originally posted by aducom View Post
            The errormessage contains ODBC information, so appearantly odbc is used. Not sure why.
            Thats simple: the pdo drivers for php 5.5 from microsoft uses the odbc driver from microsoft in the background. The pdo drivers for php 5.4 from microsoft uses the native client from microsoft or the odbc driver from microsoft.

            I have all combinations tested, but the sc app is not running via xampp or Uniform Server. A simple test.php works in all variants ... I do not understand, that the app start is ok, but not clicking on the next page etc. I would argue that it's a bug in SC ...
            Best regards: - Reinhard -

            I use ScriptCase 8 Enterprise Edition, Version 8.(latest)

            Comment


            • #7
              Are you sure that you use the correct username? It may be that it needs the domain name with it as well... Since it is microsoft. The same username without a domain is not the same as the username with a domain (unless the it is on the same computer and the default domain is set and so on).
              So DOMAIN\MeMySelfAndI is not MeMySelfAndI on my own machine.

              Anyway pdo does work on windows but you need to download the proper version. Did you try with this one: http://www.microsoft.com/en-us/downl....aspx?id=36434 and are you aware that the 32 bit driver and the 64 bit driver are installed on the same machine? You have to use the 32 bits odbc driver for scriptcase use which is in the syswow64 dir in the windows dir (ODBCADM something.exe as far as I recall).
              Last edited by rr; 01-22-2015, 10:52 AM.

              Comment


              • #8
                That has nothing to do with the username ... I'am use the sql server login, not the windows login. "sa" is the database administrator for ms sql servers. Other user don't work ...

                The proper odbc version (x64) is installed. I can't install the x86 version on a 64 bit Win7. But understand, that for the pdo connection the odbc configuration do not care. The pdo driver uses routines from the odbc driver, but a odbc configuration is not needed ... The way is:

                SC: MSSQL Server NATIVE SERVER PDO => PHP (5.4): php_pdo_sqlsrv_54_ts.dll (Microsoft Drivers 3.0 for PHP for SQL Server in XAMPP) => SQL Server 2012 Native Client (Windows) => MS SQL Server

                But this way don't fully work.

                This work:
                Test.php (not SC) => PHP (5.4): php_pdo_sqlsrv_54_ts.dll (Microsoft Drivers 3.0 for PHP for SQL Server in XAMPP) => SQL Server 2012 Native Client (Windows) => MS SQL Server

                In my view: bug in SC ...
                Best regards: - Reinhard -

                I use ScriptCase 8 Enterprise Edition, Version 8.(latest)

                Comment


                • #9
                  Aargh ...! I have tested with .27, that don't work. Now i have make a new deploy with .28 and that runs ...
                  Best regards: - Reinhard -

                  I use ScriptCase 8 Enterprise Edition, Version 8.(latest)

                  Comment


                  • #10
                    To early happy ...

                    I have deinstalled XAMPP and the drivers listed above, reinstalled all in order to document everything clean but the problem in post #1 occurs. A simple test.php runs fine, but not the sc app.
                    Best regards: - Reinhard -

                    I use ScriptCase 8 Enterprise Edition, Version 8.(latest)

                    Comment


                    • #11
                      Originally posted by RHS View Post
                      To early happy ...

                      I have deinstalled XAMPP and the drivers listed above, reinstalled all in order to document everything clean but the problem in post #1 occurs. A simple test.php runs fine, but not the sc app.
                      I asume that you have checked the compatibility between the current SQL Server version and Scriptcase. I guess that you have some kind of compatibility issue here. I don't know how complex it is, but to check you could consider moving it to MySQL and see if the problem persists.
                      Albert Drent
                      aducom software netherlands
                      scriptcase partner, reseller, support and (turn-key) development
                      www.scriptcase.eu / www.scriptcase.nl

                      Comment


                      • #12
                        Originally posted by aducom View Post
                        [] moving it to MySQL
                        No chance, the "master" db for our ERP system is on MSSQL ... and thats is good.

                        But I'am not understand that the connection test with nm_ini_manager.php is fully ok, but not the app that uses this connection ... that's totally illogical.
                        Best regards: - Reinhard -

                        I use ScriptCase 8 Enterprise Edition, Version 8.(latest)

                        Comment


                        • #13
                          I agree, but I have realy no idea what's going on. Can you debug to the point where it's failing? I.e. using XDebug?
                          Albert Drent
                          aducom software netherlands
                          scriptcase partner, reseller, support and (turn-key) development
                          www.scriptcase.eu / www.scriptcase.nl

                          Comment


                          • #14
                            Did you use this one: http://sqlsrvphp.codeplex.com/releases/view/85767 ?? I dont have mssql here so I cant test it.

                            Comment


                            • #15
                              Yes, but from MS direct: http://www.microsoft.com/en-us/downl....aspx?id=20098
                              Best regards: - Reinhard -

                              I use ScriptCase 8 Enterprise Edition, Version 8.(latest)

                              Comment

                              Working...
                              X