User registration and IIS

Hi, i just installed emoncms3 on my IIS7.5.

i created the schema on mySql and convert the url rewrite rule of htaccess on iis.

I don't have the 404 error, but on login form if i press login i receive a "Invalid username or password" message, and if i press "register" nothing happen.

 

Some suggestions?

 

thanks.

 

ps: this is  tables that have been created on the schema:

dashboard, feed_relation, feeds, input, kwhdproc, notify, notify_mail, statistics, users

maybe something is missing? 

 

leen15's picture

Re: User registration and IIS

Hi, i found  very difficult to make emoncms works on IIS 7.5 but now all work fine.

I converted the .htaccess file to web.config correctly, see below if anybody is interested or if you would add to the installation guide:

<?xml version="1.0" encoding="UTF-8"?>

<configuration>

    <system.webServer>

        <rewrite>

            <rules>

                <rule name="emoncms"  enabled="true" stopProcessing="true">

                    <match url="^(.*)$" ignoreCase="false" />

                    <conditions>

                        <add input="{REQUEST_FILENAME}" matchType="IsFile" ignoreCase="false" negate="true" 


/>

                        <add input="{REQUEST_FILENAME}" matchType="IsDirectory" ignoreCase="false" 


negate="true" />

                        <add input="{URL}" pattern="^/favicon.ico$" ignoreCase="false" negate="true" />

                    </conditions>

                    <action type="Rewrite" url="index.php?q={R:1}" appendQueryString="true" />

                </rule>

            </rules>

        </rewrite>

    </system.webServer>

</configuration>
 

After this,  i discovered that the user was not created. The bug is located in :

​Models/user_model.php

at line 111 into create_user function. we need to add admin field and value.

Before

db_query("INSERT INTO users ( username, password, salt ,apikey_read, apikey_write ) VALUES ( '$username' , '$hash' , '$salt', '$apikey_read', '$apikey_write' );"); 

After

db_query("INSERT INTO users ( username, password, salt ,apikey_read, apikey_write, admin ) VALUES ( '$username' , '$hash' , '$salt', '$apikey_read', '$apikey_write', 1 );"); 

 

another bug is located in the index.php at line 25. we need to delete this line

echo $ssl;

if you use ssl connection at the top of each page appears 'on'... it's annoying.

leen15's picture

Re: User registration and IIS

And another thing :)

in most of pages, the https is not supported:

 $path = dirname("http://".$_SERVER['HTTP_HOST'].str_replace('Vis', '', $_SERVER['SCRIPT_NAME']))."/";

 

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.