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