Topic on Project:Support desk

[RESOLVED] New Installation Errors (IIS)

10
GrendonPrimary (talkcontribs)

Windows Server 2008 R2 PHP Version 5.3.24 (used web installer) MySQL 5.6 (used msi installer)

Setup everything up. Successfully managed to go through the setup process. Accespted defaults where required. Added all options in modules selection. Completed. Tried to open website and got a HTTP 500 error straight away. Was able to run the setup so slightly confused. The wiki isnt public facing so cannot provide a link.

Was it the setup process that caused the issue?

MarkAHershberger (talkcontribs)

What does your error log say caused the HTTP 500?

If you don't see anything there, then put the following at the top of your LocalSettings.php (after the "<?php" line) and tell us what appears on your wiki:

 error_reporting( -1 );
 ini_set( 'display_errors', 1 );
Zajonara (talkcontribs)

Hi there! I had the same Issue. I did change LocalSettings.php like mentione and I got the error File(C:\Windows\TEMP) is not within the allowed path(s):....... Then I added path C:\Windows\TEMP to PHP.ini file. After that I got another http 500 error without any other error explanation as at begining. Almost forgot, PHP is running (I can open php info page within IIS), I did the whole installation regular way with no errors. Problem shows up after installation when I need to "go to my wiki" page.

Thank you.
Ciencia Al Poder (talkcontribs)

Try to find an error message so we could look what's the cause of the error.

Look at the webserver's error log, and follow the steps in Manual:How to debug to enable error displaying/logging

Zajonara (talkcontribs)

As I'not professional in php, I am having a hard time with debugging. Like you said in How to debug, I added in php.ini: error_reporting = E_ALL | E_STRICT display_errors = On

And I got:

Warning: require_once(C:\inetpub\wwwroot\wiki\LocalSettings.php): failed to open stream: Permission denied in C:\inetpub\wwwroot\wiki\includes\WebStart.php on line 136

Fatal error: require_once(): Failed opening required 'C:\inetpub\wwwroot\wiki/LocalSettings.php' (include_path='.;C:\php\pear') in C:\inetpub\wwwroot\wiki\includes\WebStart.php on line 136

I could send you the whole file if you can help me. All permissions are set, but I don't understand for whic setting is permission denied.

Regards,

88.130.64.129 (talkcontribs)

Hi!

The relevant part is

> Warning: require_once(C:\inetpub\wwwroot\wiki\LocalSettings.php): failed to open stream: Permission denied in ...

That means that the permissions of the file C:\inetpub\wwwroot\wiki\LocalSettings.php are wrong. The webserver user wants to, but cannot access the file.

I am not familiar with the permission system on your Windows server. However, on a Unix system (which you don't have), the fix would be to make sure that the webserver user either is the owner of the file or that he is in the owner's user group.

I would now view the file permissions for LocalSettings.php and those of other files in the webroot (e.g. of api.php or of includes\WebStart.php, which you obviously can access) and change of LocalSettings.php so that they are the same as for api.php or includes\WebStart.php.

Ciencia Al Poder (talkcontribs)

The problem are permissions for C:\inetpub\wwwroot\wiki\LocalSettings.php

You should make it readable by the web server (IIS, I asume). Try adding the same permissions as other files. You may need to allow permission inheritance for that file (look at http://support.microsoft.com/kb/313398)

Zajonara (talkcontribs)

Hi!

All permissions are Inherited from parent folder and first I did I have set IUSR (pre IIS 7 IUSR_Machine Name) and IIS_WPG read and write permissions. I also checked effective permissions and changed ownership to IUSR and second time to IIS_WPG. Same result.

I also tried installing MediaWiki in different folder and with same result.

Is there some special setting in AppPool on IIS? Does Wiki need separated AppPool? If does, what are the settings?

Regards,

Ciencia Al Poder (talkcontribs)

Double-check permissions again. PHP can read C:\inetpub\wwwroot\wiki\includes\WebStart.php, but can't read C:\inetpub\wwwroot\wiki\LocalSettings.php.

Compare permissions of both files and ensure they're the same.

Zajonara (talkcontribs)

After hours and hours of error debugging....I have come to conclusion:

1. If you have IIS (Web server) installation wit server in domain = AVOID using inetpub folder

2. Add your Mediawiki folder to C or D drive

3. Add new user to domain, ie wikiiis - add this user to IUSR group in AD

4. Set up new app pooll, ie Wiki - setup wikiiis user as owner in app pool

5. in path info, connect as: domain\wikiiis, pass for this user, test connection

6. on Mediawiki folder grant access for IIIS WPG and IUSR

7. finalize installation, copy LocalSettings.php to installation folder (root)

8. check Security settings it should be as parent folder - sometimes it wont inherit Security rights

Page is now OK.

Thank you for your time and HELP!

Regards,

Reply to "[RESOLVED] New Installation Errors (IIS)"