home *** CD-ROM | disk | FTP | other *** search
/ PC World 2002 May / PCWorld_2002-05_cd.bin / Komunik / apache / apache_1.3.24-win32-x86-no_src.exe / F169648_cgi.html.en < prev    next >
Encoding:
Text File  |  2002-03-21  |  22.4 KB  |  662 lines

  1. tem dFyufthe 192.101.205m dFyufthe eOd proe  tcombeOd pro)wotcomm dFyufthe tle ichen . nehe 
  2.    U  kqu<tt>O    .0tt> 
  3.  Insle
  4.  seyse:sureounops senr". proceoltu>lry
  5. restrict kqu  t pr ongs fc    s-    es wffe 
  6. o:le  O coo-,aby>he,b a kquaa<tt>de3
  7.   tt> o
  8.  
  9. aev<tt>atall</tt>
  10.     graomi Vi:.diateu item O    
  11. De3
  12. ,Atall
  13. DFyufthe 
  14. is;rAtall fthe hos rimgseOd protcomm chen . nehe 
  15.    Lse rug justc  st<tt> tall</tt> graomiaveow fle pot doowgd  isn't senwffe,sbeEis r<id=Rpcorle
  16.  
  17.    s
  18.  rom eeed hostcin,cenw</a><addMThisiaoolthat p
  19. t <teoneei\m Wh   es wffe 
  20. <  aAlatoinehe 
  21.  i>    woi> 
  22.    s
  23.  rom eeed hostwediately to
  24. pa
  25. cing ans"
  26. sfy".workS"
  27. sfy  y RettFecil(npThe <tt>S"
  28. sfy  tt> graomiaveocieviewusedw
  29. o specif  eeeddireg
  30. sevoralscsoryrialthebw:mlm otFtfn wthe Sry
  31.    o decide  ac urror rf Ricues  
  32.     efll se:urffereapdmiss   . <tt>S"
  33. sfy  tt> cle (doapt"ke aso neargup>Be e  pof<twonopThiss
  34. -t<tt> ta</tt>    proce<tt>a3
  35.   tt>. B Ansfaultoitersoiccumedelat thesvalu  Me proce<tt>ata</tt>f This  eansounops flsevoralscsoryriar".llow thpecifth a the oll<ld tok " ust be metei\w
  36.      ifhrsomee   ao
  37.     gatoin. Howche in acsee 
  38. oe<tt>a3
  39.   tt>,>wlsdsevoralscsoryria in p>mdhebw:hpecifth abut i.ngs fu>pr s"
  40. sfitsl    racgs se,>wls
  41.     the  wfll se:urffereaehs coc mediately to
  42.      <rysg"odaeOd pro,of>- is Medrrogrealain/pcelat  fao
  43.     assureounope"a  Winghnatindopeci ino iccomp> i  n'ctthe romhe webonesotF<,taler for t, oll<hosts t\sotF<
  44. eter for t" ill bef=ed wg Vinafreefplain/p>
  45. thenindopecif This w fle be plae,pylshth
  46.     bydrrogrethe <tt>S"
  47. sfy  tt> graomiavee>aso,h l/tbealwtediateu item l inDraomitte /usr/ the /strong/htgpcs/seksorn th
  48.   Au td"(  Basicw<  Au tNimg t\s coeturroAu tis tF
  49.    /www/ iccod/u>prsurroAu t
  50.     F
  51.    /www/ iccod/c    sm   Rnp gra i   becustomersurroAtall fthe F tornaltcomm   S"
  52. sfy/anyurl in/Draomitten thm chen . nehe 
  53.    Ia 
  54. erso=cenario,nd, tsiwill bew etei\w acgs   eis/p hf yoa in p> iccomp>, ineif theiacheninpthe ictornalsr for t.ediately to
  55. p1
  56. cing ancummary".Summaryworkwo      preqetp>The variouscau thetlf"
  57. </ y
  58.  les sesvotF<numb  ddf<To tdireg
  59. aoorestrictfplain/p>
  60. ,talehostcrasedwnutthe otF
  61. ts C.ngs :ct. T
  62.    . Ts ycoonfiao,omewhatosso
  63. ap>eictorface uoothisllow tBunco
  64. </alts, but sesvotF<dconfigu<eback-end mecr nismunn i
  65.     oltu>lry
  66. au thetlf"
  67.  p
  68. ) wo
  69.    .ediately to
  70.    ch 
  71. ete lain/pcelat  fmecr nismortallsses uoorestrict proceolain/prasedwnutcsoryriaunrel"theaoothe otF
  72. ts C.ngs :ct. T
  73.    ..p inschudioediate to
  74. p inschte to
  75. p4 Feots.<es  y4schte to
  76. dwayse is nedt>
  77. cing anfoot1">...
  78. valu .<orkwayse is nhref="#foot1_inturn"> set>21.1</set>   
  79. </dthe con'L   Odd
  80.  pre are>oltu>lry
  81. anumb  ddf<oodowp>Beeo
  82. </sounopsgat
  83.     r r" >
  84. ethis fif t"
  85. </.nMLDBMciss   eC.ngs m,
  86. f M Od pro.
  87.     r Howche infe  ee  iurposhe ld lais discuss   whwe'll justcdea 
  88.     r w    sso
  89. ap>eBerknowy DB, wexml inofik a Aeplhf yopiippth
  90.     r w    whatche  CpFt"
  91. grelr by s senr". alinady runnogr.<oddhe con'L   Odt>
  92. cing anfoot2">...
  93. B
  94.   </rkwayse is nhref="#foot2_inturn"> set>21.2</set>   
  95. </dthe con'L   Odd
  96. Or,s acct frri rrogree
  97. _au t_dbm,natDBMsB
  98.   ..0ddschudioeddwayse is
  99. p inschte t</bodyateu/ce.hschte<!DOCTYPE ce.h PUBLIC "-//W3C//DTD Xile s1.0 T comMThisal//EN"he web"apil://www.w3.org/TR/xce.h1/DTD/xce.h1-t comMThisal.dtd"schte<ce.h xmlns="apil://www.w3.org/1999/xce.h, Apli<hnadayse is
  100. metcing angen b><or"fren the="ile sTidy,llinewww.w3.org"inschte to
  101.  
  102. tle>13, ApaTulwil>l: DyingicTCelathet>F
  103.   CGI  ttle>te t</hnadayse <!-- Backg" >
  104. ewexte,s) ogs
  105. blu  (un t.  ed),cinvy ( t.  ed),ctfn (amiave) --schte t<body bg  y r="#FFFFFF"<t xt="#000000"s) og="#0000FF"te tv) og="#000080"sa) og="#FF0000" Studio 5 5.divhe.,codeCENTER, Aplinec:\imrelrc="../images/sub.gif"sa)t="[APACHE DOCUMENTATION]"ins e con'L   Oh3>13, Apa;ref=Se r   V<rs    1.3.0e
  106.   udioeddivschtetely to
  107. p1he.,codeCENTER, DyingicTCelathet>F
  108.   CGI        to
  109. ctt>__i\dex__"hing an__i\dex__">   
  110.  <!-- INDEX BEGIN --sch'L   tely to
  111. uwayse is neS>
  112. chref="#dyingicren the>F
  113.  cgi, DyingicTCelathet>F
  114.  yse is nCGI   
  115. </ the con'L   Ot<AStudio 5 5.chref="#stps <p kqstrongtCpFtf tcgi, Ctps <p kqu>/p>acdireg
  116. reg
  117. >
  118. pFtf tnCGI   
  119.   ow</a></h2>.uwayse is nis neS>
  120. chref="#scripte.,as".ScriptA.,as   
  121. </ the con'L   L   Ot<AStudio 5 5 5 5.chref="#sgionesotFofscripte.,asgraomitti s">CGIStudio 5 5 5 5inesotF<ld ScriptA.,as graomitti s   
  122.   ow</a></h2>/h2>.uwayse is nis nis neS>
  123. yse is nis nis nhref="#"CEnictlyrrogropThisstCpFtf tcgiexecuThis">ECEnictlyyse is nis nis nrrogreOpThiss
  124. >
  125. pFtf tnCGI execuThis   
  126. </ the con'L   L   is neS>
  127. chref="#htplain/B
  128.   s">.htplain/ f
  129.   s   
  130. </ the L   L   is ne/uwayse is nis ne/ the L   L   e/uwayse is n</ the con'L   Ot<AStudio 5 5.chref="#wr   kqscgip  gram">Wrio kquanCGI p  gram   
  131.   ow</a></h2>.uwayse is nis neS>
  132. chref="#,talB
  133. rstcgip  gram">YtaleB
  134. rstTCGIStudio 5 5 5p  gram   
  135. e/ the L   L   e/uwayse is n</ the con'L   Ot<AStudio 5 5.chref="#butits="ills.<wr tt p">But it'so="ill s.<urror   r wr tt p!   
  136.   ow</a></h2>.uwayse is nis neS>
  137. chref="#f
  138.   pFtf ss   s">F
  139.    pFtf ss   s   
  140. </ the con'L   L   Ot<A
  141. chref="# ith n  MS   MS">Piths n  MS   MS   
  142. </ the con'L   L   Ot<A
  143. chref="#syBeexerrors".SyBeex errors   
  144. </ the con'L   L   Ot<A
  145. chref="#errorlogs".Error rons   
  146. e/ the L   L   e/uwayse is n</ the con'L   Ot<AStudio 5 5.chref="#whatsgoogronbehcn gs scen s">Wh  'ojgoogrenuStudio 5 5behcn  the scen s?   
  147.   ow</a></h2>.uwayse is nis neS>
  148. chref="#en tronp>Bevariab  s".En tronp>Beyse is nis nvariab  s   
  149. </ the con'L   L   Ot<A
  150. chref="#stdin
  151.  h<tgput".STDIN o
  152.  
  153. STDOUT   
  154. e/ the L   L   e/uwayse is n</ the con'L   Ot<A.chref="#sgiy
  155.  leslibrati s">CGIStudio 5y
  156.  les/librati s   
  157. </ the con'L   Ot<A
  158. chref="#f MSore n  MS   MS">Ffhrmorcdireg
  159. re n  MS   MS   
  160. </ the L   e/uwayse is<!-- INDEX END --sch'L  
  161. p inschte to
  162. pa
  163. ctt>dyingicren the>F
  164.  cgi,
  165.     ing andyingicren the>F
  166.  cgi, DyingicTCelathet>F
  167.  nCGI   
  168. </y RettFecil(tay
  169.  b
  170.     ="1, Aplinec:\tr Studio 5 5.tdhvalicodee o"> sat ng>Rel"theM
  171.  leswosat ng>.p inschudio  5 5.p inschudio  5 5.chref="../y
  172. /e
  173. _a.,as.ce.h, e
  174. _a.,aswork.p inschudio  5 5.chref="../y
  175. /e
  176. _cgi.ce.h, e
  177. _cgiwork.p inschudio  5 5./tdv ow</a></h2>.tdhvalicodee o"> sat ng>Rel"theDraomi Viewosat ng>.p inschudio  5 5.p inschudio  5 5.chudio  5 href="../y
  178. /e
  179. _mlm
  180. mce.h#addho
  181. ler">en Ho
  182. lerwork.p inschudio  5 5.chref="../y
  183. /corcmce.h#opThiss"AOpF000swork.p inschudio  5 5.chudio  5 href="../y
  184. /e
  185. _a.,as.ce.h#scripte.,as".ScriptA.,as   
  186. <p inschudio  5 5./tdv oudio 5.0trhe io 5.0tay
  187. <p reso 
  188.  
  189.  pnCGI (Comm   G"tTo WIctorface),deChewso  To W inea webdireg
  190. se r   no i\toracet>F
  191.  n xtornalsren the-gen b><ogr5p  grams,urror wwxml aretEftina  ferracfaoo s CGI p  gramf CreCGI scripts. It procers the stodowst,
  192. and ms<ohe,m  whwo Wow,put dyingicfren thet</  <li>,talew  M.   m This dpcup>Be w Insbw:aseF tr
  193.  cThisiaoosthat p:ct. T
  194. peCGI Cples r
  195. >/p>ac
  196. w  M.e r  ,cr
  197.  
  198. gehat p
  199.  
  200.    fn wr   kq:ct. TCGI p  gramf.ediate to
  201. p inschte to
  202. pa
  203. ctt>stps <p kqstrongtCpFtf tcgi,
  204.     ing anstps <p kqstrongtCpFtf tcgi, Ctps <p kqu>/p>acfao
  205.     pFtf tnCGI   
  206.   y RettFecil(npI\w
  207.       aAue  es r
  208. CGI p  gramf waywr t"p   whly,c se'lldireg
  209. ncedAeplhf yo>/p>acf nops <ped
  210. >
  211. pFtf tnCGI execuThism Thereurror r". sevoralsTo tetoido>hism   <p reso 
  212. po
  213. ctt>scripte.,as"cing anccripte.,as".ScriptA.,as   
  214. </e
  215.   thple namThe <code.ScriptA.,as  code. graomiaveot lls 13, Apaeeed  urror rf Ricues  graomittetino, tcrsotF<for
  216. CGI p  gramf.s new veqill
  217.     assum
  218.  unopse <rysf
  219.   ei\ this graomittetinoanCGI p  gram, o
  220. llow tw Insattempe 
  221. oeexecuTe it, wthe Ssaturf Ricues a  dopeci inllow t tojhs<
  222. nby a clies     <p reso 
  223.  
  224. The <code.ScriptA.,as  code. graomiaveo toknofik :.diateu item dio  5 5ScriptA.,as /cgi-bin/ /usr/ the /strong/cgi-bin/w<chen . nehe 
  225.    T e eOd pro,,h l/tis
  226.  rom 
  227. drMgsfaultehe 
  228.  code.apild. nop  code. cnops <p>ThisiB
  229.   ,n f es 
  230.   cty < isn't13, Apei\ the gsfaultWloheo
  231. </gname <code.ScriptA.,as  code.
  232.     graomi Viersofcohwfike>he <code.A.,as  code. graomiavee>wexmlf=ed wdeChewso  URLeen fix thopsis toomdppth sceaMrf Ricues direg
  233. graomioryt <code.A.,as  code. o
  234. t<code.ScriptA.,as  code. r".llow tusu     usedwfo  diaomitti saeeed  rc inesotF<ld laaehe 
  235.  code.Dpcup>BeRoot  code. graomioryt ame gronfiguciebthweheehe 
  236.  code.A.,as  code. o
  237. t<code.ScriptA.,as  code. 
  238. <lngd  isn't<code.ScriptA.,as  code. s provew dded  ean
  239.    lat t <teth
  240.   in p>un     lat URLeen fix w Insbw:mlm otFtfn anCGI p  gram. Soe"laaehe 
  241. eOd pro, lovyot lls 13, Apaeeed  nys  p hs<W inea   dopeci
  242.     beginnogr>>F
  243.   tcode./cgi-bin/  code. pi fle bsthe r ve the Apadireg
  244. graomiory tcode./usr/ the /strong/cgi-bin/  code., o
  245.  
  246. si fle in p>be>rnaotheanoanCGI p  gram.ediately to
  247.   Fe  Od projeil ApacURL proce<code.apil://www.eOd protcom/cgi-bin/tl">.pl  code. 
  248. <llow t tojhs<
  249. ,s new veqill attempe 
  250. oeexecuTe the B
  251.    proce<code./usr/ the /strong/cgi-bin/tl">.pl  code. andointurntApadireg
  252. ineput. Ofctyrse,>wlfB
  253.    efInsaf youooeOse , o
  254.  
  255. baehe 
  256. eOecuTab  ,ao
  257.  
  258. inturntineputeMutdorf Ricues awa ,/in 13, Apllow tw Insinturntan erroremin/at m   <p reso 
  259. po
  260. ctt>sgionesotFofscripte.,asgraomitti s"
  261.     ing ansgionesotFofscripte.,asgraomitti s">CGI inesotF<ld
  262.     ScriptA.,as graomitti s   
  263. </e
  264.   thple namCGI p  gramf aretEftina  stricttheao
  265.     <code.ScriptA.,as  code.'theiaomitti saifhrseft Windrnaslm .
  266.     In>- is wa ,/aresui n reors can tighta  celat  fqeoaisortallwddireg
  267. >
  268. s r<CGI p  gramf.sHowche in acnga sespehrseft Winf=ed wpreEisThiss
  269. <reouake/, thcrF 
  270. <ls.drnaslmfqey<CGI p  gramft Apachhepot be rua fthe rrbin rryeiaomitti sw Fe  Od pro, es lthllow tw sh  aAlatod, tsiaf yoT  Mren theei\ theilehomeeiaomitti surror we Wethe <code.is tDra  code. graomiavef Iflthe  wffe 
  271. o:ileV isn'ttheile l/tCGI p  gramf, but don'tahf yoplain/p>
  272. ngeemd a
  273.     <code.cgi-bin  code. graomiory, the  wfll pee> wayse:ay
  274.   <llow t u/tCGI p  gramf elsewhercm   <p reso 
  275. po
  276. ctt>"CEnictlyrrogropThisstCpFtf tcgiexecuThis"
  277.     ing an"CEnictlyrrogropThisstCpFtf tcgiexecuThis">ECEnictlyyse isrrogreOpThiss
  278. >
  279. pFtf tnCGI execuThis   
  280. </e
  281.   thple namYs cty vi"CEnictly:s r<then<code.OpF000swocode. graomiavee  O coo- otF<,talemd a .e r   cnops <p>ThisiB
  282.   ,n
  283. o specif  eeedTCGIStudioexecuThis w</ppFtf tothei\ a rf Ricues  graomitte:.diateu item dio  5 5l inDraomitte /usr/ the /strong/htgpcs/somegran th
  284.                 OpThiss
  285. +ExecCGIStudio 5 5l in/Draomitten thm chen . nehe 
  286.    Tete lovyograomiaveot lls 13, Apae
  287. pFtf tnt e eOecuThis ld
  288.     CGI B
  289.   sm Ys w Insals
  290. nced pro/eIn<then.e r   w at B
  291.   sor".llow tCGI B
  292.   sm  p>B    lue o code.An Ho
  293. lerwocode. graomiavef=ed wt lls then.e r   pro/inaoeall icles
  294. qe Wethe <code.cgiwocode.
  295.     orp<code.pl  code.  xtons MSVa<lCGI p  gramf:.diateu item dio  An Ho
  296. ler cgi-script cgi plw<chen . nehe 
  297.  po
  298. ctt>htplain/B
  299.   s"cing anhtplain/B
  300.   s">.htplain/t ApacB
  301.   s   
  302. </e
  303.   thple namAp<code..htplain/</code. f
  304.    is dhwo Wow,, tc nops <p>This fomplgraomi Vie nutdopFt-graomittetbrsosm Whesp>/p>acn.e r inn essf   dopecioite toknoi\ the graomittetfthe wexml iterso=e r kquaw</a><B
  305. roe in dsf
  306.   escty <p<code..htplain/</code.,ao
  307. he" f>itcB
  308.  
  309. s  O cootjeid=Rpcorapp   graomi Vie f >
  310. ethere n.
  311.     <code..htplain/</code. f
  312.   s cieviewpFtf tothewith the proce<code.A.  lOr  rotF  code. graomiavee>wexml:hpeciftsowgd  isn't-"( sddf<dcaomi Vie cievdpptar i\/) wsesB
  313.   s,lineif theiache in p>s.<rtallwdnatplllm 
  314. pFtf tnt e graomiaveow  efInspee>  in
  315.     thino urposh,<thenf    lue ocnops <p>Thisi
  316.  Insbespee>rvei\:ct. T,talemd a .e r   cnops <p>This:.diateu item dio  5 5A.  lOr  rotF OpThissm chen . nehe 
  317.    Ia 
  318. ete<code..htplain/</code. f
  319.   ,c se'll nced phedireg
  320. f    lue ograomi Vi:.diateu item         OpThiss
  321. +ExecCGIStchen . nehe 
  322.    wwxml ) lls 13, Apaeeed eOecuThis ldtCGI p  gramf 
  323. <llow tpFtf tothei\ this graomitte.ediate to
  324. p inschte to
  325. pa
  326. ctt>wr   kqscgip  gram"
  327.     ing anwr   kqscgip  gram">Wrio kquanCGI p  gram   
  328.   y RettFecil(npThere are>two md a econfigucisebthwehe `` tgues ''f=ed wprogramm
  329.  ,ao
  330.  
  331. CGI p  grammogr.<oiately to
  332.   F
  333. rst, oll<lnepute rom 
  334. drMCGI p  gram" ust be preEe>rvebyplf"
  335. < MIME--"( hnad  . Tsis Med;ref=hnad  elat t lls thenclies urror wwat sor> oforen theeietinoprceiv
  336.  f Mos  C.ngs ftlm
  337. , t isllow tw Inslooklfik :.diateu item dio  5 5Celathe--"( :<t xt/ce.hStchen . nehe 
  338.    Serendly,c ser<lneputeiceds wayse: a ile ,linesom toes/p  O co  MS  aeeed   buse>pr w Insbw:ay
  339.   <p<seelayf Mos  C.ngs plf"
  340. tlm
  341.  
  342.   /pcw Insbw:ile ,lbut occas000     es lightywr   paTCGIStudiop  gram"eeed lneputswa<g fvimagewhe</oes/p non-ile urror celaes .ediately to
  343.     ir>  the Apose
  344. two - ings, wr   kquanCGI p  gramtw Inslookplf"
  345. < lotwfike>anycoes/p p  gram"eeed es lightywr   m   <p reso 
  346. po
  347. ctt>,talB
  348. rstcgip  gram" ing an,talB
  349. rstcgip  gram">Ytalw</a><B
  350. rstTCGI p  gram   
  351.   y3<p reso 
  352.  
  353.  p>B    lue o
  354. <l n eOd pro,CGI p  gramtSsaturrihereC   lhewdireg
  355. >
  356.  ser<buse>pr. T"(  n<thenf    lue , sf yoitempla B
  357.    procescty <p<code.B
  358. rst.pl  code.,ao
  359.  
  360. put iter\wes rurror <code.cgi-bin  code. graomiory..diateu item dio  5 5#!/usr/bin/ whlm dio  5 5rrihe "Celathe--"( :<t xt/ce.h\r\n\r\n";m dio  5 5rrihe "H llo, World."hm chen . nehe 
  361.    EVina acct frri s.<famieis pwe WePwhlwh0   pi flesbw:ay
  362. direg
  363. >
  364. linewhopsis hdpptnogr>hercm  p>B
  365. rstT. nee) lls 13, Apa(in
  366.     whatche  sheIn< sehfpptn wayse:>unnogr>un   )elat th
  367. <llow tp  gramtcieviewexecuTe
  368. nby feed
  369.  p
  370. ) woB
  371.   p
  372. o the ictoren t/p  O co  >
  373. eat thesloheo
  374. </p<code./usr/bin/ whl  code.. The serendpac), fineurriheregs fren the--"( declap>Thisi
  375. e  ctkwdnadtut,direg
  376. f    le
  377. nby two ca roage-inturntnewfineursi s. Thino utinn essf blank lhew
  378. aftoryth hnad  , no i\dlf"tdt e end C.ngs f;refw</a><hnad  s,ao
  379.  
  380.   stbeginnogr>C.ngs fbody.name nhird fineurriher
  381.     then.tp kqu``H llo, World.'' And th  'ojt e end C.n tm   <p reso 
  382.  
  383. Ifl sereat ser<favor   pbuse>pr o
  384.  
  385.  ep>.itemplue  Apallow trddtwsfwoiateu item dio  5 5apil://www.eOd protcom/cgi-bin/B
  386. rst.plm chen . nehe 
  387.    or wherche  es put  ser<f
  388.   ,  sew Inslinet e E   lhewdireg
  389. <code.H llo, World.  code. apptar i\/ ser<buse>prw nd l. It's in p>s.< <rysexc   kq,lbut ooritct fue  Aped wr tt p,c se'll hf yoa in p>g"odacr nci ofpgehat p
  390. justcrdtut anyth
  391.   wr tt p.ediate to
  392. p inschte to
  393. pa
  394. ctt>butits="ills.<wr tt p"
  395.     ing anbutits="ills.<wr tt p">But it'so="ill s.<urror wr tt p!   
  396.   y RettFecil(npThere are>fser<basic<  t pr 
  397.  
  398. 0   mdhelinei\/ ser<buse>prurror wwlsd0   ttetwayplain/p
  399. drMCGI p  gram"fthe the web:ediately to
  400. dwayse is nedt>ame lneputeld es r
  401. CGI p  gram  dthe con'L   Odd
  402. Ginao! Th 
  403.  eansot <teth
  404.   wr te>  hew.<p inschudio  <p inschudio  <oddhe con'L   Odt>The sopeci code
  405. ld es r
  406. CGI p  gramhe</ae"POST MeApodsNs con'L   A   le
  407. "emin/at </dthe con'L   Odd
  408.   
  409.  eansoalat es ileVnnot i   whlyf nops <ped
  410. >/p>acdireg
  411. ree
  412. pes direes r
  413. CGI p  gram. Re>Aad then.ecThisi</p<ayse is nhref="#stps <p kqstrongtCpFtf tcgi, ctps <p kqu>/p>ac   
  414.  
  415.     r r
  416.  
  417.  tetwayicn  wlat es f ssth.ep inschudio  <p inschudio  <oddhe con'L   Odt>Aemin/at  d
  418.    
  419.   we We"Forbidden"</dthe con'L   Odd
  420.   
  421.  eansoalat thcrF 
  422. <la pFtf ss   s p  y
  423. m. Crosongs  in p>c)
  424. chref="#errorlogs".13, Apaerror ron   
  425.  o
  426.  
  427.   st.ecThis in p>c)bealwi</p<achref="#f
  428.   pFtf ss   s">B
  429.    proce  pFtf ss   s   
  430. .ep inschudio  <p inschudio  <oddhe con'L   Odt>Aemin/at  day
  431.   "IctornalsSe r   Error"</dthe con'L   Odd
  432. Ifl secrosongs )
  433. chref="#errorlogs".13, Apaerrorcon'L   ron   
  434. ,  sew Insp  yayy icn  thopsiteso te"PreS  ureosp     ts wC.nscript hnad  s", possib  oaIo
  435.   we Wean erroremin/at     ts wgen b><e
  436. nby es r
  437. CGI p  gram. In>- is casoje sew Inswffe 
  438. o    ts wcrosoneaml 
  439. .ngs fbealwi.ecThiss
  440. >
  441. linewhopslightyb  proce  prcheno kqu,taleCGI p  gram"fthe ef to
  442.  p
  443. ) wosespehr;refw</a><><hnad  s..0ddschudioeddwaysreso 
  444. po
  445. ctt>f
  446.   pFtf ss   s"cing anf
  447.   pFtf ss   s">F
  448.   llow tpFtf ss   s   
  449. </y3<p reso 
  450.  
  451. Rp>mb   elat thes.e r   doesnnot pun osm se. Th 
  452.  
  453. <, wwls
  454.     thes.e r   d
  455.    s   , ietinopunnogr>>F
  456.   ) wosFtf ss   s ofoan in p>unrriv
  457.   geda
  458.     -tusu     ``nobody''jeore``www'' - o
  459.  
  460. soo t  O coefInspee>  xtra pFtf ss   s 
  461. oeexecuTe f
  462.   soteed  rc iwnrvebyplf"
  463.  se. Usu    , the To Woowg Vi dsf
  464.   eseonicies  pFtf ss   s 
  465. o in p>be>execuTe
  466. nby ``nobody''sis toog Vi t <teoneeexecuTellow tpFtf ss   wnutthe B
  467.   :bat   u item dio  5 5chmodsa+x B
  468. rst.plm chen . nehe 
  469.    Allc, id es r
  470. p  gram">Aads
  471.  romjeorewr   s to,>anycoes/pt ApacB
  472.   s, Apose
  473. icles
  474. qell pee> wayaf yous freraomi pFtf ss   s 
  475. o in p>pFtf tnt is    <p reso 
  476.  
  477. The excepThisiaooeeis Medwthe Ss;m.e r   is cnops <ptheao
  478.     s r<.chref="../suexec.ce.h, suexec   
  479. w Thino   gram"rtalls:ct. TCGI p  gramf wayse:>un>un    dconfigu<e
  480.     pFtf ss   s,f=ed wdependogrenu>wexml:virtu>lehostco  
  481.     homeeiaomitty theiache in p> theothei\. Suexec s pr <rys trictfpFtf ss   wcroso
  482.  ,ao
  483.  
  484. anyurApacBailuheninpthedohroso
  485.  tw Insinsulter\wes r<CGI p  gramft ApacBaili
  486.   we Wean "IctornalsSe r   Error". In>- is casoje sew Indireg
  487. ncedAeplcrosongs )suexec rongB
  488.   p
  489. o linewhopshpecifcrseft Winf=ed wcrosonis
  490.  aili
  491.  m   <p reso 
  492. po
  493. ctt> ith n  MS   MS"cing an ith n  MS   MS">Pith  O coo-  MS   MS   
  494. </y3<p reso 
  495.  
  496. Wwlsd0   pun o p  gram"fthe es r<he,
  497.  hele sswes ileV isn'tcer
  498.     ic  MS   MSValat ino icctheaoothe sheIn<we Wou
  499.  seurror th no
  500.  tcdtut itw Fe  Od pro, es hf yoa  ithe>wexml:) lls
  501.     thes.heIn<wherc  t cievlookl in f
  502.   soteed 0   penfiguci
  503.    <p reso 
  504.  
  505. When o p  gram"punslneringhnvok
  506. w  M.e r  eanoanCGI p  grame  O coot doesnnot af yousaturfthm Acy p  gramf weed 0   invokeei\:ct. T,taleCGI p  gram"(fike>'rsp mail',
  507. f M Od pro) wfll pee> waysellow thpecifthnby a  uco  ithe>so elat thes.heIn<cievicn  them wwls
  508.      tettempes 
  509. oeexecuTe es r
  510. CGI p  gram.ediately to
  511.     he,m  omdcifeseeo
  512. </pofn  /pc
  513. <lt e  itheaoothe script  O coo-toren t/p (Eftina<code.pwhl  code.) i\dlf"td t\ the B
  514. r">
  515.     fineuld es r
  516. CGI p  grame>wexml:
  517.  Inslookllcefth
  518.   fike:bat   u item dio  #!/usr/bin/ whlm chen . nehe 
  519.    M"ke sureounops  /pc
  520. <lo-pfactlt e  itheaoothe  O coo-toren t/pm   <p reso 
  521. po
  522. ctt>syBeexerrors"cing ancyBeexerrors".SyBeexStudioerrors   
  523. </y3<p reso 
  524.  
  525. Mos  C.ngs ftlm
  526. dwthe anCGI p  gramt ail/,  t'sobeEis r<oac urror r  y
  527. m we Wethe p  gramtitself. Tsis Medrf Ricues a Aeru  Cnci
  528.     ct fue  Apves gr>C.ngsi<lCGI steon,ao
  529.  
  530. no rongfim"ke Apallow trlovyotwo misuakes
  531.   To teattempe 
  532. oepun es r
  533. p  gram" the Apadireg
  534. he,
  535.  hele s reBor
  536. m se tl"> id viar<buse>pr. T /pcw InStudioefif nds  ms<ood es r
  537. p  y
  538. msm   <p reso 
  539. po
  540. ctt>errorlogs" ing an"rrorlogs".Error rons   
  541. e/y3<p reso 
  542.  
  543.  p>error rons
  544. <reo ser<fries
  545.   Aneth
  546.    lat gE.sewro
  547.   in p>gen b><esemin/at  t\ the error ronf Ysepi fle"rtTo telookplf"
  548. thcrF B
  549. rst. Iflthee lace<wherc ct frri host kqu,talew  M.   
  550.     dpesnnot pFtf tnct frlain/p>
  551. ngeeerror ron,a0   pi fle in p>p  yayy hostc,talea   p,omewherc else. Learnuooread thenerrorcon'L ronssw<a c se'll icn  thopsolmos soll<ld es r
  552. p  y
  553. msache in p>quicky otF
  554. fth a<a cquicky solvth.ediate to
  555. p inschte to
  556. pa
  557. ctt>whatsgoogronbehcn gs scen s"
  558.     ing anwhatsgoogronbehcn gs scen s">Wh  'ojgoogrenu5behcn  thellow thcen s?   
  559.   y RettFecil(npAst sebehe,eofore adv ncid t\ CGI p  grammogrjeid=Rpco
  560.     beEe,eos r uc
  561. >
  562. sn   sso
  563. ofore adtut wh  'ojhdpptnogr>behcn 
  564.     thes.cen s. Specifc    , hll thenbuse>pr o
  565.  
  566. .e r  direg
  567. he,unlf"tdwe Weoneeanoes/p. BeEis r<a  Winghn t'sooll< <rypac), weIn<toywr   paTp  gramtSsaturrihere``H llo, World.'',  t'sos.<urror rf Ricues a As r ucm   <p reso 
  568. po
  569. ctt>en tronp>Bevariab  s"
  570.     ing an"n tronp>Bevariab  s".En tronp>Benvariab  s   
  571. </y3<p reso 
  572.  
  573. En tronp>Benvariab  sfrri valu s eeed iloed  r >
  574. ect frs
  575.     ct fs r<es r<he,put  . Ts ycrri rrr uc
  576. > t pr fike>,tale ith  O co(wwlre>wl<he,put  
  577. .earcrose in ds
  578. ete ltu>lef
  579.    iodowp>Beogr proceo he,
  580.  hewwlsd0   t"(  t), ,taled, t<img, ,taletFtf nalst"( ,urror rnd so </gnFe</ae ucoefi,onC.n,taler MS l, e <rysdthllow ten tronp>Benvariab  s, t"( <code.en   code. ateo he,
  581.  hf=ed wpromp<.ediately to
  582.   D<p kqut pnCGI t comac    whSs;m.e r   o
  583.  
  584.   stbuse>pr ollcdireg
  585. setten tronp>Benvariab  s, so elat they<cievhe,unlf"tdwe W
  586.     oneeanoes/p. T wses re>wt pr fike>  stbuse>pr t"( (Netsca( ,urror IE, Lynx)whSs;m.e r   t"( (13, Ap, IIS, WebS   )whSs;mrimg C.
  587.     thesCGI p  gramtSsatu/pcbeogreru-,
  588. o
  589.  
  590. so </g   <p reso 
  591.  
  592. Thesenvariab  sfrri < aiyay
  593.  >
  594. ngeeCGI p  gramm  ,cr
  595.  
  596. che in p>halfeC.ngs fsittetEf thenclies -.e r   cn,unlf"
  597. </gnameurror ce,py t/efi,onC.n
  598. ojgracfvariab  sf
  599. <latp<ayse ishref="apil://hoohoo.ncsa.uiuc.edu/cgi/en .ce.h, apil://hoohoo.ncsa.uiuc.edu/cgi/en .ce.hwork.diately to
  600.  
  601. Thrso=i pro Pwhl CGI p  gramtw Ins<seelay oll<ld tokllow ten tronp>Benvariab  soteed  rc beogre iccthe r >
  602. gnawo =i ies direg
  603. p  gramf aretincludthei\ theetcode.cgi-bin  code. graomiory C.
  604.     thes13, Apadi n ibuThism Ns oounopsdom tvariab  sfrri 
  605. ojgrac,urror wwx  ores/pf aretEpF000  , so 0   mdhelinedom tvariab  sffi,owddireg
  606. >eed weri s.<i\ theeooniciaoefi,o. In>addMThis,
  607. >/p>acdireg
  608. sesvotFsoe    dconfigu<eTo te in es uoo<ayse ishref="../en .ce.h,  dde ser<lwnten tronp>Benvariab  s   
  609.  ao
  610.       stbasic<ones sesvotFdpr Ansfault.bat   u item dio  #!/usr/bin/ whlm   5 5rrihe "Celathe--"( :<t xt/ce.h\n\n";m dio  Bor
  611. aml $keia(keis %ENV) {Studio 5 5 5p ihe "$keia--n th $ENV{$kei}l inban th";m dio  }w<chen . nehe 
  612.  po
  613. ctt>stdin
  614.  h<tgput"cing anctdin
  615.  h<tgput".STDIN o
  616.  
  617.     STDOUT   
  618. e/e
  619.   thple namOes/p cn,unlf"
  620. </ebthwehe Ss;m.e r   o
  621.  
  622.   stclies urror hdpptns or   d
  623.  
  624. ap>eicpute(<code.STDIN  code.) o
  625.  
  626. s
  627.  
  628. ap>direg
  629. inepute(<code.STDOUT  code.). In>r MS l e <rydthfren txt,direg
  630. <code.STDIN  code.
  631.  eansoale keiboap>, in dsf
  632.   eeeed   p  gram procers g Vinawayplt oo, o
  633. t<code.STDOUT  code.tusu      eansoaleurror celsolelinescrehe
  634.    <p reso 
  635.  
  636. When es <code.POST  code. aew  M  MStmpla CGI p  grame>Apadireg
  637. gatasinpthedo  MSt/pcbu
  638. led   s nmpla hpecia n inmed  n
  639. gehsf=ed wdel Vired pro,taleCGI p  gramher   <code.STDIN  code.gnameurror p  gramtSsesichevpes direthedogatas provinghn t w</pce,ogrei\:ct. Tfthe the keiboap>, in fthe r
  640. B
  641.   </ <p reso 
  642.  
  643. The ``hpecia n inmed''sis  <rys i pro  A fiel> <img o
  644.  
  645. ihsf=ed wvalu  aretjoe sh prgehher we Wean equals (=)s igo, o
  646. trsi s C.
  647.     valu s aretjoe sh prgehher we Wean am whso
  648. t(&am ;).
  649.     IncelVinies  charplt/pf fike>s/p>gs, om whso
  650. ssw<a cequalsdireg
  651. stgns,l re>celVirtd t\>
  652. ngeilehexcequivales  so elat they
  653.     dpn'tagum   s- e wr tsm  p>wholeleatasstrogreeightylookplf"
  654. lcefth
  655.   fike:bat   u item dio  ing aRich%20Bows
  656. &am ;city=Lex
  657.  to
  658. &am ;seeoe=KY&am ;sotFkick=Sojgrrel%20Monkey
  659. chen . nehe 
  660.    Yse'll lceftimesortsoslinet is -"( df<strogredpptndtheao
  661.     
  662. ete cURLm WhespSsatu/pcdonewhSs;m.e r    utinunopsdt