Ir para conteúdo

POWERED BY:

Arquivado

Este tópico foi arquivado e está fechado para novas respostas.

Gran Ariete

[RESOLVIDO] Erro ao Carregar PHP

Recommended Posts

Olá galera sou novo por aqui gostaria de saber se podem me ajudar!

Tenho aqui em Casa um P3 rodando APACHE 2.2 com PHP5, quando rodo a o endereço normal ele carrega a index normal!

Ate ai belê, o problema e quando se clica em um determinado link, para se criar uma conta de usuário, ele simplesmente abre todo o código do script php no browser.

Alguém sabe como resolver isso?

o endereço da HP é esse http://otdograal.no-ip.info:8090/ e o link que dá problema é esse http://otdograal.no-ip.info:8090/account_create.php...

Existe outr0o link aqui nesta page o highscores que também é usado para acessar pastas nos msmo lugares que o ACCES ali, e as permissões de pasta estão idênticas, então não pode ser por causa das permissões de pasta!!

Pessoal tentei de tudo , mas esgotei minhas opçoes, não sou programador, sou fuçador :) .

Conto com a ajuda de alguém aqui!!!

 

Abraços

 

http://forum.imasters.com.br/public/style_emoticons/default/thumbsup.gif

Compartilhar este post


Link para o post
Compartilhar em outros sites

Muito Obrigado!!!

Segue abaixo o código da página account_create.php:

 


$password = $_POST['password'];

if (isset($account) && isset($password) && $account != "" && $password != "") {

if ($account == "111111" || $account == "1") {

echo "<h2>Warning linenums:0'><? include ("top.inc.php"); $error = 0;$account = $_POST['account'];$password = $_POST['password'];if (isset($account) && isset($password) && $account != "" && $password != "") {if ($account == "111111" || $account == "1") {echo "<h2>Warning:</h2><p>Due to safetey reasons this account number is blocked!</p>";$error = 1; }if (strlen($account) < 6 || strlen($account) > 8 || strlen($password) < 5) {echo "<h2>Error:</h2><p>Please fill out the form correctly!</p>";$error = 1;} else if (!is_numeric($account)) {echo "<h2>Error:</h2><p>Your account number must consist of 6 to 8 NUMBERS!</p>";$error = 1;} else {$temp = strspn("$password", "qwertyuiopasdfghjklzxcvbnmQWERTYUIOPASDFGHJKLZXCVBNM1234567890 ");if ($temp != strlen($password)) {echo "<h2>Error:</h2><p>Your password must consist of more then 5 letters or numbers (ABC, abc, 123 and blankspaces)!</p>";$error = 1;} else {if ($error == 0) {if (!file_exists($diraccount . $account . ".xml")) {$file = fopen($diraccount . $account . ".xml", "w");$output ="<?xml version=\"1.0\"?><account pass=\"" . $password . "\" type=\"1\" premDays=\"" . $premdays . "\"><characters></characters></account>";fwrite($file, $output);$created = true;session_unset();?><h2>Congratulations:</h2><p>Your account were successfully created. Login <a href="index.php">here</a> to create your first character.</p><?}}}}} else { if ($account != "") {?><h2>Error:</h2><p>Sorry, but that account number is not available at the moment. Please use another one.</p><?}}if ($created != true) {?><h2>Create your own, personal account:</h2><form action="<?=$PHP_SELF?>" method="POST"><h3>Account Number:</h3><p><input name="account" type="text" value="" maxlength="<? echo $sizeacc; ?> class="textfield" > <font color="red"> <i>(Max <? echo $sizeacc; ?> digits)</i></font></p><h3>Password:</h3><input name="password" type="password" value="" class="textfield"> <font color="red"> <i>(Minimum 5 characters)</i></font></p><p><input type="Submit" value="Create Account"><input type="Reset" value="Clear Form"></p></form><?}$acc_tot = 0;$dir = @opendir($diraccount);if( $dir ) { while(readdir($dir)) { $acc_tot += 1; }} else { $acc_tot = 'n/a';}$player_tot = 0;$dir = @opendir($dirplayer);if( $dir ) { while(readdir($dir)) { $player_tot += 1; }} else { $player_tot = 'n/a';}echo ("<p>There are now $acc_tot accounts and $player_tot players on $title!</p>");include ("menu.inc.php");?>

Tá ai Beraldo, pode me ajudar?

Aqui só pra caso precisar está o código da pagina top.inc.php:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"><?php include 'config.php'; ?><head>	<?php echo ("<title>$title</title>");?>	<meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1" />	<link rel="stylesheet" type="text/css" href="images/style.css" /></head><body> <div id="header"><table width="100%" border="0" cellpadding="0" cellspacing="0" class="bodyline"><tr><td class="header"> 	<center>  </center><center> 							  <a href="index.php"><img alt="" src="images/divider.gif" /> Home Page</a> <img alt="" src="images/divider.gif" /><?php 							  if($showforum == '1')					echo '<a href="'.$forumlink.'" target="_blank">Forum</a> <img alt="" src="images/divider.gif" />';?>							  <a href="rules.php">Rules</a> <img alt="" src="images/divider.gif" />							  <a href="highscores.php">Highscores</a> <img alt="" src="images/divider.gif" />							  <a href="account_login.php"></a> <img alt="" src="images/divider.gif" /></center></div></td></tr></table><div id="menu">	<table width="100%" border="0" cellpadding="4" cellspacing="0">		<tbody>			<tr>				<td valign="top"> <table style="border: 1px solid rgb(25, 25, 40);" cellpadding="3" cellspacing="1" width="100%">					<tbody>						<tr>							<td class="menubar"><img alt="" src="images/small_arrow.gif" hspace="3" /><font class="block-title">Navigation</font></td>						</tr>						<tr>							<td class="side-body" bgcolor="#191928" width="100%"> <div style="width: 100%; height: 5px;"><img alt="" style="height: 5px;" src="images/spacer.htm" /></div>								  .: <a href="info.php"><?php echo $title; ?> Info</a> :.<br />								  .: <a href="account_create.php"> ACCES</a> :.<br />								  .: <a href="logintut.php">Login tutorial</a> :.<br />								<br />							</td>						</tr>					</tbody>				</table>				<table style="border: 1px solid rgb(25, 25, 40);" cellpadding="3" cellspacing="1" width="100%">					<tbody>						<tr>							<td class="menubar"><img alt="" src="images/small_arrow.gif" hspace="3" /><font class="block-title">Community</font></td>						</tr>						<tr>							<td class="side-body" bgcolor="#191928" width="100%">								  .: <a href="character.php"></a> :.<br />								  .: <a href="guild.php">Guild List</a> :.<br />								<br />							</td>						</tr>					</tbody>				</table>				<table style="border: 1px solid rgb(25, 25, 40);" cellpadding="3" cellspacing="1" width="100%">					<tbody>						<tr>							<td class="menubar"><img alt="" src="images/small_arrow.gif" hspace="3" /><font class="block-title">Library</font></td>						</tr>						<tr>							<td class="side-body" bgcolor="#191928" width="100%">								  .: <a href="spells.php"></a> :.<br />								  .: <a href="monster_list.php"></a> :.<br />								  .: <a href="commands.php">Player Commands</a> :.<br />								<br />							</td>						</tr>					</tbody>				</table>				<table style="border: 1px solid rgb(25, 25, 40);" cellpadding="3" cellspacing="1" width="100%">					<tbody>						<tr>							<td class="menubar"><img alt="" src="images/small_arrow.gif" hspace="3" /><font class="block-title">Server Information</font></td>						</tr>						<tr>							<td class="side-body" bgcolor="#191928" width="100%">								<?php								$info = chr(6).chr(0).chr(255).chr(255).'info';								$sock = @fsockopen($worldip, 7171, $errno, $errstr, 1);								if ($sock)								{									fwrite($sock, $info);									$data='';									while (!feof($sock))									$data .= fgets($sock, 1024);									fclose($sock);									// The following script shows how many players online									preg_match('/players online="(\d+)" max="(\d+)"/', $data, $matches);									print '  .: <font color=green>ONLINE</font> :.';									print '<br /><div style="color: #cec6a4">  .: Players: ';									print $matches[1] . '/' . $matches[2];									// The following script shows uptime									preg_match('/uptime="(\d+)"/', $data, $matches);									$h = floor($matches[1] / 3600);									$m = floor(($matches[1] - $h*3600) / 60);									// And now it prints it:									echo " :.<br />  .: Uptime: $h h $m m :.<br /><br /></div></div>";								}								else								print '  .: <font color=red>OFFLINE</font> :.<br /><br /></div>';								?>							</tbody>						</table>						<table style="border: 1px solid rgb(25, 25, 40);" cellpadding="3" cellspacing="1" width="100%">							<tbody>								<tr>									<td class="menubar"><img alt="" src="images/small_arrow.gif" hspace="3" /><font class="block-title">Links</font></td>								</tr>								<tr>									<td class="side-body" bgcolor="#191928" width="100%">										  .: <a href="http://www.tibianordic.com/" target="_blank">Tibianordic</a> :.<br />										  .: <a href="http://www.otfans.net/" target="_blank">OTFans</a> :.<br />										  .: <a href="http://www.otservlist.org/" target="_blank">OT Server List</a> :.<br />										  .: <a href="http://www.otscms.com/" target="_blank">OTSCMS</a> :.<br />										<br />									</td>								</tr>							</tbody>						</table>						<table style="border: 1px solid rgb(25, 25, 40);" cellpadding="3" cellspacing="1" width="100%">							<tbody>								<tr>									<td class="menubar"><img alt="" src="images/small_arrow.gif" hspace="3" /><font class="block-title">Validation</font></td>								</tr>								<tr>									<td class="side-body" bgcolor="#191928" width="100%">										<center><p>											<a href="http://validator.w3.org/check?uri=referer"><img												src="http://www.w3.org/Icons/valid-xhtml10"											alt="Valid XHTML 1.0 Transitional" height="31" width="88" /></a>										</p>										<p>											<a href="http://jigsaw.w3.org/css-validator/">												<img style="border:0;width:88px;height:31px"												src="http://jigsaw.w3.org/css-validator/images/vcss" alt="Valid CSS!" />											</a>										</p></center>									</td>								</tr>							</tbody>						</table>						<table style="border: 1px solid rgb(25, 25, 40);" cellpadding="3" cellspacing="1" width="100%">							<tbody>								<tr>								<img alt="" style="height: 5px;" src="images/spacer.htm" /></div>								<div style="clear: both;">									<div style="width: 100%; float: left; text-align: left; color: #cec6a4;">									</div></td>								</tr>							</tbody>						</table>						<table border="0" cellpadding="0" cellspacing="0" width="100%">							<tbody>								<tr>									<td class="menubarbottom"> </td>								</tr>							</tbody>						</table>						<table cellpadding="0" cellspacing="0" width="100%">							<tbody>								<tr>									<td height="8"></td>								</tr>							</tbody>						</table></td>					</tr>				</tbody>			</table>		</div>		<div id="outercontainer">			<div id="container">
Alguns links eu suprimi porque estava dando erro também!

 

Desde já agradeço a atenção dispensada!!

 

http://forum.imasters.com.br/public/style_emoticons/default/joia.gif

Compartilhar este post


Link para o post
Compartilhar em outros sites

Com certeza esta tag está desativada, funcionou beraldo, más agora sem querer abusar, está dando um novo erro!!!

Esse aqui ó:

 

URL do erro: http://otdograal.no-ip.info:8090/%3C?php=$PHP_SELF?%3E

 

Forbidden

 

You don't have permission to access /< on this server.

 

Desde já agradeço novamente a ajuda!!!

 

Abraços

 

8)

Compartilhar este post


Link para o post
Compartilhar em outros sites

Puxavida Beraldo nem sei como te agradecer cara, funcionou perfeitamente!!!

http://forum.imasters.com.br/public/style_emoticons/default/clap.gif Você está de parabêns!!!

Muito agradecido mesmo!!

Eu tenho outra dúvida mas vou tentar resolve-la sozinho se não conseguir posso te contactar aqui?

Muito Obrigado!!!

http://forum.imasters.com.br/public/style_emoticons/default/clap.gif

http://forum.imasters.com.br/public/style_emoticons/default/clap.gif

Compartilhar este post


Link para o post
Compartilhar em outros sites

×

Informação importante

Ao usar o fórum, você concorda com nossos Termos e condições.