EllisLab text mark
Advanced Search
     
Move from Apache to IIS, now having DB issues
Posted: 09 July 2012 05:01 PM   [ Ignore ]
Joined: 2012-07-06
3 posts

Hello,

I just moved a website using EE from Apache to IIS. The site is using MySQL for the db.

We have a two server setup. IIS is on one server and MySQL on another.

I can access the database on the local MySQL database server easily. I can also easily hit the database using an internally developed PHP test script and direcy MySQL commands but I cannot connect with your dbtest.php or with EE. I get “Unable to connect to your database.”

The site is live with another host right now so I don’t know if something is cached and trying to access the database on the other host which uses a different username and password for our connection string.

We have many sites using various CMS systems on this server, all of which connect to the same instance of MySQL EE is trying to connect to. I am stumped.

What PHP modules are required by EE to run with your configuration?

BTW, I read many posts and saw another connection string posted by a different web host which also connects flawlessly. Please advise…thanks

 
Posted: 11 July 2012 11:09 AM   [ Ignore ]   [ # 1 ]   [ Rating: 0 ]
Avatar
Joined: 2005-10-18
7340 posts

Hi BizCom,

Thanks for posting and welcome to ExpressionEngine and the Forums!

I would start by reviewing Moving ExpressionEngine to Another Server.

Especially look to /system/expressionengine/config/database.php

Does the db password by chance use a “$” in the string? And lastly, what version of ExpressionEngine are you using?

Cheers,

 Signature 

How may I help you?

 
Posted: 11 July 2012 12:21 PM   [ Ignore ]   [ # 2 ]   [ Rating: 0 ]
Joined: 2012-07-06
3 posts

Hello, and thank you for the information.

I removed the “$” from the password and now the dbtest.php works fine. When I run the EE_Wizard I get the following, “Congratulations! Your server is ready to use ExpressionEngine!”

However, I still get an, “Database Error: Unable to connect to your database” when I attempt to connect to the site.

The EE version in the config denotes “170”.

BTW, I also had to give the IUSR and IIS_IUSRS everything but full control permissions in order to get the EE_Wizard to work. I will try throttling back permissions as soon as I can get the site working.

Any advice…thanks

BTW, I am running IIS 7.5 and MySQL 5.0.96.

 
Posted: 12 July 2012 01:23 PM   [ Ignore ]   [ # 3 ]   [ Rating: 0 ]
Avatar
Joined: 2005-10-18
7340 posts

Hi BizCom,

Double check that the password in config.php is correct and that the value is enclosed in ‘’ rather than “”.

If you are able to connect with the Server Wizard and the dbtest.php script, then we need to find the discrepancy.

Cheers,

 Signature 

How may I help you?

 
Posted: 12 July 2012 02:22 PM   [ Ignore ]   [ # 4 ]   [ Rating: 0 ]
Joined: 2012-07-06
3 posts

Thanks again for your assistance.

OK, I found the issue. The username and password are not case-sensitive in the dbtest.php but they are in the config.php. The home page is now coming up but I get a 404 for all subpages.

I can log into the Admin section as well.

Any ideas? Thanks

 
Posted: 16 July 2012 10:37 AM   [ Ignore ]   [ # 5 ]   [ Rating: 0 ]
Avatar
Joined: 2005-10-18
7340 posts

Hi BizCom,

Now that you are able to login to the Control Panel, let’s do just that!

Be on the look out for an email from EllisLab with further instructions.

Cheers,

 Signature 

How may I help you?

 
Posted: 17 July 2012 05:07 PM   [ Ignore ]   [ # 6 ]   [ Rating: 0 ]
Avatar
Joined: 2005-10-18
7340 posts

Hi Don,

I had to make some changes in the Control Panel where it still pointed to the live domain. I substituted the temporary domain before going any further.

The other issue and the result of your 404s - under apache, .htaccess was removing index.php - under IIS index.php is being expected

I added index.php back into General Configuration and rans some tests. If index.php is in the URL, it works without 404’ing

The big problem? All of the links on the site are hand-coded with means 1 of 2 things:
The need to be updated to use ExpressionEngine’s path variables
http://ellislab.com/expressionengine/user-guide/templates/globals/path.html

or they need to be updated to include index.php - or some means to remove index.php in IIS

Let me know if you have any questions!

Cheers,

 Signature 

How may I help you?