I’ve been testing Windows 8 and Server 2012 properly since around October last year. One of the new features of both OS that I really like is the new Server Manager, it’s really good for managing multiple servers from one place, which for me is on my Windows 8 laptop. One problem that I found though was that when I added my servers to Server Manager, only brand new 2012 servers were automatically added with no extra config. I can’t imagine there are any IT / network managers that have a network based entirely on Server 2012 yet, so this was a bit of an issue. I found this great blog post from technet about the exact steps required to sort this out for your 2008 and 2008 R2 servers: http://blogs.technet.com/b/servermanager/archive/2012/09/10/managing-downlevel-windows-based-servers-from-server-manager-in-windows-server-2012.aspx
Category Archives: Computing ‘How to’
WordPress Upload Permission problem on IIS 7
Problem: When uploading files through the WordPress interface (either via add media or attaching to a post), IIS can’t seem to read the file properly, more specifically serving the file. The IUSR account has the correct permissions on the uploads folder, the file is actually on the server when inspected. Anonymous authentication is enabled, fastcgi is correctly impersopnating, and IUSRS group also has the correct settings. Even the network service account has permissions on the uploads directory. The problem still persists! The directories have cascading / inherited permissions set, but when a file is uploaded, the file in question doesn’t inherit the permissions – they are granted some ‘special permissions’ for the network service account also. I assumed there was a problem with the network service account permissions etc. Not so….
Solution: Check the temp uploads folder that PHP uses. In my php.ini file on IIS, I have file_uploads = On and specified a folder location at upload_tmp_dir = <directory location>
Check that the directory exists, and make sure that the IUSR account has modfy permissions on the folder.
Reason: When php uploads files, it stores them in a temp directory for loading. When you upload a file using wordpress, the correct accounts need the appropriate permissions, otherwise the file doesn’t get written to the desired location with the correct permissions.
Attach SQL .MDF database that is stored in user area
I’ve been working on Visual Studio 2010 projects with local databases recently, and had an issue with different SQL Server versions. To overcome the problem, I attach the MDF file to the correct SQL Server version instance, open it, then detach and return to Visual Studio.
However, when trying to do this, I’ve encountered another problem, in that when browsing for my MDF file (which is stored in my App_Data Folder in my project, which is in my user area – C:\users\me\….) , I can’t get any further than my name.Weird, because I’m running SQL Management Studio as Administrator (Windows 7) and using my account to log into it. I thought this was weird: I’m logging in as me, so why can’t I access MY files!
After some searching on forums etc, I found that I needed to add my username (whether it is local or domain) as a sysadmin on the server instance (Security > Server Roles in Management Studio). I tried this and id didn’t make any difference. What I then found was the the account that the SQL server service runs as is important in this case too. Here is the key: Change the logon account for the SQL Server service to LOCAL SYSTEM. When I installed the instance, NETWORK SERVICE was used, it obviously doesn’t have all the rights you need.
Once that’s done, restart Management Studio, and you’ll find no problem browsing where you like to attach MDF files.
Hope this helps someone else.
Installing SIMS .net on Windows 7
The following must reside within the SIMS.ini file, which lives in C:\Windows
[Setup]
SIMSDotNetDirectory=C:\Program Files\SIMS\SIMS .net
SIMSDirectory=S:\SIMS
SIMSSetupsDirectory=s:\sims\setups
The following must reside within the Connect.ini file, which lives in C:\Program Files\SIMS\SIMS .net.
[SIMSConnection]
Redirect=S:\SIMS
Deleting Profiles Correctly – Server 2008
This also applies to Windows Vista and Windows 7.
User profiles are normally stored in C:\Users\<username>. Some people might think that to delete profiles (to clear up disk space, or if the profile becomes corrupted), you delete the <username> folder in the Users folder and all is done. If you simply do this, registry keys will be left in the registry that are associated with the profile, and if a user whose profile folder you’ve deleted tries to log on, they will receive a temporary, un-saveable profile.
Doing things properly
- Open system settings (right click on computer and choose properties).
- Open Advanced System Settings (to the left of the system settings window.
- Click on the Advanced tab.
- Click the ‘Settings’ button under User Profiles.
- Select the user profile you want to remove from the list that appears in the User Profiles window.
- Press Delete.
If it’s too late….
If you’ve already deleted the user’s profile folder without deleteing the profile properly,you can remove the associated registry keys:
- Open Registry Editor (run regedit)
- Navigate to
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList - Delete any keys with reference to the deleted user’s profile.
- The keys have pretty unreadable names, but each key has a string value called ‘ProfileImagePath’ that has the familiar username in there.
How to Install WordPress MU on IIS 7 on Windows 2008 Server
I originally posted this on the WordPress MU forum, but thought I’d post it here too.
I’m always asking for and searching for help in places like this, especially because we host WordPress (and now WPMU!) on Windows servers!
Hopefully this will help other people that want to run WordPress MU on Windows. We used WordPress MU Version 2.8.6 and are running IIS 7 on Windows Server 2008.
I’m just going to tell you how we got WPMU running, not how to install PHP and MySQL and all that stuff. There’s plenty out there about that, but less about this specific topic:
How to Install WordPress MU on IIS 7
————————————
Download WordPress mu
Extract and copy into desired directory on IIS 7 web server
Give IUSR user account modify and write permissions on the directory in IIS
Create database and user with all permissions to use it in MySql
Navigate to the location of your site (where your files are stored on IIS)
Enter the required information in the mu installation screen – make sure your server address isn’t a single word – such as ‘mysite’, use ‘mysite.com, even if your mu installation is internal. We tried installing our site at ‘mysite’ for testing purposes, everything worked as described below, except we couldn’t log into the admin side using Firefox or IE 8 – only safari could log us in, something to do with the cookies used to process login.
We used sub-directories, we couldn’t get sub-domains to work.
Enter all the other details on the mu installation screen as expected, then press install.
We got a 500 Internal Server Error, but not to worry, everything’s been created!
Normally the admin password would be e-mailed to the address you entered on the previous screen, but in our case it wasn’t (on-going issues with the php mail function and receiving mail to our Exchange 2007 Server).
What we did to get round this was to go into the database in phpMyAdmin and manually change the password (user_pass field in the wp_users table) to one of our choosing, but be sure to use the ‘md5’ function to encrypt your password before you update your table.
Go back to your server address to see the home blog running as it should.
Log in with the ‘admin’ user and the password you’ve just set.
We didn’t have to make any changes to get pretty permalinks working (I’m sure you would on IIS 6 though – they seem to be the default option with mu. What we did do though is remove /blog/ from the permalink structure under Blog > Edit. I don’t know why this was added by default, but we don’t want it, so removed it. We for some reason it didn’t work the first time we navigated to a page, we got the not found error, although the link we tried was pointing to the correct location – without /blogs/
We can now create and manage as many blogs as we like (sub sites actually) and we’ve even got the WPDirAuth plugin working with them.
Hope this helps someone.