School Assignment? Project Due Tomorrow? Chat LIVE With A Programming Expert!

Welcome to Dream.In.Code
Become an Expert!

Join 307,131 Programmers for FREE! Get instant access to thousands of experts, tutorials, code snippets, and more! There are 2,046 people online right now. Registration is fast and FREE... Join Now!




"insert into VALUES" causes "Internal Server Error"

 

"insert into VALUES" causes "Internal Server Error"

EngineMan

3 Oct, 2009 - 08:37 PM
Post #1

New D.I.C Head
*

Joined: 14 Nov, 2008
Posts: 10


My Contributions
This following code is similar to my 2 database programs that should be able to do
insert into Master ( Item, Value ) VALUES ( "Comment","This is my Comment");
BUT without even using the database the following code can read and print "insert VALUES " or "insert into" or "into VALUES "
but if I try "insert into VALUES" I get
"Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.
Please contact the server administrator, webmaster@susanscreations.co.nz and inform them of the time the error occurred, and anything you might have done that may have caused the error.
More information about this error may be available in the server error log.
Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request."

NOTE: This is NOT an SQL database error as this program does not use the above input. The 2 real programs will of cause execute the
SQL on line 2 untill now. Other database code in the real programs does execite OK.

CODE

#!/usr/bin/perl -wT
use CGI qw(:standard);
use CGI::Carp qw(warningsToBrowser fatalsToBrowser);
use strict;
use lib 'Library';
use SusansCr;                                            # This is a 3000 line library
my  $Value;                                                # This holds the value read in
my  $Style;
my  $Target   = "SpecialTest.pl";                        # This tell us to call this program on Submit
    SusansCr->OpenDatabase;                                # This is not affected by Value
    SusansCr->Startup("Logging");                        # This is not affected by Value
    $Value  = param('Value');                             # This reads value from the input parameters !!! <<<<<<<<<<<<<<<<<<<
    print header();                                        # This is not affected by Value
    print start_html(-title=>"Susans Creations Special test Program");                # This is not affected by Value
    SusansCr->BuildPage("name='Test' action=\"$Target\"","","",
        "Test : Susans Creations Special Test Program",$Style,"Admin");              # This is not affected by Value
    print "<br>Value is : $Value";                                                    # This prints value if we do not crash
    print '<br><input type="submit" ALIGN="CENTER" Submit next Request value="Submit Request">';    # This is not affected by Value ??????????
    print '<input type="text" ALIGN="CENTER" Name="Value" size="60%">  Your Value    <br>';            # This creates value for the submit
    SusansCr->EndPage;                                                                                # This is not affected by Value


This post has been edited by EngineMan: 3 Oct, 2009 - 08:39 PM

User is offlineProfile CardPM
+Quote Post


EngineMan

RE: "insert Into VALUES" Causes "Internal Server Error"

4 Oct, 2009 - 09:31 AM
Post #2

New D.I.C Head
*

Joined: 14 Nov, 2008
Posts: 10


My Contributions
[quote name='EngineMan' post='787865' date='3 Oct, 2009 - 08:37 PM']
I have now recreated this problem without Perl or a sql database using the following HTML. Again I get the same error if I enter "insert into VALUES"
CODE

<html>
<Head>
<h1>TestPost Submit input data problem</h1>
</head>
<body>
<form action="TestPost.html" Method=Post name="TestPost">
<br><input type="submit" ALIGN="CENTER" Submit next Request value="Submit Request">
<input type="text" ALIGN="CENTER" Name="Valuex" size="60%">  Your Value    <br>
</body>
</html>


This post has been edited by EngineMan: 4 Oct, 2009 - 09:38 AM
User is offlineProfile CardPM
+Quote Post

Fast ReplyReply to this topicStart new topic

Time is now: 11/21/09 02:42PM

Live Help!

Be Social

Dream.In.Code RSS Feed Dream.In.Code LinkedIn Group Follow Us On Twitter Fan Us On Facebook

Tutorials

Programming

Web Development

Reference Sheets

Code Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month