Free Web Hosting

Install Rar/UnRar Support & Open Rar Archives In Ubuntu

August 22nd, 2008 Bala Krishna Posted in FFMPEG, FFMPEG-PHP, Linux, Linux Commands, Tips and Tricks, Web Technology No Comments »

Ubuntu Archive Manager can not open rar file by default in your Ubuntu. Because of the proprietary issue rar support package not included in Ubuntu distribution. However rar support installtion in very easy with apt-get package mamager.

Follow these steps to install Rar Support in your Ubuntu Linux Distribution.

Open Terminal Window and Run the below command. You may ask to enter admin password if you are not login as root.

sudo apt-get install rar unrar

The above command will install rar/unrar capability in your ubuntu linux box. You should now able to UnRar archives using Archive Manager.

AddThis Social Bookmark Button

Useful Linux Shell Commands

August 7th, 2008 Bala Krishna Posted in General, Linux, Linux Commands, PHP Programming, PHP Tutorial, Tips and Tricks, Web Technology No Comments »

ls : List files/directories in a current directory, equivalent to dir command in dos/windows.
ls -al : Shows all files and directories with the details attributes for each file.

cd : Change directory
Examples:
cd ~ : Change your directory to your home directory.
cd - : Change to the last directory you were in.

tail : Reads and display the end of the file
Examples:
tail /var/www/me.txt : Display last 20 lines (by default) lines of the given file.
tail -f /var/www/me.txt : Watch the file continuously, while it’s being updated.
tail -400 /var/www/me.txt : Print last 400 lines of the file to the screen.

more : Open file one screen at a time.
Examples:
more /etc/log.txt : Opens the file one screen at a time rather than all at once. Press Space to go to next page.

pico : easy to use file editor
Examples:
pico /home/mysite/public_html/you.html : edit the you.html file from the public_html directory.

vi : popular editor in linux, have lots of features but harder to use
Examples:
vi /home/mysite/public_html/you.html : edit the you.html from the public_html directory.

grep : looks for certain patterns in files
Examples:
grep root /etc/passwd : shows all matches of root in /etc/passwd
grep -v root /etc/passwd : shows all lines that do not match root

touch : create an empty file
Examples:
touch /home/mysite//public_html/new.html : create an empty file called new.html in the directory /home/mysite//public_html/

ln : create’s “links” between files and directories
Examples:
ln -s /usr/local/apache/conf/httpd.conf /etc/httpd.conf : Now you can edit /etc/httpd.conf rather than the original. changes will affect the orginal, however you can delete the link and it will not delete the original.

rm : delete a file
Examples:
rm filename.txt : Deletes filename.txt, It will confirm you before deleting file.
rm -f filename.txt : Deletes filename.txt without confirmation.
rm -rf tmp/ : Recursively deletes the directory tmp, and all files in it, including subdirectories.

last : shows who logged in with the time
Examples:
last -20 : shows only the last 20 logins
last -20 -a : shows last 20 logins, with the hostname in the last field

netstat : shows all current network connections.
netstat -an : shows all connections to the server, the source and destination ips and ports.
netstat -rn : shows routing table for all ips bound to the server.

top : shows useful live system info
processes in a table format, memory information, uptime and other useful info. This is excellent for managing your system processes, resources and ensure everything is working fine and your server isn’t bogged down. top then type Shift + M to sort by memory usage or Shift + P to sort by CPU usage

ps: ps is short form of process status, equivalent to the top command. It’s used to show currently running processes with their PID.

A process ID is a unique number that identifies a process, with that you can kill or terminate a running program on your server (see kill command).
Examples:
ps U username : shows processes for a certain user
ps aux : shows all system processes
ps aux –forest : shows all system processes like the above but organizes in a hierarchy that’s very useful!

file : attempts to guess what type of file a file is by looking at it’s content.
Examples:
file * : prints out a list of all files/directories in a directory

du : shows disk usage.
Examples:
du -sh : shows a summary of total disk space used in the current directory, including subdirectories.
du -sh * : same as above, but for each file and directory. helpful when finding large files taking up space.

wc : word count
Examples:
wc -l filename.txt : tells how many lines are in filename.txt

cp : copy a file
Examples:
cp filename filename.backup : copies filename to filename.backup
cp -a /home/mysite/old/* /home/mysite/new/ : copies all files, retaining permissions form one directory to another.

kill: terminate a system process
Examples:
Syntax: kill -9 PID Examples: kill -9 431
Syntax: kill PID Examples: kill 10550

AddThis Social Bookmark Button

Control PHP Error Reporting With .htaccess

July 6th, 2008 Bala Krishna Posted in Blogging, Error Log, Linux, Linux Commands, Web Development, Web Technology No Comments »

Create .htaccess file or use existing .htaccess file in your hosting site. Add below line at the top of file content.
[sourcecode language='php']
# to stop php startup errors
php_flag display_startup_errors off
# to stop all php errors and warning
php_flag display_errors off
[/sourcecode]
You can also control level of error reporting. Here is the .htaccess syntax:
[sourcecode language='php']
# php directive for setting error level
php_value error_reporting integer
[/sourcecode]
Example:
[sourcecode language='php']
# report everything except run-time notices.
php_value error_reporting 8191
# report both fatal and non-fatal compile-time warnings by the Zend Engine
php_value error_reporting 128
# report run-time notices, compile-time parse errors, run-time errors and warnings
php_value error_reporting 8
# report fatal run-time errors and unrecoverable errors
php_value error_reporting 1
[/sourcecode]

AddThis Social Bookmark Button

What is Difference Between DNS CNAME & A Record

July 1st, 2008 Bala Krishna Posted in Godaddy Hosting, Linux, Linux Commands, Tips and Tricks, Web Development, Web Hosting, Web Technology 1 Comment »

CNAME stands for Canonical Name for a domain. CNAME is an alias records that create association between a sub-domain and antother domain or subdomain.

And, A Record simply creates an association between a domain/sub-domain name and an IP Address.

Example CNAME
gallery.bala-krishna.com -> gallery.another-domain.com -> 64.1.236.65

you can see above CNAME require two DNS lookup to translate domain/subdomain to an IP Address. If client request for gallery.bala-krishna.com then DNS record will return gallery.another-domain.com then gallery.another-domain.com has to query DNS to translate gallery.another-domain.com into IP Address.

CNAME Record Syntax:
www  14400  IN  CNAME  bala-krishna.com

Example A Record

gallery.another-domain.com -> 64.1.236.65

In case of gallery.another-domain.com, A record directly point to an IP Address so the DNS lookup directly returns IP Address to the client rather then domain/subdomain. hence only one DNS lookup required.

A Record Syntex:
ftp    14400  IN   A   67.159.45.3

AddThis Social Bookmark Button

PHP Fatal Error Fix: Can’t use method return value in write context

May 15th, 2008 Bala Krishna Posted in Blogging, Browser Stuff, Bug Fix, General, Linux, Linux Commands, PHP Function, PHP Programming, PHP Tutorial, Tips and Tricks No Comments »

PHP compiler generate fatal error if you use function return value in read/write context. Although this is not applicable for all PHP supported function but PHP function like empty does not support use of the function in this way. In other words, php empty function cannot check the return value of a function or method. It can only check variables so use only variable inside empty function. Any other function or expression inside empty function will lead to generate fatal error.

Example Problem Solution:

Wrong
if(empty(trim($testimony))) echo “Empty”; else echo “Not Empty”;

Correct
$testimony = trim($testimony);
if(empty($testimony)) echo “Empty”; else echo “Not Empty”;

Wrong
if(empty($bobj->get_results(’post’)) { // Processing Code }

Correct
$tmp = $bobj->get_results(’post’);
if(empty($tmp)) { // Processing Code }

AddThis Social Bookmark Button

Fedora 9 Released

May 14th, 2008 Bala Krishna Posted in CentOS, Events, Linux, Linux Commands, Operating System Tutorial No Comments »

Fedora 9 Download

Finally Fedora 9 has been released. Fedora is a community supported operating system sponsored by Red Hat. It is maintained by fedora community members accross the world. Beside RHEL, Fedora is free, open to use and modify it to best suit your need. You are always open to distribute it.

New Features

  • GNOME 2.22 used in this release that includes webcam photo and video creation utility called Cheese.
  • Improved network filesystem support.
  • New improved international clock applet.
  • Google Calendar support and custom email labels in Evolution.
  • New Remote Desktop Viewer and improved accessibility features.
  • KDE 4.0.3 and Xfce 4.4.2 is included in this release.
  • NetworkManager 0.7 provides improved mobile broadband support, including GSM and CDMA devices, and now supports multiple devices and ad-hoc networking for sharing connections.
  • It is now enabled by default on installations from DVD, CD, the network, and Live images.
  • Supports partition resizing for ext2/3, NTFS filesystems.L
  • Live USB images support available.
  • FreeIPA makes managing auditing, identity and policy processes easier by providing web-based and command line provisioning, and administration tools to ease system administration. FreeIPA combines the power of the Fedora Directory Server with FreeRADIUS, MIT Kerberos, NTP and DNS to provide an easy, out of the box solution.
  • Next generation Ext4 support for better performance, higher storage capacity and several other new features.
  • Fedora 9 uses Upstart, an event-based replacement for the /sbin/init daemon.
  • Firefox 3 support for native look and feel and desktop integration.
  • By default now support and installed free and open source Java environment OpenJDK 6
  • OpenOffice.org 2.4 included with many new features.
  • Fedora 9 includes Perl 5.10.0 features a smaller memory footprint and other improvements.
  • Fedora 9 features a 2.6.25 based kernel.
  • Automatic report kernel crashes to http://www.kerneloops.org

Download

i386 - Install DVD
x86_64 - Install DVD
ppc - Install DVD
i386 - Install CDs
x86_64 - Install CDs
ppc - Install CDs

Check out more download option here

AddThis Social Bookmark Button

Wordpress 2.5 Popularity Contest Plugin Fatal Error Fix

April 23rd, 2008 Bala Krishna Posted in Browser Stuff, Bug Fix, General, Linux, Linux Commands, PHP Function, PHP Programming, PHP Tutorial, Tips and Tricks, Word Press, Wordpress Plugin No Comments »

If you are using Alex popularity plug-in then you might face this error while upgrading plug-in automatically in WP 2.5. This error generate due to invalid wp-header file path in plug-in file. Unfortunately, Alex not released new fixed version of the this popular plug-in. However, fix is really very simple and anyone can fix issue just by editing one single plug-in file. Please follow steps below to fix this error in your installation:

  1. Deactivate older version of the plugin. If you are installing first time skip this step.
  2. Download the latest release from wordpress.org or plugin author website.
  3. Open popularity-contest.php in your favorite editor and scroll down to line 59. Replace
    require('../../wp-blog-header.php');

    with

    require('../wp-blog-header.php');
  4. Save file and upload file to your plugins folder.
  5. Reactivate the plugin
AddThis Social Bookmark Button

Gallary2 Platform Failure Error Fix

March 17th, 2008 Bala Krishna Posted in Blogging, Browser Stuff, Bug Fix, FFMPEG, FFMPEG-PHP, Firefox Add-On, Gallery2, General, Linux, Linux Commands, Tips and Tricks, Web Development, Web Technology, Word Press, Wordpress Plugin No Comments »

This is common error occur due to wrong permission setting in Gallery2 data directory. During module uninstall, gallery2 restore directory permission and other changes as it was before the module installation. This feature sometime break gallery directory permission and directory does not work. See Image bellow for exact error description.

Gallary2 Platform Failure Error Fix

Solution:

Try changing gallery data directory “/g2data” permission to 777. If this does not fix your problem then try changing permission to “/g2data/smarty/templates_c“. After this step delete all content including directory inside “/g2data/smarty/templates_c” directory. This should fix ERROR_PLATFORM_FAILURE problem.

AddThis Social Bookmark Button

Connect to your PC over internet with SynXro

March 12th, 2008 Bala Krishna Posted in ASP.Net, Browser Stuff, Dot.Net, Error Log, Events, General, Linux Commands, Nation, Operating System Tutorial, PHP Function, PHP Programming, PHP Tutorial, Remote Access, Tips and Tricks, Web Development, Web Hosting, Web Technology, Window Application, windows xp No Comments »

SynXro is another web based product to connect, a PC to PC; or PC to LAN connection. SynXro allows you to access all the drives of your PC and all the network drives of all PCs connected to your Local Area Network from anywhere in the world. You only need to have access of internet and modern web browser to connect to your PC. No additional software or hardware is required.

Features:

  • Navigate through your Local Area Network.
  • Remote access to LAN and/or Computer.
  • Remote upload and download capabilities.
  • Remote execution of commands.
  • Accessible from any location through the internet via any browser.

Get 7 Days SynXro Trail Version

AddThis Social Bookmark Button

Uber Uploader ClipShare Rayzz Ostube Failed to Find File Length Error

February 4th, 2008 Bala Krishna Posted in Blogging, Browser Stuff, Bug Fix, CentOS, Crawler, FFMPEG, FFMPEG-PHP, Linux, Linux Commands, Online Media, Operating System Tutorial, PHP Function, PHP Programming, PHP Tutorial, Tips and Tricks, VBScript, Web Development, Web Directory, Web Hosting, Web Technology, uber-uploader, windows xp No Comments »

You may receive “Failed To Find Flength File” error during file upload using uber uploader. The main cause of this problem is due to apache mod_security enabled on your host. Apache mod_security may prevent writing flength file duing file upload. This will cause uploder to determine file length for percentage calculation and uploader produce file length error.

Solution: This problem can be easily solve by turn off mod_security through .htaccess . We need to turn off mod_security for uploader directory. To solve this problem, create .htaccess file with the following line and upload file to the directory where uploader files reside.

<IfModule mod_security.c>
# Turn off mod_security filtering.
SecFilterEngine Off

# The below probably isn’t needed,
# but better safe than sorry.
SecFilterScanPOST Off
</IfModule>

AddThis Social Bookmark Button




|