Category Archives: Programming

Fix for WordPress Fitness Tracker Plugin — (Solved)

When adding fitness data using the WordPress Fitness Tracker Plugin, you might receive this error message: “You don’t have sufficient privileges to perform this action …”

The fitnesstracker.php file of this WordPress plugin contains two incorrect references to the plugin sub-directory. The plugin directory should be /wp-fitness-tracker/ instead of /fitnesstracker/.

FIX: Use a good text editor like notepad++ to open the php file fitnesstracker.php. First, make a backup of the original fitnesstracker.php file. Edit lines 61 and 84 of original fitnesstracker.php to change these references:

page=fitnesstracker/fitnesstracker.php

should be changed to this:

page=wp-fitness-tracker/fitnesstracker.php

Then, save the file with these changes.  These modifications should eliminate the error message and allow the page of previously input data to properly display.

CalRunnerPluginSettingsWordPress

Give credit to ClaytonJames for this fix.

NextGen Gallery Plugin Stops If PHP.ini Base64_Decode Function is Disabled

If you disable the base64_decode function in php.ini, then your NextGen Gallery stops working. This will be evident if you try to go to a gallery page and it says ‘Gallery not found. Please check your settings.’ Also, if you try to configure “Gallery Settings” in the dashboard, the Gallery Settings page does not display properly. It merely displays a bunch of code jammed together in the same paragraph as if you opened a php file using Windows notepad instead of an advanced php script editor.

If your self-hosted WordPress websites are being infected by injections of base64 encoded gibberish, then there are a couple remedies. You could install the Suhosin Patch (php extension), or you could simply disable the base64 decode function in the ‘php.ini’ configuration file. On a Windows server, open php.ini with a good editor, like notepad++, and insert a semicolon to comment out this line:

; disable_functions =

Then, insert an additional line as follows:

disable_functions = base64_decode

Save the php.ini file as revised.

Restart your internet information web service as follows:

Open a command line by clicking start, clicking run, and then type:
cmd [enter]

Next, at the command prompt, type:
net stop w3svc [enter]
net start w3svc [enter]

How to Customize the Footer In WordPress Twenty Thirteen Theme

http://wordpress.org/support/topic/twenty-thirteen-footer-question

SEE: the comment by OGC Member.  He explains how to modify the code in the footer.php file located in the Themes – Twenty Thirteen directory.  Only the second line of his example code needs to be inserted and customized.  Remember to backup the original footer.php file before you make your edits.  I recommend that you install and use the app ‘Notepad++’ as your php files editor.  Windows notepad is rather inadequate.

Example:  You can add your owe copyright notice to replace the phrase Proudly Powered by WordPress.

How to copy Ubuntu folder contents via Putty SSH

Login to remote Ubuntu install through App ‘Putty’ using ssh using and login with the ‘root’ administrative user.

You can copy the content of a folder /source to another existing folder /dest with the command

cp -a /source/. /dest/
The -a option is an improved recursive option, that preserve all file attributes, and also preserve symlinks.

The . at end of the source path is a specific cp syntax that allow to copy all files and folders, included hidden ones.

If you first need to make a new target directory/folder, then you can use the mkdir command, like this:

mkdir /home/yourusername/newtargetdir

All this is useful if you want to re-install a MySQL server that won’t start, and making backups lessen the risk of loss of database files.

MySQL database files are stored in /var/lib/mysql.  This folder ‘should’ remain untouched when you remove or re-install the MySQL package.

It is also a good idea to make a backup of those database files.  I did so using the copy command above.

 

Email forwarding in iRedMail having only Open-Source iRedAdmin Panel

ZPanel has a graphical admin interface which enables email administrators to easily setup email forwarding per user and per domain.  However, the open-source community version of iRedAdmin panel interface does not contain this same capability.  Only the iRedAdmin Pro version enables administrators to setup email forwarding.

iRedMail and ZPanel each utilize the Postfix email service.  Consequently, if both use a MySql database as their back-end to store user email configurations, then each of their MySql database table structures will be quite similar.  Certain fields of the database tables may be a bit dissimilar.

In order to manually configure an email address to forward all received email (and leave a copy of the email on the server) you must use PhpMyAdmin to edit email box records within the ‘goto’ field of the ‘alias’ table of the ‘vmail’ database.

Example — Before Editing the Record:

address field value — user@maildomain.com
goto field value — user@maildomain.com

Example — After Editing the Record to Provide Forwarding:

address field value — user@maildomain.com
goto field value — user@fwd-domain.com,user@maildomain.com

Notice that the email address where you will forward the email is inserted as the first address in the ‘goto’ field, followed by a comma, and followed by the original email box address.  This configuration keeps each received email in the original mailbox (user@maildomain.com) on the server and forwards a copy of it to the forwarding email address (user@fwd-domain.com).

Conect to Ubuntu via Windows Remote Desktop Protocol

Install xRDP on Ubuntu 12.04

Open a terminal window CTRL+ALT+T

sudo apt-get install xrdp (enter)
answer Y(es) when promted

After installing xRDP, make sure Ubuntu xRDP is listening on Tcp Port 3389. Somehow it proxies to 5210. Enter this at the terminal:

netstat -an | grep “LISTEN ” | grep “:3389”

Make sure that your router is port forwarding TCP port 3389 to the lan IP of your Ubuntu.

From Windows 7, click Start, Programs, Accessories, and select Remote Desktop Connection. Enter the router public IP or fully qualified Hostname.DomainName.com of your Ubuntu server. No username or password is necessary at this point. Click connect.

You should go past the windows warning to allow desktop connection.

At the Screen that says Login to xrdp, Make sure the module in the dropdown list is sesman-Xvnc. Enter your username or root, enter your password, and click OK.

You should connect.

If you only achieve a desktop background, without side or top Ubuntu desktop menu items, then you may need to install Ubuntu gnome session fallback or somehow make 2d the default for xRDP connections rather than Unity 3d.

So, if you have a problem connecting, run the commands below and restart Ubuntu, and try connecting again.

echo “gnome-session –session=ubuntu-2d” > ~/.xsession

Or install gnome session fallback.

sudo apt-get install gnome-session-fallback

Here are the links references that I must credit as the configuration resources for the instructions and content of this post:

http://www.liberiangeek.net/2012/05/connect-to-ubuntu-12-04-precise-pangolin-via-windows-remote-desktop/

http://askubuntu.com/questions/234856/unable-to-do-remote-desktop-using-xrdp

http://www.upubuntu.com/2012/01/how-to-open-specific-port-under-ubuntu.html