We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 34950
    • 31 Posts
    Hi all,

    I was thinking about installing modx on IIS server, with SQL server database in the background. After installing PHP on IIS, adding write permissions to Users on folder /core/cache/ I got to the point in installation where it asks for database connection. I chose:
    Database type: sqlsrv
    Database host: .\SQLEXPRESS
    Database login name: <created user>
    Database password: <users password>
    Database name: <created database>

    I’m getting this:
    Connecting to database server:
    Could not connect to the database server. Check the connection properties and try again.

    [...] (ERROR in xPDO::connect @ ...\core\xpdo\xpdo.class.php : 344) SQLSTATE[HY000] [2003] Can’t connect to MySQL server on ’localhost’ (10061)
    [...] (ERROR in xPDO::connect @ ...\core\xpdo\xpdo.class.php : 344) SQLSTATE[HY000] [2003] Can’t connect to MySQL server on ’localhost’ (10061)

    why does it state it connects to mysql server? How to set this up?


      • 34950
      • 31 Posts
      OK, I forgt to add some info. Modx Revolution is version 2.1.0-rc4 Traditional, OS is Windows server 2008 R2 on local server, and IIS is 7.5. PHP is installed with version 5.3.6. Now, when I try to connect to database on I get "Connecting to database server:" (instead of previous error). When I used 5.2.17 I was getting the error in the previous post. If PHP version is changed back to older one via PHP manager I still get the same error as before. Maybe PHP needs to be configured additionally? Did anyone do this?
      I can connect to database from IIS Database Manager so I guess my connection string is OK.

      Edit: Installed it. I had to install Microsoft SQL driver v2.0 for PHP v5.3 in IIS. Also renamed ht.access to .htaccess. Then I had to follow this guide: http://bugs.modx.com/issues/4622.
      Since the setup failed, some tables could not be (re)created. I had to delete all tables in SQL database and re-run last install step.