How to stop emails going to spam in gmail

You need to follow these simple steps when youremail@gmail account incorrectly classifies email messages as spam and places them in your spam folder.

To tell your gmail account that these emails are not spam and that the sender is a safe sender you also have to add the senders to your contact list in order to ensure that future emails from these senders are never placed in your spam folder ever again:

  1. Open your gmail webmail client on a laptop or computer (these instructions will not work on a phone) (see figure 1)
  2. Click on the More menu item in the left column to reveal the Spam folder menu item
    1. then click on the Spam folder menu item (see figure 2)
  3. Select all the check boxes of the email messages that you feel are NOT spam
    1. then click on the Not spam button (see figure 3)
  4. Click to open each message
    1. then add the sender to your Contact list from the drop-down menu in the upper right corner of the opened message (figure 4)

That is all to it!

NOTE: Same instructions again with helpful images below.

Figure 1 Open your gmail webmail client on a laptop or computer (these instructions will not work on a phone).

Figure 2 Click on the More menu item in the left column to reveal the Spam folder menu item then click on the Spam folder menu item.

Figure 3 Select all the check boxes of the email messages that you feel are NOT spam then click on the Not spam button.

Figure 4 Click to open each message then add the sender to your Contact list from the drop-down menu in the upper right corner of the opened message.

WordPress updates

Each time you login to your WordPress site you should check for updates and install them if there are any.

In general there are two types of updates. WordPress updates which include WordPress its self along with theme updates. The second type of updates and the ones you will see most often are plugin updates. WordPress will notify you when updates are available for both of these categories of updates when you log into the Dashboard of your site. Continue reading

Should you kill or terminate a misbehaving process.

Have you ever had a linux process that was not running but when you try to start or restart the process nothing happens. You may find that you need to kill the process before you try to restart it because the process is actually still alive and not responding or not actually alive but the pid (which is a unique identifying number that tells the kernel that the process has stated or is alive) was not removed when the process ended. So the kernel thinks that the process is working just fine when in fact it is not and won’t start it a new.

Before you kill the process you should always try to terminate it first. Because terminate tries to end the process gracefully and finish writing any remaining data that the process may have stored in memory as well terminate will finish writing any logging data to assist you to find out what caused the process to fail in the first place

The command to terminate a process is

Code
kill -15 pid

replace pid with the pid number

If your attempt to terminate the process fails then you will have to use the more powerful kill command which will bypass the process and ask the kernel to kill the misbehaving process directly.

The command to have the kernel kill a process is

Code
kill -9 pid

replace pid with the pid number

Before you can kill the process you will have to find its pid. To find out the pid of a running process in virtualmin you can go to

Webmin> System> Running Processes>

and select pid from the Display menu then scroll to find the pid of the process you are looking for. Linux, kill, terminate, kill -15 pid, kill -15, kill -9 pid, kill -9, pid, linux process, process, not running, process not running, start, restart, start or restart, not responding, process not responding, kernel, pid not removed, kill the process, stop the process, terminate the process, end the process, end the process gracefully, writing any logging data, virtualmin, webmin, Running Processes,Click on the pid of the process you want to kill and you will be taken to a new screen where you can terminate or kill the process by clicking the matching button.

Linux, kill, terminate, kill -15 pid, kill -15, kill -9 pid, kill -9, pid, linux process, process, not running, process not running, start, restart, start or restart, not responding, process not responding, kernel, pid not removed, kill the process, stop the process, terminate the process, end the process, end the process gracefully, writing any logging data, virtualmin, webmin, Running Processes,If you are not a virtualmin user you can open a terminal window and type

Code
ps aux | less

which will give you a list that looks something like

Linux, kill, terminate, kill -15 pid, kill -15, kill -9 pid, kill -9, pid, linux process, process, not running, process not running, start, restart, start or restart, not responding, process not responding, kernel, pid not removed, kill the process, stop the process, terminate the process, end the process, end the process gracefully, writing any logging data, virtualmin, webmin, Running Processes,when you have the pid you need to kill the process. As mentioned above you should always try the terminate command first. In the terminal window type

Code
kill -15 pid

replace pid with the pid number

If the process does not terminate you will the need to use the more powerful kill command

Code
kill -9 pid

replace pid with the pid number

Is My Blog Down for Everyone or Just Me Site Checker!

Have you ever tried to load your site or blog only to find it was down? Then you contact your service provider only for them to tell you that your site is up everything is running as normally. Your service provider tells you that the problem is with your connection or computer. Now you need a way to confirm what they are saying. There are a number of free  services that can check your site for you.

http://downforeveryoneorjustme.com/
http://www.checksite.us/
http://downorjust.me/

Go to either or all of these checking sites and enter your sites or blogs URL and submit it. The checking site will confirm wether or not your site is running or not and report to you.

How to copy and save an image from a flash website.

Lets say there is an Adobe Flash website with an image that you want to show to your graphic artist. This image is the type of image you are after for your website. With a normal website you could just right click on a photo and you would have the option to either copy the image or save it so you could send the image to your artist. But since it’s an Adobe Flash website, right clicking gives you two choices “Settings” and “About Adobe Flash Player” so you are unable to copy the image you so desperately want. Well there is a way to get the image you are after.

Below are the instructions for you to copy and save a flash image. Before you copy an image and use it you should consider any copyright implications. However if you are only using it as an example of the type of thing you are looking for you should not have any problems.

How to
1.    Load the site with flash that you want to get an image from.

2.    Find an image that you want and centre it on the screen, move the curser out of the way to one side or the top or bottom of the screen.

3.    Then Press the Print Screen key on the keyboard.
    a.    The Print Screen key is usually the next button to the right of F12 button, labelled something like ‘prt sc’.
        i.    What it does is copies the entire screen as it is  at the moment you press it, so make sure the cursors’ is moved away from the picture that you want.

4.    Then load MS Paint.
    a.    To find MS Paint click Start> then run your mouse over the All Programs menu item.
    b.    Then move your mouse over the Accessories menu item.
    c.    On the Accessories menu that opens click the paint menu item to run the paint program.
    d.    When the paint program loads click Edit> Paste>.
        i.    Then click the select button on the side bar.
            (1)    Usually the top right button that looks like a dotted square.
            (2)    This will allow you to draw a box around the section of the image you want to keep.
            (3)    You will have to practice to get it in the write place.
        ii.    When you have the box around the section of the image you want to keep press Ctrl and click C to copy the section of the image you want to keep.
    e.    Then still in paint, select File> New>
        i.    when asked if you want to save click no. The image will close and a new blank canvas will open.
    f.    In the new canvas select Edit> paste>
        i.    You will now have the image you want.
        ii.    Then click File> Save>
        iii.    Then select the folder you want to save the image in.

 

Update wordpress – WP Maintenance Mode – Internal Server Error – solution

The problem

After updating your WordPress and/or WP Maintenance Mode plugin your site is running normally for a period of time eg between 6 and 18 hours. Then at some random time all that any visitor is able to see is an Internal Server Error message. To anyone trying to get to your site, your site appears to be broken. For more information open the section on Server Side Errors in my article, Where to find Apache response codes and how to determine their meaning.

Internal server error, Update wordpress, WordPress, WP Maintenance Mode, Maintenance Mode, Maintenance, Mode, Internal Server Error, site, broken site, Plugins, Plugin, Support

Where to find Apache response codes and how to determine their meaning.

Locating your log file on your server.

Most logs files in Ubuntu are stored in /var/log/ and the folders under /var/log/ . To find all logs on your server got to a terminal window and type

locate log

then hit enter and all logs on your server will be listed.

In Particular have a look at /var/log/apache2/access.log and /var/log/apache2/error.log depending on the server your site is these logs may be in a different location.

In Virtualmin the job is much easer. After you have logged in to your Virtualmin console select Virtualmin> Logs and Reports> and then either select Apache Access Log or Apache Error Log and you will get a list of the last x number of records.

Finding the Apache response codes in your log file.

When checking your log files you will come across two sets of numbers that don’t seem to stand for anything. Have a look at these two example of standard log file entry.


208.115.111.67 – – [28/May/2011:00:44:05 +0800] “GET /robots.txt HTTP/1.1” 200 358 “-” “Mozilla/5.0 (compatible; Ezooms/1.0; ezooms.bot@gmail.com)”

208.115.111.67 – – [28/May/2011:01:33:53 +0800] “GET /WebDesign/WebDesign.php HTTP/1.1” 200 19388 “-” “Mozilla/5.0 (compatible; Ezooms/1.0; ezooms.bot@gmail.com)”

 

For this exercise ignore ever thing up to and including “GET /robots.txt HTTP/1.1” in the first log entry and “GET /WebDesign/WebDesign.php HTTP/1.1” in the second. What we are interested in here is the 200 358 and the 200 19388 in the two lines consecutively. To begin with I will deal with the second number first because it requires the shortest explanation.

In each case the second number represents the amount of data passed from your website (the server) to the computer requesting the information (the client). In other words the page passed back to the computer making the request or the client EG an error page. The first number is the Apache response code or the code for, what action the server took to the request from the client.

Response codes can be divided into 5 categories.

1xx: Redirection Further action must be taken in order to complete the request
2xx: Success The action was successfully received, understood, and accepted
3xx: Redirection Further action must be taken in order to complete the request
4xx: Client Error The request contains bad syntax or cannot be fulfilled
5xx: Server Error The server failed to full fill an apparently valid request
* NOTE Not all numbers in any category have been used.

100-199 Continue with Client Requests.

100 Continue Means that the server has received the request and that the client should proceed to send the request body (in the case of a POST request).
101 Switching Protocols Means the computer requesting the information has asked the server to switch protocols and the server is acknowledging that it will.
102 Processing (WebDAV) A WebDAV request may contain many sub-requests so it may take a long time to complete the request. This code indicates that the server has received the request and is processing it. In laymen terms “please hold the line”.

200-299 Successful Client Requests.

 200 OK Standard response for success.
 201 Created A confirmation that a new page has been created.
 202 Accepted The client’s request was accepted, but it has not been processed yet.
 203 Non-Authoritative Information The server successfully processed the request, but is returning information that may be from another server.
 204 No Content The server has successfully processed the request, but there is no content to return.
 205 Reset Content The server has processed the request successfully, but is not returning any content. Unlike a 204 response this response requires that the client refresh the browser.
 206 Partial Content The requested file wasn’t downloaded entirely. The server is delivering only part of the requested file or page due to a range header (partial request – range of bytes) sent by the client. This is used by tools like wget to enable resuming of interrupted downloads, or split a download into multiple simultaneous streams. This response code is also returned when the user clicks the stop button before a page is loaded.
 207 Multi-Status The message body that follows is an XML message and can contain a number of separate response codes, depending on how many sub-requests were made.
 208 Already Reported The members of a DAV binding have already been enumerated in a previous reply to this request, and are not being included again. See also 102 Processing (WebDAV) above.
 226 IM Used The server has fulfilled a GET request for the file or page, and the response is a representation of the result of one or more instance-manipulations applied to the current instance. A response received with a status code of 226 MAY be used by a cache, in conjunction with a cache entry for the base instance, to create a cache entry for the current instance.

300-399 Client Request Redirected.

 300 Multiple Choices Indicates multiple options for the file or page that the client may follow. The requested address refers to more than one file. Depending on how the server is configured, you get an error or a choice of which page you want. For instance, it could be used to present different format options for video, list files with different extensions, or word sense disambiguation.
 301 Moved Permanently Moved Permanently This and all future requests should be directed to the new location of the file. If the server is set up properly it will automatically redirect the client to the new location of the file.
 302 Found The page has been found but not in the location requested by the client. The page has been moved temporarily, and the new URL is available. You should be sent there by the server.
 303 See Other The response to the request can be found at another URI using a GET method. When received in response to a PUT, it should be assumed that the server has received the data and the redirect should be issued with a separate GET message.
 304 Not Modified Not Modified Indicates the file or page has not been modified since the last requested. This code will be returned if the file has not changed since the date of the last request. Search engine robots may generate a lot of these response codes.
 305 Use Proxy The requested file or page MUST be accessed through the proxy given by the Location field. The Location field gives the URI of the proxy. The recipient is expected to repeat this single request via the proxy. 305 responses MUST only be generated by origin servers. Primarily for security reasons many clients such as Firefox and Internet Explorer do not correctly handle responses with this responses code.
 306 Switch Proxy No longer used. Originally meant “Subsequent requests should use the specified proxy”.
 307 Temporary Redirect In this case, the request should be repeated with another URI however, future requests should still use the original URI.
 308 Permanent Redirect (proposed) The request, and all future requests should be repeated using another URI. Response 307 and response 308 (as proposed) parallel the behaviours of 302 and 301, but do not allow the HTTP method to change. So, for example, submitting a form to a permanently redirected file or page may continue smoothly.

400-499 Client Request Errors.

400 Bad Request There is a syntax error in the clients request and the request has been denied.
401 Unauthorised The requesting header sent by the client did not contain the necessary authentication codes, and the client is denied access.
402 Payment Required Reserved for future use. The original intention was that this code might be used as part of some form of digital cash or micropayment scheme, but that has not happened, and this code is not usually used. As an example of its use, however, Apple’s MobileMe service generates a 402 error if the MobileMe account is delinquent. In addition, YouTube uses this status if a particular IP address has made excessive requests, and requires the person to enter a CAPTCHA.
403 Forbidden The request was a valid request, but the server is refusing to respond to it. Unlike a 401 Unauthorized response, authenticating will make no difference. On servers where authentication is required, this commonly means that the provided credentials were successfully authenticated but that the credentials still do not grant the client permission to access the file or page (e.g. a recognized user attempting to access that is restricted to their access level).
404 Not Found The requested file or page could not be found but may be available again in the future. Possibly because the file or page was deleted, or never existed. Sometimes caused by misspellings of URLs. Subsequent requests by the client are permissible.
405 Method Not Allowed A request was made of a file or page using a request method not supported by that file or page for example using a GET on a form which requires data to be presented via POST, or using PUT on a read-only file or page. The method the client is using to access the file is not allowed.
406 Not Acceptable The requested file or page is only capable of generating content not acceptable according to the Accept headers sent in the request. The requested file exists but cannot be used as the client system doesn’t understand the format the file is configured for.
407 Proxy Authentication Required The requested file or page is only capable of generating content not acceptable according to the Accept headers sent in the request. The requested file exists but cannot be used as the client system doesn’t understand the format the file is configured for.
408 Request Timeout The server timed out waiting for the request. According to W3 HTTP specifications: “The client did not produce a request within the time that the server was prepared to wait. The client MAY repeat the request without modifications at any later time.” Request. The server took longer than its allowed time to process the request. Often caused by heavy net traffic.
 409 Conflict Indicates that the request could not be processed because of a conflict in the request, such as an edit conflict or too many concurrent requests for a single file by the client.
 410 Gone Indicates that the file or page requested is no longer available and will not be available again. This should be used when a file or page has been intentionally removed and the file or page should be purged. Upon receiving a 410 status code, the client should not request the file or page again in the future. Clients such as search engines should remove the file or page from their indices. Most use cases do not require clients and search engines to purge the file or page, and a “404 Not Found” may be used instead.
 411 Length Required The request did not specify the length of its content, which is required by the requested file or page.
 412 Precondition Failed The server does not meet one of the preconditions that the requester put on the request. A certain configuration is required for this file to be delivered, but the client has not set this up.
 413 Request Entity Too Large The request is larger than the server is willing or able to process. The requested file was too big to process.
 414 Request-URI Too Long The URI provided was too long for the server to process. The address the client entered was longer than the server is allowed to process.
 415 Unsupported Media Type The client has a media type which the server does not support. For example, the client attempts to uploads an image as image.xml but the server requires that images use a different format.
 416 Requested Range Not Satisfiable The client has asked for a portion of the file, but the server cannot supply that portion. For example, if the client asked for a part of the file that lies beyond the end of the file.
 417 Expectation Failed The server cannot meet the requirements of the Expect request-header field. The expectation given in an Expect request-header field could not be met by this server, or, if the server is a proxy, the server has unambiguous evidence that the request could not be met by the next-hop server.
 418 I’m a teapot This code was defined in 1998 as one of the traditional IETF April Fools’ jokes, in RFC 2324, Hyper Text Coffee Pot Control Protocol, and is not expected to be implemented by actual HTTP servers.
 420 Enhance Your Calm (Twitter) Not part of the HTTP standard, but returned by the Twitter Search and Trends API when the client is being rate limited. Other services may wish to implement the 429 Too Many Requests response code instead.
 422 Unprocessable Entity (WebDAV; RFC 4918) The request was well-formed but was unable to be followed due to semantic errors or syntax errors.
 423 Locked (WebDAV; RFC 4918) The file or page that the client is trying to accessed is locked by the server.
 424 Failed Dependency (WebDAV; RFC 4918) The request could not be performed on the file or page because the requested action depended on another action and that previous action failed. For example, if a command in a PROPPATCH method fails, then, at minimum, the rest of the commands will also fail with 424 (Failed Dependency).
 425 Unordered Collection (Internet draft) Defined in drafts of “WebDAV Advanced Collections Protocol” not yet in use.
 426 Upgrade Required (RFC 2817) The client should switch to a different protocol such as TLS/1.0.
 428 Precondition Required (RFC 6585) The origin server requires the request to be conditional. Its typical use is to avoid the “lost update” problem, where a client GETs a resource’s state, modifies it, and PUTs it back to the server, when meanwhile a third party has modified the state on the server, leading to a conflict. By requiring requests to be conditional, the server can assure that clients are working with the correct copies.
 429 Too Many Requests (RFC 6585) The user has sent too many requests in a given amount of time. Intended for use with rate limiting schemes.
 431  Request Header Fields Too Large (RFC 6585) The server is unwilling to process the request because either an individual header field, or all the header fields collectively, are too large.
 432 Request Thrashed The server has received too many requests and is currently busy trying to handle them, likely causing other problems. The server’s hosed.
 444 No Response (Nginx) Used in Nginx logs to indicate that the server has returned no information to the client and closed the connection (useful as a deterrent for malware).
 449 Retry With (Microsoft) A Microsoft extension. The request should be retried after performing the appropriate action. Often search-engines or custom applications will ignore required parameters. Where no default action is appropriate, the Aviongoo website sends a “HTTP/1.1 449 Retry with valid parameters: param1, param2, . . .” response. The applications may choose to learn, or not.
 450 Blocked by Windows Parental Controls (Microsoft) A Microsoft extension. This error is given when Windows Parental Controls are turned on and are blocking access to the given webpage.
 451 Unavailable For Legal Reasons (Internet draft) Defined in the internet draft “A New HTTP Status Code for Legally-restricted File or pages”. Intended to be used when file or page access is denied for legal reasons, e.g. censorship or government-mandated blocked access. A reference to the 1953 dystopian novel Fahrenheit 451, where books are outlawed.
 451 Redirect (Microsoft) Used in Exchange ActiveSync if there either is a more efficient server to use or the server can’t access the users’ mailbox.     The client is supposed to re-run the HTTP Autodiscovery protocol to find a better suited server.
 494 Request Header Too Large (Nginx)  Nginx internal code similar to 431 but it was introduced earlier.
 495 Cert Error (Nginx) Nginx internal code used when SSL client certificate error occurred to distinguish it from 4XX in a log and an error page redirection.
 496 No Cert (Nginx) Nginx internal code used when client didn’t provide certificate to distinguish it from 4XX in a log and an error page redirection.
 497 HTTP to HTTPS (Nginx) Nginx internal code used for the plain HTTP requests that are sent to HTTPS port to distinguish it from 4XX in a log and an error page redirection.
 499 Client Closed Request (Nginx) Used in Nginx logs to indicate when the connection has been closed by client while the server is still processing its request, making server unable to send a status code back.

500-599 Server Side Errors.

500 Internal Server Error A generic error message, given when no more specific message is suitable. EG: Internal Server Error. A nasty response that is usually caused by a problem in the Perl code on the server when a CGI program is run.
501 Not Implemented The server either does not recognize the request method, or it lacks the ability to fulfill the request. In either event the request cannot be carried out by the server.
502 Bad Gateway The server was acting as a gateway or proxy and received an invalid response from the upstream server. Or the server you’re trying to reach is sending back errors.
503 Service Unavailable The server is currently unavailable (because it is overloaded or down for maintenance). Generally, this is a temporary state. Temporarily Unavailable the service or file that is being requested is not currently available.
504 Gateway Timeout The server was acting as a gateway or proxy and did not receive a timely response from the upstream server. The gateway has timed out. Like the 408 timeout error, but this one occurs at the gateway of the server.
505 HTTP Version Not Supported The server does not support the HTTP protocol version used in the request. The HTTP protocol the client is asking for is not supported.
506 Variant Also Negotiates (RFC 2295) Transparent content negotiation for the request results in a circular reference. The 506 status code indicates that the server has an internal configuration error: the chosen variant resource is configured to engage in transparent content negotiation itself, and is therefore not a proper end point in the negotiation process. This proses could cause an infinite loop if the server does not stop it.
507 Insufficient Storage (WebDAV; RFC 4918) The server is unable to store the representation needed to complete the request.
508 Loop Detected (WebDAV; RFC 5842) The server detected an infinite loop while processing the request (sent in lieu of 208).
509 Bandwidth Limit Exceeded (Apache bw/limited extension) This status code, while used by many servers, is not specified in any RFCs.
510 Not Extended (RFC 2774) Further extensions to the request are required for the server to fulfill it.
511 Network Authentication Required (RFC 6585) The client needs to authenticate to gain network access. Intended for use by intercepting proxies used to control access to the network (e.g. “captive portals” used to require agreement to Terms of Service before granting full Internet access via a Wi-Fi hotspot).
598 Network read timeout error (Unknown) This status code is not specified in any RFCs, but is used by Microsoft Corp. HTTP proxies to signal a network read timeout behind the proxy to a client in front of the proxy.
599 Network connect timeout error (Unknown) This status code is not specified in any RFCs, but is used by Microsoft Corp. HTTP proxies to signal a network connect timeout behind the proxy to a client in front of the proxy.

 

How to Fix “mod_fcgid: HTTP request length 131619 (so far) exceeds MaxRequestLen (131072)” error on Ubuntu 12.04 LTS (Precise Pangolin) Linux.

If you are trying to upload a file through WordPress or another content system to your web site and your website is running on Apache2/PHP5/mod_fcgid, and your browser displays the error:

Browser error
Internal server error

and in your Apaches error log you see something like

Apaches error log
[Wed Nov 07 13:12:45 2012] [warn] [client 192.168.XXX.XXX] mod_fcgid: HTTP request length 131619 (so far) exceeds MaxRequestLen (131072), referer: …

This error is because the default value of FcgidMaxRequestLen is 131072 which is very small see Apache Module mod_fcgid for more information.

First check in your php.ini that upload_max_filesize has a big enough value for your upload. The default in php.ini is upload_max_filesize = 2M which stands for 2 megabytes (MB). If it is not set, set it to

Set php.ini
upload_max_filesize = 2M

Next edit your file /etc/apache2/mods-available/fcgid.conf, or if you have Virtualmin installed go to Webmin> Servers> Apache Webserver> and select the Global configuration tab then click Edit Config Files. Now select /etc/apache2/mods-available/fcgid.conf in the dropdown list then click the Edit Directives in File button. Either way you should see something like this.

Current directives
<IfModule mod_fcgid.c>
AddHandler    fcgid-script .fcgi
FcgidConnectTimeout 20
</IfModule>

You now want to add the FcgidMaxRequestLen 2097152 directive to make the file look like this. NOTE: FcgidMaxRequestLen 2097152 = 2MB.

Edit directive
<IfModule mod_fcgid.c>
AddHandler    fcgid-script .fcgi
FcgidConnectTimeout 20
FcgidMaxRequestLen 2097152
</IfModule>

Now save the changes and restart Apache with

Restart Apache
/etc/init.d/apache2 restart

Or if working in Virtualmin there is a Stop Apache link in the top right hand corner of your screen click it and when Apache has stoped the link will change to a Start Apache link. Click it also. And that is it you will now be able to upload your 2MB files.