Menu

Internal Server Error - Please Help

Help
2005-09-17
2013-06-03
  • Ron Douglas

    Ron Douglas - 2005-09-17

    I get the following error when trying to populate then submit the form:

    Internal Server Error
    The server encountered an internal error or misconfiguration and was unable to complete your request.
    Please contact the server administrator, webmaster@abcsofgod.com 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.

    --------------------------------------------------------------------------------

    Apache/1.3.33 Server at www.abcsofgod.com Port 80

     
    • TNTEverett

      TNTEverett - 2005-09-23

      Do you still need assistance?

       
    • madamstan

      madamstan - 2005-09-24

      I do! ;o)
      (getting same message)

       
    • TNTEverett

      TNTEverett - 2005-09-24

      This error will ocurr if your host is not allowing php files to run.  Have you contacted your host to ask if you can execute php files?  Please provide their response and maybe their URL so I can see what features they provide their customers.

       
    • aurialis

      aurialis - 2005-09-27

      I have this same problem.  However I am the admin for my website and I don't know what I'm supposed to do.  As far as I know, my host does allow php files.  And the phpFormGenerator came with two samples and they both work without the Internal Server Error message, its just the ones that I'm making myself that aren't working.

      If anyone knows how to fix this, could you please email me?
      Thanks.

       
      • TNTEverett

        TNTEverett - 2005-12-29

        Found this in another post.  Sounds like your directories may not have permissions according to this new security method. 
        Let me know how it works out.

        "There is a new Apache configuration being introduced to accommodate changes made to the way ssl and temporary url's work now which provides tighter security.

        If you are experiencing the 500 error now, make sure your scripts and the directories they are in have permissions set to 755."

         
    • TNTEverett

      TNTEverett - 2005-09-28

      I can help, but there is only so much we can accomplish through email. 
      Have you tried the hello.php example? 
      <?php
        // Hello World in PHP
        echo 'Hello World!';
      ?>
      If you can not get this to work, your forms will never work.  If you can get it to work, its just a matter of setting up the forms in order to get them to work. 
      The hello.php example should result in only the "Hello World!" text in you browser.  If you see more or less than that, it is not working. 
      If you need more assistance than can be provided through this forum, feel free to send me an email and we can make special arrangements to solve your problems. 

       
    • tootiki

      tootiki - 2005-12-07

      I am getting the same Internal Server Error message.

      I tried the Hello World php and that works. I have also edited my process.php to remove that line that TNTEverett instructed elsewhere (where server or something like that).

      But I am still getting that message. Help!

       
      • TNTEverett

        TNTEverett - 2005-12-07

        I have helped many people resolve issues with the form generator.  Most turn out to be pretty simple.  Host related issues are the tuffest to solve. 
        As I've said many times in the past "there is only so much that can be done through this forum".  Sending messages back and forth and guessing at what the problem might be is not very efficient.  I would be glad to provide additional help but how much is totally up to you. 
        Send me pointers to your form, or zip up your project and send it to me so I can test it on my computer.
        While I'm at it I'd like to take the opportunity to say how important it is for forum members to come back after all issues have been resolved and list what things were done to fix the problems.  With this kind of feedback it becomes easier for people to solve thier own problems. 

         
    • Powell

      Powell - 2005-12-27

      Was there an easy resolution to this - I'm getting the same message but know I can execute php on my server.  My host even provides this form generator as part of a quick install option.

       
      • TNTEverett

        TNTEverett - 2005-12-27

        Internal server error messages are one of the most difficult to trouble shoot, especially in this forum.  Each instance usually comes with a different solution due to server differences. 
        Do you have access to any of your server error logs?  These might provide some clues.

         
    • Powell

      Powell - 2005-12-27

      I had to change my permissions to 755 and now it works

       
    • rubble

      rubble - 2005-12-29

      I am getting the same error.  My server does allow PHP and even Fantastico to download, however, I read else where that the Fantastico download causes problems so I downloaded V2.09 and intsalled it manually.  I changed the "Forms" folder and all of its files to 777. I setup the "contact" form as I called it to interact with MySQL.  I get the everthing is great message with and when I try to use the form I get the 500 error.  If I click to my "administator" I get the same error. **The error log says:
      Premature end of script headers: /home/elgin3/public_html/contact/use/contact/admin/index.php
      Premature end of script headers: /home/elgin3/public_html/contact/use/contact/process.php

      Where and what do I look to switch or change? 

       
    • rubble

      rubble - 2005-12-29

      Here is my process.php script:

      ";
      pt_register('POST','Name');
      pt_register('POST','Email');
      pt_register('POST','CompanyandTitle');
      pt_register('POST','Subject');
      pt_register('POST','Comment');
      $Comment=preg_replace("/(\015\012)|(\015)|(\012)/","
      ", $Comment);if($Name=="" || $Email=="" || $Subject=="" || $Comment=="" ){
      $errors=1;
      $error.="You did not enter one or more of the required fields. Please go back and try again.";
      # }
      if(!eregi("^[a-z0-9]+([_\\.-][a-z0-9]+)*" ."@"."([a-z0-9]+([\.-][a-z0-9]+)*)+"."\\.[a-z]{2,}"."$",$Email)){
      $error.="
      # Invalid email address entered";
      $errors=1;
      }
      if($errors==1) echo $error;
      else{
      $where_form_is="http".($HTTP_SERVER_VARS["HTTPS"]=="on"?"s":"")."://".$SERVER_NAME.strrev(strstr(strrev($PHP_SELF),"/"));
      $message="Name: ".$Name."
      Email: ".$Email."
      Company and Title: ".$CompanyandTitle."
      Subject: ".$Subject."
      Comment: ".$Comment."
      ";
      $message = stripslashes($message);
      mail("myemail@dotcom","Form Submitted at your website",$message,"From: phpFormGenerator");
      $link = mysql_connect("myserver.com","mylogin","mypassword");
      mysql_select_db("mydb",$link);
      $query="insert into contact (Name,Email,Company_and_Title,Subject,Comment) values ('".$Name."','".$Email."','".$CompanyandTitle."','".$Subject."','".$Comment."')";
      mysql_query($query);
      ?>

       
    • rubble

      rubble - 2005-12-29

      Here is my admin index.php

      <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
      <HTML><HEAD><TITLE>phpFormGenerator v2.0 Admin Portal</TITLE>
      <META http-equiv=Content-Type content="text/html; charset=windows-1252">
      <STYLE>
      P {
          PADDING-LEFT: 8px; FONT-SIZE: 12px; MARGIN: 10px; COLOR: #333333; LINE-HEIGHT: 18px; FONT-FAMILY: verdana, arial, "ms sans serif", sans-serif
      }
      .small {
          PADDING-LEFT: 10px; FONT-WEIGHT: normal; FONT-SIZE: 10px; COLOR: #333333; LINE-HEIGHT: 14px; FONT-FAMILY: verdana, arial, "ms sans serif", sans-serif
      }
      .big {
          PADDING-LEFT: 10px; FONT-SIZE: 14px; COLOR: #333333; LINE-HEIGHT: 14px; FONT-FAMILY: verdana, arial, "ms sans serif", sans-serif
      }
      TD {
          FONT-SIZE: 12px; COLOR: #333333; FONT-FAMILY: verdana, arial, "ms sans serif", sans-serif
      }
      A:link {
          FONT-WEIGHT: bold; COLOR: #333333; TEXT-DECORATION: none
      }
      A:visited {
          FONT-WEIGHT: bold; COLOR: #333333; TEXT-DECORATION: none
      }
      A:active {
          FONT-WEIGHT: bold; COLOR: #333333; TEXT-DECORATION: none
      }
      A:hover {
          FONT-WEIGHT: bold; COLOR: #666666; TEXT-DECORATION: overline
      }
      INPUT {
          PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 10px; PADDING-BOTTOM: 0px; COLOR: #333; PADDING-TOP: 0px; FONT-FAMILY: verdana, arial, sans-serif; BACKGROUND-COLOR: #eeeeee
      }
      TEXTAREA {
          PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 10px; PADDING-BOTTOM: 0px; COLOR: #333; PADDING-TOP: 0px; FONT-FAMILY: verdana, arial, sans-serif; BACKGROUND-COLOR: #eeeeee
      }
      SELECT {
          PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 10px; PADDING-BOTTOM: 0px; COLOR: #333; PADDING-TOP: 0px; FONT-FAMILY: verdana, arial, sans-serif; BACKGROUND-COLOR: #eeeeee
      }
      INPUT.button {
          BORDER-RIGHT: #999 2px outset; BORDER-TOP: #999 2px outset; BORDER-LEFT: #999 2px outset; BORDER-BOTTOM: #999 2px outset; BACKGROUND-COLOR: #ccc
      }
      </STYLE>

      </HEAD>
      <BODY bgColor=#eeeeee>
      <CENTER>
      <TABLE cellSpacing=20>
        <TBODY>
        <TR>
          <TD><!----this is the top navigation bar----->
            <TABLE cellSpacing=0 cellPadding=1 bgColor=#333333 border=0>
              <TBODY>
              <TR>
                <TD>
                  <TABLE cellSpacing=0 cellPadding=1 bgColor=#cccccc border=0>
                    <TBODY>
                    <TR>
                      <TD>
                        <TABLE cellSpacing=0 cellPadding=3 bgColor=white border=0>
                          <TBODY>
                          <TR>
                            <TD>
                              <TABLE cellSpacing=0 cellPadding=1 bgColor=#333333
                              border=0>
                                <TBODY>
                                <TR>
                                  <TD>
                                    <TABLE cellSpacing=0 cellPadding=5 width=510
                                    bgColor=#ff9900 border=0>
                                      <TBODY>
                                      <TR>
                                      <TD>
                                      <P><B>phpFormGenerator</B></P></TD>
                                      <TD vAlign=bottom align=right>
                                      <TABLE cellSpacing=0 cellPadding=1
                                      bgColor=#333333 border=0>
                                      <TBODY>
                                      <TR>
                                      <TD>
                                      <TABLE height=20 cellSpacing=0 cellPadding=1
                                      bgColor=#ffcc00 border=0>
                                      <TBODY>
                                      <TR>
                                      <TD class=small>&nbsp;&nbsp;&nbsp;[ <A
                                      href="http://phpformgen.sourceforge.net/">home</A>
                                      ]&nbsp;&nbsp;&nbsp;[<A
                                      href="https://sourceforge.net/project/showfiles.php?group_id=45605">update</A>]&nbsp;&nbsp;&nbsp;[<A
                                      href="http://sourceforge.net/docman/?group_id=45605">support</A>]&nbsp;&nbsp;&nbsp;[<A
                                      href="mailto:musawir@ali.tf">contact</A>]&nbsp;&nbsp;&nbsp;
                                      </TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE></TD></TR>
        <TR>
          <TD><!----this is the bottom section where all the content goes----->
            <TABLE cellSpacing=0 cellPadding=1 bgColor=#333333 border=0>
              <TBODY>
              <TR>
                <TD>
                  <TABLE cellSpacing=0 cellPadding=1 bgColor=#cccccc border=0>
                    <TBODY>
                    <TR>
                      <TD>
                        <TABLE cellSpacing=0 cellPadding=3 bgColor=white border=0>
                          <TBODY>
                          <TR>
                            <TD>
                              <TABLE cellSpacing=0 cellPadding=1 bgColor=#333333
                              border=0>
                                <TBODY>
                                <TR>
                                  <TD>
                                    <TABLE cellSpacing=0 cellPadding=3 width=510
                                    bgColor=#ff9900 border=0>
                                      <TBODY>
                                      <TR>
                                      <TD vAlign=top><!----Side Navigation and Links----->
                                      <TABLE>
                                      <TBODY>
                                      <TR>
                                      <TD>
                                      <TABLE cellSpacing=0 cellPadding=1
                                      bgColor=#333333 border=0>
                                      <TBODY>
                                      <TR>
                                      <TD>
                                      <TABLE cellSpacing=0 cellPadding=2 width=100
                                      bgColor=#333333 border=0>
                                      <TBODY>
                                      <TR>
                                      <TD class=small align=middle><FONT
                                      color=#ffffff><B>quick links</B></FONT>
                                      </TD></TR>
                                      <TR>
                                      <TD class=small bgColor=#ffcc00>- <A
                                      href="http://sourceforge.net/projects/phpformgen/">project
                                      web</A><BR>- <A
                                      href="http://www.sourceforge.net/">sourceforge</A><BR>-
                                      <A
                                      href="http://www.linux.com/">linux.com</A><BR>-
                                      <A href="http://www.php.net/">php.net</A><BR>-
                                      <A
                                      href="http://www.mysql.com/">mysql.com</A><BR>-
                                      <A
                                      href="http://www.apache.org/">apache.org</A><BR></TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE></TD></TR>
                                      <TR>
                                      <TD><BR>
                                      <TABLE cellSpacing=0 cellPadding=1
                                      bgColor=#333333 border=0>
                                      <TBODY>
                                      <TR>
                                      <TD>
                                      <TABLE cellSpacing=0 cellPadding=2 width=100
                                      bgColor=#333333 border=0>
                                      <TBODY>
                                      <TR>
                                      <TD class=small align=middle><FONT
                                      color=#ffffff><B>powered by</B></FONT>
      </TD></TR>
                                      <TR>
                                      <TD class=small
                                      bgColor=#ffcc00>h4x0rs.us<BR></TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE></TD></TR>
                                      <TR>
                                      <TD><BR>
                                      <TABLE cellSpacing=0 cellPadding=1
                                      bgColor=#333333 border=0>
                                      <TBODY>
                                      <TR>
                                      <TD>
                                      <TABLE cellSpacing=0 cellPadding=2 width=100
                                      bgColor=#cccccc border=0>
                                      <TBODY>
                                      <TR>
                                      <TD class=small align=middle
                                      bgColor=#333333><B><FONT color=white>wise
                                      words</FONT></B> </TD></TR>
                                      <TR>
                                      <TD class=small bgColor=#eeeeee>What is the
                                      difference between genius and stupidity? Genius
                                      has limits. - Albert Einstein.
                                      </TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE></TD>
                                      <TD align=right rowSpan=2><!----Item boxes for daily news events or whatever you want to talk about, i have included three.----->
                                      <TABLE>
                                      <TBODY>
                                      <TR>
                                      <TD>
                                      <TABLE cellSpacing=0 cellPadding=1
                                      bgColor=#333333 border=0>
                                      <TBODY>
                                      <TR>
                                      <TD>
      <TABLE cellSpacing=0 cellPadding=2 width=400 bgColor=#ffcc00 border=0>
                                      <TBODY>
                                      <TR>
                                      <TD bgColor=#333333><font color="#FFFFFF"><b>
                                      Administration Portal</b></font></TD>
                                      <TD class=small align=right
                                      bgColor=#333333><FONT color=#ffffff>v2.0</FONT>
                                      </TD></TR>
                                      <TR>
                                      <TD class=small colSpan=2>this is your portal
                                      for maintaining your form usage. if you have
                                      used the 'database' or 'file-based database'
                                      option of the program, you can take advantage of
                                      this portal which will let you view all the
                                      records filled in through your form.<p>&nbsp;</p>
                                      <p class=small>
      <!-- Put code here -->

      <?php

        include("config.inc.php");

        if ($db == 1) {
          echo "Using MySQL database info:<br><br>\n\n";
        } elseif ($file_db == 1) {
          echo "Using file-based database:<br><br>\n";
        } else {
          echo "Sorry. In order to use the administration portal you must use the MySQL or file-based database option.\n\n";
        }

        if ($file_db == 1 && $db != 1) {
          $filedb = fopen("data.dat","r") or die ("<br>Could not open data file to read.");
          $columns_str = fgets($filedb,4096);
          $columns = explode("|",$columns_str);
          echo "<table cellspacing=\"0\" cellpadding=\"4\" border=\"1\" width=\"90%\">\n";
          echo "<tr><td colspan=\"" . (sizeof($columns)+2) . "\">\n";
          echo "<table cellspacing=\"0\" cellpadding=\"2\" border=\"0\" width=\"100%\">\n";
          echo "<tr><td class=\"small\" bgcolor=\"#000000\" align=\"center\" valign=\"middle\">\n";
          echo "<font color=\"#ffffff\">Records Table</td></tr></table></td></tr><tr>\n";

          for ($i=0;$i<sizeof($columns);$i++) {
            echo "<td class=\"small\"  align=\"center\" valign=\"middle\"><b>".$columns[$i]."</b></td>";
          }
          echo "<td class=\"small\" align=\"center\" valign=\"middle\">Delete Record</td>";
          echo "<td class=\"small\" align=\"center\" valign=\"middle\">Printer Friendly</td></tr>";

          $i=0;
          while (!feof($filedb)) {
            $temp = fgets($filedb,4096);
            if ($temp != "") {
              $records[$i]=$temp;
              $i++;
            }
          }

          for($j=0;$j<$i;$j++) {
            echo "<tr>";
            $holder = explode("|",$records[$j]);
            for ($k=0;$k<sizeof($holder);$k++) {
              echo "<td class='small'><center>$holder[$k]</td>";
            }
            echo "<td class='small'><center><a href='delete_file_rec.php?id=".$j."'>delete</a>";
            echo "<td class='small'><center><a href=\"printer_friendly.php?id=" . $j . "\">Print</a></tr>";
          }
          echo "</table>";
        } else if($db==1) {
          // mySQL Table
          $db_con = mysql_connect($hostname,$username, $password) or die("Connetion to database failed!");
          mysql_select_db($dbname);
          $query = "select * from ".$table;
          $result = mysql_query($query);
          $i = 0;

          while ($i < mysql_num_fields($result)) {
            $meta = mysql_fetch_field($result);
            $columns[$i] = $meta->name;
            $i++;
          }

          echo "<table cellspacing=\"0\" cellpadding=\"4\" border=\"1\" width=\"90%\">\n";
          echo "<tr><td colspan=\"" . (sizeof($columns)+2) . "\">\n";
          echo "<table cellspacing=\"0\" cellpadding=\"2\" border=\"0\" width=\"100%\">\n";
          echo "<tr><td class=\"small\" bgcolor=\"#000000\" align=\"center\" valign=\"middle\">\n";
          echo "<font color=\"#ffffff\">Records Table</td></tr></table></td></tr><tr>\n";

          for($i=1;$i<sizeof($columns);$i++) {
            echo "<td class='small'><center><b>".$columns[$i]."</td>";
          }
          echo "<td class='small'><center>Delete Record</td>\n";
          echo "<td class=\"small\" align=\"center\" valign=\"middle\">Printer Friendly</td></tr>\n";

          $query = "select * from ".$table;
          $result = mysql_query($query);
          $j=0;

          while($row=mysql_fetch_array($result)) {
            echo "<tr>";

            for($i=1;$i<sizeof($columns);$i++) {
              echo "<td class='small'><center>".$row[$columns[$i]]."</td>";
            }

            $j=$row[$columns[0]];
            echo "<td class='small'><center><a href='delete_rec.php?id=".$j."'>delete</a></td>";
            echo "<td class='small'><center><a href=\"printer_friendly.php?id=" . $j . "\">Print</a></tr>";
          }
          echo "</table>";
        }

        // mySQL ends

      ?>

      <br /><br />
      </TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE><BR></TD></TR>
      <TR>
      <TD class=small align=right>opensource design © 2001</TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE>

      <a href="http://sourceforge.net">
      <img src="http://sourceforge.net/sflogo.php?group_id=45605&type=5" width="210" height="62" border="0" alt="SourceForge Logo"></a>
      </center></form>

      </body></html>

       
    • rubble

      rubble - 2005-12-29

      Actually my php files are set to 755 and my images and html files defaulted to 644.

      Thx for your help!!

       
    • rubble

      rubble - 2005-12-30

      It works now, I didn't quite have all php files changed to 755.

      thanks.

       

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.