I'm wondering if anybody has experienced the following, and if they have, if they found a solution that they could share with me.
Basically, I can open an MCAL stream successfully, but I can't do anything with it. As in, anything file-related. I'm using the mstore driver, and I have /etc/mpasswd and /var/calendar set up 100% correctly according to the (poorly written but clear) installation directions.
In PHP, I can open the stream with:
$stream = mcal_open("{/mstore}", "username", "randomword");
Note that "randomword" should be "password", but when I put in the password that I put into /etc/mpasswd using htpasswd from Apache (again, according to the MCAL documentation, all correctly), the PHP literally fails as soon as I call it, as in, when I try to go to the file in a browser, nothing happens and I stay on the page I was on before I tried to go to the file in question. No errors are displayed.
If I put in a random word that is clearly not the password, the file will work and the current month with all the days (and some additional code to highlight the current day) will render perfectly. This is also the case if I remove the password parameter entirely.
Get this, however: From a separate file that has the event functions, I can call mcal_open WITH the correct password, and the stream opens fine. When I call the event functions, they all return true or whatever their equivalent of success is, even mcal_append_event, which is supposed to write the data to file. HOWEVER, when I check /var/calendar, NOTHING is there. According to the documentation, a calendar file with the same name as whatever I put as the username in mcal_open() should be there, with the calendar data that I added.
I know that it isn't putting it anywhere else, because /var/calendar is hard-coded into mstore.c as DATA->base_path, as per the following:
/* Set up folder_user */
if(addr->host)
DATA->base_path=strdup(addr->host);
else
DATA->base_path=strdup("/var/calendar");
DATA->login_user=DATA->login_userbuf;
if (addr->user) {
/* Copy and split folder_userbuf */
if ((DATA->folder_userbuf = strdup(addr->user)) == NULL) {
#ifdef DEBUG
printf("\ncouldn't get folder_userbuf (%s)\n",
addr->user);
#endif
goto fail;
}
So... that's all I can tell you. Any help would be appreciated. If I get any other info on it I'll reply with it.
Relevant links:
http://sourceforge.net/projects/libmcal/
http://mcal.chek.com
http://us2.php.net/manual/en/ref.mcal.php
http://www.phpbuilder.com/columns/musone19990927.php3