projectnami icon indicating copy to clipboard operation
projectnami copied to clipboard

Installation woes in Server 2019 IIS

Open johanbar opened this issue 5 years ago • 9 comments

Hi

Trying to get an installation going as per the tutorial. PHP 7.4 and Database set up ok the user is the owner and works. Upon the installation wizard, when setting up and clicking log in, falls over:

Warning: file_put_contents(C:/inetpub/wwwroot/wp-includes/fields_map.parsed_types.php): failed to open stream: Permission denied in C:\inetpub\wwwroot\wp-includes\fields_map.php on line 201

Is this a setting in IIS?

Warning: include(C:\inetpub\error_page.php): failed to open stream: No such file or directory in C:\inetpub\wwwroot\wp-includes\fields_map.php on line 208

Its not there. Everything is in C:/inetpub/wwwroot why would it want to write to C:/inetpub ?

Warning: include(): Failed opening 'C:\inetpub\error_page.php' for inclusion (include_path='.;C:\php\pear') in C:\inetpub\wwwroot\wp-includes\fields_map.php on line 208

Yup its not there and PHP 7.4 via the Web installer is installed to C:\Program Files\PHP\v7.4 not c:\php ?

Thank you

johanbar avatar Aug 26 '20 15:08 johanbar

This is version 2.5.2 giving you this error?

patrickebates avatar Aug 26 '20 15:08 patrickebates

Wow that was quick, no I download 2.5.1 and got the error. Then, hopeful that it was fixed 2.5.2 from here. Same errors

johanbar avatar Aug 26 '20 15:08 johanbar

I see the problem now. When we modified the dependency on the file that is trying to be written, looks like we missed one of the write attempts.

Remove lines 201 thru 210 from that file. When done, the contents of that function update_for should be simply

        $this->read();
        $this->fields_map = array_merge($this->fields_map, $this->extract_column_types($qry));
        return $this->fields_map;

patrickebates avatar Aug 26 '20 15:08 patrickebates

I would also add, you need to look into the file write permissions that Wordpress requires for the C:\inetpub\wwwroot folder anyway. They would also resolve this issue, and you will need those set anyway for plugins, themes, media uploads, etc.

patrickebates avatar Aug 26 '20 15:08 patrickebates

Hi Patrick, result

Unable to write to wp-config.php file.

You can create the wp-config.php file manually and paste the following text into it.

Box with the contents of the config.....

After you’ve done that, click “Run the installation”.

johanbar avatar Aug 26 '20 15:08 johanbar

I tried adding my user as Full Access on the C:\inetpub\wwwroot structure, was hoping to leave defaults here?

johanbar avatar Aug 26 '20 15:08 johanbar

Could you please assist in setting the permissions?

johanbar avatar Aug 26 '20 15:08 johanbar

I haven't done a local installation in some time, but I think you will need to give write permissions to IUSR_ and possibly one other account. Those are used by default by IIS.

Quick Google search turned up this, which is another option. https://brudtkuhl.com/blog/wordpress-iis-permissions-updates-permalinks/

patrickebates avatar Aug 26 '20 15:08 patrickebates

Thank you, that did the trick, but not sure which application pool to modify as the Default Website doesn't seem to have its own?

johanbar avatar Aug 26 '20 15:08 johanbar