synaesthesia Posted October 24, 2014 Posted October 24, 2014 Trying to convert a website (our Intranet & home page) from Apache to IIS running on Server 2012. I've gotten the site working in it's rough state. It's PHP based. However it does a few funky things like authenticate against the domain and provides a unique landing page according to the user logged on at the time. It's whinging a lot about undefined variables but they're just PHP notices, so guessing those aren't actually what's stopping the above from working. One thing I note is that the .htaccess file contains information that I believe is relevant only to Apache, and therefore won't work in IIS. I've had a rudimentary play around with the authentication types in IIS, made sure the LDAP extension is enabled for PHP but can't get any joy. Anyone know how I can sort this? The .htaccess file is thus: php_flag display_errors off php_flag display_startup_errors off #php_value error_reporting 2047 AuthName "School Name" AuthType SSPI SSPIAuth On SSPIOfferBasic On SSPIDomain schoolname.internal SSPIOmitDomain On SSPIUsernameCase Lower SSPIAuthoritative On require valid-user
mac_shinobi Posted October 24, 2014 Posted October 24, 2014 Not sure how much help this is and just a quick google came across this : PHP: Microsoft IIS 7.0 and later - Manual
synaesthesia Posted October 24, 2014 Author Posted October 24, 2014 (edited) Yeah had gone through all that. So much of the documentation says "enable the ldap extension and it'll just work"... Edited October 24, 2014 by synaesthesia
SovietRussia Posted October 24, 2014 Posted October 24, 2014 You need to convert the values from htaccess to the Microsoft way (using web.config) PHP display_errors and display_startup_errors can be turned off in IIS by installing PHP Manager (A quick google for this and its from codeplex from MS), once installed PHP Manager you can click 'Edit Settings' and manually set these. All the authentication stuff which you would have used in Apache (NTLM) is now in the basis of Windows Authentication. On your site in IIS manager, click Authentication - right click on Basic and click Disable then right click on Windows and click Enable - and thats it, theres no need to set the domain or any parameters. Users will be authed using any domain the IIS server is joined to, like we have trust domains here and they all work fine just out of the box. If Windows Authentication is missing, you will have to install it via Server Manager (Add Roles and Features > IIS > Authentication) AND YES you do need to enable the ldap function!
synaesthesia Posted October 24, 2014 Author Posted October 24, 2014 (edited) It's exactly the conversion of the values I have no idea what to do with. Authentication I believe is working, it's all set as you say anyway. Can'ts ee anything in web.config that looks remotely linked - just lots of default handlers, default document and that's pretty much it. Edited October 24, 2014 by synaesthesia
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now