Answers.Body: <p>Resolved it - it was an ancient and unused bespoke CiviCRM extension. Disabling it solves the problem.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-05-27T00:18:32.293Z
Answers.LastActivityDate: 2019-05-27T00:18:32.293Z
Answers.UserDisplayName: Robin Fenwick
Body: <p>We are moving our CiviCRM site over from Drupal to Wordpress.  We have this fully working on our developer's server (nginx), but on our live server (Apache), we see an error when loading some CiviCRM pages. </p>
  
  <p>Notice: Undefined index: path in /var/www/etcetcetcetc/wp-content/plugins/civicrm/civicrm/Civi/Core/Paths.php on line 200</p>
  
  <p>You can see the error at <a href="https://culturalenterprises.org.uk/?page=CiviCRM&amp;q=civicrm%2Fevent%2Finfo&amp;id=285&amp;reset=1" rel="nofollow noreferrer">https://culturalenterprises.org.uk/?page=CiviCRM&amp;q=civicrm%2Fevent%2Finfo&amp;id=285&amp;reset=1</a></p>
  
  <p>It also appears on some back end screens (attached below).</p>
  
  <p><a href="https://i.sstatic.net/xUcrI.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/xUcrI.png" alt="enter image description here"></a></p>
  
  <p>I have asked our developer to look into what is causing the error in the first place, but I am also completely unable to prevent display of the 'notice' error.</p>
  
  <p>In wp-config.php I have:</p>
  
  <pre><code>ini_set('display_errors','Off');
  ini_set('error_reporting', E_ALL );
  define('WP_DEBUG', false);
  define('WP_DEBUG_DISPLAY', false);
  </code></pre>
  
  <p>In civicrm.settings.php, I have added:</p>
  
  <pre><code>ini_set('display_errors','Off');
  ini_set('error_reporting', E_ALL );
  </code></pre>
  
  <p>In php.ini, I have set:</p>
  
  <pre><code>display_errors = Off
  error_reporting = E_ALL &amp; ~E_NOTICE &amp; ~E_DEPRECATED &amp; ~E_STRICT
  </code></pre>
  
  <p>And I have also tried disabling all plugins other than CiviCRM in case one of them is overriding these settings.</p>
  
  <p>Debug is off in CiviCRM settings, and it is 'Production' mode.</p>
  
  <p>Is there anything else I can do!?</p>
  
  <p>Thanks</p>
  
  <p>CiviCRM 5.13.4
  Wordpress 5.2.1</p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2019-05-26T13:49:56.417Z
Comments.Text: Can you set wpconfig.php and civicrm.settings.php to the same as what you have in php.ini?
Comments.UserDisplayName: Demerit
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2019-05-26T14:33:58.523Z
Comments.Text: Tried that a few times, but you're right it should be consistent, so I've done that now. Alas no change!
Comments.UserDisplayName: Robin Fenwick
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2019-05-26T15:50:04.340Z
Comments.Text: Can you resave the Directory and Resource URL from CiviCRM UI? And also Clear CiviCRM cache
Comments.UserDisplayName: Pradeep Nayak
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2019-05-26T15:50:59.180Z
Comments.Text: @PradeepNayak Done both of those too 
Comments.UserDisplayName: Robin Fenwick
Tags: <php>
Title: Unable to hide PHP 'notice' warning
ThreadText: # Unable to hide PHP 'notice' warning
  
  (Asked by: username_0 on 2019-05-26)
  
  We are moving our CiviCRM site over from Drupal to Wordpress.  We have this fully working on our developer's server (nginx), but on our live server (Apache), we see an error when loading some CiviCRM pages. 
  Notice: Undefined index: path in /var/www/etcetcetcetc/wp-content/plugins/civicrm/civicrm/Civi/Core/Paths.php on line 200
  You can see the error at https://culturalenterprises.org.uk/?page=CiviCRM&q=civicrm%2Fevent%2Finfo&id=285&reset=1
  It also appears on some back end screens (attached below).
  
  I have asked our developer to look into what is causing the error in the first place, but I am also completely unable to prevent display of the 'notice' error.
  In wp-config.php I have:
  ini_set('display_errors','Off');
  ini_set('error_reporting', E_ALL );
  define('WP_DEBUG', false);
  define('WP_DEBUG_DISPLAY', false);
  
  In civicrm.settings.php, I have added:
  ini_set('display_errors','Off');
  ini_set('error_reporting', E_ALL );
  
  In php.ini, I have set:
  display_errors = Off
  error_reporting = E_ALL & ~E_NOTICE & ~E_DEPRECATED & ~E_STRICT
  
  And I have also tried disabling all plugins other than CiviCRM in case one of them is overriding these settings.
  Debug is off in CiviCRM settings, and it is 'Production' mode.
  Is there anything else I can do!?
  Thanks
  CiviCRM 5.13.4
  Wordpress 5.2.1
  
  **Tags:** php
  
  > **Comments:**
  > **username_1**: Can you set wpconfig.php and civicrm.settings.php to the same as what you have in php.ini?  
  > **username_0**: Tried that a few times, but you're right it should be consistent, so I've done that now. Alas no change!  
  > **username_2**: Can you resave the Directory and Resource URL from CiviCRM UI? And also Clear CiviCRM cache  
  > **username_0**: @PradeepNayak Done both of those too   
  
  ---
  
  ## 1 answers
  
  ### Answer by username_0 on 2019-05-27. Score: 2 | Accepted answer
  
  Resolved it - it was an ancient and unused bespoke CiviCRM extension. Disabling it solves the problem.
  
  
  ---
  
  