Showing posts with label Others. Show all posts
Showing posts with label Others. Show all posts
How to Set Environment Variable in .htaacess
SetEnv SERVER_ADMIN webmaste@tstindia.com
in .htaccess file
write php script
<?
echo "<pre>";
print_r($_SERVER);
echo "</pre>";
?>
output
Array
(
[DB_USER] => root
[DB_PASS] =>
[SERVER_ADMIN1] => webmaste@htaccesselite.com
[HTTP_HOST] => 192.168.2.61
[HTTP_USER_AGENT] => Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.14) Gecko/20080404 Firefox/2.0.0.14
[HTTP_ACCEPT] => text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
[HTTP_ACCEPT_LANGUAGE] => en-us,en;q=0.5
[HTTP_ACCEPT_ENCODING] => gzip,deflate
[HTTP_ACCEPT_CHARSET] => ISO-8859-1,utf-8;q=0.7,*;q=0.7
[HTTP_KEEP_ALIVE] => 300
[HTTP_CONNECTION] => keep-alive
[HTTP_COOKIE] => poll=Voted; style=null; SMFCookie575=a%3A4%3A%7Bi%3A0%3Bs%3A1%3A%221%22%3Bi%3A1%3Bs%3A40%3A%22fad077d4e426943b32e462a38d114fbd337b3fc4%22%3Bi%3A2%3Bi%3A1399441877%3Bi%3A3%3Bi%3A0%3B%7D; __utmz=157290106.1207050145.1.1.utmccn=(direct)|utmcsr=(direct)|utmcmd=(none); __utma=157290106.1426920627.1207050145.1210759060.1214305026.6; WT_FPC=id=247bbbe7e73420e83c21209459354270:lv=1209460134764:ss=1209459354270; SMFCookie956=a%3A4%3A%7Bi%3A0%3Bs%3A1%3A%221%22%3Bi%3A1%3Bs%3A40%3A%22e53f2ea11a88993a04d0837b81ccb7c4c3699121%22%3Bi%3A2%3Bi%3A1399292921%3Bi%3A3%3Bi%3A0%3B%7D; PHPSESSID=e2536b9303b16fb31076d6a8b1b3ed1d; USRNIM=; PASSVIN=; REMIZ=; SESSd1d6ec85abd01c207c8a130a38579464=5bf10fdb87e2d001299a0acb37206889; 5cd4ea95eb59d31cfbbd83d1c02f8921=8b024a3149f666280b6f54fe21cbc471
[HTTP_CACHE_CONTROL] => max-age=0
[PATH] => C:\Perl\site\bin;C:\Perl\bin;E:\ruby\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Program Files\Common Files\Teleca Shared;E:\ruby\bin
[SystemRoot] => C:\WINDOWS
[COMSPEC] => C:\WINDOWS\system32\cmd.exe
[PATHEXT] => .COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.RB;.RBW
[WINDIR] => C:\WINDOWS
[SERVER_SIGNATURE] => Apache/2.2.4 (Win32) DAV/2 mod_ssl/2.2.4 OpenSSL/0.9.8e mod_autoindex_color PHP/5.2.3 Server at 192.168.2.61 Port 80
[SERVER_SOFTWARE] => Apache/2.2.4 (Win32) DAV/2 mod_ssl/2.2.4 OpenSSL/0.9.8e mod_autoindex_color PHP/5.2.3
[SERVER_NAME] => 192.168.2.61
[SERVER_ADDR] => 192.168.2.61
[SERVER_PORT] => 80
[REMOTE_ADDR] => 192.168.2.61
[DOCUMENT_ROOT] => C:/xampp/htdocs/
[SERVER_ADMIN] => admin@localhost
[SCRIPT_FILENAME] => C:/xampp/htdocs/server.php
[REMOTE_PORT] => 1575
[GATEWAY_INTERFACE] => CGI/1.1
[SERVER_PROTOCOL] => HTTP/1.1
[REQUEST_METHOD] => GET
[QUERY_STRING] =>
[REQUEST_URI] => /server.php
[SCRIPT_NAME] => /server.php
[PHP_SELF] => /server.php
[REQUEST_TIME] => 1215003903
[argv] => Array
(
)
[argc] => 0
)
Php Others
Mozilla 3.0 for windows and Ubuntu
Use below link to download Mozilla 3.0
http://www.mozilla.com/en-US/ --- windows
Ubuntu --follow the steps mentioned in the below url,it will do all the backups then it will install
Here one change we need to do during the installation
sudo tar -C /opt -jxvf firefox-3.0b2.tar.bz2
instead of this make modification like this
sudo tar -C /opt -jxvf folder/firefox-3.0b2.tar.bz2
Refer:
http://www.ubuntugeek.com/howto-install-firefox-3-beta-2-in-ubuntu-710-gutsy-gibbon.html
Php Others
Htaccess
Creating A .htaccess File
Creating a .htaccess file may cause you a few problems. Writing the file is easy, you just need enter the appropriate code into a text editor (like notepad). You may run into problems with saving the file. Because .htaccess is a strange file name (the file actually has no name but a 8 letter file extension) it may not be accepted on certain systems (e.g. Windows 3.1). With most operating systems, though, all you need to do is to save the file by entering the name as:
".htaccess"
(including the quotes). If this doesn't work, you will need to name it something else (e.g. htaccess.txt) and then upload it to the server. Once you have uploaded the file you can then rename it using an FTP program.
Start like this:
You can use custom error pages for any error as long as you know its number (like 404 for page not found) by adding the following to your .htaccess file:
ErrorDocument errornumber /file.html /*optional
deny from all
Creating a .htaccess file may cause you a few problems. Writing the file is easy, you just need enter the appropriate code into a text editor (like notepad). You may run into problems with saving the file. Because .htaccess is a strange file name (the file actually has no name but a 8 letter file extension) it may not be accepted on certain systems (e.g. Windows 3.1). With most operating systems, though, all you need to do is to save the file by entering the name as:
".htaccess"
(including the quotes). If this doesn't work, you will need to name it something else (e.g. htaccess.txt) and then upload it to the server. Once you have uploaded the file you can then rename it using an FTP program.
Start like this:
You can use custom error pages for any error as long as you know its number (like 404 for page not found) by adding the following to your .htaccess file:
ErrorDocument errornumber /file.html /*optional
To denyl all :RewriteEngine On .....this is line should be
there in all htaccess file.
eg:
ErrorDocument errornumber /file.htmlRewriteEngine On
RewriteRule ^article/([0-9]+)/? article.php&article=$1[R].htaccess file to stop the directory list from being shown:
Options -indexes
You can block an IP address by using:
deny from 000.000.000.000
To allow :
allow from 000.000.000.000
deny from all
Php Others
Subscribe to:
Posts (Atom)