Browsing articles from "October, 2009"
Oct
30
2009

sso Implementation in linux

Steps needs to follow to implement sso in our server (Linux)   : 1. Needs to download ntlm package for our corresponding server version. 2. Install or upload the ntlm.so file in apache module folder. 3. Needs to enable the ntlm module in apache configuration file for load the module. 4. Needs to add some few configuration for  ntlm (domain name,domain controller name and domain backup controller name) and also needs to set the authentication type [...]

Oct
30
2009
Uncategorized

xml and xpath

XML stands for extensible Markup Language XML is a markup language like HTML. It won’t have any predefined tags. You must define the tags. XML was designed to describe data and to focus on what data is. If you want to ignore some thing from the parser, you can use CDATA. Namespaces are used to avoid the Name conflicts in XML XPATH: Is a language for defining parts of an xml. xpath uses the following [...]

Oct
30
2009
Uncategorized

301 Redirect for Apache

Write to file called ‘.htaccess’. The file is named only as an extension.Hidden files must be viewable in operating system. mod_rewrite must be enabled Command Description Redirect 301 /oldpage.html http://www.ournewdomain.com/newpage.html Redirect single file or directory to a newfile or directory on a different domain RewriteEngine onRewriteCond %{HTTP_HOST} ^mysite\.com [NC]RewriteRule (.*) http://www.oursite.com/$1 [L,R=301] Redirect http://oursite.com to http://www.oursite.com. Affects entire domain Entire site:Redirect 301 / http://www.ournewdomain.com/Redirect permanent /old http://www.ournewdomain.com/new Redirect entire domain to a new domainas either [...]

Oct
23
2009
Uncategorized

Important SEO

When I am searching in google I saw some important SEO tips. I shared that one here. Important SEO HTML tags Title Tag <head> <title>Keyword</title> </head> ———————– H1,H2,H3 <h1>Most Important</h1> <h2>Second Most Important</h2> <h3>Third Most Important</h3> ————————— Bold, Strong (Same Worth) <b>Keyword</b> <strong>Keyword</strong> ————————- Image (XHTML) <img src=”keyword.jpg” mce_src=”keyword.jpg” alt=”keyword” /> —————————- Hyperlink <a href=”http://www.mysite.com/webpage.html” mce_href=”http://www.mysite.com/webpage.html” title=”keyword”>Keyword in Anchor Text</a> Hyperlink (No Followed) <a href=”http://www.mysite.com/webpage.html” mce_href=”http://www.mysite.com/webpage.html” title=”keyword” rel=”nofollow”>Keyword in Anchor Text</a> Search Engine Indexing Limits *Does [...]

Oct
23
2009

Best Practices – Javascript

1.use === instead of == 2. Avoid to use short-hand if(condition) variable = true Consider this : if(condition) { variable = true; } 3. Place scripts at the bottom of your page 4. Declare variables outside of the for statement 5. reduce globals 6. Comment your code. 7. Dont pass a String  to “Setinterval” or “SetTimeOut” 8.Dont use the “with” statement 9.use {} instead of new object() 10. use [] instead of new Array() var [...]

Oct
23
2009
Uncategorized

Excel Creation – Multiple worksheets in php

After spending few days i find a format to generate excel with multiple work sheets. Based on that format , I created my own functions for creating excel with multiple work sheets with out using any third party tool. Creating Header for excel function header_excel(){ $header = <<<EOH <?xml version=”1.0″?> <?mso-application progid=”Excel.Sheet”?> <Workbook xmlns=”urn:schemas-microsoft-com:office:spreadsheet” xmlns:o=”urn:schemas-microsoft-com:office:office” xmlns:x=”urn:schemas-microsoft-com:office:excel” xmlns:ss=”urn:schemas-microsoft-com:office:spreadsheet” xmlns:html=”http://www.w3.org/TR/REC-html40″> <DocumentProperties xmlns=”urn:schemas-microsoft-com:office:office”> <Author>Author Name</Author> <LastAuthor>Author Name</LastAuthor> <Created>Created Date</Created> <Company>Company Name</Company> <Version>Version</Version> </DocumentProperties> <ExcelWorkbook xmlns=”urn:schemas-microsoft-com:office:excel”> <WindowHeight>12240</WindowHeight> <WindowWidth>24855</WindowWidth> <WindowTopX>240</WindowTopX> [...]

Oct
23
2009
Uncategorized

Apache Log Format.

Apache logs : Actually we have two types of log files in the apache server. 1. Access_log – used to store the information ,regarding the request served by the server. 2. error_log    -  used to store the error information. we can able to customize our own log format. sample code: LogFormat “%h %l %u %t \”%r\” %>s %b” common LogFormat “%h %l %u %t \”%r\” %>s %b” \”%{Referer}i\” \”%{User-agent}i\”” combined %h: The IP address of [...]

Oct
23
2009
Uncategorized

Automatic Server Restart in linux.

In windows , if the server shutdown or crashed ,it will automatically restart , if we installed apache as service. But i linux server we needs to write a shell program to do this. #!/bin/bash if [ ‘ps -waux | grep -v grep | grep -c httpd’ -lt 1 ]; then apachectl restart; fi By using the above script we can able to achive this. 1. We needs to give executable permission for the script and [...]

Oct
23
2009
Uncategorized

Imap configuration in php

map – Used to communicate with the mail server and reading mails. Steps to configure Imap : 1. Download the rpm package for imap ,it depends on the os installed. 2. Install that rpm using rpm -i rpmpackage . 3. Once the insallation was finished, the imap.so file was placed in the corresponding php module folder. 4. We needs to enable the pop3 port for mail server. Once all these are finished,we can able to [...]

Oct
23
2009
Uncategorized

php tips

When i read the blogs through google reader ,i saw some php tips. I shared that points here. Use a SQL Injection cheatsheet. Know the Difference Between Comparison Operators Shortcut the else Drop those Brackets Favor str_replace() over ereg_replace() and preg_replace() Use Ternary Operators Memcached Use a Framework Use the Suppression Operator Correctly Use isset instead of strlen

Pages:12»

 

October 2009
M T W T F S S
    Jul »
 1234
567891011
12131415161718
19202122232425
262728293031  
  Domain Name + 1GB Linux India Web Hosting in Rs.349