Technical Support

How to Set Up a Cron Job in Plesk

150 150 rhecht

This tutorial will show you how to setup a cron job using Plesk 10 on a Linux VPS. Like cPanel, Plesk is a widely available hosting control panel, providing a GUI through which users can configure their hosting.

Just to comment, this post has saved me from running around in circles, thanks to Compare Hosting.

What is a cron job?

A cron job, also referred to as a ‘scheduled task’, is simply a command (e.g. go to a particular URL) which is executed at a specified time.

You may, for example, setup a cron job to access the URL of a PHP file (e.g. http://www.example.com/test.php) once every day. Accessing that PHP file could in turn run whatever code the file contained, and that code could then in turn initiate other tasks such as creating a database backup or clearing log files.

In short, cron jobs can be a useful way of performing, or initiating, (recurring) tasks.

So, let’s get started…

1. Log into Plesk and click the ‘Subscriptions’ link

Logging into Plesk will bring you to your Plesk panel’s home page.

We first need to select which VPS subscription we want to associate the cron job with. So, click the ‘Subscriptions’ link in the left sidebar

Plesk 10 home

2. Select the relevant control panel

Click the ‘Control Panel’ link for the subscription you want to associate the cron job with. In this example we only have one subscription (‘example.com’, which is subscribed to our ‘Unlimited’ plan) so we click its ‘Control Panel’ link

Plesk subscriptions

3. Navigate to the ‘Scheduled Tasks’ page

Clicking the ‘Control Panel’ link opens our chosen subscription’s control panel home page. Cron jobs are categorised under ‘Websites & Domains’ so click the ‘Websites & Domains’ menu tab

Plesk control panel home

and in the ‘Websites & Domains’ section scroll down and click ‘Show Advanced Operations’

Plesk control panel websites and domains

Now click ‘Scheduled Tasks’ (‘Scheduled tasks’ is how Plesk generally refers to cron jobs)

Plesk control panel advanced operations

This opens the ‘System Users’ page. Click on the name of the subscription’s system user

Plesk control panel system users

4. Schedule a new task

On the ‘Scheduled Tasks’ page click ‘Schedule New Task’

Plesk - Cron - Schedule New Task

which will load the ‘Schedule a Task’ form (in this screenshot we’ve already filled the form fields)

Plesk - Cron - Schedule A Task

Our cron job is switched on and will fire on the fifteenth minute (15) of the third hour (3) of every day of the month (*) of every month (*) of every day of the week (*) and execute the command

/usr/bin/wget -O - -q http://www.example.com/test.php

Or, to put it more clearly, our cron job will fire every day at 3.15am and hit the URL

http://www.example.com/test.php

Cron job configuration

There are three key parts to our cron job configuration:

  • Is the cron job switched on or not? – i.e. should it fire or not?

    We want our cron job to fire, so we ensure the ‘Switched on’ checkbox is checked.

  • What time should the cron job fire?

    Times can be set for each field by entering numeric values, or in the case of ‘Month’ and ‘Day of the week’ by selecting from a dropdown.

    The basic values which can be entered are:

    Minute0 to 59
    Hour0 to 23
    Day of the month1 to 31
    Month1 to 12, or choose from the dropdown
    Day of the week0 to 6 (0 for Sunday), or choose from the dropdown

    Further manipulation of cron times can be achieved with the asterisk (*):

    • On its own, an asterisk means ‘every’. In our example we use an asterisk to represent every day of the month, every month, and every day of the week
    • Combining an asterisk with a forward slash and a number means ‘every x number of’. So, if we instead wanted our cron job to fire every three hours we’d replace the ‘3’ in the ‘Hour’ field with ‘*/3’

    Plesk - Cron every three hours

    Note: Numeric values, forward slashes, and asterisks will probably be sufficient for timing the majority of cron jobs, however cron expressions can be further extended using other special characters (comma (,), hyphen (-), question mark (?), L, W, and pound (#)).

  • What command should the cron job execute?

    We’re using the command /usr/bin/wget -O - -q http://www.example.com/test.php

    This command is made up of three parts:

    • /usr/bin/wget

      Firstly, we specify the path to the utility we want to use to execute the command. Here we’re using a Unix utility called ‘Wget’, which is located on our server at ‘/usr/bin/wget’.

      Note: alternative Unix utilities which could be used include lynx and curl.

    • -O - -q

      Secondly, we specify what to do with any output generated as a result of our command executing.

      All we want to do is retrieve the URL http://www.example.com/test.php, so we set wget options which will discard any output and prevent cron’s default behavior of sending an email notification to the user executing the command (i.e. us):

      -O -

      takes any output (‘-O‘) and sends it to stdout (‘-‘)

      -q

      turns off any output. This means both that the output we’ve sent to stdout is effectively discarded, and that cron will not send us email

    • http://www.example.com/test.php

      Lastly, we specify the URL which the command should retrieve.

Create it

Click the ‘OK’ button. The cron job will be created and a confirmation message shown

Plesk - Cron - New Task Scheduled

Our cron job is now listed under ‘Scheduled Tasks’ and ready to go.

Want/How to Hack WordPress? Check Out WPScan

150 150 rhecht

I’ve been looking for ways to ethically hack WordPress as it’s not the easiest platform to hack. I recently came across a free tool called WPScan, courtesy of EthicalHack3r. This tool is built for Linux and essentially looks for any passwords in a given list. Originally called “WordPress Brute Force Tool,” this is a great tool to use for consulting purposes.

Take note that by default it can provide you a list of usernames per site as well as plugins/themes being used, which is a good start. However, you would need to provide a password list file for WPScan to read from. WPScan doesn’t just extract passwords.

The purpose of this is to advise someone to make his/her passwords and system secure as it can easily be compromised.

Video of WPScan in Action

Video of the first PoC

In case the files aren’t available, here’s WPScan directly downloadable from this site.

Tip: If on Ubuntu, you cannot install “typhoeus,” a pre-requisite to WPScan because a file “mkmf” is not found, you need to uninstall/reinstall ruby 1.8 dev:

sudo apt-get remove ruby1.8-dev
sudo apt-get install ruby1.8-dev

Finally, to prevent anyone from continuously hacking your WordPress site, here’s a plugin to “lock down” someone trying to “brute force” his way in by tracking the IP address it’s coming from: http://www.bad-neighborhood.com/login-lockdown.html


Here are some additional resources on WordPress hacking:

GMail’s new interface stinks!

150 150 rhecht

Recently, when using GMail, Google’s email service, I noticed that they were switching to a new graphical user interface that was supposed to make up for the old interface’s slow page load time. The result in my opinion is a disaster.

To get all the menus, one needs to hover ones mouse over certain icons. The plain white and red interface looks very discomforting. The usage of Frames to allow for partial page load cheapens the experience for me.

And this is the new interface Google is rolling out?!? Please! Who else uses GMail and tried out the new interface? I’d like to hear some other opinions other than my own.

Rent a CMS Powered Website for Cheap With Website Tenants

150 150 rhecht

Oh, the drama. The headache. The way that a website project that starts off so well goes to hell in a flash because the consultant you hired half-finished your website and never returned. Once the consultant does get back to you, he demands more money out of you that you simply don’t have, since you’re paying for everything else on top. Sounds familiar?

Well, worry no more! Website Tenants does all the hard work for you! Website Tenants provides low-cost CMS powered website solutions for your small business, non-profit, or hobby site. They provide full email support, custom design, and plugins support.

Website Tenants provides 30 free design themes to choose from, as well as a suite of default plugins to make your website configurable and user-friendly. It brings users into the user-friendly and intuitive WordPress Content Management system to have them build their own SEO-friendly websites within minutes. Everything is scalable and easy to use.

Want to learn more? Visit Website Tenants today!

WordPress – Where on Earth is my Excerpt Box?

150 150 rhecht

Many people that upgrade to WordPress 3.0+ flip out where on earth the Excerpt box is for fancy posts. No worries! Here’s the solution, thanks to Ottobox:

For some reason in the new versions of WordPress the is disabled on the screen by default. All you need to do is to go to “Screen Options,” then enable “Excerpt!”

No fancy plugins, no custom coding, no downgrading. How simple was that?

4 Different “Web Guy” Roles

150 150 rhecht

What is a “web guy?” This is a loaded question that I get all-too-many times.

After hearing other small business owners’ frustrations about one designer not knowing Javascript for website purposes, and a web programmer not knowing how to use Flash, I decided that it was necessary to lay out some different “web guy” roles so one knows what to realistically expect when hiring “the right person” for the job. No one in this world knows everything, get used to it.

1.       Graphic Designer

  • Knows Adobe Photoshop, InDesign and Flash cold.
  • Focus is more on Print than on Web.
  • Very basic level of HTML and CSS.

2.       Web Designer

  • Knows Adobe Photoshop, InDesign and Flash enough to create a decent looking website on the client side.
  • Knows Javascript and CSS in addition to advanced HTML knowledge.

3.       Web Programmer

  • Focuses on server-side and “back-end” coding with database knowledge.
  • Knows PHP/ASP/ASP.net/Java (not Javascript), with database knowledge like MySQL, SQL Server, and/or Oracle.
  • The web programmer generally doesn’t know, nor cares to know, Flash, and has a basic understanding of Photoshop.

4.       UI (User Interface – for Web Applications) Web Developer

  • Can create themes and/or plugins for web applications like WordPress, Joomla, and Magento.
  • Can create themes for frameworks like CodeIgniter and CakePHP.
  • A significant amount of knowledge of either PHP and/or ASP.net and the applications’ classes and functions is essential.

I feel that it’s necessary to define some of these roles since I’m constantly asked why someone knows this and not that. There are many more roles, but this is for starters.help.

Why Do I Give Away Free Information?

150 150 rhecht

Some people have asked me why I give away long-researched IT advice for free. I have a few reasons:

  1. No Trade Secrets – I don’t believe in “trade secrets” or “proprietary information.” I believe in the spreading of information so that the industry can become more standardized.
  2. Contract offers – Many people who have read my posts have said to themselves, “Hey, this guy seems to know what he’s talking about. Let me hire him do do Project X for me.”

    Also, because I personally, at this time, don’t own personal software products for sale, I can write objective techniques and product reviews. This also establishes the element of trust with potential clients.

  3. Free marketing – Studies have shown that when in doubt, people Google the answers. I therefore title my posts and URLs in the form of phrases and questions people will type in by imaging myself as one of them. By having my website ranked for commonly asked questions, people get to my site and I don’t need to pay tons of money for marketing. Google does a nice job of that already.
  4. Grateful people – Some people are grateful and will donate once seeing that the information I posted has saved people from hours of research which I already performed, then presented on a silver platter. Usually one visitor in a thousand is like that, I find.
  5. Fame – I like getting my word out and basking in the glory. I’ll admit it. I’m human.

Google Chrome Chromebooks – Ahhh!!!!!

150 150 rhecht

Chromebooks. The one word that made me curious a couple of years ago. Finally, a Linux system by Google that has the latest security features and search optimization techniques on a desktop! Not only that, but the amount of software overhead would be minimal, and you would install only what you need! What a novel concept!

But no, it’s not that at all. The entire operating system simply consists of a browser, and that’s pretty much it. Everything is in “the cloud,” they say. You can boot up and immediately connect to the internet. To that I say “bah.”

First of all, what is the cloud? The cloud simply is the Internet. In my old computer and data communications university classes they diagrammed the world wide web as this cloud for illustration purposes. That what it is in essence.

Now, the concept of leveraging work on “the cloud” is to work on internet applications rather than desktop ones, such as Google docs and Picasa etc. in order to access your information everywhere. This is convenient when you have that report saved on your machine and forgot to email it or save it to your flash drive for printing. However, there are drawbacks.

One is the most obvious: security. What do you think makes Google Google and Facebook Facebook? Believe me, it’s not their pretty faces. It’s the fact that they have TONS of data stored from billions of users worldwide. They can then use this information for themselves, or divulge it to the government should they be asked to. Facebook recently had to do this, for example. Also, it disturbs me when your Facebook account is hacked, you change your password, and then, when out of habit you enter your old password, Facebook tells you the date and time you changed your password and asks you if you did so. Why should they not only have this information, but flaunt it? I firmly believe that no one should be in charge of ones data and pictures other than you.

Another drawback is, what happens when you enter a non-wireless network? I know, I know. In today’s day in age this is almost impossible, but it exists. On one hand, Chromebooks allow you to download whatever work you have online locally, but what if you forget to download that one paper on your machine and need to print it out within the next 5 minutes before a big presentation? At that point you’re pretty much screwed.

Finally, the pricing. Why should I need to pay the rough equivalent amount for a Google Chromebook as a netbook with a desktop when, not only doesn’t it have a real Operating System, but it uses a browser that’s free to download on Windows, Macs, and Linux machines? What’s up with that?

Groupon Clone Script Software Reviews

150 150 rhecht

Note: Due to the age of this post as well as the evolution of the Groupon clone/aggregator system, RJH Solutions will no longer offer support for these systems. The “writing on the wall” was seen when Groupon’s CEO was fired early 2013. In the meantime, please continue browsing the rest of the site. -Rafi

Groupon has been incredibly successful as a business model, as it had been offered a significant amount of money by Google and they turned them down! An Israeli company, Grouper, was offered something like $15 million. As a result, many niche groupon clones have emerged.

Most of these clones use a piece of software from off-shore locations like India and China. This post will cut to the bottom line about some of the most popular softwares out there.

This post covers Contus’ GroupClone, AlstraSoft, Agriya, Couponic, GetSocio, and GroupScript.net. This also addresses what I find as limitations with each script, a buyer beware disclaimer, and my experience with Off-Shore companies in general.

Contus GroupClone.net

Contus is an India-based company that has built it’s software on Magento’s shopping cart platform. Since it’s based on a well-established shopping cart, it’s incredibly stable and secure. Not only that, but if support cannot be found at the Contus website, some Google searching on Magento forums will generally yield satisfactory results. Not to mention that there are more plugins for Magento than any other shopping cart.

The down sides are that a) it’s fairly difficult to install straight out-of-the-box (ionCube needs to be installed, b) it requires a minimum version of PHP 5.2 installed, and c) it, like Magento, runs slow on shared hosts and requires a dedicated host to load normally. Also, GroupClone is not a plugin. Rather, it’s a mutation of Magento. Once installed, though, it runs well.

***UPDATE***

After working on a few Groupon Clone websites with Contus GroupClone installations, I found out that this software too has its share of bugs. I also found that, while they usually are very responsive in their ticketing system to simple changes and requests, the larger problems will usually receive responses like “we are looking into this (a not getting back),” “That feature (bug fix) is not available in our installation. Please contact business development for customization changes,” or “look at our forums.”

Bottom line, I fully support the script as it’s built on Magento, but for “full” Magento support, it’s recommended to contact a more local agency specializing in Magento for many obvious reasons. Love the script, don’t so-much-like the support or various bugs found within.

Price: $500 plus $400 custom home page design.

Note: there’s an alternate website, called bestgrouponclone.com, that markets the same software at $100 less. Warning: this site is a scam as a certain Javad Farooq purchased the script and he had essentially hacked the script to sell for cheaper. You get no support, and he takes “Western Union” or “Moneygram,” both red flags.

AlstraSoft

AlstraSoft is a China-based company that produces another poor-man’s GroupClone software (example: dealdipp.com). It’s demo presentation is impressive, however, there are many bugs. Included are:

  • Adding cities is a pain and generally ineffective.
  • WYSIWYG editor doesn’t allow for plain text.
  • Cities are difficult to add when using a different character set.
  • When adding a website, you need to type in “http://” before the website, otherwise it doesn’t work.

Price: $178, but a 15% discount coupon code is available by typing in “AS15.”

Agriya

Agriya is an India-based company. It’s groupon clone script looks clean from the front-end, yet the back-end is cumbersome. Problems include sending coupons to everyone.

The script is built with the CakePHP framework.

Price: Varies. Plus, they charge “through the roof” for every little change.

Couponic

Couponic is a Russian-based company that has a nice front-end, but a less-than-intuitive back-end. This script is built on the “Yii” framework (http://www.yiiframework.com/), which is not the most commonly used.

Price: $200 base price, $35 for each add-on.

GetSocio

GetSocio is a script where you let them do all the work and you’re essentially renting Groupon services from them. Short-term it makes sense, but not long term.

***Update:***

I recently was notified that a number of people have utilized GetSocio’s services, as it’s already hosted and quick to set up. The concept behind it is that, the more you grow, the more they should grow as well. Makes sense. While I personally am an advocate of one owning ones code, others apparently don’t care just so long as they get a site up and running quickly. And, it’s reported to be stable, so I have nothing negative to say about their functionality.

Price: Rental

Subscription fee: $15/month (first month is free)
Transaction fee: 5% of buyer payments.

GroupScript.net

GroupScript is a Bulgaria-based company that sells a groupon clone. The back-end interface looks simple and intuitive like WordPress, but when digging deeper one sees a lot of technical limitations and over-simplicity. The front-end drop-down cities menu looks amateurish compared to its competitors.

Price: $400

Limitations with each script

One limitation I have seen is that, once you buy someone else’s script, you’re at the mercy of these off-shore developers.

Another one that I’ve seen is that each of these scripts are limited to only one currency. Should you want to expand globally and use different currencies, you’re stuck and you need to basically re-create the script on a new domain/subdomain, which is a pain.

Also, should you want to have multiple language versions of a site each of these scripts out-of-the-box don’t support that.

Finally, save for Contus which is based on Magento’s shopping cart, your choice of payment processors is limited. You can add more processors at an additional fee.

Caveat Emptor (Buyer Beware)

Buyer Beware: one of the most common trends I’ve seen with each script is that, once you pay for a script, you can’t get your money back. Their reasoning is logical: one you downloaded the code you can use it or redistribute it without the seller’s consent. So if you’re unhappy with the script, you’re stuck.

Off-Shore Experience in General

In general, my experience with off-shore companies has been dual-sided. On one hand you will pay a fraction of what you would pay in the United States or Canada, but at a price. For one thing, the hours difference is huge. To call India during support hours, for example, you need to be up from 1 AM to 9 AM in EST time zone. That’s a big issue when you need to get up for work the next day.

Another is that, while people in India and China know English, they don’t speak the same language. English is not their first language, and there can be serious miscommunication. You generally need to illustrate your problems with screenshots describing any issues you have.

The best solution is custom. Build one from scratch, utilize a framework or go with a CMS like Drupal which can be customized for about anything.
Hope this helps.

 

 

***UPDATE***

Read the next section which covers Wroupon, Daily Deal Builder, and EponWare’s EponGroup.

We now build PInterest clones! Click Here for my PInterest Script Clone Reviews.

Contus Groupon Clone: How to install Contus’ GroupClone Magento-Based software

150 150 rhecht

Note: Due to the age of this post as well as the evolution of the Groupon clone/aggregator system, RJH Solutions will no longer offer support for these systems. The “writing on the wall” was seen when Groupon’s CEO was fired early 2013. In the meantime, please continue browsing the rest of the site. -Rafi


We are all aware about how hot the Groupon industry is today, and how everyone is trying to get in on it. In looking for certain scripts I have found that GroupClone by Contus is, while one of the most difficult to install out of the box, one of the most powerful in my opinion since it’s based on Magento’s shopping cart.

That said, installing it again is, in short, difficult. The following install post unfortunately doesn’t do a very good job of explaining all the steps. This post will post all the correct steps in detail so that, like a recipe, albeit a complicated one, all you will need to do is follow it and presto! A Groupon Clone built on Magento!

Here are the modified installation instructions (for GoDaddy’s Shared hosting):

Pre-Requisites

  1. PHP 5.2 AND OVER (if you have a virtual machine running an earlier version of Linux LAMP, like “Grandma’s LAMP,” then it won’t work since Grandma’s LAMP for example only runs PHP 5.1.)
  2. MySQL 5+
  3. PHPMyAdmin or HeidiSQL for the database import.
  4. Strongly Recommended: Linux Hosting – NOT Windows Hosting. If you have Windows hosting that’s okay, but Linux makes it go a LOT smoother!

Download and Unzip

  1. Download the groupclone package.
  2. Unzip the files in the folder you want to install it on (root folder is misleading, you can do a subfolder if the domain name points to that subfolder in your hosting, or if you want to test the site out prior to launch).

Database Installation

  1. In the groupclone.sql file under db.zip, open it up, CTRL+F the phrase “config_data,” and change the variables in “web/unsecure/base_url” and “web/secure/base_url” from “http://localhost/groupclone” to “http://yourdomain.com.”
  2. Install the database using PHPMyAdmin or HeidiSQL with your updated SQL file.
  3. If you didn’t change the secure base URL and unsecure base URL, do it now! Go to the table “magentocore_config_data” and it should be config ID’s 2 and 3.

Connecting the website to the database

Once that’s done, you need to connect the website to the database. For that go to the following:

” /app/etc/local.xml” and give your database details

Server hostname
user name
password
database name

in the below place of local .xml file

ionCube

  1. You need to install ioncube now.
  2. Open php.ini (or php5.ini if on GoDaddy) file in the root directory.
  3. Find this line “ zend.ze1_compatibility_mode = off ”.
  4. [Zend]
  5. zend_extension = /httpdocs/ioncube/ioncube_loader_lin_5.2.so
  6. paste these lines below “zend.ze1_compatibility_mode = off “
  7. If you’re on a dedicated host, you may need to consult a Linux Server professional to install ionCube, as this saves a lot of headache.

Finding Absolute Path

  1. To find the absolute path, run phpinfo.php like this, http://www.domain.comphpinfo.php. You can find an absolute path in the list.
  2. Open_basedir | /var/www/vhosts/groupclone.net/httpdocs:/tmp.
  3. Here “/var/www/vhosts/groupclone.net/httpdocs:/tmp” is an absolute path. (sometimes it reads “empty”)

If the Absolute Path Doesn’t Appear,

  1. What you need to do then, if you set up the database configuration completely, is to go onto the site and get the following error message: “Site error: the file /app/code/core/Mage/Page/Block/Html/Head.php requires the ionCube PHP Loader ioncube_loader_lin_5.2.so to be installed by the site administrator.”
  2. That absolute path is what you need.

Placing the absolute path in php.ini (or php5.ini)

  1. In php.ini (or php5.ini), find the absolute path in this screen. And replace the path as given below,
  2. [Zend]
  3. zend_extension = /httpdocs/ioncube/ioncube_loader_lin_5.2.so
  4. To check if the ioncube installed properly use this link, http://www.domain.comioncubeioncube-loader-helper.php
  5. *****SUPER IMPORTANT***** With hosting services like GoDaddy, with their PHP 5 hosting they include a php.ini file instead of a php5.ini file. Why that is the case is beyond me. You need to RENAME (not even keeping a copy of php.ini) php.ini to php5.ini. The same applies with Contus’ software. Rename php.ini there to php5.ini. Otherwise the ionCube installation won’t work and you will be stuck!

Gaining Entry into the Admin System

  1. For some reason here there is no way to instantly set the admin username/password. What you need to do is as follows:
  2. At the table “magentoadmin_user,” you need to change the password in order to get in. Do the following:
  3. Enter the query “UPDATE magentoadmin_user SET password=CONCAT(MD5(‘qXpassword’), ‘:qX’) WHERE username=’admin'” where “password” is your password.
  4. Once that’s done, you can enter the admin system under sitename.com/admin and modify other information, including adding/removing admins.

Provide License Key

  1. Then you need provide the license key, which is very important.
  2. Without License Key, site will not load the deals, Goto: Admin -> System -> Configuration ->LicenseKey(Configuration) -> License Config, Where you can enter the valid License Key for that particular domain.

What if you’re running Contus’ GroupClone on a local Windows machine for testing?

If you are going to test the file locally, you need to use this License key for localhost.com
License Key : 3YY2YFQ3O2O3OD4PV34VQ2OPQXVPXOO1NV1FX5Q1

To change localhost to localhost.com,

Look in your hosts file (usually located under C:WindowsSystem32driversetc).
Look for the line:

127.0.0.1 localhost

Change this to:

127.0.0.1 http://www.localhost.com

Obtaining a License Key

  1. License Key will work only for that particular domain.
  2. You can get the License Key for the domain you are going to install from us , after the successfull payment.
  3. And you have done it now.

(Contact their ticket support team and get the license key. You have to confirm your domain and the license key will not be changed once you confirm your domain & get from their team)

 

***UPDATE***

We now build PInterest clones! Click Here for my PInterest Script Clone Reviews.