1. Welcome to TechPowerUp Forums, Guest! Please check out our forum guidelines for info related to our community.

im having trouble with a jquery webcalendar uses MySQL

Discussion in 'Programming & Webmastering' started by Hybrid_theory, Sep 28, 2010.

  1. Hybrid_theory

    Hybrid_theory

    Joined:
    Mar 31, 2007
    Messages:
    1,895 (0.68/day)
    Thanks Received:
    163
    Location:
    ontario canada
    There's not much help online for this calendar i found on google: wdcalendar. http://www.webappers.com/2010/06/08/wdcalendar-jquery-based-google-calendar-clone/

    The installation instructions are simple, but not detailed so maybe im screwing up somewhere. They go as follows:


    Copy the unzipped directory into the apache www directory/sub-directory.
    For a database:
    Create a database, execute setup.sql
    Change php/dbconfig.php to fit yours
    rename edit.db.php to edit.php and php/datafeed.db.php to php/datafeed/php

    And thats it for the instructions. My experience with mysql is nil so i followed a debian guide.

    Code:
    sudo apt-get install mysql-server amarok
    
    $ mysql -u root -p
    Enter password:
    
    mysql> create database amarokdb;
    mysql> grant usage on *.* to amarokuser@localhost identified by 'amarokpasswd';
    mysql> grant all privileges on amarokdb.* to amarokuser@localhost ;
    # running the setup.sql as specified
    mysql> \. setup.sql
    
    #and check i can connect with:
    
    mysql -u amarokuser -p'amarokpasswd' amarokdb
    
    The dbconfig.php the install mentioned now looks like:
    Code:
    <?php
    class DBConnection{
         function getConnection(){
         //localhost/amarokuser/amarokpasswd
             mysql_connect("localhost","root","") or
         die("Could not connect: " . mysql_error());
       //amarokdb
             mysql_select_db("jqcalendar") or
                 die("Could not select database: " . mysql_error());
          }
    }
    ?>
    
    <?php class DBConnection{ function getConnection(){ //localhost/amarokuser/amarokpasswd mysql_connect("localhost","root","") or die("Could not connect: " . mysql_error()); //amarokdb mysql_select_db("jqcalendar") or die("Could not select database: " . mysql_error()); } } ?>
    What i changed here were the "//" lines which just said, localhost/user/pass and //databasename.


    So after all this i goto the sample.php page. This generates random events on the page, untill the database is specified (i believe). When i browse to the page, the UI is there, but the rest is blank. At the top it says sorry, could not load your data, please try again later.

    The error is just produced from the webpage file sample.php. Here's the line that does that:
    Code:
    <div id="errorpanel" class="ptogtitle loaderror" style="display: none;>Sorry, could not load your data, please try again later</div>
    
    Even a way to print a php or sql error would be fantastic.

    Thanks
     
  2. Hybrid_theory

    Hybrid_theory

    Joined:
    Mar 31, 2007
    Messages:
    1,895 (0.68/day)
    Thanks Received:
    163
    Location:
    ontario canada
    rofl, my bro helped me figure it out. i didnt realize // were comment lines. i was thinking network paths haha. so yeah changed the localhost root stuff to localhost amarokuser. so all good now :D
     
  3. caleb

    Joined:
    Sep 15, 2004
    Messages:
    1,551 (0.42/day)
    Thanks Received:
    206
    Location:
    Poland,Slask
    lol ^^
    Don't worry stupidity never seizes to amaze in programming :)
     
  4. hallyb New Member

    Joined:
    Nov 10, 2010
    Messages:
    1 (0.00/day)
    Thanks Received:
    0
    Sample does not work?

    I extracted the zip file to a directory, but the data will not load. When I pull up sample.php, I get the "Sorry, could not load your data, please try again later" error.

    This is without making any changes to the files at all. (Should be loading random data).

    Please help! Running PHP 5.2.14 on Apache 2.2.16
     

Currently Active Users Viewing This Thread: 1 (0 members and 1 guest)

Share This Page