Howto: Block Facebook Video from your network

As a business owner or system administrator, you might want to safe the bandwidth usage from your office network. If you found out Facebook Video is the root cause as your staff might waste the bandwidth to stream the Facebook Video, you may block these URL from the LAN Network.

1. video.ak.fbcdn.net
2. video.l3.fbcdn.net

You need to update the URL as Facebook might add more domain.

Tasklist & Taskkill

As a system administrator, tasklist and taskkill are very important where you could manage them easily from a remote server without access to the remote desktop.

Sometimes, you might suffer from a server highload, you may list the process task list from tasklist from another server,

tasklist /s system /u username /p password

Eg. tasklist /s myserver /u administrator /p mypassword

Next, you may perform a task killing from the taskkill command.

taskkill /f /im process /s system

Eg, taskkill /f /im php-cgi.exe /s myserver

Result:
SUCCESS: The process “php-cgi.exe” with PID 4020 has been terminated.

Windows:Run Task Scheduler with System user

Task scheduler or scheduled task is very important for a system administrator to manage the self design script to monitor from a server.

However, you might found out when you schedule a task from Windows Server 2003 with your used user such as batch file with .bat, you will get a command prompt popped up every time you are performing other task where this is annoyed.

To overcome this problem, I just found out that we can use System user to set the task without worry the above problem and it could solve when you have implement forced password change from a server.

I have come out the solution for Windows Server 2003 and Windows Server 2008.

Windows Server 2003,
With Windows Server 2003, you may look for the scheduled task from Control Panel, and look for Scheduled Task.

If you are creating the new task, just enter the information needed and use the user of “System”(Exactly, case sensitive) as the user.
Note: System or NT AUTHORITY\SYSTEM, where I will use System only where it is easy to remember.

If you are modifying old task, change the user to System and use empty password.

Windows Server 2008,
With Windows Server 2008, go to the Administrative tool and look for Task Scheduler.

When you create the task or modify it, just click the button of “Change User or Group…” and change it to SYSTEM. That all.

Jailed Shell memory issue

If you are using Secure Shell (SSH), you might get these error when you running your php script.

PHP Fatal error:  Out of memory (allocated 20447232) (tried to allocate 4096 bytes) in email.php

If you are the programmer or system administrator, you might tried to increase the memory_limit from the php.ini or using ini_set to increase the memory_limit but you will find out no matter how much memory_limit you set will not solve the problem.

The reason of the error occurs is not because of the PHP memory_limit usage of your script, but it is because the jailed shell limitation.

With cPanel jailed shell, the problem could caused by the forkbomb setting of your cPanel limited the PHP memory.

You may easily get this fix by modify the file as detail below where you should change the user to the cPanel user of your account.
/home/virtfs/user/etc/profile.d/limits.sh

Search for,
if [ “$LIMITUSER” != “root” ]; then

Then modify the ulimit “-m 200000” to “-m unlimited” and save it.

Classic ASP script error messages are no longer shown in a Web browser by default

With IIS 7.x, ASP error is disabled by default. Hence, the web programmer will not know what is the detailed error from your scripting and the following error shown.

An error occurred on the server when processing the URL. Please contact the system administrator.

To work around this problem, you could set the detailed error through IIS or web.config file.

Method 1:

1. Open IIS or run inetmgr.
2. Click on the websites.
3. Click on the ASP icon.
4. Expand the Debugging Properties.
5. On Send Errors To Browser parameter set to True.

Method 2:

Open your web web.config file, add the following command.

<configuration>
<system.webServer>
<asp scriptErrorSentToBrowser="true" />
</system.webServer>
</configuration>

Method 3:

Run the following command to enabled from server end.

%windir%\system32\inetsrv\appcmd set config -section:asp -scriptErrorSentToBrowser:true

Fix Frontpage from cPanel

If you are a webmaster or System Administrator, you should know that FrontPage Extension is a pile of shit.

If you ever used Frontpage extension from your website, then you shall alway found problem while install the Frontpage, getting error when using FrontPage form, etc.

You may use the following command to fix the problem.

/scripts/fixfrontpagesuexec