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) »
  • Developer Discussion (Moderator: Donald Lobo) »
  • extern script returns 500, wordpress
Pages: [1]

Author Topic: extern script returns 500, wordpress  (Read 292 times)

konadave

  • I’m new here
  • *
  • Posts: 19
  • Karma: 0
  • CiviCRM version: 4.2.6
  • CMS version: Drupal 7.17
  • MySQL version: 5.1.66
  • PHP version: 5.3.19
extern script returns 500, wordpress
October 15, 2014, 06:04:14 pm
A while back I developed an extern script for a client running drupal/civicrm 4.1. After switching to wordpress, this script now returns error code 500. The following simple example demonstrates the problem.


// http://example.com/wp-content/plugins/civicrm/civicrm/extern/example.php

session_start();

require_once 
'../civicrm.config.php';
require_once 
'CRM/Core/Config.php';
require_once 
'api/api.php';

$config = CRM_Core_Config::singleton(); // this is where the 500 happens

echo 'Hello, World!'; // comment out the previous statement and this gets executed


All of the standard extern scripts initialize the same way, and they return 500 too when accessed directly. There is something different about how this works under wordpress, and I haven't been able to find the answer yet. Could somebody please clue me in to the issue here?

I appreciate any help you can offer. Thanks.

konadave

  • I’m new here
  • *
  • Posts: 19
  • Karma: 0
  • CiviCRM version: 4.2.6
  • CMS version: Drupal 7.17
  • MySQL version: 5.1.66
  • PHP version: 5.3.19
Re: extern script returns 500, wordpress
October 16, 2014, 12:17:14 pm
The extern scripts are terminating on a fatal PHP error for missing functions. Client is running wordpress 4.0 with civi 4.1, which after further investigation are not compatible. Advised the need to upgrade to 4.3 or higher.

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Developer Discussion (Moderator: Donald Lobo) »
  • extern script returns 500, wordpress

This forum was archived on 2017-11-26.