Page 1 of 1

FATAL ERROR: Could not find database connection key

Posted: Sun Jun 16, 2013 10:42 am
by hgpdesign
Hello everybody.

We have this this very annoying problem, maybe someone can help us out...


Since a few months we regularly get this fatal error:

/var/www/vhosts/abteam.nl/httpdocs/lib/adodb.functions.php:52 - offsetGet
/var/www/vhosts/abteam.nl/httpdocs/lib/classes/class.CmsApp.php:229 - adodb_connect
/var/www/vhosts/abteam.nl/httpdocs/include.php:186 - GetDb
/var/www/vhosts/abteam.nl/httpdocs/admin/listcontent.php:22 - require_once
FATAL ERROR: Could not find database connection key dbms in the config file

Then when we refresh this fatal error message will sometimes (most of the times) go away.

We've contacted our hosting company several times but they cannot figure out what is going wrong here.
Can someone see what is happening here?

Thanks in advance.

Maybe this is related: we always have to login twice(...). The first time (per session) we login we always get a new, fresh login-screen again. Only when we login a second time we are forwarded to our administration pages...

Ron Hoenson


Here's our configuration:

----------------------------------------------
Cms Version: 1.11.5
Installed Modules:
CMSMailer: 5.2.1
FileManager: 1.4.3
MenuManager: 1.8.5
ModuleManager: 1.5.5
News: 2.12.12
Uploads: 1.14.4
Search: 1.7.8
ThemeManager: 1.1.8
CGSmartImage: 1.10.8
Statistics: 1.1.3
Guestbook: 1.4_RC2
FormBuilder: 0.7.3
Captcha: 0.4.6
CGSimpleSmarty: 1.6.1
CGExtensions: 1.32.6
Statistics: 1.1.3
CGBlog: 1.9.12
CMSPrinting: 1.0.4
MicroTiny: 1.2.5
Printing: 1.1.2

Config Information:
php_memory_limit:
process_whole_template: 1
output_compression: false
max_upload_size: 96000000
url_rewriting: none
page_extension:
query_var: page
image_manipulation_prog: GD
auto_alias_content: true
locale: nl_NL.utf8
default_encoding:
admin_encoding: utf-8
set_names: false

Php Information:
phpversion: 5.3.3
md5_function: On (True)
gd_version: 2
tempnam_function: On (True)
magic_quotes_runtime: Off (False)
E_STRICT: 0
E_DEPRECATED: 0
memory_limit: 256M
max_execution_time: 90
output_buffering: 4096
safe_mode: Off (False)
file_uploads: On (True)
post_max_size: 96M
upload_max_filesize: 96M
session_save_path: No check because open basedir active
session_use_cookies: On (True)
xml_function: On (True)
xmlreader_class: On (True)

Server Information:
Server Api: apache2handler
Server Db Type: MySQL (mysql)
Server Db Version: 5.0.77
Server Db Grants: Found a "GRANT ALL" statement that appears to be suitable

----------------------------------------------

Re: FATAL ERROR: Could not find database connection key

Posted: Sun Jun 16, 2013 1:07 pm
by calguy1000
Upgrade first.... then seee if the problem persists. Your version of CMSMS is unsupported.

Re: FATAL ERROR: Could not find database connection key

Posted: Sun Jun 16, 2013 6:49 pm
by hgpdesign
Thanks for your reply.
Unfortunately we cannot upgrade due to a other problem I posted a message about on June 5th, entitled:

'News returnid=page_alias not working since 1.11.6'.
Main content of that post can be seen below.
That post got 27 views and so far and not one reply.

In addition we must say we already had this problems also when 11.5 was the latest version...

Hopefully someone who has a better understanding about this matter than us or our hosting company can help us out...

Thanx in advance.

Ron Hoenson


************
Post of June 5th

in my News summarytemplate I have this (regex_replace) line:

Code: Select all

{capture assign='category_page'}{$entry->category|replace:' ':'-'|lower}{/capture}
{$entry->titlelink|regex_replace:'/returnid=[0-9]*/':"returnid=$category_page"}
in order to get to a specific page to show the article on (by naming the page_alias exactly the same as the category).
It seems that as of version 1.11.6 this does not work any more. I.o.w.

Code: Select all

http://www.alphenphoto.nl/index.php?mact=News,cntnt01,detail,0&cntnt01articleid=73&cntnt01returnid=sports
leads us to the homepage (unwanted) where

Code: Select all

http://www.alphenphoto.nl/index.php?mact=News,cntnt01,detail,0&cntnt01articleid=73&cntnt01returnid=58
does lead us to the 'sports'-page.

************

Re: FATAL ERROR: Could not find database connection key

Posted: Sun Jun 16, 2013 11:02 pm
by Jo Morg
hgpdesign wrote:************Post of June 5thin my News summarytemplate I have this (regex_replace) line:

Code: Select all

{capture assign='category_page'}{$entry->category|replace:' ':'-'|lower}{/capture}{$entry->titlelink|regex_replace:'/returnid=[0-9]*/':"returnid=$category_page"}
in order to get to a specific page to show the article on (by naming the page_alias exactly the same as the category). It seems that as of version 1.11.6 this does not work any more.
I may be wrong but, AFAIK returnid should never hold the page alias given he fact that these are different things. So that may have been a secondary effect of a bug that, after being corrected, stopped working as you expected but works as designed.

Re: FATAL ERROR: Could not find database connection key

Posted: Thu Jun 20, 2013 12:53 pm
by hgpdesign
Hi Jo Morg,

you are probably right. We found a udt called "Get content ID from given page alias" at the 'I Do This'-website and with that we've updated our code. It works like charm now. Thank you for pointing me in the right direction.

Regards,

Ron Hoenson