WordPress Plugin Wordtwit Add Twitter Account Not Working (Setup Instructions)

If you’ve recently upgraded Wordtwit, you’ll notice some changes which are specifically to address the old Twitter API being deprecated. You will need to create a Twitter Application for Wordtwit to be able to add a Twitter account.

The developer has provided some instructions on how to correctly create a Twitter application for Wordtwit:Creating a custom application for WordTwit

Make sure that you set the callback URL to your websites URL, which is what I had skipped and caused the “Add Account” button under Twitter accounts to not function at all.

 

 

Receiving Windows 7 File In Use Errors or File Locked By Process Errors

For some reason I’ve been getting issues with applications trying to update themselves, file lock errors will occur. Today it started happening with Steam, it downloaded an update and tried to run but was unable to remove the Steam.exe file stating that it was in use.

I did a bit of googling and found that this may occur if the Application Experience service is disabled, of which it was. Once I set it to “Manual” and started the service, Steam could update correctly with any file lock errors.

As for how this was disabled, I have no idea but I believe it may have been an SSD guide or a guide on how to disable non-essential Windows 7 services.

OpenClinica Tomcat Error When Setting JAVA_OPTS on Ubuntu 10.04

I’ve setup OpenClinica a number of time and never really touched the JAVA_OPTS for Tomcat because I’ve never really had any issues. On the OpenClinica Installation Documentation it states that the JVM performs well when using the following JAVA_OPTS

https://docs.openclinica.com/3.1/installation/installation-linux#content-title-5460

export JAVA_OPTS="$JAVA_OPTS   -Xmx1280m -XX:+UseParallelGC -XX:ParallelGCThreads=2 -XX:MaxPermSize=180m -XX:+CMSClassUnloadingEnabled"

 

However, if you’re running Ubuntu 10.04 LTS, you will receive an error when modifying the /etc/default/tomcat6 JAVA_OPTS.

Conflicting collector combinations in option list; please refer to the release notes for the combinations allowed

 

The two options that cause this error are “-XX:+UseParallelGC -XX:ParallelGCThreads=2”, if you remove these then the errors go away. Looking into this further, I’ve found some documentation but not much. The commands are related to garbage collection, and the following article sheds some light on the above two commands as well as “-XX:+UseParNewGC”

http://stackoverflow.com/questions/2101518/difference-between-xxuseparallelgc-and-xxuseparnewgc

Upon remove the two recommended options and adding¬†“-XX:+UseParNewGC” tomcat6 starts without error.

If anyone has any information on why this is, it would be great to know.

Apache Tomcat Native library Not Found Error on Ubuntu

Sometimes you might get the following error message in your logs for your Tomcat instance under Ubuntu.

The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found

 

To fix this issue, simply run the following command to install the appropriate library.

apt-get install libtcnative-1

 

The error should go away!

Dual or Triple Monitors and Multiple Taskbars for Windows 7

If you have a dual or a triple monitor setup, and you wish to have a taskbar on the second or second and third monitor. Then you should take a look at Dual Monitor Taskbar.

It’s a free opensource program for Windows 7 that puts a taskbar on your second monitor if you have dual monitor setup or on your second and third monitor if you have a triple monitor setup. I haven’t tried a quad monitor setup or beyond, please let me know if you have in the comments.

Here is a list of configuration options.

  • General
    • Automatically start with Windows
    • Check for Updates
  • Taskbar Appearance
    • Show lables
    • Show clock
    • Mirror mode
    • Use small icons
    • Show notification area
    • Show start button
    • Use custom font
    • Auto-hide the taskbar
  • Taskbar location
    • Mutliple display support
    • Options for Bottom, Left, Right, Top

Below is a screenshot of the settings, and notepad on a second monitor. As you can see, it’s hard to tell the different from a normal Windows 7 taskbar.

dual-monitor-taskbar-screenshot

If you have a program running on your second or third screen, it will show on the taskbar for that monitor, so it makes it easy to locate your programs windows.

There is similar software that you can purchase, however Dual Monitor Taskbar seems to get the job done and is free.

Dual Monitor Taskbar Homepage

Apache Error Log mod_fcgid: can’t apply process slot for /usr/local/cpanel/cgi-sys/php5 (cPanel/CloudLinux)

I was getting the following error message in apaches error log on a cPanel machine with CloudLinux

mod_fcgid: can't apply process slot for /usr/local/cpanel/cgi-sys/php5

Looking into the issue, it seemed that a couple of sites were reaching the max EP (Entry PRocess). If you read the ClouldLinux documentation it states the following. http://docs.cloudlinux.com/index.html?limits.html

Entry processes limit control the number of entries into LVE. Each time a process ‘enters’ into LVE, we increment the counter. Each time process exits LVE, we decrement the counter. We don’t count processes that are created inside LVE itself. It is also know as ‘Apache concurrent connections’ limit. The process enter’s into LVE when there is a new HTTP request for CGI/PHP, when new SSH session is created, or when new cron job is started. This limit was created to prevent DoS attacks against web server. One of the fairly popular attacks is to tie up all the Apache connections by hitting some slow page on a server. Once all Apache slots are used up, no one else will be able to connect to the web server, causing it to appear to be down. The issue is worsened by CPU limits, as once site starts to get slow due to CPU limit — it will respond to requests slower and slower, causing more and more connections to be tied up. To solve that, we have created entry processes (often called concurrent connections) limit. It will limit the number of concurrent connections to Apache, causing web server to serve error 508 page (Resource Limit Reached), once there number of concurrent requests for the site goes above the limit.

I

How To Create A WordPress Admin Login Using MySQL

You can do this simply by running the following SQL commands through phpMyadmin or through command line MySQL.

1. First insert the new user account into the database.

If you’re using command line MySQL then you will need to select the database first using the “use” command below:

use wp_mywordpressdatabasename

Now that you’ve selected the database, you can run the following query to insert the new user account into the wp_users table of your WordPress Database. You will want to fill in your details below before executing the query. You enter this query under the “SQL” tab within phpMyAdmin.

INSERT INTO wp_users (id,user_login, user_pass, user_nicename, user_email, user_url, user_registered, user_activation_key, user_status, display_name) VALUES ('','john', MD5('newpassword123'), 'John Smith', '[email protected]', 'https://www.geektank.net/', '2013-29-03 00:00:00', '', '0', 'John Smith');

 

If successfully you should see:

Query OK, 1 row affected (0.00 sec)

Note, the field ‘ID’ is blank because this field is set to auto-increment within the table, a number will automatically to the ‘ID’ field for the new user.

2. Find out what ID your new account received.

Now that you have the successfully inserted the new record into the wp_users table. You want to know the new ID for the new account. You can find this rather easily with phpMyAdmin, but if you’re using the mysql command line simply run the following.

select * from wp_users where user_login = "john";

Which should return:

+----+------------+----------------------------------+---------------+--------------------------+-------------------------+---------------------+---------------------+-------------+--------------+
| ID | user_login | user_pass | user_nicename | user_email | user_url | user_registered | user_activation_key | user_status | display_name |
+----+------------+----------------------------------+---------------+--------------------------+-------------------------+--------+------------+---------------------+-------------+--------------+
| 5 | john | 8359b10e30dfabd587a5661e52249101 | John Smith | [email protected] | https://www.geektank.net | 2012-08-23 00:00:00 | | 0 | John Smith |
+----+------------+----------------------------------+---------------+--------------------------+----------+--------------+---------------------+---------------------+-------------+--------------+

The ID for the new account we created is 5.

3. Making the new WordPress Account an Administrator (wp_usermeta bits)

Even though we added a new user, it doesn’t have Administrator rights yet. We need to add a couple of entries to the wp_usermeta table. Taking the ID of the new user we create the following two queries.

INSERT INTO wp_usermeta (umeta_id, user_id, meta_key, meta_value) VALUES (NULL, '5', 'wp_capabilities', 'a:1:{s:13:"administrator";s:1:"1";}');
INSERT INTO wp_usermeta (umeta_id, user_id, meta_key, meta_value) VALUES (NULL, '5', 'wp_user_level', '10');

These queries will tell provide Administrator rights to our new user account.

4. Enjoy the new account!

You’re done!