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 »
  • Upgrading CiviCRM (Moderator: Deepak Srivastava) »
  • api/Contact.php
Pages: [1]

Author Topic: api/Contact.php  (Read 2172 times)

jasonruyle

  • Guest
api/Contact.php
July 17, 2008, 01:25:16 pm
I upgraded from 1.9 to 2.04.

The error is that when I take a user and try to post content (add node) I get this error:

Code: [Select]
    * warning: require_once(api/Contact.php): failed to open stream: No such file or directory in /mywebsite.com/includes/common.inc(1352) : eval()'d code on line 11.
    * warning: require_once(api/Contact.php): failed to open stream: No such file or directory in /mywebsite.com/includes/common.inc(1352) : eval()'d code on line 11.

How can I get the system to point to api/v2/Contact.php?
I'm assuming that's whats wrong because there is a Contact.php in that folder, but not the original /api/ folder.

Deepak Srivastava

  • Moderator
  • Ask me questions
  • *****
  • Posts: 677
  • Karma: 65
Re: api/Contact.php
July 19, 2008, 09:05:39 am
The CiviCRM/civicrm.config.php file should do the work of setting appropriate include path (provided it's able to locate civicrm.settings.php file). A simple include / require should do the initialization -
Code: [Select]
require_once 'path_to_civicrm/civicrm.config.php';

If it doesn't work you might want to look at civicrm.settings.php file and check the way it sets the include path.
« Last Edit: July 19, 2008, 09:11:17 am by Deepak Srivastava »
Found this reply helpful? Contribute NOW and help us improve CiviCRM with the Make it Happen! initiative.

jasonruyle

  • Guest
Re: api/Contact.php
July 21, 2008, 08:29:00 am
I moved the contact file up one directory and I don't get the errors.
Is there a particular area spot that has changed it from /api directory to /api/v2 directory?

I believe this is the problem.

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Upgrading CiviCRM (Moderator: Deepak Srivastava) »
  • api/Contact.php

This forum was archived on 2017-11-26.