Easy PHP Calendar - We really take care of your dates!


Go Back   Easy PHP Calendar > General Discussion > General Support

General Support Questions about using the Easy PHP Calendar. (Not installation or customizations)

Closed Thread
 
Thread Tools Search this Thread Display Modes

mySQL DB not working
Old 10-07-2010, 04:01 AM   #1
cepheid
Calendar User
 
cepheid is offline
Join Date: Apr 2007
Posts: 39
Default mySQL DB not working

I've got v6.4.1 installed, and am trying to use the mySQL database. It's not working. EPC is able to login to the mySQL server just fine - the setup.php script was able to create the epc_calendar table in the DB. However, when I try to add a new event, the event never gets added... EPC tells me that the event was added to the DB, but the event does not appear in the calendar display and no rows are actually added to the table (I checked with phpMyAdmin).

The flatfile database works just fine.

And, there's a probably-related bug: if I turn off the flatfile DB but do not erase the flatfile DB filename, any events I try to add to the mySQL DB get added to the flatfile DB instead, even though I disabled the DB... but, the flatfile DB contains only the last event entered. In other words, if the flatfile DB is disabled, any attempt to write an event to the mySQL DB fails on the mySQL DB and erases the flatfile DB, then writes that event to the flatfile.

If the flatfile DB is disabled, EPC shouldn't be touching it at all... it should especially not erase it! I was stupid and failed to back up my flatfile DB, and ended up losing the whole thing because of this bug.

1) Why is EPC failing to write events to the mySQL database, but not giving me any errors?
2) Why is the flatfile DB still being accessed for writing events (and why is it being erased) when flatfiles are disabled?

Please help ASAP.

EPC v6.4.1, php v5.1.6, mySQL v5.0.77 on CentOS 5.4
 

Old 10-07-2010, 12:09 PM   #2
Brian
EPC Developer
 
Brian's Avatar
 
Brian is offline
Join Date: Jun 2001
Location: Florida, USA
Posts: 10,878
Default

Please open a support ticket with your calendar URL and login.
__________________
-- Brian

Questions?

Instructions: Version 6 - Version 7 | FAQ | Errors FAQ | Paths FAQ | Forums | Support
| Web Site Hosting
 

Old 10-07-2010, 05:41 PM   #3
cepheid
Calendar User
 
cepheid is offline
Join Date: Apr 2007
Posts: 39
Default

I figured out what leads up to the problem... EPC is confused if trying to use BOTH mySQL and flatfile DB formats at the same time. If I enable both mySQL and flatfile, then EPC will display events from both sources. However, any new events end up only in the mySQL database, not in the flatfile.

However, the problem happens when trying to edit an event that is in the flatfile DB... EPC says "Switching to flat-file database mode," and that's when things start to get weird. After getting that message, any new events end up only in the flatfile DB, not in the mySQL DB - this is an interface inconsistency and shouldn't happen. This then leads to the next problem: if I then disable the flatfile DB, EPC gets really confused... it tries to write to the flatfile, not to the mySQL DB, but it writes only a single event because the flatfile DB is disabled.

If I log out of EPC (to clear all the cookies) and log back in, EPC begins to behave "properly" again. It appears that this is basically an in-session issue, caused by EPC remaining in "flat-file mode" after editing a flatfile event, instead of reverting back to mySQL mode as it should.

So... I suspect this whole issue stems from a bug in trying to simultaneously handle both mySQL and flatfile DB modes. There is good reason to be using both modes, however: for example, lots of legacy events in a flatfile mode but wanting to switch (for current/future edits) to mySQL.

If we are not intended to use both mySQL and flatfile at the same time, then EPC should disallow this option - enabling one should disable the other, and there should be documentation to that effect. If we are allowed to use both at the same time, then whatever is causing this bug should be fixed... for example, after editing the flatfile event, EPC should switch back to mySQL mode so that it's not trying to edit the flatfile anymore, i.e. EPC touches the flatfile only when it needs to (when editing an event that's in the flatfile), but otherwise is in mySQL mode.

I've opened a support ticket for this (XAD-728636), but I'm pretty sure this is now a real bug, not a support issue.

Let me know if I can be of more assistance.
Thanks.
 

Old 10-07-2010, 10:14 PM   #4
Brian
EPC Developer
 
Brian's Avatar
 
Brian is offline
Join Date: Jun 2001
Location: Florida, USA
Posts: 10,878
Default

The calendar will use the database that was selected when logged into the calendar. If you have both selected, mySQL takes precedence after the next login.
__________________
-- Brian

Questions?

Instructions: Version 6 - Version 7 | FAQ | Errors FAQ | Paths FAQ | Forums | Support
| Web Site Hosting
 

Old 10-07-2010, 11:05 PM   #5
cepheid
Calendar User
 
cepheid is offline
Join Date: Apr 2007
Posts: 39
Default

Under normal circumstances, yes. However, if both methods are selected (i.e. mySQL takes precedence) and you edit an event in the flatfile, the calendar switches to use the flat-file mode... any new events added to the calendar during that same session will only be added to the flatfile. If you follow the sequence of steps I outlined in the support ticket, you'll see what I mean.

I realize v7 will use mySQL only, but in the meantime, I strongly recommend fixing this bug for v6.4.2, since although probably not common, it could still bite anyone.

Thanks.
 

Old 10-09-2010, 01:43 AM   #6
ve9gra
Support Team
 
ve9gra's Avatar
 
ve9gra is offline
Join Date: Jun 2003
Location: New Brunswick, Canada
Posts: 4,965
Default

In order to minimize issues, I do offer the free service of converting your flat-file db into a .sql script that you can simply import into your mySQL table so that you are then using a single db mode.
__________________
-- Gervais
EPC Tutorials... We're here to help!
Offering custom integration services. Contact me here.
* Not affiliated with EasyPHPCalendar or NashTech Inc.
 

Old 10-09-2010, 02:16 AM   #7
cepheid
Calendar User
 
cepheid is offline
Join Date: Apr 2007
Posts: 39
Default

Gervais: thanks, I may take you up on the offer, though v7 will also include a converter, so I might just wait for that. In the meantime, I'll just pick one method and use it... most likely the flatfile method since I already have a few dozen events stored. I'll definitely keep it in mind, though, thanks.
 
Closed Thread

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Calendar MySQL Breaks Other MySQL GlennS General Support 5 12-24-2009 09:10 AM
can't access calendar since upgrading MySQL from 4.0.12 to 4.1 mediainn General Support 2 11-25-2009 07:13 PM
Use a mySQL database for events? (admin setup) novakb1 General Support 3 01-16-2009 02:18 PM
MySQL selected but still using flat-file? straw-man General Support 5 06-30-2005 02:12 PM
MySql setup problem (newbe) nigel General Support 2 12-18-2003 11:05 AM



All times are GMT -4. The time now is 08:42 AM.


vBulletin skins developed by: eXtremepixels
Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Copyright 2009 NashTech, Inc.

| Home | Register | Today's Posts | Search | New Posts |