Apache Server for Windows Little Black Book:Making Your Site Dynamic Through CGI
function GetCookie (name)
{
var arg = name + "=";
var alen = arg.length;
var clen = document.cookie.length;
var i = 0;
while (i < clen)
{
var j = i + alen;
if (document.cookie.substring(i, j) == arg) {
var end = document.cookie.indexOf (";", j);
if (end == -1)
end = document.cookie.length;
return unescape(document.cookie.substring(j, end));
}
i = document.cookie.indexOf(" ", i) + 1;
if (i == 0) break;
}
return null;
}
var m1='';
var gifstr=GetCookie("UsrType");
if((gifstr!=0 ) && (gifstr!=null)) { m2=gifstr; }
document.write(m1+m2+m3);
Keyword
Title
Author
ISBN
Publisher
Imprint
Brief
Full
Advanced Search
Search Tips
Please Select
-----------
Components
Content Mgt
Certification
Databases
Enterprise Mgt
Fun/Games
Groupware
Hardware
IBM Redbooks
Intranet Dev
Middleware
Multimedia
Networks
OS
Prod Apps
Programming
Security
UI
Web Services
Webmaster
Y2K
-----------
New Titles
-----------
Free Archive
To access the contents, click the chapter and section titles.
Apache Server for Windows Little Black Book
(Publisher: The Coriolis Group)
Author(s): Greg Holden with Matthew Keller
ISBN: 1576103919
Publication Date: 01/01/99
function isIE4()
{
return( navigator.appName.indexOf("Microsoft") != -1 && (navigator.appVersion.charAt(0)=='4') );
}
function bookMarkit()
{
var url="http://www.itknowledge.com/PSUser/EWBookMarks.html?url="+window.location+"&isbn=0";
parent.location.href=url;
//var win = window.open(url,"myitk");
//if(!isIE4())
// win.focus();
}
Search this book:
Previous
Table of Contents
Next
Apaches CGI Debugging Directives
Debugging CGI scripts is a tedious and often difficult task. Apache includes logs that record CGI output. You can also use directives that are provided by mod_cgi help developers to track down errors.
TIP: If you use the Perl module CGI.pm or an application like WinPerl, you can do a lot of script debugging. WinPerl provides detailed error reports, and CGI.pm lets you do interactive debuggingyou enter key/pairs as you would in a Web-page form, and CGI.pm provides output.
You can follow these steps to track errors recorded in Apaches CGI error logs:
1. Open srm.conf in Notepad.
2. Enter the ScriptLog directive, which identifies the log file name for CGI errors. ScriptLog follows this syntax:
ScriptLog path-to-logfile
If path-to-logfile does not begin with a forward-slash (/), it is considered relative to the directory identified by the ServerRoot directive.
3. Optionally, you can limit the size of the CGI log. Otherwise, the log file can grow rapidly as CGI errors are encountered. To do so, use the ScriptLogLength directive, which has this syntax:
ScriptLogLength size
The size is given in bytes; the default size is 10385760 bytes, which is 10.38MB.
4. Additionally, you can limit the size of any data that is submitted by POST or PUT. This, too, is given in bytes; the default is 1024 bytes.
These three directives might look like this:
ScriptLog C:/www/Apache/logs/cgi.log
ScriptLogLength 16000000
ScriptLogBuffer 1024
5. Choose File|Save to save your changes, and restart Apache.
Be aware that, although recording CGI errors is helpful when you are debugging, you should probably comment out these lines after your script has been checked. Daily logging of all CGI errors can slow down your server performanceand the log files can grow very large very fast.
Previous
Table of Contents
Next
Products | Contact Us | About Us | Privacy | Ad Info | Home
Use of this site is subject to certain Terms & Conditions, Copyright © 1996-2000 EarthWeb Inc.
All rights reserved. Reproduction whole or in part in any form or medium without express written permission of EarthWeb is prohibited.
Wyszukiwarka
Podobne podstrony:
163 165163 166163 00165 (2)index (163)Mazowieckie Studia Humanistyczne r1999 t5 n1 s157 165 action=produkt&produkt=165165 jedrzejkowięcej podobnych podstron