Cannot download Error Log

Hello,

I created a contact us web form on my dummy site. For some reasons, I cannot receive emails from the web form. There is no error showing up in front. Someone suggested me to check Error log files in the Cpanel. When I try to download the Error log files of the concern domain, I get an following error that you do not have the permission to download the files.

Forbidden
You don't have permission to access /panel/modules-new/errorlogview/index-content.php on this server.

What should I do to download the Error Log of that particular domain.

Regards,

Comments

  • @m_imran79 said:
    Hello,

    I created a contact us web form on my dummy site. For some reasons, I cannot receive emails from the web form. There is no error showing up in front. Someone suggested me to check Error log files in the Cpanel. When I try to download the Error log files of the concern domain, I get an following error that you do not have the permission to download the files.

    Forbidden
    You don't have permission to access /panel/modules-new/errorlogview/index-content.php on this server.

    What should I do to download the Error Log of that particular domain.

    Regards,

    I think the Error Log service has been disabled.

    What is your domain and the email address you are trying to receive mails to?

  • @ChrisPAR Thank you for looking into this. The domain is creative-sites.ga and email address is [email protected] . The code I wrote is as follows: MAy be you can find any error in the code.

    <div id="contact">
      <h2>Contact Form</h2>
      <p>Please drop us a message with your name, short description of your project, a telephone number and best time to contact. We aim to reply all our emails quickly as possible. </p>
        <?php
    
      //check for header injection
      function header_injection($str){
        return preg_match("/[\r\n]/", $str);
      }
      if(isset($_POST['contact_submit'])){
        $name     = trim($_POST['name']);
        $email    = trim($_POST['email']);
        $msg    = $_POST['message'];
    
      //Check if Name & Email has header injection
      if (header_injection($name) || header_injection($email)){
      die();// if true the kill the script
      }
      if(!$name || !$email || !$msg){
        echo '<h4 class="error">All fields required</h4><a href="contact.php" class="button block">Back</a>';
          exit;
      }
      // Add Receiver Email
        $to = "[email protected]";
      //Subject
        $subject = "$name has sent you a message from returant contact form.";
      //Main Message
        $message  = "Name: $name\r\n";
        $message .= "Email: $email\r\n";
        $message .= "Message: \r\n$msg";
    
        $message = wordwrap($message,72);
    
        //Email Header
        $headers  = "MIME-Version: 1.0\r\n";
        $headers .= "Content-type: text/plain; charset=iso-8859-1\r\n";
        $headers .= "From: $name <$email>\r\n"; 
        $headers .= "X-Priority: 1\r\n";
        $headers .= "X-MXMail-Priority: High\r\n\r\n";
    
        mail($to, $subject, $message, $headers);
    
      ?>
      <!--Show Success Message once email sent -->
      <h3 style="color: green">Thank you for contacting us.</h3>
      <p>We will get back to you within 24 hours.</p>
    
      <?php } else{ ?>
    
        <form method="post" action="" id="contact-form">
          <label for="name">Your name</label><br><br>
          <input type="text" name="name" id="name"><br><br>   
          <label for="email">Your email address</label><br><br>
          <input type="email" name="email" id="email"><br><br>      
          <label for="message">Your Message</label><br><br>
          <textarea id="message" name="message"></textarea> <br><br>     
          <button type="submit" name="contact_submit" class="button">Send</button>    
    
        </form>
      <?php } ?>
    </div>
    
  • @m_imran79 said:
    @ChrisPAR Thank you for looking into this. The domain is creative-sites.ga and email address is [email protected] . The code I wrote is as follows: MAy be you can find any error in the code.

    To begin with, I noticed your site is on CloudFlare. Have you transferred your site to them by changing nameservers or did you enable it from cPanel?
    If you enabled it from cPanel, which is my first suspicion, it breaks emails.

    Also, you might want to check this out, which may be a reason for emails not beng sent at all: https://profreehost.com/support/email/sending-emails-from-your-website

  • edited January 16

    @ChrisPAR

    Thank you for the suggestion, you are right, I have created Cloudflare Account and transferred the nameservers. But not through control panel. I can send & receive emails through my roundcoube webmail account.

    Issue is that I do not receive the message which I send through my Contact Form on my website. I have checked the link you suggested, and I think i have followed it correctly.

    Could you please check my code, may be you find something suspicious? Or And why I cannot view the Error in Cpanel?

    Thank you in advance for the help.

  • @ChrisPAR

    I asked a friend to check the code. He uploaded the files into his hosting server and it was working. There is nothing wrong with the code. Issue is Profreehost is blocking my messages.

    What should I now do so that my messages are not blocked by Profreehost?

    Thank you again for helping.

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!