Wrox Programmer Forums
|
BOOK: Beginning PHP4/PHP 5 ISBN: 978-0-7645-4364-7; v5 ISBN: 978-0-7645-5783-5
This is the forum to discuss the Wrox book Beginning PHP4 by Wankyu Choi, Allan Kent, Chris Lea, Ganesh Prasad, Chris Ullman; ISBN: 9780764543647
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning PHP4/PHP 5 ISBN: 978-0-7645-4364-7; v5 ISBN: 978-0-7645-5783-5 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old June 22nd, 2003, 12:26 AM
Registered User
 
Join Date: Jun 2003
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default The specified CGI application misbehaved by not re

I keep getting this message on some forms and not others. I do not know what the difference is. Can someone please explain why I get this error.

Thanks

Rob

The Following doesn't work :(

Form
<HTML>
<head></head>

<body><form action="recursion.php" method=POST>
<p>I would like to know the factorial of:
    <input name="value" type="text" />
</p>
<p>
  <input type="submit"/>
</p>
</form>

</body>
</HTML>

recursion.php
<HTML>
<HEAD></HEAD>
<body>
<?php
extract ($_POST);

function recursion ($value)
{
    if ($value <= 1)
        return 1;
    else
        return $value*recursion($value-1);
}

echo "The factorial of " . $value . " is " . (recurison($value));
?>
</body>
</HTML>


The Following Script Works :)

This is the form:
<HTML>
<HEAD></HEAD>
<BODY>
<B>Namllu Holiday Booking Form</B>
<FORM method=GET action="holiday3.php">
Where do you want to go on holiday?
<BR>
<BR>
<INPUT name="Destination" type="Radio" value="Prague">
Prague
<BR>
<INPUT name="Destination" type="Radio" value="Barcelona">
Barcelona
<BR>
<INPUT name="Destination" type="Radio" value="Vienna">
Vienna
<BR>
<BR>
What grade of hotel do you want to stay at?
<BR>
<BR>
<INPUT name="Grade" type="Radio" value="Three">
Three Star
<BR>
<INPUT name="Grade" type="Radio" value="Four">
Four Star
<BR>
<BR>
<INPUT type=SUBMIT>
</FORM>
</BODY>
</HTML>


This is the PHP part: holiday3.php
<HTML>
<HEAD></HEAD>
<BODY>
<B>Namllu Holiday Booking Form</B>
<BR>
<BR>
<?php

extract ($_GET);

function Calculator($Price, $CityModifier, $StarModifier)
{
   return $Price = $Price * $CityModifier * $StarModifier;
}
$Price=500;
$StarModifier=1;
$CityModifier=1;
$DestGrade = $Destination.$Grade;
switch($DestGrade) {
   case "BarcelonaThree":
      $CityModifier=2;
      break;
   case "BarcelonaFour":
      $CityModifier=2;
      $StarModifier=2;
      break;
   case "ViennaThree":
      $CityModifier=3.5;
      break;
   case "ViennaFour":
      $CityModifier=3.5;
      $StarModifier=2;
      break;
   case "PragueThree":
      break;
   case "PragueFour":
      $StarModifier=2;
      break;
   default:
      $CityModifier=0;
      echo ("Go back and do it again");
}
if ($CityModifier<>0)
{
   echo "The cost for a week in $Destination is " . "$" . Calculator($Price,$CityModifier,$StarModifier);
}
?>
</BODY>
</HTML>
 
Old June 22nd, 2003, 12:50 AM
Registered User
 
Join Date: Jun 2003
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Sorry the full error is:

CGI Error
The specified CGI application misbehaved by not returning a complete set of HTTP headers. The headers it did return are:





Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem with CGI Counter arunmohanmp Perl 0 April 9th, 2006 12:40 AM
help! on CGI Error heerajee Pro PHP 0 February 2nd, 2006 05:17 AM
CGI Timeout EricS Beginning PHP 3 January 24th, 2005 01:50 AM
PHP5 CGI or CLI? freddo Beginning PHP 2 August 15th, 2004 07:20 PM
PHP install: CGI app misbehaved - no headers scalene Beginning PHP 2 July 14th, 2003 12:07 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.