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 »
  • Using CiviEvent (Moderator: Yashodha Chaku) »
  • CiviEvent error: undefined function: simplexml_load_string()
Pages: [1]

Author Topic: CiviEvent error: undefined function: simplexml_load_string()  (Read 8506 times)

WebTeam

  • Guest
CiviEvent error: undefined function: simplexml_load_string()
April 29, 2007, 01:04:43 am

Fatal error: Call to undefined function: simplexml_load_string() in /home/www/hctmn/heartwoodtmn.org/docs/sites/all/modules/civicrm/CRM/Utils/Geocode/Google.php on line 133

####################
What I was doing at the time...

Add a new event: Step 2 of 4
Entered the address, clicked [continue], and received the error shown above. I have completed the admin settings to select Google map and entered the key. ---Ashford

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: CiviEvent error: undefined function: simplexml_load_string()
April 29, 2007, 01:43:58 am

You'll have to disable geocoding from CiviCRM (Administer CiviCRM >> Global Settings >>  Mapping and Geocoding)

We use php5 functions in those areas that have no php4 equivalent (unless a different library is used). alternatively you can upgrade to php5.

Note that we are dropping support for php4 completely after the next release (v1.8), so now is a good time to upgrade your php version

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

WebTeam

  • Guest
Re: CiviEvent error: undefined function: simplexml_load_string()
April 29, 2007, 01:38:52 pm
I read the you need to restart Apache after installing php5. I'm on a commercial web host, thinkhost.com. They give me a lot of access, but not that much. Thanks for the warning about php4. I'll start bugging the Techs now to request the php5 upgrade.

Ashford

hallman

  • I post occasionally
  • **
  • Posts: 87
  • Karma: 10
Re: CiviEvent error: undefined function: simplexml_load_string()
June 12, 2007, 10:56:14 am
I have this problem and will disable geocoding.

Should I hold off on putting contacts in the database until our hosting service goes to php5 or is there a way to go back and add geocoding for contacts later?

Judy Hallman
Judy Hallman

Dave Greenberg

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 5760
  • Karma: 226
    • My CiviCRM Blog
Re: CiviEvent error: undefined function: simplexml_load_string()
June 12, 2007, 11:04:14 am
Judy - In 1.7 there is no way to geocoding a "batch" of contacts - you would have to "edit" each contact (and on save, the geocoding would happen if it's enabled). For 1.8 we're adding a command-line script to geocode all (or a subset) of contacts. So waiting for php5 OR going forward and waiting for batch geocoding are your 2 reasonable choices :-)
Protect your investment in CiviCRM by  becoming a Member!

hallman

  • I post occasionally
  • **
  • Posts: 87
  • Karma: 10
Re: CiviEvent error: undefined function: simplexml_load_string()
June 18, 2007, 02:24:03 pm
My hosting service gave me php 5.

I removed the civicrm directory then, in the directory ~/public_html/sites/all/modules:
  tar -zxvpf civicrm-1.7.9821-drupal-php5.tar.gz

I think there's something else I need to change. Civicrm still seems to think I'm running php 4 -- When I add an address with Google geocoding enabled, I still get the message:

Fatal error: Call to undefined function simplexml_load_string() in /home/drupal/public_html/sites/all/modules/civicrm/CRM/Utils/Geocode/Google.php on line 130

I'm running Drupal 5.1 with multi-site hosting.
Logs, System info shows:

PHP
Version   5.2.2-pl1-gentoo
Magic quotes GPC   On
Magic quotes runtime   Off
Memory limit   28M
Register globals   Off
Safe mode   Off
Session cache limiter   none
Session cookie domain   .nccommunities.org
Session name   PHPSESSID
Session save handler   user
Upload max filesize   2M

I've looked in civicrm.settings.php and settings.php and don't see anything there to change.
Is there something in the database that needs to be changed?

Judy

Judy Hallman

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: CiviEvent error: undefined function: simplexml_load_string()
June 18, 2007, 07:27:32 pm

Judy:

it could be one of the following:

1. You are still running php4. Can u please do a phpinfo( ); on a web page and see if u get php-5.2.2 as your php version. You can do this by loading a file whose content is:
<?php

phpinfo( );

?>

in your web browser

2. If the above show you are running php5, can u search for SimpleXML on the page loaded above. On my install i get:

SimpleXML
Simplexml support   enabled
Revision    $Revision: 1.151.2.22.2.26 $
Schema support    enabled

If you dont see the above, most likely simplexml is not compiled into your version of php5

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

hallman

  • I post occasionally
  • **
  • Posts: 87
  • Karma: 10
Re: CiviEvent error: undefined function: simplexml_load_string()
June 19, 2007, 09:11:49 am
Thank you!

phpinfo showed -- disable-simplexml

Our sysems guy enabled it for me and now it works.
When I add contacts to the civicrm database, they get geocoded and I can Google map contacts. Cool!

Judy
Judy Hallman

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviEvent (Moderator: Yashodha Chaku) »
  • CiviEvent error: undefined function: simplexml_load_string()

This forum was archived on 2017-11-26.