Help - Search - Members - Calendar
Full Version: 500 error [BIG PROBLEM!]
HTMLHelp Forums > Web Authoring > Markup (HTML, XHTML, XML)
Hizxi
Hello!

You can move this tpoic, if i put it wrong place.

Well, i have a gib problem with 500 Internal Server Error. It says this:

CODE
Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator, webmaster@maplefinland.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.


Okay, now i'll give my codes on my webisite:

First, my HTML Code:

CODE
<center><form action="event.php">
<b>Hahmosi nimi:</b><br>
<INPUT type="text" name="nimi" STYLE="color: #000000; font-family: Verdana; font-weight: bold; font-size: 12px; background-color: #D3E8F3;" size="17" maxlength="30"><br><br>


<b>Sähköpostiosoitteesi:</b><br>
<INPUT type="text" name="email" STYLE="color: #000000; font-family: Verdana; font-weight: bold; font-size: 12px; background-color: #D3E8F3;" size="17" maxlength="30"><br><br>


<b>Linkki videoosi YouTubessa:</b><br>
<INPUT type="text" name="video" STYLE="color: #000000; font-family: Verdana; font-weight: bold; font-size: 12px; background-color: #D3E8F3;" size="17" maxlength="30"><br><br>

<input type="submit" value="ROCK ON!"></form></center>


Then my "event.php" -Code:

CODE
<?php
           $to_addr = "MY E-MAIL";
           $subject = "Videokilpailu";
$msg = "Kotisivujen kautta on lähetetty seuraava videokilpailu.\n";
$msg .="\n";
$msg .="Ilmoittajan nimi: " . $_REQUEST["nimi"] ."\n";
$msg .="    e-mail: " . $_REQUEST["email"] . "\n";
$msg .="    YouTube: " . $_REQUEST["video"] . "\n";
$msg .="\n";
$msg .="------------------------------------------------------------------------------\n";
$msg .="Lähettäjän IP-osoite: " . $_SERVER["REMOTE_ADDR"] . "\n";
$msg .="Selain: " . $_SERVER["HTTP_USER_AGENT"] . "\n";
  
            if (mail($to_addr, $subject, $msg)) {
            header ("Location: viestix.html");
            } else {
    # Tähän ilmoitukset, jossa kerrotaan ettei onnistunut
            }
?>


Hope i get help fast, this is so important. And sorry for those texts in the codes, it's finnish cool.gif

Thank you!
Brian Chandler
QUOTE
And sorry for those texts in the codes, it's finnish


Why do you apologise? I mean, I can see it's Finnish, actually (except it might just be Estonian), even though I can't understand a word. It makes no difference to the program.

Anyway, 500 means that for some reason or other your program (php) did not run, or failed in some way. You have to sort out why not, which involves checking your hosting documentation, testing with a "Hello World" program, and so on, until you find the problem. Nobody can just look at snippets of code and tell you. (Oh, there's plenty of little things that need correction - like the <Form...> doesn't have POST or GET specified...)
Hizxi
Okay...
Well, I forgot to tell that I have one php script (same as this) that works. It looks exactly same as this, but it works and this doesn't.
But I try to make this work, if I have more questions, I will ask.

Thank you.
Brian Chandler
QUOTE(Hizxi @ Mar 19 2008, 08:25 PM) *

Okay...
Well, I forgot to tell that I have one php script (same as this) that works. It looks exactly same as this, but it works and this doesn't.
But I try to make this work, if I have more questions, I will ask.

Thank you.


At one stage, my hosting service (pair.com) had php configured so there was a 500 error if the program could not be found. You might recheck that you have the program name exactly correct (myprog.php vs Myprog.php and similar).

HTH
Hizxi
QUOTE(Brian Chandler @ Mar 19 2008, 07:23 AM) *

QUOTE(Hizxi @ Mar 19 2008, 08:25 PM) *

Okay...
Well, I forgot to tell that I have one php script (same as this) that works. It looks exactly same as this, but it works and this doesn't.
But I try to make this work, if I have more questions, I will ask.

Thank you.


At one stage, my hosting service (pair.com) had php configured so there was a 500 error if the program could not be found. You might recheck that you have the program name exactly correct (myprog.php vs Myprog.php and similar).

HTH

Well, i have copied the name "event.php". It cannot be wrong.
But anyway, I asked my host about this problem. I'm waiting for the answer...
Hizxi
Okay, this problem have been repaired. The reason was chmod.
Thank you anyway.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2024 Invision Power Services, Inc.