Jamroom Logo Jamroom 5 Core
is now Open Source!
User Support Forum Archive (Read Only)
Jamroom Developers:
module does not create a db, what's wrong?
musichive-net



Joined: 24 Jan 2009
Posts: 266

Posted: 06/30/11 14:22 
Hi,

I have a problem with my recent creation and I have no clue as to what's wrong. I have reset all the caches, enabled and disabled the module multiple times on my JamDev and a dev server from JB to no avail. Checked and rechecked the files and everything seems to be fine. Thus, here I am asking you guys to have a look and maybe throw couple suggestions as to what is wrong.

include.php:

Code

<?php
 
// make sure we are not being called directly
defined('IN_JAMROOM') or exit();

// Define module name as a variable - this will be used for the "settings" button
// in the Jamroom Config, if we choose to use it.
$mhNetworks = "Networks";

// Our version
$config['mhNetworks_version']     = '0.1.3';
$config['mhNetworks_developer']   = 'Music Hive Ltd., &copy;'. strftime('%Y');
$config['mhNetworks_description'] = 'This module allows for management and addition of profiles on other networks.';
$config['mhNetworks_support_url'] = 'http://www.musichive.net/contact/';


// Our db tables
$jamroom_db['mhNetworks_twitter'] = $config['db_prefix'] .'mhNetworks_twitter';
//$jamroom_db['mhNetworks_facebook'] = $config['db_prefix'] .'mhNetworks_facebook';
//$jamroom_db['mhNetworks_youtube'] = $config['db_prefix'] .'mhNetworks_youtube';

// Our includes
include_once('modules/mhNetworks/include/EpiCurl.php');
include_once('modules/mhNetworks/include/EpiOAuth.php');
include_once('modules/mhNetworks/include/EpiTwitter.php');
include_once('modules/mhNetworks/include/secret.php');
?>


and schema.php:

Code

<?php

defined('IN_JAMROOM') or exit();

// mhNetworks Twitter table
$tbl = "
   CREATE TABLE {$jamroom_db['mhNetworks_twitter']} (
      n_t_id INT(7) UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY,
      n_band_id INT(7) UNSIGNED NOT NULL, 
      n_t_token VARCHAR(70) UNSIGNED NOT NULL DEFAULT '', 
      n_t_token_secret VARCHAR(70) NOT NULL DEFAULT ''
   )";
dbVerifyTable($jamroom_db['mhNetworks_twitter'],$tbl);


// Jamroom quota accesss (yes/no)
$tbl = "
   quota_mhnetworks_access CHAR(3) NOT NULL DEFAULT 'no'
   ";
dbVerifyTable($jamroom_db['quota'],$tbl);
?>


If you can spot something wrong or have tips with regards to what to look for let me know.
Thanks,
Mike

Back to top
Brian
Jamroom Team


Joined: 09 Jul 2003
Posts: 37583
Location: Seattle, WA

Posted: 06/30/11 15:44 
Check your PHP error log - do you see any errors? Also, make sure there are NO trailing spaces/new lines after your closing ?> tag.

Hope this helps!

- Brian


_________________
Make sure and check out:
* The Jamroom FAQ
* The Jamroom Documentation
Back to top
musichive-net



Joined: 24 Jan 2009
Posts: 266

Posted: 06/30/11 16:13 
Hi,

Thanks Brian. There is no PHP errors and even though I did find some spaces in the schema.php removing them did not help. I think I will rewrite it from scratch as there is probably some little tiny thing that I keep missing. Dreamweaver says "no syntax error" on all the pages though.

Thanks,
Mike

Back to top
Brian
Jamroom Team


Joined: 09 Jul 2003
Posts: 37583
Location: Seattle, WA

Posted: 06/30/11 16:19 

musichive-net:
Hi,

Thanks Brian. There is no PHP errors and even though I did find some spaces in the schema.php removing them did not help. I think I will rewrite it from scratch as there is probably some little tiny thing that I keep missing. Dreamweaver says "no syntax error" on all the pages though.

Thanks,
Mike


Use your FTP client and look for a jamroom/logs/jr_debug_log file and see if there are errors in there - if the query fails it can be logged there, as well as the Activity Log.

Hope this helps!

- Brian


_________________
Make sure and check out:
* The Jamroom FAQ
* The Jamroom Documentation
Back to top
musichive-net



Joined: 24 Jan 2009
Posts: 266

Posted: 06/30/11 16:20 
Hi,

Found it! Third column in the CREATE should not contain UNSIGNED. Must have looked at the integer above and just rewrote it. Spent three hours looking for it...

Thanks for your help,
Mike.

Back to top
Brian
Jamroom Team


Joined: 09 Jul 2003
Posts: 37583
Location: Seattle, WA

Posted: 06/30/11 16:30 
Sorry - I should have looked closer at it too - glad you found it.

Thanks!

- Brian


_________________
Make sure and check out:
* The Jamroom FAQ
* The Jamroom Documentation
Back to top
Display posts from previous:   
User Support Forum Archive (Read Only)
Jamroom Developers

 
Solutions
• Social Media Platform
• Social Networking Software
• Musician Website Manager
• Community Builder
Products
• Jamroom Core
• Jamroom Addons
• Jamroom Modules
• Jamroom Marketplace
Support
• Support Forum
• Documentation
• Support Center
• Contact Support
Community
• Community Forum
• Member Sites
• Developers
Company
• About Us
• Contact Us
• Privacy Policy
©2003 - 2010 Talldude Networks, LLC.