Category Archives: Programming

Solved Zpanel Webalizer Stats Module Not Showing Statistics

It has been reported in the Zpanel Forum that the Webalizer module installed with Zpanel on Windows O/S with Apache hasn’t been functioning since ZPanel version 10.1.0

Here is the Zpanel forum thread that leads to the fix.

http://forums.zpanelcp.com/Thread-Windows-ZPanel-not-showing-web-statistics

Here is the thread that contains the file attachment to be downloaded:

http://forums.zpanelcp.com/Thread-Windows-ZPanel-not-showing-web-statistics

You will need to login or register and login to the forum to download the fix. OnDaemonHour.hook.php

Rename and replace the original OnDaemonHour.hook.php file in the following path:

C:\zpanel\panel\modules\webalizer_stats\hooks\

Thanks, bushr4anger

His quote:

You were on the right track, here’s the fix for windows ( was due to webalizer command string being incorrectly formatted )
Just replace OnDaemonHour.hook.php with the attached file

btw… I used the zGodx module to run zDaemon so I could see instant results

Here is the original download link for the PHP file:
http://forums.zpanelcp.com/attachment.php?aid=538

This is the same file in a zip archive:
http://www.sheldonsblog.com/?p=3169

OwnCloud Updated to Version 7.0.1.1

2014-08-06 18_07_16-ownCloud

Version 7.0.0.8 was deficient. Owncloud files were accessible, but the admin area did not properly display. The admin link led to a blank white page. All is well now that OwnCloud is updated to version 7.0.1.1. Apparently, Windows server with apache or IIS cannot utilize Word Preview in Docs area even with LibreOffice installed on the server and the path properly set in config.php.

How to Create a WordPress Child Theme

  • Navigate to the themes directory of your WordPress website and create a new child theme sub-folder in the path of your themes folder (for example, yourwebsitedomain/wp-content/themes/ChildTwentyFourteen/).  This sub-folder is going to be your new child theme folder for your current themes.  Mane the sub-folder something like “ChildTwentyFourteen” or be a little more creative than me.
  • Search Google for — child theme wordpress codex — and the first link that you should find and follow is to http://codex.wordpress.org/Child_Themes
  • On the codex support page which will be displayed from your search, please locate and copy the gray block of code to your clipboard memory.  Make sure you copy every line including the /* — */ comment part.  The code you copy should look like this:

/*
Theme Name: Twenty Fourteen Child
Theme URI: http://example.com/twenty-fourteen-child/
Description: Twenty Fourteen Child Theme
Author: John Doe
Author URI: http://example.com
Template: twentyfourteen
Version: 1.0.0
Tags: light, dark, two-columns, right-sidebar, responsive-layout, accessibility-ready
Text Domain: twenty-fourteen-child
*/

@import url(“../twentyfourteen/style.css”);

/* =Theme customization starts here
————————————————————– */

  •  Open your child theme folder and create a new text file called style.css.  Open the style.css file with your php editor, like notepad++ and paste into that file the code contents that you just copied to your clipboard (that is, paste the above code to the style.css file) and save the file contents of style.css.
  • You can modify each of the lines in the style.css file.  The required lines are the theme name, the Template, and the @import url line
  • Theme customization begins below the dashed line — like css changes.
  • Note: The child theme’s stylesheet is included after the parent theme’s and, consequently, the child theme styles will override those in the parent theme’s stylesheet.
  • Activate your childtheme in your wordpress administrative panels — Appearance — Themes.

You can override main content theme with your child theme content as follows.  For example, to remove or change the contents of the wordpress footer “Proudly Powered by WordPress,” you would first make a copy of footer.php (copied from the main theme folder and pasted into your child theme folder).  Open your child theme copy of the footer.php file using Notepad++ editor and edit the code.  Save the modified footer.php file.  Refresh your wordpress site and check your changes.

How to Enable or Disable the Demo Store Notification in Magento

You can configure Magento eCommerce to display a notice when your store is in demo mode to ensure that your customers know that their orders will not be processed.

Log into the Magento admin panel and hover your mouse pointer over the “System” tab on the horizontal menu. Select “Configuration” from the drop down list. Under “GENERAL” on the vertical menu on the left, select “Design” and then select “HTML Head” on the submenu on the right side. Scroll down and you will see a “Yes/No” toggle option appearing next to “Display demo store notice.”

To Enable/disable the Demo Store Notification make your selection Yes/No from the drop down toggle and click the “Save Config” button at the top right of your display in order to save this configuration change.

Updgrade iRedAdmin Open Source Edition to Latest Release on Ubuntu

How to updgrade iRedAdmin (Open Source Edition) eMail Server Administrator Panel from version 0.2.2 (or earlier version) to version 0.3 (or the Latest stable release) on Ubuntu/Debian Server:

Download the latest iRedAdmin (open source edition) here:

http://iredmail.org/yum/misc/  .  For example: iRedAdmin-0.3.tar.bz2.

Upload this downloaded package to your iRedMail server which has the older version running.  Assume it’s /root/iRedAdmin-0.3.tar.bz2.

Uncompress it to correct directory, set correct file owner and permission, convert config file to python file format, restart Apache web server.

Terminal:

# —- On Debian/Ubuntu —-
#

  • # tar xjf /root/iRedAdmin-0.3.tar.bz2 -C /usr/share/apache2/
  • # cd /usr/share/apache2/
  • # cp -p iRedAdmin-0.2.2/settings.ini iRedAdmin-0.3/
  • # cd iRedAdmin-0.3/
  • # bash tools/convert_ini_to_py.sh settings.ini     # <– This step is required if you’re upgrading from iRedAdmin-0.2.2 or earlier release.
  • # rm -f settings.ini
  • # cd ../
  • # chown -R iredadmin:iredadmin iRedAdmin-0.3
  • # chmod -R 0555 iRedAdmin-0.3
  • # chmod 0400 iRedAdmin-0.3/settings.*
  • # rm -i iredadmin         # <- Remove old symbol link
  • # ln -s iRedAdmin-0.3 iredadmin       # Create a new symbol link
  • # /etc/init.d/apache2 restart

Source of this Information — iRedMail.org Wiki:
http://www.iredmail.org/wiki/index.php?title=IRedMail/FAQ/Upgrade.iRedAdmin.Open.Source.Edition

How to disable authenticated SMTP in MS Exchange 2003

SEE: http://support.zen.co.uk/kb/Knowledgebase/How-to-disable-authenticated-SMTP-in-MS-Exchange-2003?Keywords=server where this Article is Originally Published. Full credit for original authorship of this knowledge base Article goes to whoever published it at that URL. All copyrights remain with the original author. This article will be immediately removed from here on notice from support.zen.co.uk.

Aim of this article:

This article provides instructions on disabling authenticated delivery of e-mail over the SMTP protocol to a Microsoft Exchange 2003 Server, in order to prevent yourserver from being used as a relay for fraudulent e-mail.

Background

Out of the box MS Exchange 2003 is not an open relay, but it can be used as a relay if the spammer has usernames and passwords for users on your network. This authenticated relay is the most common way that spammers get MS Exchange to send their junk.
In an ideal world this would not be a problem because users would have complex passwords that cannot be guessed by using brute force, continuously attempting log in using possible passwords until a valid one is found. However, users will use as easy to remember a password as they can, thus making brute force password guessing very effective.
By disabling authentication when not on the office network, even if a network password is known, spam cannot be sent through the Exchange server, although other services exposed to the Internet may be exploited – remote desktop etc.
Note: most smartphones do not use SMTP for sending and receiving e-mail so disabling aSMTP in this way should not affect remote employees that use their phones to access e-mail.

Accessing Virtual SMTP server Properties

On the Exchange server, open Server Management, then in the left hand trees view expand the following:
Advanced Management > Domainname (Exchange) > Servers > ServerName > Protocols > SMTP
Right click and select properties of the Default SMTP Virtual Server

props

Select Access from the tabs at the top, and then click the button named Relay

relay rest

The Relay Restrictions window should open. By default under the Add button, a checkbox will be ticked. This “Allow all computers…..” checkbox is what allows someone with a valid password to send mail through your server from anywhere on the Internet. Un-tick this box.
Next click the button named Users…

Users

Ensure Authenticated Users only have Submit Permission ticked.
Selecting Relay Permission here will override removing the tick from the previous window.
To finish, click OK until all the properties boxes are closed.

End of Article = = = = = = =

MY COMMENTARY:

I am not sure whether it is necessary or advisable to grant relay access to the localhost at 127.0.0.1 nor the local IP bind to the network interface of the 2k3 exchange server. In other words, if your exchange server is located at 192.168.2.2, for example, it might not be wise to grant that either. It is, however, important to grant access to the exchange smtp relay from any perimeter smart host that you may use to forward email to your exchange server on your LAN.

FURTHER COMMENTARY IF YOU USE A SMART HOST OUTSIDE THE EXCHANGE LAN PERIMETER:

The smart host might have several separate email boxes:

user1 @ myDomain.com
smart host configured to keep a copy of each msg received, and redirect each message to user1 @ ExchangeServer.MyDomain.com

On the other hand, you may merely set the smart host to receive all mail for MyDomain.com) and forward it to ExchangeServer.MyDomain.com where the exchange server will sort the mail by account and deliver it to the appropriate mail box accounts.

Configure the MX records of both the perimeter smart host and the exchange server with the appropriate priorities.  The following, for example, will ensure that attempted delivery will be made first to the smart host (standard priority 10) and, if the smart host is offline, then secondary delivery will be made directly to the exchange server (priority 12).

smtp.smarthost.somedomain.com.  MX 10
smtp.exchangeserver.MyDomain.com MX 12

Q — Will shutting off relay to anyone other than the smart host and the local.lan prevent reception of internet mail destined for delivery (secondary priority) on the local 2k3 exchange server?

Connect FolderSync Lite For Android With Your OwnCloud Server

  • Install FolderSync Lite (for Android) from Google Play
  • Launch the App
  • Select “Accounts” from the menu
  • Select “ADD ACCOUNT”
  • Select “WebDAV” as the Account Type
  • Choose a Unique Name For Your Account:  MyOwnCloud
  • Protocol:  http:  or https:  (Whichever your server is setup to use)
  • Server Address:  www.yourownclouddomain.com
  • Start Folder:  owncloud/remote.php/webdav
  • Port:  <Leave Blank – Unless there is a Non-default port>
  • Use expect-continue:  Leave this box checked
  • Login Name:  [use the account name that you setup for your private owncloud]
  • Password:  [Only you know this]
  • Press: TEST CONNECTION
  • If it connects [Display would show “Login Succeeded”], then Press SAVE

 

For OwnCloud Enable WebDAV in Apache2.x on Windows Server

SEE: http://www.mkyong.com/apache/how-to-enable-webdav-in-apache-server-2-2-x-windows/

While installing “ownCloud” web services, the post installation checklist noted that WebDAV services did not appear to be enabled, check configuration instructions.  Consequently, the installation would not conclude.

I googled and found the above article and proceeded to enable each LoadModule and the Include for httpd-dav.conf file as shown in Step 1. Load WebDav in Apache Server, and Step 4. Restart the Apache Service.   It was unnecessary to perform  steps 2, 3, and 5 shown in the article.

STEP 1. Load WebDav In Apache Server. WebDAV comes with Apache server 2.x, you just need to enable it. Edit “%APACHE_PATH%/conf/http.conf“, un-comment the following load and include statements by removing the leading # hashtags.  Use Notepad++ to edit the file: http.conf

LoadModule alias_module modules/mod_alias.so
LoadModule auth_digest_module modules/mod_auth_digest.so
LoadModule authn_file_module modules/mod_authn_file.so
LoadModule dav_module modules/mod_dav.so
LoadModule dav_fs_module modules/mod_dav_fs.so
LoadModule dav_lock_module modules/mod_dav_lock.so
LoadModule setenvif_module modules/mod_setenvif.so

# Distributed authoring and versioning (WebDAV)
Include conf/extra/httpd-dav.conf

2014-02-09 20_08_36-ownCloud