April14
As I have recently worked on two computers with multiple viruses (one literally reported 177 viruses found, the other only a mere 14), I wanted to make a note about Anti-Virus software. These two different relatives of mine both had computers that were un-usable, and asked for help to make it so their computers did not run so slow when they tried to use them. Were they ever suprised by the amount of viruses I found!
My antivirus software program of choice is AVG Free Anti-Virus. Mostly because while it is FREE, it is still very good. I used Symantec Anti-Virus (Version 10) for long period of time but had real problems with its sluggishness and responsiveness on my computer. It was OK (not great) when my laptop was XP, but then when I switched to Vista, it was a resource hog that noticeably slowed my computer down.
I think of AVG Free like I do Google Chrome. Fast, efficient, and loads quickly. I find those things important.
At any rate, if you do not have an anti-virus program on your computer right now, at least download AVG FREE and do a computer scan. You might be surprised by what you find.
What to do if you find out you have a virus:
- This may be a given, especially if you already know you have a virus, but make sure you have UP TO DATE ANTI-VIRUS software running on your PC. A lot of users think they have up to date anti-virus software, but really they only have the 6 month trial version of Symantec or McAfee, which while it runs after the 6 month period, offers you zero protection.
- Make sure to change all passwords you use on the web (of course only after the virus is removed). A common virus users have is a Trojan Horse which can log what passwords you enter and where you entered them and send that information back to a hacker.
- Make sure Windows has all of the latest updates. Go to http://update.microsoft.com/ (in Internet Explorer only unfortunately) until it tells you that you have no more updates to download and install. You should also set up Windows to update nightly on its own. That can be done with the Microsoft Security Center. While you are there, make sure the Windows Firewall is turned on (if you are not using a commercial firewall product).Make sure other programs you use, such as your web browser, email client (if not using web mail), etc are also up to date. Many viruses exploit flaws in web browsers and email clients as those are typically much easier to break than Windows itself.
- Stop doing things that help cause viruses, such as going to shady internet sites, opening email attachments from unknown sources, or downloading files. If you are using a program like Limewire or Bearshare… STOP. Not only are you probably downloading illegal files with those programs; programs like Limewire load tons of adware on your PC, not to mention the likely hood that files you download could have viruses in them. Oh, and the possibility of six figure fines, but I digress.
- Other than that… don’t panic. You can get a virus by just being connected to the internet. The most important thing to do is keep your computer up to date and protected. Happy internet-ing!
Sorry, there are no polls available at the moment.
February9
If your website hosting is of the Linux variety, you know you can schedule scripts to automatically run using cron jobs. But what if your servers are all of the Windows variety? Not a problem, Windows provides the Windows Task Scheduler.
Lets say you have a php script that sends out emails to a newsletter list, but because you do not want to flood your email servers, you would like to have the server send out (20) emails every 30 minutes to keep your daily total under 1000 emails/day. You could generate a script that every time it was executed grabbed the next 20 emails from a database list and send them a predefined email.
Or if you have a database that has a large amount of volume, so to conserve space you only want to keep data that is less than 30 days old. You could create a script that executes a query to delete any content older than 30 days. With the task scheduler, you could have this script run every night.
Or if you have a production database and need to email a report out every hour, you could create a script to do so and task schedule it.
Or any other task you wish to have repeated on a scheduled basis and can easily script the task. This is a great tool for developers who are only familiar with scripting languages like PHP, ASP, etc and can complete advanced tasks in them that would otherwise be done by coding a C++ or C# server application.
Lets go with scheduling the email script example above for a walk through on setting up the Windows Task Scheduler.
On the Windows server (note this does not have to be the web server – it can be any Windows machine that will be running 24/7 to be able to execute the script when scheduled) go to “Start | Control Panel | Scheduled Tasks”.
- Click the Add Scheduled Task button
- Click Next
- Select Internet explorer from the list and click Next
- Select Perform this task Daily (we’ll change it later) and click Next
- Click Next on the task start time
- Enter your username and password of the computer
- Check the open advanced properties checkbox and click Finish
In advanced properties
- Add “www.mywebsite.com/mail.php” after “C:\PROGRA~1\INTERN~1\iexplore.exe” in the “Run” Section. The field will look like this: “C:\PROGRA~1\INTERN~1\iexplore.exe www.mywebsite.com/mail.php“
- Click on the schedule tab and click advanced
- Check “Repeat Task” and say every 30 minutes for 24 hours.
- Click OK
- Click OK
- Enter the Windows user name and password again
Internet explorer will pop up and execute the script every 30 minutes now.
Need the script to have a few layers of security? Here are a few things you can add:
- Utilize SSL encryption and setup the task scheduler to access the page via https:// instead of http:// this ensures any data transmitted between the web server and computer running the task scheduler is encrypted.
- Have the web page look for a specific cookie on the computer making the request to execute the script. Then add a method to the script to allow for the one time creation of the cookie, such as mail.php?generatecookie=1. Now on any computer you need to run the task scheduler, first generate the cookie on the computer, then run the scheduler.
- Have the script check the IP address of where the request is coming from and only allow it to execute if it is the IP address of the server running task scheduler. With PHP you can detect the IP address of where the web request is coming from using “$_SERVER['REMOTE_ADDR']” (note: only works if you have a static IP address and keep in mind IP addresses can be spoofed).