aid with tantra_php_webregister

Results 1 to 4 of 4
  1. #1
    Novice erblack666 is offline
    MemberRank
    Aug 2008 Join Date
    1Posts

    aid with tantra_php_webregister

    Hello a greeting to the comunida one, my excuses by the English, copies and beats in a translator. I need that they help pliz me in a problem that brings crazy person to me for day, I leave an image them attached:



    like tried Web server and with xampp server, wamp server, easy php and the error persists. not yet and managed to highly create accounts of users in my servant agradeceria its aid or if somebody can raise " account server tool"
    here I leave tantra_php_webregister that I am using

    Code:
    <?php
    require_once './inc/class.captcha.php';
    $accdir="D:\tantraserver\teh-server\teh-server\DBSRV\run\account";
    ?>
    <html>
    <head>
    <title>Tantra Register</title>
    <STYLE type='text/css'>
    body
    {
    	FONT: 13px Arial;
    }
    td
    {
    	FONT: 13px Arial;
    }
    </STYLE>
    </head>
    <body>
    <div align="center">
    <br />
    <b>Tantra Online Account Register</b>
    <br />
    <br />
    <form id="form1" name="form1" method="post" align="center" action="register.php?register=1">
      <table align="center" border="0" width="59%">
      <tbody>
          <tr>
    		<td>Username:</td>
    		<td><input name="userid" id="userid" type="text" /></td>
    		<td>Only letters from A to Z, lenght of 4 to 12 characters</td>
    	  </tr>
    	  <tr>
    		<td>Password:</td>
    		<td><input name="password" id="password" type="password" /></td>
    		<td>Only letters or numbers, lenght of 4 to 12 characters</td>
    	  </tr>
    	  <TR>
    	  <TD>Check Code:</TD>
          <TD><input name='CheckCode' type='text'></TD>
    	  <TD>Type Check Code Here</TD>
          </TR>
    	  <tr>
    		<TD align="center" colspan="3"><img src='./inc/img.php' width='200' height='60' alt='Visual CAPTCHA' style='border: 1px solid #000000; padding: 2px;' /></TD>
    	  </tr>
    	  <tr>
    		<td colspan="3"><div align="center"><input name="Submit" value="Register Account" type="submit" /></div></td>
    	  </tr>
    	</tbody>
      </table>
    </form>
    <?php
    if(isset($_GET['register']) && $_GET['register']==1)
    {
    	if(PhpCaptcha::Validate($_POST['CheckCode']))
    	{
    		$userid=strtoupper(trim($_POST['userid']));
    		$password=trim($_POST['password']);
    		$password2=strtoupper(md5($password));
    		$initial=substr($userid,0,1);
    		$userlenght=strlen($userid);
    		
    		if(!ereg("^[0-9A-Z]{4,12}$",$userid))
    		{
    			echo "Only letters from A to Z, lenght of 4 to 12 characters";
    			exit();
    		}
    		if(!ereg("^[0-9a-zA-Z]{4,12}$",$password))
    		{
    			echo "Only letters or numbers, lenght of 4 to 12 characters";
    			exit();
    		}
    		if (ereg("^[a-zA-Z]$",$initial))
    		{
    			$initial=strtoupper($initial);
    		}
    		else
    		{
    			$initial="etc";
    		}
    		if(file_exists($accdir."\\".$initial."\\".$userid.".tad"))
    		{
    			echo "Account already exist.";
    		}
    		else
    		{
    			$f=@fopen("./inc/sample.tad",r) or die("Error");
    			$acc = @fread($f,7124);
    			$demoid=substr($acc,0,$userlenght);
    			$demopass=substr($acc,52,32);
    			$acc = str_replace($demoid,$userid,$acc);
    			$acc = str_replace($demopass,$password2,$acc); 
    			$f2=@fopen($accdir."\\".$initial."\\".$userid.".tad",a);
    			@fwrite($f2,$acc) or die("Error");
    			@fclose($f);
    			echo "Account registered successfully.";
    			exit();
    		}
    	}
    	else
    	{
    		echo "Check Code is Wrong";
    	}
    }
    
    ?>
    </div>
    </body>
    </html>




    Thanks and a greeting!


  2. #2
    Novice elotroyo is offline
    MemberRank
    Dec 2008 Join Date
    1Posts

    Re: aid with tantra_php_webregister

    Hola Yo tmb tengo el mismo problema si encuentro alguna solucion te aviso... y Si alguien sabe q nos ayude por q pasa eso ..

  3. #3
    Proficient Member spicman is offline
    MemberRank
    May 2007 Join Date
    Toronto - CanadaLocation
    170Posts

    Re: aid with tantra_php_webregister

    Quote Originally Posted by erblack666 View Post
    Hello a greeting to the comunida one, my excuses by the English, copies and beats in a translator. I need that they help pliz me in a problem that brings crazy person to me for day, I leave an image them attached:



    like tried Web server and with xampp server, wamp server, easy php and the error persists. not yet and managed to highly create accounts of users in my servant agradeceria its aid or if somebody can raise " account server tool"
    here I leave tantra_php_webregister that I am using

    Code:
    <?php
    require_once './inc/class.captcha.php';
    $accdir="D:\tantraserver\teh-server\teh-server\DBSRV\run\account";
    ?>
    <html>
    <head>
    <title>Tantra Register</title>
    <STYLE type='text/css'>
    body
    {
        FONT: 13px Arial;
    }
    td
    {
        FONT: 13px Arial;
    }
    </STYLE>
    </head>
    <body>
    <div align="center">
    <br />
    <b>Tantra Online Account Register</b>
    <br />
    <br />
    <form id="form1" name="form1" method="post" align="center" action="register.php?register=1">
      <table align="center" border="0" width="59%">
      <tbody>
          <tr>
            <td>Username:</td>
            <td><input name="userid" id="userid" type="text" /></td>
            <td>Only letters from A to Z, lenght of 4 to 12 characters</td>
          </tr>
          <tr>
            <td>Password:</td>
            <td><input name="password" id="password" type="password" /></td>
            <td>Only letters or numbers, lenght of 4 to 12 characters</td>
          </tr>
          <TR>
          <TD>Check Code:</TD>
          <TD><input name='CheckCode' type='text'></TD>
          <TD>Type Check Code Here</TD>
          </TR>
          <tr>
            <TD align="center" colspan="3"><img src='./inc/img.php' width='200' height='60' alt='Visual CAPTCHA' style='border: 1px solid #000000; padding: 2px;' /></TD>
          </tr>
          <tr>
            <td colspan="3"><div align="center"><input name="Submit" value="Register Account" type="submit" /></div></td>
          </tr>
        </tbody>
      </table>
    </form>
    <?php
    if(isset($_GET['register']) && $_GET['register']==1)
    {
        if(PhpCaptcha::Validate($_POST['CheckCode']))
        {
            $userid=strtoupper(trim($_POST['userid']));
            $password=trim($_POST['password']);
            $password2=strtoupper(md5($password));
            $initial=substr($userid,0,1);
            $userlenght=strlen($userid);
     
            if(!ereg("^[0-9A-Z]{4,12}$",$userid))
            {
                echo "Only letters from A to Z, lenght of 4 to 12 characters";
                exit();
            }
            if(!ereg("^[0-9a-zA-Z]{4,12}$",$password))
            {
                echo "Only letters or numbers, lenght of 4 to 12 characters";
                exit();
            }
            if (ereg("^[a-zA-Z]$",$initial))
            {
                $initial=strtoupper($initial);
            }
            else
            {
                $initial="etc";
            }
            if(file_exists($accdir."\\".$initial."\\".$userid.".tad"))
            {
                echo "Account already exist.";
            }
            else
            {
                $f=@fopen("./inc/sample.tad",r) or die("Error");
                $acc = @fread($f,7124);
                $demoid=substr($acc,0,$userlenght);
                $demopass=substr($acc,52,32);
                $acc = str_replace($demoid,$userid,$acc);
                $acc = str_replace($demopass,$password2,$acc); 
                $f2=@fopen($accdir."\\".$initial."\\".$userid.".tad",a);
                @fwrite($f2,$acc) or die("Error");
                @fclose($f);
                echo "Account registered successfully.";
                exit();
            }
        }
        else
        {
            echo "Check Code is Wrong";
        }
    }
     
    ?>
    </div>
    </body>
    </html>




    Thanks and a greeting!
    This is a SHARING COMMUNITY RIGHT?

    I have received some help from users in this community so I will help out and share my knowledge.

    A couple things that "may" be the problem. The MOST important one is that you have an error in your directory in your script:

    Code:
    $accdir="D:\tantraserver\teh-server\teh-server\DBSRV\run\account";
    It should look more like this:

    Code:
    $accdir="D:\\tantraserver\\teh-server\\teh-server\\DBSRV\\run\\account";
    What's the difference? You must make sure you use 2 blackslashes \\ ... php will remove one of them and put the correct path.

    Also make sure that D:\tantraserver\teh-server\teh-server\DBSRV\run\account is a valid path and that it exists with your letter subfolders in there (A, B, C, D, E....etc.)

    Hope this helps!

    Cheers!

  4. #4



Advertisement