Category Archives: Programming

Adding Strict Transport Security Response Header in IIS

Make sure the web.config file in the root directory of your website is not set to read only on the properties page for that file.

Open Internet Information Services Manger.  Select the website where you want to add this Strict-Transport-Security response header.  Double click and select the Icon for HTTP Response Headers.

In HTTP Response Headers window, click on Add… on the right pane and type in Strict-Transport-Security for Name and max-age=63072000; includeSubDomains; preload for Value and click OK. The max-age value 63072000 is the number of seconds for the duration of two years. You need to enter a value of at least one year.

Source URL for this information:

https://www.itnota.com/setup-http-strict-transport-security-hsts-iis/

Exchange 2010 OWA Options or Inbox Rules Will Not Load – Server 2008 R2

When you are logged into Outlook Web Access (OWA) and you try to access “Options” such as “Create Inbox Rule” or “All Options,” you get redirect to an error message page that says, “Unexpected Error – An error has occurred and your request couldn’t be completed. Please try again.”

When you load (run) the performance monitor

Start > Run > c:\perfmon (Enter)

you may see this alert box for “Performance Monitor Control” when you select, or whenthe snap-in console is focused on, “Performance” in the left menu: 

 

WARNING:  DO THIS AT YOUR OWN RISK.  I DISCLAIM ALL RESPONSIBILITY FOR YOUR RESULTS AND/OR THE AFFECT ON YOUR SERVER SYSTEM AND REGISTRY.  I TOOK THE CHANCE AND IT SOLVED MY IMMEDIATE OWA PROBLEMS.

Rebuilding the Performance Counter Setting, using the lodctr /R command from a command prompt (opened with Run as Administrator) allows the Options pages in OWA to properly load:

On the server, click Start , in the search box, type, cmd.exe

In the search results shown above the search you performed, right-click on the “cmd.exe” result, and left-click on and to select the option to “Run As Administrator.”

When the command window opens, make sure that your command prompt shows:

C:\Windows\System32>

otherwise, enter this to change directory:

cd\Windows\System32 (Press Enter key on your keyboard)

Then enter the following command to rebuild the performance counter setting:

lodctr /R (Press Enter key on your keyboard)

It takes quite a while for the lodctr /r command to completely execute, and there is no progress indicator!  BE PATIENT AND LET IT RUN TO CONCLUSION.  The cursor just seems to hang after you enter the lodctr /R command and press (Enter).  Remember to also “resetiis” from the command window after successfully rebuilding performance counter setting. 

Here are a few articles that I found which address these issues and possibly your issues:

https://support.microsoft.com/en-us/help/2554336/how-to-manually-rebuild-performance-counters-for-windows-server-2008-6

https://answers.microsoft.com/en-us/windows/forum/windows_7-performance/perfmon-problems-unable-to-add-counters/e90f231d-0014-457d-8b1f-5f342971597a?auth=1

https://coredumpelf.wordpress.com/2016/03/30/exchange-2010-sp1-ecp-wont-load

How to Customize the Footer in WordPress Twenty Seventeen Theme

In the WordPress Admininstrator’s dashboard, select >Appearance, select >Editor, and select >footer.php from the list on the right margin.

Edit the footer.php file.

Locate this part of the footer.php file:

get_template_part( ‘template-parts/footer/site’, ‘info’ );
?>
</div><!– .wrap –>

Change that part as follows:

Insert “//” at the beginning of the “get_template_part” line in order to comment-out this line. Next, insert the 4 lines shown below between the “?>” line and the </div><!– .wrap –> line.

//get_template_part( ‘template-parts/footer/site’, ‘info’ );
?>
<div class=”site-info”>
<a href=”https://wordpress.org/”>Copyright 2017, Your site name</a>
</div>
</div><!– .wrap –>

Customize by fixing the URL — http://www.yoursitedomain.com/  and Your site name.

Save your changes / update / the footer.php file.

Note:  Your modifications will likely be overwritten in the next WordPress version update.  That’s okay.  And, it might be easier to again edit the footer.php after the version update rather than trying to figure out how to use a child theme that would preserve your modifications from being overwritten due to a version update.

DAA Opt-Out of Targeted Advertising Interest-based Advertising

Digital Advertising Alliance Consumer Choice Page

Go here using the particular browser that you wish to set your opt-out cookies:

http://www.aboutads.info/choices/

Microsoft Opt-Out regarding browser and apps:

http://choice.microsoft.com/en-us/opt-out

 

Toggle Preferences on/off for Microsoft and Internet Explorer:

  • Personalized ads in this browser.
  • Personalized ads when you use your Microsoft Account.

 

Install KODI Media Center in Linux Ubuntu and Mint

Open a Terminal (CTRL+ALT+T)

sudo apt-get install python-software-properties pkg-config

sudo apt-get install software-properties-common

sudo add-apt-repository ppa:team-xbmc/xbmc-nightly

sudo apt-get update

sudo apt-get install xbmc

exit

Originally Published on YouTube on Sep 23, 2014

See how To Install the Kodi Media Center (XBMC), In Ubuntu and Linux Mint from the nightly builds. Kodi is a free and open source media player and entertainment center for Linux, OS X, Windows, iOS and Android.

Open-Source SilverStripe CMS

SilverStripe CMS is an open source web content management system. It is a powerful tool for professional web development teams.  Web content authors rave about how easy it is to use.

Before installing, make sure to do the following:

  • Properly set the date.timezone in php.ini
    For example:
    date.timezone = “America/New_York”
  • Enable “Tidy” support library of code to clean up your html. SilverStripe should operate fine without Tidy, but HTMLCleaner will not be effective. For example, in php.ini you should enable – remove the leading semicolon in the following line:
    ;extension=php_tidy.dll
  • Find /framework/thirdparty/Zend/Loader.php and comment out as follows:

Go to: framework/thirdparty/Zend/Loader.php
at about line 190 you will find this foreach statement:

foreach (self::explodeIncludePath() as $path) {
if ($path == ‘.’) {
if (is_readable($filename)) {
return true;
}
continue;
}
/* COMMENT THIS OUT
$file = $path . ‘/’ . $filename;
if (is_readable($file)) {
return true;
}
*/
}

Hope it helps

[Warning] is_readable(): open_basedir restriction in effect. File(C:\php\pear/Zend/Translate/Adapter/I18nRailsYamlAdapter.php) is not within the allowed path(s): (c:/zpanel/hostdata/client/public_html/yourdomain_com;c:/windows/temp)

GET /

Line 198 in C:\zpanel\hostdata\client\public_html\yourdomain_com\framework\thirdparty\Zend\Loader.php

Source

189 
190         foreach (self::explodeIncludePath() as $path) {
191             if ($path == '.') {
192                 if (is_readable($filename)) {
193                     return true;
194                 }
195                 continue;
196             }
197             $file = $path . '/' . $filename;
198             if (is_readable($file)) {
199                 return true;
200             }
201         }
202         return false;
203     }
204