Upload error with cPanel and Cloudflare

When trying to upload a large file (archive) through File Manager in cPanel I came across this strange error:

An error occurred. Your account may be over its quota or you attempted to upload a folder.

Why strange ? Because everything in this account is set to unlimited. Just to be sure I double checked. Even the FTP user quota.

The domain was set to use Cloudflare and it blocked the upload going through.

The solution: disable caching in the DNS tab on Cloudflare, so it is set to “DNS only”.

recover from failed mysql upgrade (5.6 to 5.7)

i updated mysql using the tool provided in WHM. all seemed to run smoothly until it tried to restart mysql and i got this message:

tried to reboot and restart services (old windows habits 🙂 ) and of course it didn’t work.

so i opened up a ssh connection, deleted all content from /etc/my.cnf and replaced it with:

restarted mysql again (with success) and then deleted once again all content from /etc/my.cnf and restarted mysql

went back to whm – Upgrade MySQL and clicked on Resume Upgrade button

just to be sure i went back to ssh and ran

all good after that 😀

contributor/ guest/ partner/ syndicated posts and spammy links

directly from google webmaster central blog:

what does violate Google’s guidelines on link schemes is when the main intent is to build links in a large-scale way back to the author’s site. Below are factors that, when taken to an extreme, can indicate when an article is in violation of these guidelines:
* Stuffing keyword-rich links to your site in your articles
* Having the articles published across many different sites; alternatively, having a large number of articles on a few large, different sites
* Using or hiring article writers that aren’t knowledgeable about the topics they’re writing on
* Using the same or similar content across these articles; alternatively, duplicating the full content of articles found on your own site (in which case use of rel=”canonical”, in addition to rel=”nofollow”, is advised)

 

Sites accepting and publishing such articles should carefully vet them, asking questions like: Do I know this person? Does this person’s message fit with my site’s audience? Does the article contain useful content? If there are links of questionable intent in the article, has the author used rel=”nofollow” on them?

 

kk Star Ratings WordPress plugin customization

i needed a voting system for a client’s wordpress website so i installed this plugin: kk Star Ratings

the standard version is great but has very few options. the quickest way to achieve what the client wanted was to customize the plugin a little bit

show voting only for logged in users

i had to replace the voting box with a message inviting the user to login/signup

i edited the file /wp-content/plugins/kk-star-ratings/index.php

search for this line:

and replace it with:

of course you can include HTML code between ‘ ‘ to further edit the message: include a link to login page, change the appearance (float, background)

hide voting on some posts

with kk Star Ratings you can choose where you want the ratings to be placed (homepage, archives, posts, pages, categories) but you can’t hide it from some posts (custom posts in my case)

so i edited the file /wp-content/plugins/kk-star-ratings/index.php

search for this line:

and replace it with:

where 101,151,1001 from the array are the ID’s of the posts

embed flash in HTML / AC_RunActiveContent

in order to embed a flash (swf) animation in a HTML page i use AC_RunActiveContent.js

you can download it from here (it’s a very old file that i’ve been using for years – not sure where i got it from and where to get a new version from 😀 – didn’t need one so far). just right-click on the link and choose save link as (chrome)

upload it to your server

in the head section include this line:

then include this piece of code where you want to show the animation

  • filename is name of the animation file without the .swf extension; you need to change this in 3 places
  • path_to is the path to the file relative to public_html
  • the width and the height are the numbers right after ‘width’ and ‘height’

hide an empty div in google DFP

whenever a Google DFP (DoubleClick for Publishers) ad doesn’t deliver a banner (i.e. not enough inventory, not in the geographic location that you set up) you’ll have an empty blank space instead

to avoid this you’ll have to make a little change in the code

in the first piece of code, the one placed in head, insert this line

before

open and read .p7s files in ubuntu linux

did you receive a doc or docx file with an extra .p7s extension ? it’s a digitally signed document
in order to read it in ubuntu you’ll have to transform it back to the regular .doc or .docx file

here’s how to do this:

  • download the file
  • open a terminal (CTRL+ALT+t)
  • use cd to get to the folder where you downloaded the file

  • copy this line in the terminal (mouse right click) and modify the .p7s file name

now you have the file without the .p7s extension in the same folder you have the original file

include twitter tweets in wordpress

embed a single tweet in an article

just copy / paste the tweet url in the editor and the wordpress will do the rest

it will look like this:

embed a twitter timeline in an article

go to the profile and locate the settings icon (more user actions) and click on the “Embed this Profile” option – like this:

twitter-embed-profile-timeline-1

on this new page you can make a few changes if you want to and click on the Create widget button

copy/paste the code in the wordpress editor – use the text tab. it should look like this: