403 Forbidden auf Formular Vorlage
Ich habe eine url zurückgibt, 403 forbidden aus unbekannten Gründen. ich habe deaktivieren Sie mod_security .htaccess, chmodded Datei auf 0777. Die URL ist
http://www.veepiz.com/afrostar.php?app=help&func=addvideo
es passiert, wenn u senden Sie das Formular irgendwelche Ideen?
hier ist der code
function PublicAddVideo()
{
if (isset($_POST['submit_addvideo']))
{
require_once("class.phpmailer.php");
//send email tobirthday person
$subject="New AfroStar Video Suggested";
$msg = "Dear Jordah,\n".
"Youtube video: ".$_POST['youtubesle']."\n Star Name: ".$_POST['starnamesle']."\n Country: ".$_POST['countrysle']."\n IP Address: ".getRealIpAddr();
$mail = new PHPMailer();
$mail->IsSMTP(); //set mailer to use SMTP
$mail->Host = "localhost"; //specify main and backup server
$mail->SMTPAuth = true; //turn on SMTP authentication
$mail->Username = "[email protected]"; //SMTP username
$mail->Password = "********"; //SMTP password
$mail->From = "[email protected]";
$mail->FromName = "Veepiz";
$mail->AddAddress('[email protected]',"Jordah Ferguson");
$mail->AddReplyTo("[email protected]", "Veepiz");
$mail->WordWrap = 50; //set word wrap to 50 characters
$mail->IsHTML(true); //set email format to HTML
$mail->Subject = $subject;
$mail->Body = nl2br($msg);
$mail->AltBody = $msg;
if(!$mail->Send())
{
}
?>
<div style='color:green;'>Admins at veepiz.com have been notified of your request and will update afrostar application accordingly.<div align='center' style='padding:10px'> <a href='afrostar.php' onclick="return getPage('afrostar_class.php',{});" class='btn'>Back to AfroStars</a></div></div>
<?php
} else
{
$this->DisplayHeader("Add African Video");
?>
<script language="javascript">
var checkHelpVars=function ()
{
err='';
if ($('#starnamesle').val().length==0) err+="Please type in the name of the star";
if ($('#countrysle').val().length==0) err+="\nName of the country missing";
if ($('#youtubesle').val().length==0) err+="\nYoutube url missing";
var url=$('#youtubesle').val();
var matches = url.match(/^http:\/\/(?:www\.)?youtube.com\/watch\?(?=.*v=[\w-]+)(?:\S+)?$/);
if (matches) {
} else {
err +="\nInvalid Youtube Url";
}
if (err.length>0)
{
alert(err);
return false;
}
<?php
if (isloggedin())
{
echo "return postPage('afrostar_class.php?app=help&func=addvideo',{starnamesle:$('#starnamesle').val(),countrysle:$('#countrysle').val(),youtubesle:encodeURI($('#youtubesle').val()),submit_addvideo:1});";
} else
{
echo "return true;";
}
?>
}
</script>
<form id='helpform' method="POST" action="http://www.veepiz.com/afrostar.php?app=help&func=addvideo">
<table cellpadding="2" cellspacing="3">
<tr>
<td><b>Africa Artist Name:</b></td>
<td><input id='starnamesle' type="text" style='' name='starnamesle' style='-webkit-border-radius: 8px;-moz-border-radius: 8px;border-radius: 8px;width:450px'/></td>
</tr>
<tr>
<td><b>Country:</b></td>
<td><input id='countrysle' type="text" style='' name='countrysle' style='-webkit-border-radius: 8px;-moz-border-radius: 8px;border-radius: 8px;width:450'/></td>
</tr>
<tr>
<td><b>Youtube link:</b></td>
<td><input id='youtubesle' type="text" style='' name='countrysle' style='-webkit-border-radius: 8px;-moz-border-radius: 8px;border-radius: 8px;width:450'/><br/>Example:<small style='font-size:8pt;color:#666666'>http://www.youtube.com/watch?v=vJyftjMOd2w</small></td>
</tr>
<tr>
<td colspan="2" align="center"><input type="submit" class="btn" onclick="return checkHelpVars();" name='submit_addvideo' value="Finish"></td>
</tr>
</table>
</form>
<?php
$this->DisplayFooter();
}
}
InformationsquelleAutor Sir Lojik | 2010-12-03
Du musst angemeldet sein, um einen Kommentar abzugeben.
Überprüfen Sie Ihre Daten veröffentlichen, wenn es enthält eine beliebige url, dann gibt es Chancen, blockiert in der server.
ersetzen Sie bestimmte Zeichen in der url, die Sie Einreichen, dann müssen Sie konvertieren wieder zu seiner ursprünglichen form auf post.
Wie mache ich das? Angenommen ich habe eine textbox in einer form, wie Ersetze ich die textbox-Daten und an welcher Stelle muss ich konvertieren es zurück vor dem speichern in eine Datenbank?
InformationsquelleAutor VKGS
Meine Lösung:
InformationsquelleAutor T.Todua
Und hier einige Kerl sagt, ändern Sie die Berechtigungen auf 644
http://www.daniweb.com/forums/thread21777.html
InformationsquelleAutor Ives.me
ich merkte, ich hatte den Namen definiert, zweimal für countrysle.... also habe ich es geändert und nun funktioniert es[in eine form]
InformationsquelleAutor Sir Lojik
Müssen Sie die
type= "text"
Attribut im input-tag des Feldes, das Sie das problem mit. Auch versuchen Sie und verwenden Siemethod= "post"
in der form Attribute eher als bekommen, der kann auch dieses problem verursachen.InformationsquelleAutor indigo
http://www.linuxforums.org/forum/servers/34130-you-dont-have-permission-access-server-solved.html
Lesen Sie den letzten Kommentar von diesem link:
WTF!
Ich verstehe das, aber einen Versuch Wert wenn sonst nichts hilft.
InformationsquelleAutor Ives.me
Unglaublich, ich fand, dass wenn ich habe die post-string aus der 'Formular-Webseite' , 'leere Seite', d.h. das weglassen der technische Wort "form", die form würde den text posten, ohne den server werfen, bis eine 'Forbidden' - Meldung!!!
InformationsquelleAutor Ian Dickson