Block adds on laptop but doesn't add on host - SOLVED

Permalink
Hello,

I've designed a block for Concrete5 - a contact form. It takes 3 variables as user input during block installation (e.g. email address to send the form to). It installs fine on both my laptop's server and host's. When I try to add the block on my own server running on my laptop, it adds just fine. When I add it on my real hosting provider's server, it gives me the following error: "An unexpected error occurred. An error occurred while processing this request.< Back to Home".

I can't even imagine where to look to figure out what the problem could be. Anyone have any ideas? Thank you.

[SOLVED]
It turned out to be a trivial error. And Concrete5's Reports->Logs tool is pretty useful, I didn't know it was in the Panel, I found it accidentally. What happened was my block creates a DB table and takes some values from it in view(). But the thing was I've already created the table on my laptop long time ago, and when I was playing with installing/uninstalling, adding/deleting my block, everything was working fine. But on my host the table was not created. And the error was my block tried to read the table BEFORE it was created, but it only got created after the block gets added to a page! So, when I saw the log showing DB errors accessing the non-existent table... oh my...

Hope my experience helps someone. Remember about the Log feature!

add.php:
<?php defined('C5_EXECUTE') or die("Access Denied.");
$email_address = '';
$email_subject = '';
$submit_wait_time = '';
include_once('edit.php');
?>


edit.php:
<?php defined('C5_EXECUTE') or die("Access Denied.");?>
<style type="text/css" media="screen">
   .ccm-block-field-group h2, h3 { margin-bottom: 5px; }
</style>
<div class="ccm-block-field-group">
   <h2>Form Configuration</h2>
   <div class="ccm-block-field-group">
      <h3>Email Address</h3>
      <input type="text" id="email_address" name="email_address" value="<?php  echo  $email_address; ?>" maxlength="100" size="30" />
   </div>
   <div class="ccm-block-field-group">
      <h3>Email Subject</h3>
      <input type="text" id="email_subject" name="email_subject" value="<?php  echo  $email_subject; ?>" maxlength="100" size="30" />
   </div>
   <div class="ccm-block-field-group">


controller.php:
public function on_page_view() {
      $this->set('email_address', $this->email_address);
      $this->set('email_subject', $this->email_subject);
      $this->set('submit_wait_time', $this->submit_wait_time);
   }
   public function save($data) {
      $args['email_address'] = ($data['email_address'] != '') ? $data['email_address'] : '';
      $args['email_subject'] = ($data['email_subject'] != '') ? $data['email_subject'] : '';
      $args['submit_wait_time'] = (intval($data['submit_wait_time']) > 0) ? intval($data['submit_wait_time']) : 60;
      parent::save($args);
   }


db.xml:
?xml version="1.0"?>
<schema version="0.3">
   <table name="AbContactForm">
      <opt platform="MYSQL">ENGINE=MYISAM</opt>
      <field name="bID" type="I">
         <key ></key>
         <unsigned ></unsigned>
      </field>
      <field name="email_address" type="C" size="200">
      </field>
      <field name="email_subject" type="C" size="200">
      </field>
      <field name="submit_wait_time" type="I">
         <unsigned ></unsigned>
         <default value="60" ></default>

linuxoid