# im having trouble with a jquery webcalendar uses MySQL



## Hybrid_theory (Sep 28, 2010)

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.


```
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:

```
<?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:

```
<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


----------



## Hybrid_theory (Sep 28, 2010)

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


----------



## caleb (Sep 29, 2010)

lol ^^
Don't worry stupidity never seizes to amaze in programming


----------



## hallyb (Nov 10, 2010)

*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


----------

