Archive

Archive for the ‘Ganeral’ Category

How can I set php.ini values in a .htaccess file ?

January 30, 2013 1 comment

Although we do not allow access to the php.ini files on our servers, many common php.ini settings can be changed in a .htaccess file. If you wish to make these changes site-wide, they should be made in the .htaccess file in your public_html folder. If you just wish a single directory and subdirectories to have these changes, create a .htaccess file in that directory.

There are two ways to change php.ini settings in a .htaccess file. The first is valid for boolean values (that is, settings that are either true or false). To set a boolean value use:
php_flag setting value 
Where value can either be 0 (which also means off, or false) or 1 (which also means on, or true).

If you have a setting which requires a value or string (such as a timeout setting or error log directory), you’ll need to use:
php_value setting value
Where value is expressed just as it would be in a php.ini file.

Please see http://us2.php.net/manual/en/ini.php for more information on the various settings. Settings marked ‘PHP_INI_SYSTEM’ in the ‘Changeable’ column cannot be changed in .htaccess, they can only be changed by the system administrator.

 

Static IP vs. Dynamic IP Address

January 30, 2013 Leave a comment

Converted to SVG from the XFIG source quoted o...

Converted to SVG from the XFIG source quoted on the original PNG file’s page using XFIG. Edited and fixed using Inkscape. (Photo credit: Wikipedia)

 

A static IP address is one that remains fixed and never changes. The PC always sees the same address regardless if the session between the PC and ISP is broken or not.

 

A Dynamic IP Address is one that changes over time or in the case of a Dial-up connection, when the user disconnects and reconnects to his/her ISP.

 

 

Creating An E-Mail Account in Microsoft Outlook 2007

November 26, 2012 Leave a comment

Microsoft Outlook 2007

TrackerOffice, Microsoft Outlook based product

1. Launch your Microsoft Outlook 2007

2. Go to Tools and select Account Settings.

3. Click on the New… to create a new email account as below screen shot.

4. Check on Manually configure server settings or additional server types? as below screen shot

5. Enter your name and full email address on User’s Information section.

6. Select Account Type. You may choose either POP3 or IMAP as we support for both email protocol.

7. Enter mail.domain.com for incoming and Outgoing mail server (SMTP) mail.domain.com

8. Then assign your full email address and password on the Logon information section and check on to remember password

9. Then click on the More settings… as below screenshot.

10. Then go to Outgoing server tab to check on My outgoing server (SMTP) requires authentication as it is our currently mail server policy to allow sending from mail client.

11. Go to Advanced tab and change Outgoing server (SMTP) port from 25 to 587 and click OK.

12. Click Finish and your email account in Microsoft Outlook 2007 is ready to use.

How To Clear Your Cache ?

November 26, 2012 Leave a comment

Apple Safari icon

Apple Safari icon (Photo credit: Wikipedia)

Cache is a block of memory used for temporary storage of data (ie: webpages, etc..) that is likely to be used again. Your CPU and hard drive frequently use a Cache, as do web browsers and web servers. A Cache is made up of a pool of entries. Each entry has a piece of data or copy of the original information which can be stored in multiple locations. Each entry also has a tag, which specifies the identity of that
particular peice of data in your storage. When the Cache client (web browserISP, oroperating system) wishes to access this data it first checks the Cache. This helps save time and reduces the workload on the system using the Cached client. If you use your web browser and an entry can be found with a tag matching that of the desired data, then the Cached version is used instead. This situation is known as a Cache Hit. When theCache is consulted and found not to contain data with the desired tag, it is known as aCache Miss.

So, for example, a web browser program might check its Local Cache stored on your computer to see if it has a local copy of the contents of a web page at based on a particular URL. In this example, the URL is
the tag, and the contents of the web page is the data. The percentage of accesses that result in Cache Hits or Cache Misses is known as the Hit Rate or Hit Ratio of the cache.

Most systems fetch and retrieve updated versions of your stored data or Cache every 18-72 hours. This means that your ISP and your local system can at anytime have an out of date version of your data (i.e. website) in its Cache. If you have updated your website, migrated servers or changed web hosts you may not immediately see the changes you made. This could be because your local system has an out of date copy or your ISP’s system has not clear their Master Cache. Follow the steps below to clear your local systems Cache first. If this does not do the trick then you may need to contact your ISP and request they manually flush their current cache. Depending on the ISP if they refuse you will have to wait for them to automatically clear their Cache which may take 18-72 hours for them to do.

How do I clear my browser cache?
For Internet Explorer 4.x and Above 

  • Click Tools from the Internet Explorer menu bar.
  • Click Internet Options.
  • Click the General Tab.
  • Click the Delete Files button in the Temporary Internet files section.
  • If you still have a problem, repeat the steps above and restart the computer.

For Internet Explorer 8.x and 9.x 

  • Click Tools from the Internet Explorer menu bar.
  • Click Internet Options.
  • Click Delete button from Browsing history.
  • Click Delete files… button from Temporary Internet Files section.
  • If you still have a problem, repeat the steps above and restart the computer.

For Firefox 1.5x and Above 

  • Click Tools from the Firefox menu bar.
  • Click Clear Private Data Ctr+Shift+Del.
  • Make sure the box is checked next to each option you wish to Clear Private Datafor.(Browsing History, Cache, Cookies, Authenticated Sessions)
  • Click the Clear Private Data Now button.
  • If you still have a problem, repeat the steps above and restart the computer.

For Netscape 4.x and Above 

  • Click Preferences from the Edit menu.
  • Click Edit from Netscape menu bar.
  • Expand the Advanced menu by clicking the triangle sign.
  • Click Cache.
  • Click both the Clear Memory Cache and the Clear Disk Cache buttons.
  • If you still have a problem, repeat the steps above and restart the computer.

For Mozilla 1.x and Above 

  • Click Edit from the Mozilla menu bar.
  • Click Preferences…from the Edit menu.
  • Expand the Advanced menu by clicking the plus sign.
  • Click Cache.
  • Click ok to close the preferences menu.
  • If you still have a problem, repeat the steps above and restart the computer.

For Opera 

  • Click Edit from the Opera menu bar.
  • Click Preferences… from the File menu.
  • Click the History and Cache Menu.
  • Click Cache.
  • Click ok close the Preferences menu.
  • If you still have a problem, repeat the steps above and restart the computer.

For AOL 3.x and Above 

  • Start AOL from AOL menu bar.
  • Select Keyword > Go to Keyword.
  • Type the keyword preferences.
  • Click Go. Dialog box: AOL Settings: Customize your AOL Enterprise.
  • Select Essentials tab > Internet (Web) Options - Set Web Browser options and properties. Dialog box: Internet Options.
  • Select General tab.
  • Click Delete files. Dialog box: Delete Files: Delete all files in the Temporary Internet files.
  • Select Delete all offline content.
  • Click OK.
  • Click OK.
  • If you still have a problem, repeat the steps above and restart the computer.

For Safari 1.x for Macintosh OS X 

  • Open Safari.
  • Click on Safari in the toolbar and select Preferences…
  • Click on the Privacy Icon.
  • Click the [clear] button next to the Cache option.
  • Click OK.
  • Exit your Safari browser completely and re-launch Safari.
  • If you still have a problem, repeat the steps above and restart your computer.

Basic UNIX Tutorial || Chapter Three

July 25, 2012 Leave a comment

3.1 Redirection

Most processes initiated by UNIX commands write to the standard output (that is, they write to the terminal screen), and many take their input from the standard input (that is, they read it from the keyboard). There is also the standard error, where processes write their error messages, by default, to the terminal screen.

We have already seen one use of the cat command to write the contents of a file to the screen.

Now type cat without specifing a file to read

% cat

Then type a few words on the keyboard and press the [Return] key.

Finally hold the [Ctrl] key down and press [d] (written as ^D for short) to end the input.

What has happened?

If you run the cat command without specifing a file to read, it reads the standard input (the keyboard), and on receiving the ‘end of file‘ (^D), copies it to the standard output (the screen).

In UNIX, we can redirect both the input and the output of commands.

3.2 Redirecting the Output

We use the > symbol to redirect the output of a command. For example, to create a file called list1 containing a list of fruit, type

% cat > list1

Then type in the names of some fruit. Press [Return] after each one.

pear
banana
apple
^D {this means press [Ctrl] and [d] to stop}

What happens is the cat command reads the standard input (the keyboard) and the > redirects the output, which normally goes to the screen, into a file called list1

To read the contents of the file, type

% cat list1

Exercise 3a

Using the above method, create another file called list2 containing the following fruit: orange, plum, mango, grapefruit. Read the contents of list2

3.2.1 Appending to a file

The form >> appends standard output to a file. So to add more items to the file list1, type

% cat >> list1

Then type in the names of more fruit

peach
grape
orange
^D (Control D to stop)

To read the contents of the file, type

% cat list1

You should now have two files. One contains six fruit, the other contains four fruit.

We will now use the cat command to join (concatenate) list1 and list2 into a new file called biglist. Type

% cat list1 list2 > biglist

What this is doing is reading the contents of list1 and list2 in turn, then outputing the text to the file biglist

To read the contents of the new file, type

% cat biglist

3.3 Redirecting the Input

We use the < symbol to redirect the input of a command.

The command sort alphabetically or numerically sorts a list. Type

% sort

Then type in the names of some animals. Press [Return] after each one.

dog
cat
bird
ape
^D (control d to stop)

The output will be

ape
bird
cat
dog

Using < you can redirect the input to come from a file rather than the keyboard. For example, to sort the list of fruit, type

% sort < biglist

and the sorted list will be output to the screen.

To output the sorted list to a file, type,

% sort < biglist > slist

Use cat to read the contents of the file slist

3.4 Pipes

To see who is on the system with you, type

% who

One method to get a sorted list of names is to type,

% who > names.txt
% sort < names.txt

This is a bit slow and you have to remember to remove the temporary file called names when you have finished. What you really want to do is connect the output of the who command directly to the input of the sort command. This is exactly what pipes do. The symbol for a pipe is the vertical bar |

For example, typing

% who | sort

will give the same result as above, but quicker and cleaner.

To find out how many users are logged on, type

% who | wc -l

Exercise 3b

Using pipes, display all lines of list1 and list2 containing the letter ‘p’, and sort the result.

% cat list1 list2 | grep p | sort

Summary

Command Meaning
command > file redirect standard output to a file
command >> file append standard output to a file
command < file redirect standard input from a file
command1 | command2 pipe the output of command1 to the input of command2
cat file1 file2 > file0 concatenate file1 and file2 to file0
sort sort data
who list users currently logged in

More Post:

  1. UNIX Introduction
  2. UNIX Chapter One
  3. UNIX Tutorial || Chapter Two
Follow

Get every new post delivered to your Inbox.

Join 3,434 other followers

%d bloggers like this: