Calendar in Elastix

Gringio

Joined
Sep 3, 2010
Messages
16
Likes
0
Points
0
#1
Hello everybody,

I've got a little problem. I can't find where the data of the calendar is saved, in which file on the Elastix's Server. Someone can help me ?

Thank you


Gringio
 

Gringio

Joined
Sep 3, 2010
Messages
16
Likes
0
Points
0
#2
Hello,

I found the database in the Elastix server but now I've got a new problem. I'm not a expert in php, but i'd like to insert a new event in this database with a .php file. I look on internet, but i can't find something interresting for me. I keep searching.

Thank you
 

dingoland

Joined
Jan 16, 2008
Messages
220
Likes
0
Points
0
#3
Hi,

Install phpmyadmin on your Elastix server, it will be easier for that ;)

Why don't you use the calendar tab to insert an event ?

It is the easier method.

Regards
 

Gringio

Joined
Sep 3, 2010
Messages
16
Likes
0
Points
0
#4
Thank you for your response :)

I'm programming a XML button for Aastra IP phone, so I need to change the database of Elastix without being in the interface of Elastix. It's why I search this database.

Now I have discover another thing. The database calendar.db juste create a table, I can't do anything with that, but there is a "big" database where i can modify that, but I can't find it, in the configuration of Elastix and with phpmyadmin.

Somebody could help me on that ? :(
 

Gringio

Joined
Sep 3, 2010
Messages
16
Likes
0
Points
0
#5
I have looked in every table in Elastix. No trace of any calendar or agenda. I'm loosing hope to find it someday. Nobody know where this can be stocked in the server Elastix ? :(

Need Help please :blush:
 

Gringio

Joined
Sep 3, 2010
Messages
16
Likes
0
Points
0
#6
Nobody have a solution ? :(
 

dingoland

Joined
Jan 16, 2008
Messages
220
Likes
0
Points
0
#7
If it is a db file, it should be a sqlite database.
You can install sqlite manager but cannot help you on that.
Search in the forum for the install of this tool.

Regards
 

Gringio

Joined
Sep 3, 2010
Messages
16
Likes
0
Points
0
#8
Thank you dingoland.

You have right, it's a .db file that I need to change.

I have search in all database of Elastix, there is nothing about the Calendar module.
So I finally need to change the calendar.db file, I don't see other way. But my php file can' see calendar.db like a database. I don't understand why.

The file, calendar.db is in /var/www/db.

I have done a ln on this file to move it in /var/www/html folder

Someone can help me ?

(PS : I have tried SQLiteManager but I can't understand how it works but thanks for this advise)

Gringo
 

dingoland

Joined
Jan 16, 2008
Messages
220
Likes
0
Points
0
#9

Gringio

Joined
Sep 3, 2010
Messages
16
Likes
0
Points
0
#10
Thank you Dingoland.

But now, I have all the information that I need about this .db file.

Now, I've got a new problem :( . I need to make an INSERT TO to the table event. But when I try to have a access to this file (calendar.db), I've got a error from mySQL that this file or table doesn't exist :(. But I saw that it exist in this file (I used a SQLite3.exe to convert the file in .sql to see what is in it).

Somebody knows a issue to my problem ?

I know that I need some help in php or with the file. So I don't know if I can continue to post in the forum.

Greats,
Gringio
 

dingoland

Joined
Jan 16, 2008
Messages
220
Likes
0
Points
0
#11
You re welcome ;)

Try to see the owner of this calendar.db.
It could be a permissions problem.

Regards
 

dicko

Joined
Oct 24, 2008
Messages
4,099
Likes
0
Points
0
#12
It could also be that Gringio is trying to query a sqlite3 database with mysql, that just doesn't work too well :)
 

Gringio

Joined
Sep 3, 2010
Messages
16
Likes
0
Points
0
#13
It's exactly that my problem. I've try to use mySQL in my .php but I need to use SQLite3. I begin my research about it :)

Thank you very much for all the help :)

Gringio
 

danardf

Joined
Dec 3, 2007
Messages
8,069
Likes
10
Points
88
#14
Greg,
Gringio opened a new post in French.
He used a Mysql engine instead of Sqlite3.
Sqlite3 is used for every Elastix configuration.

Code:
# sqlite3 /var/www/db/calendar.db
SQLite version 3.3.6
Enter ".help" for instructions
sqlite> select * from events;
1|1|2009-09-18|2009-09-18|2009-09-18 07:30:00|1|Reveil||on|dodo|
2|1|2009-09-21|2009-09-24|2009-09-21 07:00:00|1|reveil||on|dodo|
3|1|2009-09-28|2009-09-28|2009-09-28 07:30:00|1|Reveil||on|dodo|
Regards ;)
 

dingoland

Joined
Jan 16, 2008
Messages
220
Likes
0
Points
0
#15
If he used MySQL instead of SQLite3, of course it doesn't work :blink:
I was sure he was using the php/SQLite apps i told him.

Thank you Franck !

Regards
 

Gringio

Joined
Sep 3, 2010
Messages
16
Likes
0
Points
0
#16
Hello hello,
I'm sorry for this long time of absence, but I have one month of work and one month of school.

So now, I've found how it works with a php file, this is what I wrote :

Code:
dl('sqlite3.so'); //needed to work

#requete SQL
$db = sqlite3_open("/var/www/db/calendar.db"); //opening the database

sqlite3_exec($db, "INSERT INTO events (id, uid, startdate, enddate, starttime, eventtype, subject, description, asterisk_call, recording, call_to) VALUES (1,1,'2010-10-19','2010-10-19','2010-10-19 16:35:00',1,'test','test test','off','calendarEvent','300')"); //my query

//all after that it's just to see if it's work
$query = sqlite3_query($db, "SELECT startdate FROM events");


while (($row = sqlite3_fetch_array($query)))
{
		$ftext = new AastraIPPhoneFormattedTextScreen();
		$ftext->setdestroyOnExit();
		$ftext->addLine('Marche','','');
}
AND IT WORKS ! My database has a new event and I can see it from the calendar's module in Elastix.

But now, I have a new problem :(. When the time comes, the phone don't ring when I put information with my php file, but if I do it with my browser, it works.

Somebody have an idea ? :(
 

Members online

No members online now.

Latest posts

Forum statistics

Threads
30,902
Messages
130,887
Members
17,565
Latest member
omarmenichetti
Top