Category Archives: Software

Install Apache, PHP and MySQL on Windows Server 2008 R2 SP1

 Apache doesn’t provide binaries for Windows, however Apache provides links to several third-party sites that do provide binaries, for example, Apache Lounge. From the Apache Lounge website, and depending on your Windows Server version (32bir-x86 or 64bit-x64 ) we can download either the 32-Bit version (win32) or the 64-Bit one (Win64)

Download the Prerequisites – Example: 64bit versions:

Go to Apache Lounge: Apache2.4.25-win64-VC14
The File Download: (httpd-2.4.25-win64-VC14.zip)

Go to windows.php.net/download:  PHP-7.1-VC14-x64-Thread-Safe
The File Download: (php-7.1.5-Win32-VC14-x64.zip)

Find this at Microsoft:
C++RedistributableVisualStudio2015 (vc_redist.x64.exe)

Installation Instructions for Apache:

First Install the C++ Redistributable Visual Studio 2015.  It will show up in your Programs and Features in the Control Panel.  Using the PHP-7.15 VC14 x64 thread safe and the Apache2.4.25-Win64=VC14, you should also use the C++ VS2015 x64 redistributable (rather than VS2017 version).  Make everything match or you will have errors when you try to start Apache after you

Unzip the Apache2.4.25 VC14 and then copy the extracted contents to a new folder c:/Apache24 (that is the ServerRoot in the config).
Default folder for your your web pages is DocumentRoot “c:/Apache24/htdocs”

Note: If  you unzip to a location other than C:\Apache24, you will need to change ServerRoot in the httpd.conf, and also change in httpd.conf the Documenroot, Directories, ScriptAlias, also when you use the extra folder config file(s) change to your location there.

We may need to set up a fully qualified domain name at this point.

Starting Apache in a DOS box as Administrator.  In other words, ppen a command prompt “As Administrator.”

Change the directory as follow:
cd\apache24\bin

C:\apache24\bin> httpd.exe

At this point, It may appear to you that the system is hanging, but it is NOT hanging.  In fact, it means there are no errors, at least those that are reported at the moment, and that Apache is probably started and running.  Test Apache by opening a web browser and typing localhost in the address bar. Hit enter.  “IT WORKS!”

To “Break” from the “Hang” in the DOS command prompt:
C:\apache24\bin> Ctrl+C

After you install PHP7, then come back here and
Install Apache as a service:

C:\apache24\bin> httpd.exe -k install

Installation Instructions for Installing PHP7.1.5:

Using Windows Explorer (file explorer), create a new folder named php at the Windows C: drive root:

c:\php

Now, extract all the folders and files from php-7.1.5-Win32-VC14-x64.zip.

Then copy those extracted folders and file contents to the new folder:
C:\php

Now, go get and install Notepad++ if you have not already installed it.  This text editor (or one like it) is a must to open and edit various text configuration files for php and apache, etc.

Here is the download page for Notepad++:  https://notepad-plus-plus.org/download/v7.4.1.html  Get the 64-bit or 32-bit version of Notepad++ that your system requires:

But, here is the installer file for the 64-bit version of Notepad++

Within the php root c:\php, open the php.ini.production file and save it as a file named php.ini in the root folder c:\php

Using Windows Explorer (file explorer) find the file called php.ini.production.  Open it using Notepad++ editor.  Now, on the Notpad++ menu, click File, select SAVE AS and change the name of the file to php.ini before saving it. 

APPEND the following items to the existing items within the “PATH” System Environment Variable. Note a Semicolon ; must separate each path item.  If you don’t know how to do this, you must learn.

;c:\php;c:\apache24;c:\apache24\bin

Go to a Dos command prompt and type in:

path (press enter)

You will see a display of what is in the current path. At this point, the above-appended path items are not yet included in the current path.

Log Off Windows, then Ctrl-Alt-Del and log into Windows again.

Now, open a command prompt and type:

path (press enter)

You will see the existing path containing the above-appended path items. 

Integrate / Connect Apache2 to your PHP7:

Using Windows Explorer, go to c:\apache24\conf

Open with Notepad++ the file called httpd.conf
Scroll down within the httpd.conf file and just below all the “LoadModule” lines, insert the following new lines:

LoadModule php7_module C:/PHP/php7apache2_4.dll

<IfModule php7_module>
DirectoryIndex index.html index.php
AddHandler application/x-httpd-php .php
PHPIniDir “C:/PHP”
</IfModule>

Save the changes to httpd.conf file and then close Notepad++

Log off Windows, and log into Windows again.

Test Apache now having php referenced from the httpd.conf of Apache.  How, just like we did above.

Start Apache in a DOS box as Administrator.  In other words, open a command prompt “As Administrator.”

Change the directory as follow:
cd\apache24\bin

and type httpd.exe at the prompt (and press enter).

C:\apache24\bin> httpd.exe

If it “hangs” without errors, you are good!  Open a browser and input localhost in the address bar.  IT WORK! 

In the command prompt window, enter Ctrl+C in order to break to the C:\> prompt.

In Windows, click Start, point at Administrative Tools, and select Services.  Then, in the Services list, find the Apache service near the beginning of the list, right-click the Apache service and left click /or select Properties. Find the correct TAB to STOP the Apache service.

Remember that I said above, after you install PHP7, then come back here and

Install Apache as a service:

C:\apache24\bin> httpd.exe -k install

Test localhost in your Web Browser.  IT WORKS!

Displaying PHP INFO:

Open Notepad++ text editor and create a new file (on the menu, click file, new).  Now, save the new with a filename of phpinfo.php

While you still have the new “phpinfo.php” file displayed within Notepad++, now insert the following contents on line 1 of the new file.

<?php phpinfo() ; ?>

Save the file named phpinfo.php with only this one line of content.  Copy or save this file to the root folder of the Apache http docs. In other words, save or copy the new phpinfo.php file into the following target sub-folder.

c:\apache24\htdocs\

Open a web browser, type into the address bar:

localhost/phpinfo.php

Voila!!!

Open TCP Port 80 In Windows Firewall

https://wiki.mcneel.com/zoo/window7firewall

Open TCP Port 443 in Windows Firewall the same way.

Configure httdd.conf using Notepad++

Find httpd.conf in C:\apache24\conf\
#ServerName www.example.com
#Insert next line & change svr (host header domain com or net)
ServerName svr.yourdomain.tld

Restart Apache service in the Services Module
Start, Administrative Tools, Services.

Set Up a DNS Entry — “A” (Address) record, pointing to your server’s fully qualified domain name and the IP address

You should now be able to connect from a remote 

 = = = = = = To be continued = = = =

ApacheMonitor:

Double click ApacheMonitor.exe, or put it in your Startup folder.

How to Identify and Stop and Remove a Docker Container

This pertains to Ubuntu Server 16.04 running Apache2.x, PHP7.x, and MySQL.  NextCloud 12 is installed and running on a domain with an SSL certificate issued by a public CA (on www.mydomain.tld and mydomain.tld).  I tried to integrate Collabora (Docker) obtaining its own SSL on a subdomain (office.mydomain.tld)

It became necessary to remove and reinstall the Collabora docker container / image. My two SSL certificates were conflicting after Collabora was installed and enabled in NextCloud 12. There was a failed configuration when I following the guided instructions for integrating Collabora online with NextCloud.  Incidentally, the installation mistake occurred  during the “run” phase. I mistakenly (and understandably) entered the sub-domain “office.mydomain.tld” (i.e. the subdomain where my collabora SSL certificate will address) rather than entering the already configured nextcloud domain www.mydomain.tld.  See the correct run command at the end of this Article.

Open terminal or putty ssh connection:

To See All docker containers:
sudo docker ps -a

To Stop a running docker container:
sudo docker stop <container id>
Example:
sudo docker stop 94fc7ad48626

Check the status again:
sudo docker ps -a

To Remove a stopped docker container:
sudo docker rm <container id>
Example:
sudo docker rm 94fc7ad48626

If there is an error at the removal step, it may be necessary to either restart apache or reboot the system.  Restarting Apache did not work for me.  I rebooted the system.

After reboot, check the status again and the container ID should be gone/empty. CONGRATULATIONS.  

When you reinstall Collabora:

Example to run the docker container referencing correct sub-domain of the previously installed nextcloud:
sudo docker run -t -d -p 127.0.0.1:9980:9980 -e ‘domain=nextcloud\\.your-domain\\.com’ –restart always –cap-add MKNOD collabora/code

I am not sure whether I should again first pull the docker Collabora/code before the docker run.  I will let you know.

 

Footnotes:  URL References / Credits:

https://docs.docker.com/engine/reference/commandline/stop/

https://help.nextcloud.com/t/collabora-docker-remove/4851

Prerequisites For Installing CMS Made Simple Version 2.1.6

Readme File for CMS Made Simple (PDF)

Requirements:

  1. The installation assistant requires a PHP environment with a minimum version of PHP 5.4.0.
  2. For new installations of CMS Made Simple you should create a new mysql database and database user. The database user
  3. must have ALL PRIVILEGES to all tables within the new database.
  4. CMS Made Simple itself requires at least PHP 5.4.11 with numerous libraries enabled (the install assistant will
    check for these) including json, tokenizer, xml, and gd.
  5. Your PHP environment must include the PHAR extension (yes, even for the expanded installer). This is for expanding the archive(s) included within the installation assistant.

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.

 

Windows Server Prerequisites to Installing MailEnable Server

Set the Computer / Mail Server name in Windows:  Example, mail.YourDomain.com

Bind the local static IP on the server’s network interface card that will be used to receive port forwarding from your public IP address on your router, such as TCP ports 25, 53, 80, 110, 143, 587, etc.  An example of the local IP might be 192.168.0.60, depending on the subnet you have configured

Win 2008 Server R2 — Add Role Wizard

  • Add DNS Server
  • Add Web Server — IIS Services
  • Add ASP.Net — and add the required / supporting role services too

Enable Windows Features — MailEnable server requires installation of the .Net 2.0 framework  — But, you should instead enable the .Net 3.51 features, which already include the .Net 2.0 API’s

You are now ready to download and install the latest edition of MailEnable server

Install and Use Import-Export Tools In Mozilla Thunderbird

Installation of the Add-On Import-Export Tools:

GoogleSearch

 

 

  • On the Add-ons page, click the yellow Download Now button and save the ImportExportTools.xpi file to a new or empty existing folder on your hard disk.  Remember the path where the file was downloaded. because you will need to find it in the next steps.

AddonPage

 

  • Open Thunderbird email account.  Make sure you Menu is Enable (see below).
  • On the Thunderbird Menu select Tools, and from the Drop Down List select Add-ons.

Menu-Tools-add-ons

 

  • Find and click on the little Gear at to top right corner of the Add-ons Extensions Manager next to the search add-ons box.
  • In the drop down list select “Install Add-ons from File.”

Add-Extension-From-File

Find and Select and Open the Import-Export-Tools.xpi file that you just downloaded to a folder on your hard disk. Select it and click the Open Button.

Open-XPI-File

 

  • Select the Install Now button in the bottom right corner of the Software Installation action box.

Select-Install-XPI

  • And after the Addon is installed, click the Restart Now button to restart Thunderbird and activate the addon for this email account.

restart-to-enable-addon

  • When Thunderbird restarts, close the Add-on Manager Tab.
  • You will find Import Export Tools on the Tools Menu of Thunderbird.  Select tools, then point  to Import Export Tools from the Tools drop down list.  You will see all the options for importing and exporting messages, etc.

USING IMPORT EXPORT TOOLS TO BACKUP MESSAGES TO YOUR HARD DRIVE.  HERE IS MY RECOMMENDED BACKUP METHOD:

  • Select the folder you wish to backup such as the INBOX.
  • On the Menu, select TOOLS, point to IMPORT EXPORT TOOLS, point to EXPORT ALL MESSAGES IN THE FOLDER, and select EML FORMAT.
  • Navigate to your downloads folder, and create a subfolder with the name of your email account, and create a subfolder called INBOX on your hard drive.  Select that subfolder to export all the messages in your Thunderbird INBOX to that new subfolder.
  • When your email messages are somehow corrupted or deleted from your email account inbox, or if you wish to create a new email account (such as an IMAP account) for which you want to IMPORT the messages to the new INBOX of the IMAP account, and have them Synchronized / Uploaded to the IMAP server Inbox, well you then have the ability to IMPORT all the Messages from your hard disk sub-folder located in your customer downloads path at / INBOX / MESSAGES folder that was created when you exported all of your EML files to a backup.
  • The EML files will be backed-up into a MESSAGES sub-folder under the INBOX backup folder that you created, and the folder path to those files will look something like the following image.  The files with the blue Tbird Icon are all *.EML files. All email attachments are preserved.

EML-Files-Backup

 

NOTE, you can do a separate backup of all the email messages in each email folder of your email account, such as SENT ITEMS, and DRAFTS, and IMPORTANT folder, etc.  Just make a separate backup folder for each.  You can import them folder-by-folder if you ever need to reconstruct your Email Account.

[Solved] Exchange 2003 smtp;554 5.6.1 Caused by Thunderbird – Body Type Not Supported

Diagnostic-Code: smtp; 554 5.6.1 Body type not supported by remote host

You try to send an email from Mozilla Thunderbird, but your Exchange Server 2003 returns the email to you as undeliverable with the diagnostic message as follows:

The message contains a content type that is not supported <mailservername.domain.com #5.6.1 smtp;554 5.6.1 Body type not suported by remote host>

Reporting-MTA: dns; dns.yourdomain.local
Action: failed
Status: 5.6.1
x-Supplemental-Info: <YourExchangeServerName #5.6.1 smtp;554 5.6.1 Body type not supported by Remote Host >

Your Exchange Server Logs probably show this message:

smtp;554 5.6.1 Body type not supported by Remote Host

If you can send email through Outlook Web Access but not through Thunderbird email client, then there must be a problem with the handshake of encoding methods between Thunderbird and Exchange 2003.

SOLUTION:  Open Thunderbird and try this:

  • Go to Tools -> Options -> Advanced -> Config Editor. See bottom right corner of this image for Config Editor button:

000Capture

  • Click on the “I’ll be careful, I promise!” button.
  • Type “mime” into the Filter box.
  • Double Click “mail.strictly_mime” to change the setting from “false” to “true”.  Or, you can right-click “mail.strictly_mime” and left click toggle True
  • Close all the windows that have popped up in the process.
  • Restart Thunderbird.
  • Test outgoing email now.

0004Capture