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 Core CiviCRM Functions (Moderator: Yashodha Chaku) »
  • call to civicrm_api generate HTTP Error 500
Pages: [1]

Author Topic: call to civicrm_api generate HTTP Error 500  (Read 445 times)

norim

  • Guest
call to civicrm_api generate HTTP Error 500
November 22, 2011, 02:17:21 am
Hi,
I've installed the CiviCRM 4.0.7 on Drupal7 & configured it.
The CRM seeems to be working properly, but when trying to call civicrm_api from php I get this server error.
I've tried example files - same problem. The weird thing is - when using example api (javascript) everything is ok, and I get the results as expected.

If anyone has already experienced this kind of problem & solved it - please advice!

xavier

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4453
  • Karma: 161
    • Tech To The People
  • CiviCRM version: yes probably
  • CMS version: drupal
Re: call to civicrm_api generate HTTP Error 500
November 22, 2011, 03:10:56 am
Hi,

You're having your install with a cgi php?

by example api (javascript) you mean the api explorer?

It might be that civicrm isn't initialised when you use it, or a configuration problem. Could you share the code and details of what's you're trying to do?

X+
-Hackathon and data journalism about the European parliament 24-26 jan. Watch out the result

norim

  • Guest
Re: call to civicrm_api generate HTTP Error 500
November 22, 2011, 04:12:48 am
Thnanks for the reply, this is what I'm trying to do:
In the user profile edit & view pages the fields are divided by tabs: CRM fields on one tab - core profile on the other.
I was trying to combine them into one page (no tabs) - add some fields to drupal page & update the CRM DB via call to civicrm_api('contact', 'update', array...).

By javascript I mean the api explorer.
This is the code (sample)
  require_once 'api/api.php';
 $result = civicrm_api("contact", "update", array ('version' =>'3', 'id' =>'17', 'first_name' =>'first.'));


In case it's a faulty install/configuration - is there a way to test it?
Thanks

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using Core CiviCRM Functions (Moderator: Yashodha Chaku) »
  • call to civicrm_api generate HTTP Error 500

This forum was archived on 2017-11-26.