The new websites are live

With proud I can announce that all the Anvar IT websites have been updated and are back live now.
The websites are as followed

I hope you will enjoy all the websites and if there are problems, please don’t hesitate to contact me.

Apache – make a file downloadable

As well known, Apache is a web server application. To give a basic summary, you can place files on your apache webserver and browse them afterwards in your webbrowser. Now Apache uses MIME types to know how to display various types of file, for example .php has to be rendered by PHP, html can be processed by the Apache server and etc.

This technique can prove troublesome if you want to use your web hosting as a download folder. For example you have a folder full of .xml or .txt files that need to be downloaded from you hosting instead of viewed in your browser. To do this you can erase the MIME type in the server preferences but this solution does this for the full webserver. So other folders will also promp a downloadable file instead of viewing it.

To enable this only for one folder, you can use the .htaccess file.
In your FTP program or through the shell navigate to the folder you want to use as your download folder and create or open the .htaccess file.
Then add the following line to the file

Just change the “file type” to the extension of your file excluding the dot. For example if you want to download .txt files your .htaccess will be as followed

Afterwards just reload your browser page and the file will be downloadable.

Have fun

Joomla Error 28 from storage engine SQL

A not so documented error that Joomla sites can have is error 28 from storage engine sql.Due to this error it isn’t possible to create new MySQL connections and your website will display multiple error messages displaying this error.

The problem and resolution lays in the hands of the webhoster or system engineer.
Joomla uses the /tmp folder to create a file every time a MySQL connection is established. Now this folder can run out of space or the maximum number of files / folder is reached.

The resolution is then quite simpel, clean out the /tmp folder. You can do this with the following command

If you want you schedule a cron job to do this on for example a weekly basis.

Open the cron editor

And add the following line

Close and save the file

Remove Multiple Modern Apps from Windows 8

There are numerous modern apps that are a built into Windows 8 and they are featured prominently on the Start screen. It may well be the case that you don’t want to use them because they just aren’t apps you’re interested in, or it may be that you have found a better alternative.

You can right click a tile and selecting the uninstall option, but if you want to remove multiple apps at once you can do so with a PowerShell Script. You can also use this technique to uninstall multiple apps you have installed from the Store.

You can download a readymade script from the TechNet Script Center that can be used to select all of the modern apps you want to remove, and uninstall them all at once. Download the script and extract it from the zip file.

Launch PowerShell in Administrator mode by pressing the Windows key to bring up the Start screen and then type Powershell. Right click the Windows PowerShell icon and then click the ‘Run as administrator’ button at the bottom of the screen before clicking Yes in the User Account Control dialog.

Run the script by typing its full path at the command prompt and then press Enter.

You will see a list of all of the modern apps you have installed. This list includes apps that you have installed and those that are built into Windows 8.

Each app has a number next to it and you can use these to specify which apps should be uninstalled. Just enter all of the app numbers, separated by commas, and press Enter.

Confirm the action and after a moment or two the selected apps will be removed for you.

Should you change your mind about an app you have removed, you can easily reinstate it from the Store.

It may be that you would like to remove all modern apps form your hard drive, and if this is the case you have a couple of options available to you.

The first option can be used to remove all apps from the account you are currently logged into.  Launch PowerShell as an administrator and type the following command before pressing Enter:

Secondly, you can use the following command to remove all modern apps from all user accounts:

Manage Windows Optional Features From PowerShell

The first thing you will want to do is see what features you have enabled, to do this we will need to pass the output of the Get-WindowsOptionalFeature cmdlet down the pipeline, where it can be filtered and formatted:

That will give you a nice tabulated view of what is enabled.

If you want to see what features are disabled you can use the following:

 

If you need to disable a feature you can use the following:

This assumes that the feature that you want to disable is NetFx3.

Of course, you will most likely be adding a feature which can be done like so:

That’s all there is to it.

PowerShell Quick Reference Guides from Microsoft

Are you just getting started with learning PowerShell or tired of looking up less frequently used commands? Then this terrific set of PowerShell quick reference guides from Microsoft is just what you need!

The first guide focuses on commonly-used Windows PowerShell commands and is available in a single .doc format document. The other guides are available as a set (six files) in .pdf format and focus on: tips, shortcuts, and common operations in Windows PowerShell 3.0, Windows PowerShell Workflow, Windows PowerShell ISE, Windows PowerShell Web Access, Server Manager for Windows Server 2012, WinRM, WMI, and WS-Man.

Keep in mind that you can select all the guides or just the ones you need to download for the PowerShell 3.0 set.

Windows PowerShell Quick Reference [Microsoft]

Windows PowerShell 3.0 and Server Manager Quick Reference Guides [Microsoft]

[via The Windows Club here and here]