CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Post-installation Setup and Configuration (Moderator: Dave Greenberg) »
  • CiviCRM Error/warning messages ...Warning: array_key_exists() [function.array-k
Pages: [1]

Author Topic: CiviCRM Error/warning messages ...Warning: array_key_exists() [function.array-k  (Read 4267 times)

sewen

  • Guest
CiviCRM Error/warning messages ...Warning: array_key_exists() [function.array-k
May 15, 2007, 08:28:22 am
Hi

Right after a new install, when accessing the main search screen:

---------- CiviCRM Error/warning  messages ------------
Warning: array_key_exists() [function.array-key-exists]: The second argument should be either an array or an object in /home/michambe/public_html/administrator/components/com_civicrm/civicrm/CRM/Core/BAO/Setting.php on line 127

Warning: array_merge() [function.array-merge]: Argument #2 is not an array in /home/michambe/public_html/administrator/components/com_civicrm/civicrm/CRM/Core/BAO/Setting.php on line 132

Warning: Invalid argument supplied for foreach() in /home/michambe/public_html/administrator/components/com_civicrm/civicrm/CRM/Core/Config.php on line 1093

Fatal error: Smarty error: [in CRM/Admin/Page/Admin.tpl line 11]: syntax error: invalid attribute name: 'http://civicrm.org/\' (Smarty_Compiler.class.php, line 1536) in /home/michambe/public_html/administrator/components/com_civicrm/civicrm/packages/Smarty/Smarty.class.php on line 1095
-------------------------------

I uninstalled, removed the tables, and reinstalled. Got the same error/warning message.

OK, it looks like ALL our CiviCRM sites are down. Last Friday (05/11/07) we did change registered_global to OFF, and magic_quotes to ON, on the Server (I got sick of seeing the red messages in the backend of Joomla). Is this what is causing the problem???

All of our sites have the same version of Joomla 1.0.12, and the same modules installed, Acajoom, ArtBannerPlus, jCalPro, mosDirectory, and zOOm Gallery.

------------------------ From Joomla's System | System Info menu ----------------------------------

Following PHP Server Settings are not optimal for Security and it is recommended to change them:

    * Joomla! RG_EMULATION setting is `ON` instead of `OFF` in file globals.php
      `ON` by default for compatibility reasons

Please check the Official Joomla! Server Security post for more information.
PHP built On: Linux web1ecdca.secure-24.net 2.6.9-42.ELsmp #1 SMP Wed Jul 12 23:27:17 EDT 2006 i686
Database Version: 4.1.21-standard
PHP Version: 5.1.4
Web Server: Apache/1.3.37 (Unix) PHP/5.1.4 mod_auth_passthrough/1.8 mod_log_bytes/1.2 mod_bwlimited/1.4 FrontPage/5.0.2.2635.SR1.2 mod_ssl/2.8.28 OpenSSL/0.9.7a
WebServer to PHP interface: apache
Joomla! Version: Joomla! 1.0.12 Stable [ Sunfire ] 25 December 2006 01:00 UTC
User Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.3) Gecko/20070309 Firefox/2.0.0.3
Relevant PHP Settings:
Joomla! Register Globals Emulation: ON
Register Globals: OFF
Magic Quotes: ON
Safe Mode: OFF
File Uploads: ON
Session auto start: OFF
Session save path: /tmp
Short Open Tags: ON
Output Buffering: OFF
Open basedir: /home/echamber:/usr/lib/php:/usr/local/lib/php:/tmp
Display Errors: ON
XML enabled: Yes
Zlib enabled: Yes
Disabled Functions: none
---------------------------
PHP Version 5.1.4

System Linux web1ecdca.secure-24.net 2.6.9-42.ELsmp #1 SMP Wed Jul 12 23:27:17 EDT 2006 i686
Build Date Nov 2 2006 16:06:45
Configure Command './configure' '--with-apxs=/usr/local/apache/bin/apxs' '--prefix=/usr/local' '--with-xml' '--enable-bcmath' '--enable-calendar' '--with-curl' '--with-dom' '--with-dom-xslt' '--with-dom-exslt' '--enable-ftp' '--with-gd' '--with-jpeg-dir=/usr/local' '--with-png-dir=/usr' '--with-xpm-dir=/usr/X11R6' '--with-iconv' '--enable-mbstring' '--enable-mbstr-enc-trans' '--enable-mbregex' '--with-mcrypt' '--enable-magic-quotes' '--with-mysqli' '--with-mysql=/usr' '--with-openssl' '--enable-discard-path' '--with-pear' '--enable-xslt' '--with-xslt-sablot' '--enable-sockets' '--enable-track-vars' '--with-ttf' '--with-freetype-dir=/usr' '--enable-gd-native-ttf' '--with-xmlrpc' '--with-zip' '--with-zlib' '--with-imap' '--with-kerberos' '--with-imap-ssl' '--with-pdo' '--with-pdo-mysql' '--with-sqlite' '--with-posix' '--with-fastcgi'
Server API Apache
Virtual Directory Support disabled
Configuration File (php.ini) Path /usr/local/Zend/etc/php.ini
PHP API 20041225
PHP Extension 20050922
Zend Extension 220051025
Debug Build no
Thread Safety disabled
Zend Memory Manager enabled
IPv6 Support enabled
Registered PHP Streams php, file, http, ftp, compress.zlib, https, ftps
Registered Stream Socket Transports tcp, udp, unix, udg, ssl, sslv3, sslv2, tls
Registered Stream Filters string.rot13, string.toupper, string.tolower, string.strip_tags, convert.*, consumed, convert.iconv.*, zlib.*
----------------------

Michał Mach

  • Ask me questions
  • ****
  • Posts: 748
  • Karma: 59
    • CiviCRM site
  • CiviCRM version: latest
  • CMS version: Drupal and Joomla latest
  • MySQL version: numerous
  • PHP version: 5.3 and 5.2
Re: CiviCRM Error/warning messages ...Warning: array_key_exists() [function.arr
May 15, 2007, 10:07:48 am
Reposting Dave's followup questions from http://issues.civicrm.org/jira/browse/CRM-1904:

Scott - A few trouble-shooting / clarification questions on this issue and 1902...
(...and better to post follow up with complete info on the forums as these are almost certainly install / configuration / environment issues rather than "bugs" - and more folks are around to help out on the forums - http://forum.civicrm.org )

Are you seeing the error msg you posted in 1902 on ALL your (previously running ok) sites?

Were the PHP settings changes the only changes on these sites?

Have you tried changing your PHP settings back to what they were when the sites were working?


Also, from myself, since that Smarty error looks wierd, did you clean up template cache after your installs/reinstalls?

Thx,
m
Found this reply helpful? Contribute NOW and help us improve CiviCRM with the Make it Happen! initiative.

My absolute favourite: Wordpress Integration!.

Donate Now!

sewen

  • Guest
Re: CiviCRM Error/warning messages ...Warning: array_key_exists() [function.arr
May 15, 2007, 11:25:10 am
Hi all,

We found out the problem.  Last Friday we turned ON "Magic_Quotes", because I was tired of looking at the red warning box in the backend of Joomla.  Turns out that magic_quotes screws up the entry in the civicrm_domain table, config_backend field.  You get a lot of escape \ characters that cause civiCRM not to load.  Clean up the field and everything works OK (I hope).

For now we are going to leave magic_quotes off.... unless someone has another suggestion.

thanks.

conticreative

  • Guest
Re: CiviCRM Error/warning messages ...Warning: array_key_exists() [function.array-k
May 27, 2007, 11:14:27 am
I am experiencing the same issue and I found this post looking for the error message In recieved.
Joomla 1.0.12
CiviCRM 1.7
However, we did not touch the server and yesterday CiviCRM was working just fine.
I have also a staging site on the same server in a subdirectory with CCRM installed and that one is working OK. The other strange thing is that we did not even touch CCRM at all since the last time it worked nor we did any massive changes to the other parts of the site.
Yesterday it worked and today I get the
Code: [Select]
Warning: array_key_exists() [function.array-key-exists]: The second argument should be either an array or an object in /home/accountname/public_html/administrator/components/com_civicrm/civicrm/CRM/Core/BAO/Setting.php on line 127
What could this be?

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: CiviCRM Error/warning messages ...Warning: array_key_exists() [function.arr
May 27, 2007, 03:05:26 pm

Not sure why exactly that is happening, but it has something to do with the settings file. If i can get access to the box, i can figure out what condition we are tripping on and potentially fix it.

I've added a check in the trunk version to avoid the below error

lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

prickeke

  • I post occasionally
  • **
  • Posts: 64
  • Karma: 4
Re: CiviCRM Error/warning messages ...Warning: array_key_exists() [function.arr
July 14, 2007, 10:39:05 pm
I had this same error when moving my civicrm (1.7)/drupal(5.1) installation.  I talked with Donald Lobo and he said to do the following:

Somehow edit your civicrm database (phpMyAdmin, ssh, etc.).
Find the civicrm_domain table.
Find the one entry in that table corresponding to the site.
FInd "config_backend" entry in that table.
Set it to NULL or clear it.

Save changes and try again!

Viola!  That worked for me!

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Post-installation Setup and Configuration (Moderator: Dave Greenberg) »
  • CiviCRM Error/warning messages ...Warning: array_key_exists() [function.array-k

This forum was archived on 2017-11-26.