Author Archive
Windows 7: An error occurred while checking for new updates for your computer (Code 8024800A)
I have recently I have made Linux the primary OS on all my computers.
However, mostly due to Adobe Flash/Photoshop and other few important applications, I decided to leave Windows on a separate disk on each of the computers. (I’ve basically installed Linux into 2 new disks and left the existing Windows drives untouched, as secondary boot devices.)
So, today I needed to use Photoshop and therefore had to boot Windows 7.
Naturally, after not using it for at least 3 months, the first application I have opened was “Windows Update”.
To my surprise, I got an error while checking for them (code 8024800A) on both of my computers and from what I have read – this can happen if you do not check for updates for a while (EG: if you don’t use your computer for an extended period of time).
This may sound silly at first but it makes sense to me as I have just seen this on 2 separate machines.
This is what I’ve done to get it working again:
- Click on your “Start” button, then go to “All Programs” -> “Accessories”. You should see an icon for “Command Prompt”. Right-click it, and click on “Run as administrator”.
- Type each of the following commands, one by one; followed by the “Enter” or “Return” (really, that old?) key.
net stop wuauserv & net stop cryptSvc & net stop bits net stop msiserver & mkdir C:\8024800A\ move C:\Windows\SoftwareDistribution C:\8024800A\ move C:\Windows\System32\catroot2 C:\8024800A\ net start wuauserv & net start cryptSvc net start bits & net start msiserver
- Open a “Windows Update” window (like you would normally do to update your computer) and click on “Check for Updates”. Wait for the process to finish.
You should now be able to update again.
NOTE: The process above will create a backup of the current files being used by your system at “C:\8024800A”.
It’s safe and encouraged to delete this folder once you confirm that Windows Update is working correctly.
Sony Xperia U (ST25i): Performance issues after updating to Android ICS (4.0.4) using the official method
I have noticed my household’s Xperia U (ST25i) slowed down quite a lot after upgrading to ICS (6.1.1.B.1.54-Stock Version), using the official method provided by Sony.
I do not want to have the phone rooted at the moment, so wanted to ensure I would find a solution without requiring such thing. And I just did.
Here’s how to bring your Xperia U up to speed again:
WARNING: I am not responsible for any problems that may occur after you follow the instructions below. Do not proceed unless you’re absolutely sure that you know what you’re doing. Proceed at your own risk. You have been warned.
1) First and foremost, check your android version and build number (go to “Settings” -> “About Phone”). They must be “4.0.4″ and “6.1.1.B.1.54″, as that is the package being distributed by Sony in Europe, at least at the moment. So if you have upgraded your phone to ICS through the official method, those versions should match.
—
2) Download Flashtool, it’s available here.
—
3) Download the World-Unlocked Kernel Firmware File, it’s available here.
—
4) Install FlashTools (install to C:\Flashtool).
—
5) Install the Flashtool drivers. To do this, execute the file”Flashtool-drivers.exe”, which should be located at “C:\Flashtool\drivers” in your computer. Under “Components to install”, check the following items:
- Xperia P, Xperia U and Xperia sola drivers
- Flashmode drivers
- Fastboot drivers
Click the “Install” button and let it run. The installer will execute “dpinst32.exe” (Windows Driver Package Installer) on the final stage. Make sure you complete the process there, and do not freak out once you see the “Untrusted/Unsigned” driver installation warning – make sure you allow it, as you do need the drivers for the process to work, and they’re harmless anyway. Once you complete the installation of the drivers on the “Driver Package Installer” window, the Flashtool driver’s setup will resume and tell you that the installation process is complete.
—
6) Copy/Move the file “xperia u_6.1.1.B.1.54_World kernel.ftf” to the folder “C:\Flashtool\firmwares”
—
7) Enable “USB Debugging” on your phone by going to “Settings -> “Developer Options”. It should be the very first option of that screen. Once “USB Debugging” is enabled, you should see a new icon on your phone’s task bar (the top one), reminding you of that fact.
—
8) Connect your Xperia U to the computer and give it time to install its drivers (Windows should notify you during the process or show an icon in your taskbar)
—
9) Start Flashtool as an administrator (just to make sure). You can do this through the start menu or by browsing the “C:\Flashtool” folder, then right-clicking “FlashTool.exe” (or just “FlashTool” if your Windows is not setup to show file extensions) and selecting “Run as Administrator”.
–
10) Click on the very first button in the Flashtool interface (“Flash”) and then select “Flashmode” on the mode selector.
—
11) You should now have the “Firmware Selection” window in front of you. Unless you did not copy the firmware file to the “firmwares” folder, you should see it listed under “Select a Firmware”. The version you need to select is “6.1.1.B.1.54“. Once the version is selected, click on “OK” button.
—
12) Flashtool will now shutdown your phone and ask you to connect it in “Flash Mode”. To do so, just press and hold the “Volume -” key, and while holding it, press the power button. Flashtool will recognize that the phone is in flash mode, and will carry on with the rest of the process.
—
13) Flashtool will now show the message “Please unplug and start your phone”. This means exactly that, disconnect the phone from your computer, and power it on. Your phone’s performance should now be back to what you were used to, while still running Android 4.0.4 (ICS)!
The Flashtool log should look like this (or similar):
——————-
07/038/2013 18:38:42 – INFO – Device connected with USB debugging on
07/038/2013 18:38:45 – INFO – Connected device : ST25
07/038/2013 18:38:45 – INFO – Installed version of busybox : N/A
07/038/2013 18:38:45 – INFO – Android version : 4.0.4 / kernel version : 3.0.8+ / Build number : 6.1.1.B.1.54
07/046/2013 18:46:50 – INFO – Device connected in flash mode
07/046/2013 18:46:52 – INFO – Device disconnected
07/049/2013 18:49:04 – INFO – Selected xperia u_6.1.1.B.1.54_World kernel.ftf
07/049/2013 18:49:04 – INFO – Preparing files for flashing
07/049/2013 18:49:04 – INFO – Please connect your device into flashmode.
07/049/2013 18:49:15 – INFO – Device connected in flash mode
07/049/2013 18:49:15 – INFO – Opening device for R/W
07/049/2013 18:49:16 – INFO – Reading device information
07/049/2013 18:49:16 – INFO – Phone ready for flashmode operations.
07/049/2013 18:49:16 – INFO – Current device : ST25i – 6.1.1.B.1.54 – WORLD_6.1.1.B.1.54
07/049/2013 18:49:16 – INFO – Start Flashing
07/049/2013 18:49:16 – INFO – Processing loader
07/049/2013 18:49:16 – INFO - Checking header
07/049/2013 18:49:16 – INFO - Flashing data
07/049/2013 18:49:17 – INFO – Loader : S1_Root_3065 – Version : R5E006 / Bootloader status : NOT_ROOTABLE
07/049/2013 18:49:17 – INFO – Processing kernel.sin
07/049/2013 18:49:17 – INFO - Checking header
07/049/2013 18:49:17 – INFO - Flashing data
07/049/2013 18:49:20 – INFO – Ending flash session
07/049/2013 18:49:20 – INFO – Flashing finished.
07/049/2013 18:49:20 – INFO – Please unplug and start your phone
——————-
NOTE: This procedure will NOT root your phone.
It will just correct the performance issues (slowliness) that everyone is talking about.
D-Link DIR-600: Installing custom firmware (DD-WRT)
Nearly 2 years ago, I have posted a small review and introduction to the D-Link DIR-600′s basic and advanced settings. With time, I ended up finding a few bugs on the router, and so did my visitors, who left a good amount of comments there.
I ended up installing custom firmware on the router, but didn’t really want to post anything on that subject until I had tested it for a while on my router. It turned out very well, so I am now guiding you on how to do the same on yours.
LIMITATIONS AND RECOMMENDED PRECAUTIONS:
1) Make sure you are connected to the router using a cable. You won’t be able to complete the tutorial using a wireless connection.
2) This tutorial is meant for the D-Link DIR-600 Revisions B1 and B2 only! Revisions A and C aren’t supported, and trying to install DD-WRT on them may “brick” your router. Below, I’m posting 2 easy ways to find out the revision version of your device:
Option A » Check your router’s original box. You should have a sticker on the side with this information.
Here’s what you’ll be looking for:
Option B » Open your router’s administration panel. By default, it should be http://192.168.0.1/. If you have modified the subnet used by your router, then change the URL accordingly. The revision number should be shown on the top bar, like this:
Do not proceed with the rest of this tutorial unless you’re absolutely sure that your device is supported.
THE ACTUAL PROCEDURE:
1) First we’ll obviously need to download the DD-WRT firmware files.
I’ll provide for that, as I want to make sure the files I’m working with will be the same you’ll work with – this will avoid surprises that come with different versions.
You can download an archive containing the files needed to complete the tutorial here.
Using a file compressing utility (such as 7-Zip or p7zip), extract the files to an easily accessible folder – such as your desktop.
You should now have 2 files in your desktop folder; dlink-dir600b-factory-webflash.bin and dir600b-revb-ddwrt-webflash.bin.
2) Enter the D-Link DIR-6oo’s control panel by pointing your browser to http://192.168.0.1/.
This is the default subnet used by the router (192.168.0.x). If you have modified yours, then change the URL accordingly.
(Reminder: By default, this router is shipped with the username setup as “admin” and no password defined.)
Now click on “Maintenance” -> “Save and Restore”. Under the “Save and Restore Settings” section, click on “Reset to Factory Default Settings”.
This will reboot the router and restore it to the default settings. Please be patient during this process, as it may take up to 3 minutes for the router to reboot and revert the settings. During this time, you won’t be able to connect to the network. (Your operating system should notify you once you’re connected again.)
Note for advanced users: If you were using a static IP address on a different subnet (anything other than 192.168.0.x), you should either update your static IP to something within the default subnet (such as 192.168.0.111 – by default the address pool is set to start on 192.168.0.100 and end on 192.168.0.199), or simply set your network connection to obtain the IP address automatically (in other words, use DHCP). If you’re already obtaining your IP address automatically through DHCP (default setting in every OS), this note does not apply to you.
3) Log into the administrative interface again (http://192.168.0.1/ – The username is “admin” and the password field should be left blank)
4) Click on “Maintenance” -> “Firmware Update”. Under the “Firmware Upgrade” section, click on “Browse…” and select “dlink-dir600b-factory-webflash.bin” from your desktop folder. (Picture below)
5) Click on “Upload” to initiate the flashing process. It should take about 3 minutes, do NOT reset or power cycle the router during this stage. Just monitor the leds, once they stop blinking, it means it finished.
6) DD-WRT does not use the same subnet as the original D-Link DIR-600′s router’s firmware, so we’ll need to make sure your OS detects the change.
A simple way of forcing your computer to do this is to simply disconnect the ethernet (network) cable, and reconnect it again once your operating system tells you that the connection was lost. Your operating system should detect the connection again and hopefully also the new IP address.
If this does not turn out to be the case, you can set a static IP address in your computer within the same subnet as DD-WRT’s default (such as 192.168.1.111), or you can reboot your computer, as that will force an IP renewal/network detection as well.
7) Log into DD-WRT’s administative interface (http://192.168.1.1). You will be forced to select an administrative username and password.
8) Click on the “Administration” tab in the top menu. Then, click on “Firmware Upgrade” (screenshot below).
9) Select the option “Reset to Default settings”, click on “Browse…” , select “dir600b-revb-ddwrt-webflash.bin” and click on “upgrade” (screenshot below).
Wait about 3 minutes for the upgrade process to complete. You should be redirected to the router’s system information page at the end, and the version of DD-WRT should have changed (screenshot below):
This means SUCCESS! DD-WRT is now installed on your D-Link DIR-600 wireless router, and you can proceed with its configuration.
BASIC CONFIGURATION OF DD-WRT:
I know some of you might be new to this so I’m writing an example setup tutorial below for a cable connection, using Google’s Public DNS, and a Secure Wireless Configuration (WPA2).
1) Click on “Setup” -> “Basic Setup”, and try to duplicate the settings shown on the screenshot below:
Make sure you change the timezone to yours (under “Time Settings”).
I suggest leaving the router name set to “DIR-600″ unless you have a valid reason to change it. But if you do, you can change it from “DIR-600″ to anything else. The router name should only contain alphanumeric characters. Except for dashes (“-”), no special characters are allowed.
Once you complete the configuration above, click on “Save” and then “Apply Settings”.
2) Click on the “Wireless” tab (in the top navigation bar) and try to duplicate the settings shown on the screenshot below:
After replicating the settings, click on “Save” and then “Apply Settings”.
3) Click on “Wireless Security” (in the blue sub-navigation bar) and try to duplicate the settings shown on the screenshot below:
Needless to say, you have to pick your own WPA Shared Key, as this will be your wireless password. The password should contain between 8 and 63 characters.
To ensure better security, make sure you’re using a password that is a combination of uppercase/lowercase letters, numbers and symbols.
After replicating the settings and typing a WPA Shared Key, click on “Save” and then “Apply Settings”.
4) Click on the “Security” tab (in the top navigation bar) and enable the “SPI Firewall” if it’s not enabled yet.
More information on what a Stateful Packet Inspection Firewall is can be found here.
After this, click on “Save” and then “Apply Settings” again.
5) Click on the “Administration” tab (in the top navigation bar), scroll down the page to its very end and click on “Reboot Router”.
Wait a few minutes for the router to reboot. It should take you to the router’s default page (System Information).
You should now be able to connect all your wired and wireless devices to your router and connect to the internet.
I’d recommend you to take some time to review all the options available on DD-WRT and configure it according to your specific needs, but this basic setup should allow you to use the internet and have basic home networking right away.
Oracle VirtualBox: Installing Guest Additions in Fedora 18 (and all others)
Unfortunately you cannot just install VirtualBox Guest Additions in a fresh Fedora 18 install, as it will require a few additional packages to be installed and a few minutes checking on the logs to identify any possible further issues.
While the Guest Additions are not required to use a CLI-based Virtual Machine, they are essential if you’re using it as a Desktop/Workstation OS (over Windows in this example).
Moving on, here’s the procedure to properly install VirtualBox Guest Additions in Fedora 18.
(This procedure may or may not work for other distros using the same package manager and for other versions of Fedora)
- Open a new console window, and type the following commands, one per line (I’ll explain what they do below):
su
yum -y update kernel
yum -y install kernel-devel kernel-headers dkms gcc gcc-c++
yum -y update
The commands above will authenticate you as root (su), update your system’s Kernel install the required packages for VirtualBox Guest Additions to work properly.
Just as a preventative measure, I recommend running “yum update” afterwards, just to ensure you’re up to date on everything else (assuming that this is just a fresh install of Fedora). - In the VirtualBox menu bar, open the “Devices” menu and select “Install Guest Additions”.
- Just browse your DVD Drive contents using your file explorer and run autorun.sh from there (it will ask you to re-authenticate as root).
The output should be similar to this:
Verifying archive integrity... All good.
Uncompressing VirtualBox 4.2.6 Guest Additions for Linux..........
VirtualBox Guest Additions installer
Removing installed version 4.2.6 of VirtualBox Guest Additions...
Removing existing VirtualBox DKMS kernel modules [ OK ]
Removing existing VirtualBox non-DKMS kernel modules [ OK ]
Building the VirtualBox Guest Additions kernel modules [ OK ]
Doing non-kernel setup of the Guest Additions [ OK ]
Starting the VirtualBox Guest Additions [ OK ]
Installing the Window System drivers
Installing X.Org Server 1.13 modules [ OK ]
Setting up the Window System to use the Guest Additions [ OK ]
You may need to restart the hal service and the Window System (or just restart
the guest system) to enable the Guest Additions.Installing graphics libraries and desktop services componen[ OK ]
Press Return to close this window…
Let the script finish, reboot your Virtual Machine and you’re all set.
Note: I have used VirtualBox 4.2.6 and Fedora 18 (3.7.2-204) in this tutorial.
Exim: Clearing the internal eximstats database (cPanel)
Clearing the eximstats database isn’t something difficult to do via phpMyAdmin or a similar web-based database management application, and shouldn’t harm anything in your system.
However, if you run into any issues, or just want to re-initialize the database and re-create the tables structures manually via SSH, here’s what you should do:
mysqladmin drop eximstats ; mysqladmin create eximstats ; mysql eximstats < /usr/local/cpanel/etc/eximstats_db.sql
If for any reason you do not have your default eximstats .sql file (which includes the database structure), you can copy it from the block below.
Just make sure you save it as /usr/local/cpanel/etc/eximstats_db.sql (pay close attention to the path).
– Host: localhost Database: eximstats
– ——————————————————/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8 */;
/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
/*!40103 SET TIME_ZONE=’+00:00′ */;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE=’NO_AUTO_VALUE_ON_ZERO’ */;
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;–
– Table structure for table `defers`
–DROP TABLE IF EXISTS `defers`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `defers` (
`mailtime` datetime NOT NULL DEFAULT ’0000-00-00 00:00:00′,
`msgid` char(16) NOT NULL DEFAULT ”,
`email` char(255) NOT NULL DEFAULT ”,
`transport_method` char(45) DEFAULT ‘remote_smtp’,
`host` char(240) DEFAULT NULL,
`ip` char(60) DEFAULT NULL,
`message` char(240) DEFAULT NULL,
`router` char(65) DEFAULT ”,
`deliveryuser` char(30) NOT NULL DEFAULT ”,
`deliverydomain` char(255) NOT NULL DEFAULT ”,
PRIMARY KEY (`mailtime`,`msgid`,`email`),
KEY `email_mailtime_index` (`email`,`mailtime`),
KEY `msgid_mailtime_index` (`msgid`,`mailtime`),
KEY `deliverydomain_mailtime_index` (`deliverydomain`,`mailtime`),
KEY `deliveryuser_mailtime_index` (`deliveryuser`,`mailtime`),
KEY `email_deliveryuser_mailtime_index` (`email`,`deliveryuser`,`mailtime`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;–
– Table structure for table `failures`
–DROP TABLE IF EXISTS `failures`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `failures` (
`mailtime` datetime NOT NULL DEFAULT ’0000-00-00 00:00:00′,
`msgid` char(16) NOT NULL DEFAULT ”,
`email` char(255) NOT NULL DEFAULT ”,
`transport_method` char(45) DEFAULT ‘remote_smtp’,
`host` char(240) DEFAULT NULL,
`ip` char(60) DEFAULT NULL,
`message` char(240) DEFAULT NULL,
`router` char(65) DEFAULT ”,
`deliveryuser` char(30) NOT NULL DEFAULT ”,
`deliverydomain` char(255) NOT NULL DEFAULT ”,
PRIMARY KEY (`mailtime`,`msgid`,`email`),
KEY `email_mailtime_index` (`email`,`mailtime`),
KEY `deliverydomain_mailtime_index` (`deliverydomain`,`mailtime`),
KEY `deliveryuser_mailtime_index` (`deliveryuser`,`mailtime`),
KEY `email_deliveryuser_mailtime_index` (`email`,`deliveryuser`,`mailtime`),
KEY `msgid_mailtime_index` (`msgid`,`mailtime`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;–
– Table structure for table `sends`
–DROP TABLE IF EXISTS `sends`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `sends` (
`mailtime` datetime NOT NULL DEFAULT ’0000-00-00 00:00:00′,
`msgid` char(16) NOT NULL DEFAULT ”,
`email` char(255) NOT NULL DEFAULT ”,
`processed` int(11) DEFAULT NULL,
`user` char(30) NOT NULL DEFAULT ”,
`size` int(11) DEFAULT NULL,
`ip` char(60) DEFAULT NULL,
`auth` char(30) DEFAULT NULL,
`host` char(240) DEFAULT NULL,
`domain` char(255) NOT NULL DEFAULT ”,
`localsender` int(1) DEFAULT ’1′,
`spamscore` double DEFAULT NULL,
PRIMARY KEY (`mailtime`,`msgid`,`email`),
KEY `mailtime_domain_user_msgid_index` (`mailtime`,`domain`,`user`,`msgid`),
KEY `user_mailtime_index` (`user`,`mailtime`),
KEY `msgid_user_index` (`msgid`,`user`),
KEY `domain_user_mailtime_index` (`domain`,`user`,`mailtime`),
KEY `email_mailtime_user_index` (`email`,`mailtime`,`user`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;–
– Table structure for table `smtp`
–DROP TABLE IF EXISTS `smtp`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `smtp` (
`mailtime` datetime NOT NULL DEFAULT ’0000-00-00 00:00:00′,
`msgid` char(16) NOT NULL DEFAULT ”,
`email` char(255) NOT NULL DEFAULT ”,
`processed` int(2) NOT NULL DEFAULT ’0′,
`transport_method` char(45) DEFAULT ‘remote_smtp’,
`transport_is_remote` int(1) NOT NULL DEFAULT ’1′,
`host` char(240) DEFAULT NULL,
`ip` char(60) DEFAULT NULL,
`deliveredto` char(255) NOT NULL DEFAULT ”,
`router` char(65) NOT NULL DEFAULT ”,
`deliveryuser` char(30) NOT NULL DEFAULT ”,
`deliverydomain` char(255) NOT NULL DEFAULT ”,
`counteddomain` char(255) DEFAULT NULL,
`countedtime` datetime DEFAULT NULL,
`countedhour` datetime DEFAULT NULL,
PRIMARY KEY (`mailtime`,`msgid`,`email`,`deliveredto`,`router`),
KEY `msgid_index` (`msgid`),
KEY `deliverydomain_mailtime_index` (`deliverydomain`,`mailtime`),
KEY `deliveryuser_mailtime_index` (`deliveryuser`,`mailtime`),
KEY `email_mailtime_index` (`email`,`mailtime`),
KEY `email_deliveryuser_mailtime_index` (`email`,`deliveryuser`,`mailtime`),
KEY `processed_transport_is_remote_index` (`processed`,`transport_is_remote`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
That’s about it. ![]()
WordPress: Password-Protected pages not working on folders within WordPress’ directory (Error 404)
Symptoms: You add password-protected directories to folders within your WordPress installation, but instead of showing a password-protection prompt, your browser will show a 404 page instead
This appears to be a common issue for users that try to password-protect folders within an installation of WordPress.
This happens because you did not define a 401/403 (depending on the situation) error page in your main .htaccess file.
In order to correct this, you will need to add the 401 error page to your WordPress’ .htaccess file.
Example of a WordPress .htaccess file:
# BEGIN WordPress
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
# END WordPress
In order to correct this issue, simply create a 401 and 403 error page (on this example I’m using errors/401.html) and add it to .htaccess:
ErrorDocument 401 /errors/401.html
ErrorDocument 403/errors/403.html
# BEGIN WordPress
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
# END WordPress
And that’s it, save .htaccess and your password-protected folders should work now.
cPanel: RoundCube not working (Error 500)
Symptom: When you log into WebMail and select RoundCube, you will get an Error 500.
The first thing to try is to force an update for RoundCube by issuing the following command via SSH:
/usr/local/cpanel/bin/update-roundcube –force
If the reason for RoundCube not to work is its configuration files, this command will do the trick.
Now, if you get a MySQL Database error while updating it, it’s possible that your “roundcube” database is either corrupt, or you might have the InnoDB scheme disabled (RoundCube requires InnoDB).
In order to check if InnoDB is enabled on your server, simply issue the following command through SSH:
mysqladmin var |grep have_innodb
The command output should be similar to this:
| have_innodb | YES |
If by any reason you get a “NO”, it means InnoDB is disabled, and you have to enable it to make RoundCube (and it’s update script) work.
The first thing to look out for is your MySQL master configuration file at /etc/my.cnf. Make sure you’re not using the “skip-innodb” command in it.
To make it easy, just run the following command:
grep skip-innodb /etc/my.cnf
If the skip-innodb command is found on the file, make sure you remove it.
NOTE: From this line on, I’m assuming you are NOT using the InnoDB schema for any of your databases. Please note that the procedure below may (most likely will) render any databases using the InnoDB schema corrupt. Do not proceed unless you’re 100% certain of what you’re doing.
If it’s not found, and you’re still having problems getting InnoDB to work, try the following batch of commands (just paste the full line in your command prompt and press Enter):
service mysql stop; cd /var/lib/mysql/; mv ibdata1 ibdata1.bak; mv ib_logfile0 ib_logfile0.bak; mv ib_logfile1 ib_logfile1.bak; service mysql start
The line above will stop the MySQL Server, change the working directory to “/var/lib/mysql/” where it then renames a few files and start the MySQL Server again. It’s important to shut it down before renaming any files.
Once the MySQL Daemon is started, the files will be generated again. Once the process is complete, check for InnoDB again using:
mysqladmin var |grep have_innodb
If it is showing as enabled, try to update RoundCube again:
/usr/local/cpanel/bin/update-roundcube –force
If you’re still getting a MySQL Database error after this, it’s most likely due to your RoundCube database being corrupted.
The solution on that case is to delete the database via phpMyAdmin (remove the database with the name “roundcube”), or you can also do it via SSH by logging into the MySQL Server (just type “mysql” in SSH) and issuing the following command:
drop database roundcube;
Now try to run the update script again (it should work this time):
/usr/local/cpanel/bin/update-roundcube –force
Connecting your Samsung TV to stream videos directly from a computer / server
I have had difficulties getting this to work as I wanted to, so I thought it would be good something to write about.
I am using a Samsung LED TV from the 7 Series, but you should be able to use this on other series, just as long as your Samsung TV is able to connect to your home network using either a wired or wireless connection.
Your first step should be to get the TV’s MAC address and whitelist it in your router’s firewall. You may skip this if you are not using a firewall.
To get the MAC Address for your TV, press the “menu” button on your remote controller, and navigate through:
Setup –> Network –> Network Test
The MAC address will be displayed as the Network Test starts.
Once you’ve whitelisted the MAC address, download Samsung PC Share Manager.
I have no idea why, but the software is extremely hard to find online, even though it’s free and it’s bundled with most Series 6 and Series 7 TVs, so for that reason I have made it available for download. Click here to get it.
Install PC Share Manager and start the application.
Navigate through:
Share –> Set Device Policy
Select your TV’s IP Address (it will be listed as a TV) and click toggle the Policy button to Accept. You can then close that menu and return to the main screen.
Then, navigate through:
Share –> Share Folder
Select the folder you want to share with the TV and close the menu box by clicking on the Accept button. Repeat the process for all the folders you want to have available on your TV.
(You cannot share individual files)
Once you have added all the folders you want to share on the TV, navigate through:
Server –> Server: On
You will have enable or disable the server. Select “On” to connect to the TV. You may also want to make sure the option “Run Digital Media Server when Windows Starts” if you want to share the folders on a permanent basis (for media servers),
Finally click on:
Share –> Refresh DB
The database will now synchronize. This will take a while.
Once the process is complete, you should be able to browse your videos through your TV.
Why your backup attempts fail in cPanel and other control panel systems – your files can be the problem.
I’ve had the idea to write about this subject a few months ago, and left it on a post it on my desk. Luckily, I have just seen it and didn’t want to throw it away without posting something about it.
In these days, every single web host promises you that your data is safe and that they will backup your site every X days. While this is true, it’s not 100% sure.
Backup systems can fail (they do fail). What if? What if it fails for you?
What if your blog gets hacked, and there’s no backup to restore it from?
Did you even think about that scenario? It happens to hundreds of people. Why shouldn’t it happen to you?
No one is special in technology. It can fail for everyone (look at NASA for example, technology fails for them too). If you care about your website (and your email) you should back it up at least once a month, or once a week if you update it too often.
Most control panels out there will offer you an easy and convenient way of generating/downloading full backups for your website. This should be a 20 minute operation (between the generation and downloading).
Now here’s the tricky part - and also why many webmasters do not download a backup of their site every month or every week:
Your site is too large!
I have been a consultant in this industry for a long time, and I know for a fact that most websites do not use over 500M to run, in any circumstances. The problem here is, that webmasters neglect the “file sharing” problem.
You’re given 5GB or 10GB to host files, so you intend to use them for file storage. After all, it’s what you’re paying for, right? Not really.
It’s complicated to talk about it. Web hosts offer that to compete with each other. It’s a normal marketing strategy. A responsible webmaster will not use nowhere near that because having 10GB in files on a site will ruin any self-backup attempt by the website owner.
There are other ways of storing your files online. Let’s say you are a Disc Jockey and want to share your “sets” with everyone. Your main web hosting account is certainly not the best place to upload your files to.
Sure, it’s nice to have a link attached to your set such as djrocknroll.com/setxxx.mp3 but this will add inconveniences to you, such as not being able to generate a backup without a headache, or without having to wait 6 hours for it.
I rarely point at a problem without providing an option to evade it, so here’s what I recommend:
If you need to host files (large files), setup a separate hosting account and use a subdomain for it. For example, files.yoursite.com. Your web host will know how to do this for you. That way, you can separately backup both your files and your site, without having one interfering with the other.
Please note that I am not referring to subdomains. A Subdomain is usually hosted within the same user home directory, so this will not do any good. Ideally, a separate account is recommended.
If you have a reseller or a multi-site account, you can take advantage of it by creating a new account just for the purpose of storing your files. If you do not have this possibility and cannot afford a new account at your current host, you can always find a cheaper web host just to deal with your “downloadable” files. Assuming that your email and website content is more important than your files, you should always make sure that your main hosting account is clean. Never use more room than you need to.
That way, you will be able to generate/download backups every time, with no delays or hiccups. This is valid for almost every control panel system. Whether it’s cPanel, Plesk, DirectAdmin or anything else… if your account is flooded with files, the instant backups will not work as you expect.
Using Windows’ “hosts” file to avoid downtime when switching web hosts
I do have a lot of people asking me what’s the best way to transfer their website from a web host to another without any downtime. While I think this is almost impossible (at least coherently and without anyone noticing it), there are a few tricks that you can use to minimize the downtime.
One of them is to use the Windows HOSTS file to prepare everything at the new web host.
The HOSTS file, is a basic text file that allows you to override your DNS server settings. By having a web address in there, you will make your PC ignore any DNS Resolution (it won’t even try to resolve the address) – Instead, it will use the IP Address you supply in the HOSTS file.
Think of that file as a “God Mode” in DNS.
Whatever you wrote there, will be the absolute path for a given domain name.
So, when you’re moving to a new web host this becomes handy, because you can simply make your PC resolve your URL to the new web hosts’ IP address, without having to change your domains’ nameservers. The advantage here is that you will be able to preview your site *exactly* as it will be functioning at the new location without risking a DNS change; along with its side-effects if it goes wrong (having to change it back to the previous host because it’s not working as expected, etc).
So let’s say you’re moving from WEBHOST1 to WEBHOST2.
The very first thing you must do is to find out your website’s new IP address.
This is an information that is usually sent to you by the new web hosting provider through a “Welcome Email” along with other useful technical notes about the new account. If this isn’t the case, simply ask your web host (WEBHOST2) what your IP address will be.
Once you have that information, you can move on to the next step – editing the HOSTS file.
By default, on a standard setup; the HOSTS file is located at the following location:
Windows 95, Windows 98 and Windows ME: C:\Windows\Hosts
Windows NT/2000: C:\WINNT\system32\drivers\etc\hosts
Windows XP: C:\Windows\system32\drivers\etc\hosts
Windows Vista and Windows 7: C:\Windows\System32\drivers\etc **
** Under Windows Vista and Windows 7, you will need to open this file using the option “Run as Administrator” in order to prevent issues when saving your file. (you won’t be able to save the modified file if you do not use this option)
Since this file has no extension, you will most likely be asked which program to use to deal with the file. Select NOTEPAD or WORDPAD as an alternative.
Once you open it, you should have the following (or at least similar) text:
# Copyright (c) 1993-2009 Microsoft Corp.
#
# This is a sample HOSTS file used by Microsoft TCP/IP for Windows.
#
# This file contains the mappings of IP addresses to host names. Each
# entry should be kept on an individual line. The IP address should
# be placed in the first column followed by the corresponding host name.
# The IP address and the host name should be separated by at least one
# space.
#
# Additionally, comments (such as these) may be inserted on individual
# lines or following the machine name denoted by a ‘#’ symbol.
#
# For example:
#
# 102.54.94.97 rhino.acme.com # source server
# 38.25.63.10 x.acme.com # x client host
127.0.0.1 localhost
On Windows Vista/Windows 7, you might be missing the 127.0.0.1 entry.
This is because both Operating Systems do not need such line there, the localhost entry is handled by the DNS client directly.
You will instead see a few extra lines replacing the first entry, such as:
# localhost name resolution is handled within DNS itself.
# 127.0.0.1 localhost
# ::1 localhost
Moving on, let’s say your domain name is “myblog.com” and your new web hosting IP address is 74.74.74.74 – where is the entries you would need to add to this file:
74.74.74.74 myblog.com
74.74.74.74 www.myblog.com
So, to summarize, you would have a file similar to this one:
# Copyright (c) 1993-2009 Microsoft Corp.
#
# This is a sample HOSTS file used by Microsoft TCP/IP for Windows.
#
# This file contains the mappings of IP addresses to host names. Each
# entry should be kept on an individual line. The IP address should
# be placed in the first column followed by the corresponding host name.
# The IP address and the host name should be separated by at least one
# space.
#
# Additionally, comments (such as these) may be inserted on individual
# lines or following the machine name denoted by a ‘#’ symbol.
#
# For example:
#
# 102.54.94.97 rhino.acme.com # source server
# 38.25.63.10 x.acme.com # x client host74.74.74.74 myblog.com
74.74.74.74 www.myblog.com
This will order your PC to not even try to resolve the domain name, but to use the IP you specified instead. Once you save this file, your domain should start to point to the new IP immediately. If you want to make sure it’s happening, a good way to do it is by performing a PING test on your domain.
To do so, just open a new Command Prompt window (by going to Programs/All Programs –> Accessories –> Command Prompt), and typing the following command:
ping www.myblog.com
Then wait for the output. If you get the new IP address, that means you’re ready.
Upload your website to the new host, restore any databases you need to have working and test it on your PC. The best part is that no one will notice any flaws on the new host – only you will be able to see them, as the rest of the world will still be using the current/old host to retrieve your content.
Once you’re fully satisfied with what you see on your domain, you can safely change your nameservers (pointing them to the ones you have been provided by WEBHOST2) without risking anything – because you have tested it all beforehand.
IMPORTANT NOTE: Once you are satisfied with the results and are ready to change the nameservers, make sure you remove those 2 lines from your HOSTS file. You will no longer need them, and having them there can cause problems in the future (for example if for any reason your web host has to change your IP address… This seems unlikely but it isn’t. There are many valid reasons to change your IP, such as installing a SSL Certificate!)











