Saturday, October 3, 2015

How do you find what packages are installed when you install R?

It is very easy to find.

1. Launch R

2. Click Packages as shown. Click Load Packages and this code is run.

> local({pkg <- all.available="TRUE)),graphics=TRUE)<br" packages="" select.list="" sort="">+ if(nchar(pkg)) library(pkg, character.only=TRUE)})

After a while the list of available packages appear and you can choose the one you want.

4. If click, say Matrix and click OK, the matrix related package gets loaded, you get just the R prompt and nothing else.

How to remove from your computer?

This site is OK  is  OK but it hijacks other search engines and tries to show up first. It also seems to make search slow. I am sure it came from several other downloads I make often.

By following steps I have managed to get rid of it for now:
  • Removed all publisher references to in Programs and Features


Cleaned up the Managed Extensions in IE 11 Search Provider's list (Ask does not show up anymore).
In Internet Explorer's Manage Add-ons look for anything related to You may not be able to delete it but you can disable.

FoxPDF Creator Toolbar for example brought in I disabled it, although FoxPDF is an excellent PDF editor.
Make sure ASK is not in Search Providers as well. If it is remove it.


In Internet Options | General page use any site other than for the Home Page is the default Home Page.


If you find an executable ApnStub.exe on your computer, delete it.
If you find ChromeInstall java program  such as this one remove it.


Well I have my browser not showing suddenly. I hope it is gone for ever.

Is there a built-in web server for PHP?

Yes there is one which can be used for testing and designing web applications.

Runs in an environment similar to sandbox environment and does not have all features. If you need a full blown web server you can use Windows Internet Information Services (IIS).

You can start the web server with this command:

C:\Users\mysorian>php -S localhost:8083

PHP 5.4.14 Development Server started at Fri Sep 25 11:01:49 2015
Listening on http://localhost:8083
Document root is C:\Users\mysorian
Press Ctrl-C to quit.

The document you are viewing is in the Document root folder.

But if you try to access the localhost on Port 80 you would get this response.
C:\Users\mysorian>php -S localhost:80

[Fri Sep 25 11:01:12 2015] Failed to listen on localhost:80 (reason: An attempt was made to access a socket in a way forbidden by its access permissions.)

Sunday, September 27, 2015

What is Credential Guard?

It is a new feature in Windows 10 but only available in Windows 10 Enterprise or Windows 10 Education. This is meant to beef up on security. It protects the core kernel from malware by not allowing taking control of the machine remotely.
Credential Guard provides isolation for the secrets held in Local Security Authority in the older systems by a virtualization based security. Data stored by virtualization is not accessible to the rest of the OS. Credit Guard has no device drivers but hosts a reduced subset of OS binaries needed for security only. Of course the binaries are signed with trusted certificates.

The Credential Guard feature depends on the Hypervisor.  Here is a high-level overview of Credential Guard(virtualization based security).


The Credit Guard offers the following features/solutions:
Hardware security Credentials Guard takes advantage of platform security features, such as Secure Boot and virtualization to increase security.

•Virtualization-based security Windows services can run in a protected environment that is isolated from the running operating system.

•Better protection against advanced persistent threats Credential Guard does this by securing domain user's credentials in the virtualization-based security environment. Malware running in the operating system, even with administrative privileges, cannot extract secrets that are protected by virtualization-based security.

•Manageability You can manage Credential Guard by using Group Policy, WMI, from a command prompt, and Windows PowerShell.
The following virtualization extensions are required to support virtualization-based security:
•Intel VT-x or AMD-V
•Second Level Address Translation
It run only on X64 Bit platforms.
Watch this video from Channel 9:

How do you install PHP on Windows 7 Ultimate SP1?

Installing PHP using Windows Platform Installer (wpilauncher.exe) gives you instant access to working with PHP. In this post Web Platform Installer version 5.0 was used to install PHP version 5.6

Step 1: Download Web Platform Installer, the version used here is 5.0. After launching the WebPI search for php as shown. This has the latest products/services/programs for web platform.


Step 2: Click on PHP 5.6.0 (9/7/2014).  On Windows 7 (x64) Ultimate you do have IIS and not IIS Express.

Click Add button and click Install at the bottom of the window.

Note the items to be installed by clicking the link at the bottom. The following window is displayed showing 3 items should you decide to install.


Step 3: Close the item list window. Click Install. The previous window appears as shown with more controls.


Here you need to accept license terms.

Step 4: Click I Accept. Install begins and a number of required items are installed showing progress as shown.
Microsoft ODBC Driver 11 for SQL Server.
Microsoft Drivers 3.2 for PHP  v5.6 for SQLServer
Installing Php5.3.28(?)
PHP Manager for IIS
Installing PHP 5.6.0


After a while you get the Finish window showing installed products as shown:


Step 5: Click Finish on Web Platform Installer 5.0.
You are done.

Launch the Internet Information Services and you see that Web Platform Installer is added to the Managemen Section.

If you were to run a PHP file such as phpinfo.php you will run into this error:


Now open Programs & Features in Control Panel. Click Turn on/off window programs to turn on:
The following window gets displayed:


The node for CGI is not checked. This is needed to work with IIS.  Place check mark for CGI and Click OK.

Microsoft Windows MSG appears that it is making changes. This may run for quite sometime depending on your computer.


After sometime the Microsoft Windows MSG goes away.

Now try to bring up phpinfo.php in your browser in the IIS window and Presto! PHP now can be processed by the IIS using the FastCgiModule (only part of page shown here).


Notice that the "Handler Mappings" now has PHP-Via_FastCGI and PHP53_via_FastCGI


Notice that you have FastCGIModule in Add Module Mappings list:


Friday, September 25, 2015

What does php.exe found in the PHP directory do?

It is the command line processor that processes a file with the .PHP extension as shown here:
C:\Windows\system32>php "C:\inetpub\wwwroot\phpinfo.php" > "C:\info"
The PHP processor processes the provied php file and the command line directs the result to a file "info'

The input file phpinfo.php is as shown here:

The above file is typed into Notepad and saved with the extension ".PHP".

Here is the beginning section of the long file 'info' opened in Windows Word program.
PHP Version => 5.4.14

System => Windows NT HODENTEKWIN7 6.1 build 7601 (Windows 7 Ultimate Edition Service Pack 1) i586
Build Date => Apr 10 2013 21:15:43
Compiler => MSVC9 (Visual C++ 2008)
Architecture => x86
Configure Command => cscript /nologo configure.js  "--enable-snapshot-build" "--enable-debug-pack" "--disable-zts" "--disable-isapi" "--disable-nsapi" "--without-mssql" "--without-pdo-mssql" "--without-pi3web" "--with-pdo-oci=C:\php-sdk\oracle\instantclient10\sdk,shared" "--with-oci8=C:\php-sdk\oracle\instantclient10\sdk,shared" "--with-oci8-11g=C:\php-sdk\oracle\instantclient11\sdk,shared" "--with-enchant=shared" "--enable-object-out-dir=../obj/" "--enable-com-dotnet=shared" "--with-mcrypt=static" "--disable-static-analyze" "--with-pgo"
Server API => Command Line Interface
Virtual Directory Support => disabled
Configuration File (php.ini) Path => C:\Windows
Loaded Configuration File => C:\Program Files (x86)\iis express\PHP\v5.4\php.ini
Scan this dir for additional .ini files => (none)
Additional .ini files parsed => (none)
PHP API => 20100412
PHP Extension => 20100525
Zend Extension => 220100525
Zend Extension Build => API220100525,NTS,VC9
PHP Extension Build => API20100525,NTS,VC9
Debug Build => no
Thread Safety => disabled
Zend Signal Handling => disabled
Zend Memory Manager => enabled
Zend Multibyte Support => provided by mbstring
IPv6 Support => enabled
DTrace Support => disabled

Thursday, September 24, 2015

How to get around 'HTTP 503 Error: Service not available' error in IIS 7.5 on Windows 7.1 SP1?

My localhost (the default website) has not been active for a longtime and I wanted to test a PHP script. To my dismay, I could not even browse to the IISStart.htm that is on all installations. I got the following error.


I am using a Toshiba Satellite laptop X64 with Windows 7 Ultimate with SP1. I had various programs running while writing the book on SQL Server Reporting Services 2012 such as PHP, SharePoint Server, etc. It is possible I had tweaked items around a lot.

I stopped and started the server and the problem remained. There was a fix in stackoverflow site pertaining to this error.

To get this going, I had to make some changes to the advanced settings of the Application pools by clicking the Application Pools as shown:

Clicking Advanced Settings displays the following:

As suggested the Load User Profile was changed to FALSE. I restarted the server and the 503 Error was displayed when I browsed the IISStart.htm as in the first image above.

Then I looked at the Application Pools status and realized that the DefaultappPool had stopped.


When I started it the 503 Error went away and i could display the IISStart.htm page.


I went back to Advanced Settings and the 'Load User Profile' was set to TRUE. Changing to FALSE did not produce the 503 error. 

I looked at what this settings meant and here  is a screen shot. This sets the mode to IIS 6.0