Answers.Body: <p>It turns out this was down to the distribution of BSD on the broken servers was standard USA but PHP needed the PECL international library (<a href="https://pecl.php.net/package/intl" rel="nofollow noreferrer">https://pecl.php.net/package/intl</a>).</p>
  
  <p>Apparently without it, the collator in Array.php is returning a null rather than an exception and causing the error. But only in Joomla 3.8 it seems.</p>
  
  <p>Dave at Digijuice suggested that ammending Array.php at line 534 as follows could fix the problem - which I include in case of use to anyone, but not sure if the problem is common enough to submit this as a change/issue?</p>
  
  <pre><code>public static function asort($array = array()) {
    $lcMessages = CRM_Utils_System::getUFLocale();
  
    if ($lcMessages &amp;&amp; $lcMessages != 'en_US' &amp;&amp; class_exists('Collator')) {
      $collator = new Collator($lcMessages . '.utf8');
        If($collator!==NULL) {
          $collator-&gt;asort($array); }
           else {
             asort($array);
           }
         }
      else {
        // This calls PHP's built-in asort().
        asort($array);
      }
  return $array;
  }
  </code></pre>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-09-28T12:32:57.553Z
Answers.LastActivityDate: 2017-09-28T12:47:30.057Z
Answers.LastEditDate: 2017-09-28T12:47:30.057Z
Answers.UserDisplayName: Nic
Body: <p>I upgraded Joomla to 3.8 on a test site and CiviCRM (4.7.24) seemed to work fine. I've now replicated the upgrade on a live server (a different config'd machine but both PHP 5.6.31) and while it seemed ok at first, after logging in as admin, certain Profile Edit &amp; all Contribution CiviCRM pages give an Error 500 (the default Name and Address profile doesn't work - but a custom profile does). Dashboard seems to load fine.</p>
  
  <p>I've checked another Joomla 3.8/Civi 4.6.31 site and am getting the same problem. As I've got a working 3.8/Civi am going to try and figure what's different between the installs, but meantime, thought I'd post in case anyone has something similar or any ideas.</p>
  
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2017-09-27T03:52:38.010Z
Comments.Text: This might help https://civicrm.stackexchange.com/questions/6399/how-do-i-debug-civicrm-when-i-hit-a-blank-page-white-screen-fatal-error/6400
Comments.UserDisplayName: Demerit
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2017-09-27T10:38:28.407Z
Comments.Text: Thanks - that was very helpful. The error is
  
  `Fatal error: Call to a member function asort() on null in /var/www/html/~/administrator/components/com_civicrm/civicrm/CRM/Utils/Array.php on line 534'`
Comments.UserDisplayName: Nic
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2017-09-27T15:11:47.347Z
Comments.Text: Unfortunately that's a pretty generic function that could be called from anywhere. Don't suppose there was a stack trace underneath the error as well?
Comments.UserDisplayName: Demerit
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2017-09-27T15:25:42.377Z
Comments.Text: No - unless I can add something else to get that to appear? I'm still waiting on the host to give me full access to the error logs. 
  
  Meantime I downloaded a copy of the site to MAMP locally and it works fine suggesting this is something specific to the server's setup (the other site with the problem is using the same host)
Comments.UserDisplayName: Nic
Tags: <joomla><upgrade>
Title: Joomla 3.8 & CiviCRM 4.7.x - front-end error 500 when logged in
ThreadText: # Joomla 3.8 & CiviCRM 4.7.x - front-end error 500 when logged in
  
  (Asked by: username_0 on 2017-09-26)
  
  I upgraded Joomla to 3.8 on a test site and CiviCRM (4.7.24) seemed to work fine. I've now replicated the upgrade on a live server (a different config'd machine but both PHP 5.6.31) and while it seemed ok at first, after logging in as admin, certain Profile Edit & all Contribution CiviCRM pages give an Error 500 (the default Name and Address profile doesn't work - but a custom profile does). Dashboard seems to load fine.
  
  I've checked another Joomla 3.8/Civi 4.6.31 site and am getting the same problem. As I've got a working 3.8/Civi am going to try and figure what's different between the installs, but meantime, thought I'd post in case anyone has something similar or any ideas.
  
  **Tags:** joomla, upgrade
  
  > **Comments:**
  > **username_1**: This might help https://civicrm.stackexchange.com/questions/6399/how-do-i-debug-civicrm-when-i-hit-a-blank-page-white-screen-fatal-error/6400  
  > **username_0**: Thanks - that was very helpful. The error is  `Fatal error: Call to a member function asort() on null in /var/www/html/~/administrator/components/com_civicrm/civicrm/CRM/Utils/Array.php on line 534'`  
  > **username_1**: Unfortunately that's a pretty generic function that could be called from anywhere. Don't suppose there was a stack trace underneath the error as well?  
  > **username_0**: No - unless I can add something else to get that to appear? I'm still waiting on the host to give me full access to the error logs.   Meantime I downloaded a copy of the site to MAMP locally and it works fine suggesting this is something specific to the server's setup (the other site with the problem is using the same host)  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_0 on 2017-09-28. Score: 3
  
  It turns out this was down to the distribution of BSD on the broken servers was standard USA but PHP needed the PECL international library (https://pecl.php.net/package/intl).
  Apparently without it, the collator in Array.php is returning a null rather than an exception and causing the error. But only in Joomla 3.8 it seems.
  Dave at Digijuice suggested that ammending Array.php at line 534 as follows could fix the problem - which I include in case of use to anyone, but not sure if the problem is common enough to submit this as a change/issue?
  public static function asort($array = array()) {
    $lcMessages = CRM_Utils_System::getUFLocale();
  
    if ($lcMessages && $lcMessages != 'en_US' && class_exists('Collator')) {
      $collator = new Collator($lcMessages . '.utf8');
        If($collator!==NULL) {
          $collator->asort($array); }
           else {
             asort($array);
           }
         }
      else {
        // This calls PHP's built-in asort().
        asort($array);
      }
  return $array;
  }
  
  
  ---
  
  