Two of my three installs (the live site and one test site) have the CPG and eFiction tables in a shared database. The third install, test2, has the CPG and eFiction tables in separate databases. That one is at http://test2.calic0cat.net/efiction - you can see that the page title has the word "test" in it, indicating that it's coming from my "test" database, while the first image in the "Most Recent" block has the word "test2" in its title, indicating that it's coming from my "test2" database. Why does this work with my setup and not with other people's? Presumably, something to do with the server's setup is forcing either PHP or MySQL to behave differently. Maybe the "extra web security" (which is apparently the mod_security apache module) is somehow responsible for this?
I don't really know why - I personally am satisfied with the identification of the symptom to the cause... I really had no idea eFiction even existed until I downloaded the code to look at this problem.
Here is the thing:
EFiction creates a connection to its table
CpmFetch creates a connection to its table
CpmFetch specifically calls mysql through its specific connection
Efiction creates its queries through the last created connection
So thats the problem. If you can create your CpmFetch object and get it to connect to the database before eFiction creates its own, they will work fine.
You can see this in the includes/dbfunctions.php file...
The dbconnect line returns the specific connection, but non of the queries are told about it!
Can I say for sure this is why they are having the problem and not others - well, no. But this is definatly why it is happening. The eFiction code does not take into account another db connection existing.
As I mentioned before the bad fix is to put it all into one db, the good is to teach efiction to handle co-existing with another program. This will fix the problem.
Now, mod_security could be exposing it or something more - by delaying the connection or something... I don't know much about that except that it does do some support for mysql injection attacks, so who knows. Maybe it is delaying the connection till it needs it...
I don't know, but the eFiction code should be fixed... thats my 0.02
Someone could probably hack a fix in, I would be tempted to do it myself, but I am really short on time