Jump to content

Shinryuu

Moderators
  • Posts

    1,025
  • Joined

  • Last visited

  • Days Won

    40

Posts posted by Shinryuu

  1. Use your domain name as the server name. In the remote mysql page limit the allowed IPs to the block that is used by your home/work router, just setting it to allow connections from any IP is dangerous.

     

    also try:

    			  using (SqlConnection connection = new SqlConnection(db))
    			    {
    					 
    					   connection.Open();
    					    using (SqlCommand command = new SqlCommand("INSERT INTO Suroviny (ID, Meno, Suroviny) VALUES (@id, @meno, @pocet", connection))
    					    {
    							 
    							    command.Parameters.Add(new SqlParameter("id", id));
    							    command.Parameters.Add(new SqlParameter("meno", meno));
    							    command.Parameters.Add(new SqlParameter("pocet", pocet));
    							 
    							   
    							    command.ExecuteNonQuery();
    							 
    					    }
    			 
    			    }
    

    and you have an extra ';' after your connection string.

  2. Basically I'm trying to create a new user and save the user=>pass pair and leaving apache to handle the login process, but I've run into a silly snag. The html has the user field as a required field, so for newuser.php to ever be called it has to have a value, it's not passing over into newuser.php though

     

    create.htm:

    <form id="new_user" method="post" action="newuser.php">
      <table>
       <tr>
     <td>
      <h2>Username:</h2>
     </td>
     <td>
      <input type="text" id="user" size="20" max="20" required="required">
     </td>
       </tr>
       <tr>
     <td>
      <h2>Password:</h2>
     </td>
     <td>
      <input type="text" id="pass" size="20" max="20" required="required">
     </td>
       </tr>
       <tr>
     <td>
      <h2>Contact Email:</h2>
     </td>
     <td>
      <input type="email" id="email" size="20" max="40" required="required">
     </td>
       </tr>
       <tr>
     <td>
      <h2>Retype Email:</h2>
     </td>
     <td>
      <input type="email" id="email2" size="20" max="40" required="required">	 
     </td>
       </tr>
       <tr>
     <td colspan="2">
      <h4>Additionally if you prefer contact through text messages provide your phone number and mobile carrier</h4><h5>(For US only)</h5>
     </td>
       </tr>
       <tr>
     <td>
      Phone:<input type="tel" id="tele">
     </td>
     <td>
      Carrier:<input type="text" size="20" id="carrier">
     </td>
       </tr>
       <tr>
     <td colspan="2">
      <h4>Finally please provide your birthdate to give a demographic statistic.</h4>
     </td>
       </tr>
       <tr>
     <td>
      <h2>Birthday</h2>
     </td>
     <td>
      <input type="date" id="bday">
     </td>
       </tr>
       <tr>
     <td colspan="2"><input type="submit">
       </tr>
      </table>
     </form>
    

     

    newuser.php:

    <?php
    $user=$_POST['user'];
    $pass=$_POST['pass'];
    $email=$_POST['email'];
    $email2=$_POST['email2'];
    if($email==$email2){
    if(isset($_POST['user'])){
    $pass=crypt($pass);
    $user=(string)$user;
    $output = $user.":".$pass.$nl;
    file_put_contents("passwd", $output, FILE_APPEND);
    }
    

  3. 500 errors are generally from accessing stuff like cPanel, phpMyAdmin, mail, etc and trying to access your site concurrently, memory allocation errors you shouldn't be getting unless you have a runaway script spawning a lot of excess objects. As for the sluggishness, that's just part of being on Johnny, Johnny easily gets higher load than Stevie because of all the extra services it offers, with a higher load the pages it serves are served slowly.

  4. No, I meant images for your site, when this started I threw a few files up to see if cPanel was being aggressive with only certain filetypes, and I managed to upload an image without an issue while having a simple 9-byte text file rejected.

     

    Basically, if you need to upload graphics for your site you might as well do that while we fix the problem.

     

    EDIT: Which is now fixed.

    • Like 1
  5. ps. I just realised how clever I am, changing the email address to an account I can't access... :(

    Clever indeed -_-.

     

    IPs used to do cPanel logins are recorded by the server so an admin could check that with the IP you posted this from and PM you or something, we have a password creator that makes nice passwords in cPanel, try making an ftp/email account and use it, then instead of making those accounts just copy it into the change password area for cPanel.

  6. I finally managed to get this error while testing a text editor running through a textarea. In my case I originally had the script output through the textarea's value attribute which ended up a little broken. When i simplified it to

    <textarea cols="80" rows="25" id="TEXT">
    <?php if(isset($_POST['open'])){
    if(isset($_POST['file'])){
    echo file_get_contents($_POST['file']);
    }
    } ?>
    </textarea>
    

    I had left out the closing php tag and after opening a couple files, got the error. I waited a couple minutes, went into the source and put the missing tag and haven't gotten the error again.

×
×
  • Create New...