Personal, Tips & Trick

Three days ago arvixe telling my site using to much their cpu usage. They complaint about wp-cron.php and index.php process which I believe it was looping and won’t stop in background. wp-cron is just like cron job in normal condition. The crazy thing everyone doesn’t know is, it’s loading each time visitors coming to their site. I don’t know why wordpress don’t fix it or at least give options to run it each time frame.

For a site using wordpress and have a lot articles/pages the optimization for it is just disable wp-cron, another option is disable wp-cron and running cron job from cpanel which can be setup in time frame.

You will lose schedulle post feature but it’s better than get suspended right? You still can run cron in time frame you setup from cron job panel than using crazy method like spawn it each time visitors coming to your site. Let’s do this thing, it’s very easy…

  1. Open your wp-config.php and put this after the <?php. define(‘DISABLE_WP_CRON’, true);
  2. Open wp-includes folder and find a file with name cron.php
  3. Find string “function wp_cron() {
  4. Replace all function with code below :
    function wp_cron()
    {// Prevent infinite loops caused by lack of wp-cron.php
    if ( strpos($_SERVER['REQUEST_URI'], ‘/wp-cron.php’) !== false || ( defined(‘DISABLE_WP_CRON’) && DISABLE_WP_CRON ) )
    return;if ( false === $crons = _get_cron_array() )
    return;$local_time = time();
    $keys = array_keys( $crons );
    if ( isset($keys[0]) && $keys[0] > $local_time )
    return;$schedules = wp_get_schedules();
    foreach ( $crons as $timestamp => $cronhooks ) {
    if ( $timestamp > $local_time ) break;
    foreach ( (array) $cronhooks as $hook => $args ) {
    if ( isset($schedules[$hook]['callback']) && !call_user_func( $schedules[$hook]['callback'] ) )
    continue;
    // spawn_cron( $local_time );
    break 2;
    }
    }
    }
  5. Save it/replace cron.php file with the new edited cron.php
  6. Done

After doing this your wp-cron has been disabled and never ever run each time a visitors coming to your site. But you will lose schedulle post, to fix this problem open your hosting control panel and set cron job from there to run your wp-cron.php. You can set it run each 24 hours or in time frame you need.

After doing this small optimization arvixe not complaint to me. It’s mean this is maybe the big issue for worpdress to update their cron setting.

That’s a share for today, have a great day everyone, and Happy New Year! :D

    Digg Del.icio.us StumbleUpon Reddit Twitter RSS
Miscellaneous, Personal, Short Reviews

After searching on hosting review I found out most people like scalahosting and recommended them as good hosting provider. I try using their hosting service with start plan, everything was fine until one day… The problem is still not coming after I add my domain mp3zap.net on there. In next 24 hour scalahosting email me and tell me this site has reach limit they provided in their hosting service.

They asking me to upgrade but not using shared hosting I just can use VPS/DS for this site. I think it’s only marketing strategy. I believe once host company email and complain about abuse on their server I won’t use them anymore. Enough! I’m back to HostMonster again my lovely host provider and they not complaint to me after I add this site to my account.

In short review ScalaHosting is good hosting for small site, budget site, but not great for development site. Mp3zap only received around 300 unique visitors daily but scala claim script consume more than 10% cpu resource. I buy this script from someone and everything inside has decrypted using ioncube, I can’t do optimization. The good side for scalahosting, they not disable all my site instanlty but they waiting for my action in next 24 hours I really appreciate that.

So If you’re looking for great shared hosting I recommended HostMonster and HostGator, Arvixe also fine but not great but they still can be negotiated if there is problem. ScalaHosting, Hawkhost, JustHost is limited hosting, they won’t allow traffic site on their server.

    Digg Del.icio.us StumbleUpon Reddit Twitter RSS
Computer And Internet, Personal, Tips & Trick

If you are using wordpress or other cms and have a lot of data in you sql, your site usually will unavailable with common message database error. What actually error on your database? Nothing, this is all about query limitation on your hosting. Your blog will grown in time, say in the last months you got 10,000 readers and in the next month you got 1,000,000 readers. When people access your site it’s continuously reading data again from your database, when it to much some hosting will stop it to executed. This is not good for SEO because your potential readers will gone (robots also can’t indexing full your site). Usually bad hosting will ask you to upgrade into vps or dedicated server. Everyone know it, there is no free lunch, you will have to pay more and more, if you got good revenue maybe it’s fine but how if not?

In this short articles I will give some tips and trick to fix common wordpress database problem. When you’re planning to get a lot of visitors to your site you better looking for a ways to optimize your sql query. There is one options for this, using DB cache so when people coming to your site request the articles server don’t need to re-query database again. You just need to sacrifice some memory and space which may be better in result if you’re not planning to go for vps or dedicated at the moment.

How to do this? Search on google is good idea, I found many articles for database caching last night, this is the best one. For wordpress users there is a simple solution. Just get and install DB-CACHE-RELOADED plugin, setting it as you need, example you want cache stays for 24 hours or maybe just 10 minutes.

In this sample I set 180 minutes (3 hours). Cache will stay for 3 hours and then when it expired all cache files will deleted from cache folder and generated new cache. The result after using this plugin is better than not using it. When I tested it I have never seen wordpress database error again (of course because when someone read articles again server doesn’t need to re-read again from the sql). If you like this plugin you can spare some money for Ivan for his great works :D

The effect?? I’m not sure but in the past when I’m using similar plugin like this I have error on feed, when this happen disable the plugin clear all the cache files and reactivate plugin again. But if not then you don’t need to do anything just keep monitors your site availability and traffic. Before I close this articles I want to tell you, you can also combine this plugin with auto cron job to repair and optimize your mysql, just search on my blog you will find the articles. This combination will giving a better result.

That’s share for today, I need back to work on project he he, Have a great day everyone :)

    Digg Del.icio.us StumbleUpon Reddit Twitter RSS
Computer And Internet, Personal

After 2 days ago my server already cleaned from mso.sys yesterday it’s spreading again in my local networks and download new Trojan called Virut.56 then infected one of my computers client. I think I’m lucky because I detect this Trojan early before it infected all clients. I’m pretty sure this is a new virut variant which coming from mso.sys , It’s really bad bad Trojan and very hard to remove it using manual technique.

To detect when you’re infected by this Trojan:

  1. When your computer start-up you will see 2 IEXPLORE.exe running on process background.
  2. When It’s already totally control your computer you will see VRTxxx.TMP in your process background (xxx=random from 1 to z) and sometimes created random executable in  your username folder.
  3. You can’t open anti-virus website, to test if try to browse www.microsoft.com
  4. If you’re monitoring your traffic Trojan will try to communicate with their server, I don’t know who own this IP but sure it’s located and registered in CHINA!.
  5. You’re executable programs sometimes not working properly.
  6. Your Internet connection slower than usual.

That’s some sign for you to make sure you’re infected by this Trojan. This is really hard Trojan, when I try to remove it using manual technique Trojans keep coming back again and again. Even after I using ckean image from ghost software it’s coming back really fast!. This Trojan infected everything! not only .exe files but .htm and .txt also got infected! specially windows file common used example: explorer.exe, userinit.exe, svchost.exe, and much more.

If you’re got infected by Trojan virut you actually doesn’t need to re-install total your system. This information was false (but it’s fine), when I try to follow it Trojan coming back in seconds. So don’t waste your time to re-install the system it’s will not working!

How to repair your computer if infected by trojan Virut.56 :

1. Make sure your computer totally not connected to local network and Internet to make sure Trojan can’t hidden or run from the scanner.

2. Download Dr. Web Cure It! and burn it into your CD/DVD (to make sure it’s not infected I used CD non re-writable). Why use Cure It? I try using another anti-virus, anti-malware, and anti-spyware none of them workings right! this is not promotion!

3. Run your computer in safe-mode (recommended) then run Dr. Web Cure It! scan total your system including your removable device (if available) don’t use express scan or custom scan. It should be complete scan! should there is no infected file left or you may cry.

4. After scan complete (usually in 3-6 hours) reboot your computer and try to connect it into local network and Internet. Always check your background process if you find something strange on there disconnected from local network and Internet and re-scan total again your system.

5. If you’re already connected to local network/Internet then you can browse to www.microsoft.com and there is nothing strange on your computer background take a deep breath, the Trojan has been assassinated!

That’s a share for today, have a nice day :D

    Digg Del.icio.us StumbleUpon Reddit Twitter RSS