Answers.Body: <p>First, let the record show that I am an idiot.</p>
  
  <p>After uploading 4.7.23 (the new version) to /wp-content/plugins, I neglected to copy the pre-existing <em>civicrm.config.php</em> into /wp-content/plugins/civicrm4.7.23/civicrm ... thereby depriving the system of (at very least) a working value for <code>$civicrm_root</code>.</p>
  
  <p>It was suggested to me that my civicrm.config.php was probably off, and I checked it just to make sure the <code>$civicrm_root</code> value made sense. The value was good, but the file I was checking was located outside of the plugins directory -- this was a clue, and I missed it. As I said, I'm an idiot.</p>
  
  <p>Of course, once I copied the old civicrm.config.php into the new /wp-content/plugins/civicrm/civicrm, everything worked perfectly. Except for CRON jobs, of course -- but that's another matter.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-08-08T18:09:06.430Z
Answers.LastActivityDate: 2017-08-08T18:09:06.430Z
Answers.UserDisplayName: Prónay
Answers.Body: <p>Ok that's odd - <code>require_once 'api/api/php';</code>
  has been there since CiviCRM switched from SVN to GitHub. </p>
  
  <p><a href="https://github.com/civicrm/civicrm-core/blame/master/CRM/Core/Config.php#L41" rel="nofollow noreferrer">https://github.com/civicrm/civicrm-core/blame/master/CRM/Core/Config.php#L41</a></p>
  
  <p><a href="https://i.sstatic.net/IhZZg.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/IhZZg.png" alt="enter image description here"></a></p>
  
  <p>So something else is going on; do you perhaps have two civicrm directories in your file structure? Simply renaming 4.7.22 to civicrm-old and 4.7.23 to civicrm will not work. Make sure to move the civicrm-old completely out and away. </p>
  
  <p>Added: make sure you do everything in exact order:</p>
  
  <ul>
  <li>move 4.7.23 code out and away</li>
  <li>revert back to 4.7.22 db</li>
  <li>move 4.7.22 code -> civicrm</li>
  <li>make sure it's working</li>
  <li>remove 4.7.22 code out and way</li>
  <li>put the 4.7.23 code -> civicrm</li>
  <li>run the database upgrade script</li>
  <li>make sure it's working</li>
  </ul>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-08-08T02:12:02.270Z
Answers.Text: Thank you for your answer, Karin. You're absolutely right: `require_once 'api/api/php';` is right where it should be in 4.7.22 -- I was in a rush to post my question, and I made the stupid mistake of trusting the search engine in my file manager when it found the string in 4.7.23 and didn't find it in the previous version. I had to open Config.php in 4.7.22 just now to see that it was there.
  In past updates, I've never had a problem playing the name game with the civicrm directories. Upload the new, rename the new and the old, and run the db update script ... but not this time.
Answers.UserDisplayName: Prónay
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-08-08T02:41:03.227Z
Answers.Text: That said, moving the old civicrm directory out of my root directory doesn't help. When I do that, I still get a 500 error with every civi page I try to access. Something is amiss in 4.7.23, but I have no idea *what*.
Answers.UserDisplayName: Prónay
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-08-08T14:03:41.250Z
Answers.Text: There are no widespread install issues for 4.7.23 so this is specific to your setup/procedures. Added some notes to my answer.
Answers.UserDisplayName: KarinG - Semper IT
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-08-08T18:18:18.337Z
Answers.Text: Finally realized my omission of pasting the old civicrm.config.php into the new civicrm/civicrm folder was breaking the system. There was no need to move 4.7.22 away -- once I renamed the civicrm folder, it became effectively inactive, and the newly renamed civicrm folder (previously 4.7.23) became active. Now that the current version is installed & working and the db was successfully upgraded, I can remove the 4.7.22 folder.
Answers.UserDisplayName: Prónay
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-08-08T01:42:01.097Z
Answers.LastActivityDate: 2017-08-08T14:08:56.647Z
Answers.LastEditDate: 2017-08-08T14:08:56.647Z
Answers.UserDisplayName: KarinG - Semper IT
Body: <p>Just updated our WP install from 4.7.22 to 4.7.23 -- but can't run the db update script, because whenever I rename the 4.7.23 folder to <em>civicrm</em>, I subsequently get 500 internal server errors while trying to load <em>any</em> civicrm pages. Error log indicates a problem at line 41 in CRM/Core/Config.php, which is <code>require_once 'api/api.php';</code> ... so I searched the previous working iteration (it runs fine when I switch back to 4.7.22) and there is no mention of <code>api/api.php</code> anywhere. So I assume this line is new in 4.7.23, and I have to wonder why it's making civicrm completely unusable for our site.</p>
  
  <p>Ideas?</p>
  
  <p>More detail from the error message: </p>
  
  <p><code>PHP Fatal error: require_once(): Failed opening required 'api/api.php' (include_path='.:/wp-content/plugins/civicrm/civicrm:/wp-content/plugins/civicrm/civicrm/packages:/wp-content/plugins/civicrm/civicrm/vendor/tecnickcom:/wp-content/plugins/civicrm/civicrm/vendor/phpseclib/phpseclib/phpseclib:/wp-content/plugins/civicrm/civicrm/vendor/pear/pear_exception:/wp-content/plugins/civicrm/civicrm/vendor/pear/auth_sasl:/wp-content/plugins/civicrm/civicrm/vendor/pear/net_socket:/wp-content/plugins/civicrm/civicrm/vendor/pear/net_smtp:/wp-content/plugins/civicrm/civicrm/vendor/pear/validate_finance_creditcard:.:/wp-content/plugins/civicrm/civicrm/:/wp-content/plugins/civicrm/civicrm//packages:.:/usr/lib/php:/usr/local/lib/php') in /wp-content/plugins/civicrm/civicrm/CRM/Core/Config.php on line 41</code></p>
  
Tags: <api><configuration><upgrade><500>
Title: CRM/Core/Config.php line 41 throwing 500 error with new require_once api/api.php
ThreadText: # CRM/Core/Config.php line 41 throwing 500 error with new require_once api/api.php
  
  (Asked by: username_0 on 2017-08-07)
  
  Just updated our WP install from 4.7.22 to 4.7.23 -- but can't run the db update script, because whenever I rename the 4.7.23 folder to *civicrm*, I subsequently get 500 internal server errors while trying to load *any* civicrm pages. Error log indicates a problem at line 41 in CRM/Core/Config.php, which is `require_once 'api/api.php';` ... so I searched the previous working iteration (it runs fine when I switch back to 4.7.22) and there is no mention of `api/api.php` anywhere. So I assume this line is new in 4.7.23, and I have to wonder why it's making civicrm completely unusable for our site.
  
  Ideas?
  
  More detail from the error message:
  
  `PHP Fatal error: require_once(): Failed opening required 'api/api.php' (include_path='.:/wp-content/plugins/civicrm/civicrm:/wp-content/plugins/civicrm/civicrm/packages:/wp-content/plugins/civicrm/civicrm/vendor/tecnickcom:/wp-content/plugins/civicrm/civicrm/vendor/phpseclib/phpseclib/phpseclib:/wp-content/plugins/civicrm/civicrm/vendor/pear/pear_exception:/wp-content/plugins/civicrm/civicrm/vendor/pear/auth_sasl:/wp-content/plugins/civicrm/civicrm/vendor/pear/net_socket:/wp-content/plugins/civicrm/civicrm/vendor/pear/net_smtp:/wp-content/plugins/civicrm/civicrm/vendor/pear/validate_finance_creditcard:.:/wp-content/plugins/civicrm/civicrm/:/wp-content/plugins/civicrm/civicrm//packages:.:/usr/lib/php:/usr/local/lib/php') in /wp-content/plugins/civicrm/civicrm/CRM/Core/Config.php on line 41`
  
  **Tags:** api, configuration, upgrade, 500
  
  
  ---
  
  ## 2 answers
  
  ### Answer by username_0 on 2017-08-08. Score: 1
  
  First, let the record show that I am an idiot.
  
  After uploading 4.7.23 (the new version) to /wp-content/plugins, I neglected to copy the pre-existing *civicrm.config.php* into /wp-content/plugins/civicrm4.7.23/civicrm ... thereby depriving the system of (at very least) a working value for `$civicrm_root`.
  
  It was suggested to me that my civicrm.config.php was probably off, and I checked it just to make sure the `$civicrm_root` value made sense. The value was good, but the file I was checking was located outside of the plugins directory -- this was a clue, and I missed it. As I said, I'm an idiot.
  
  Of course, once I copied the old civicrm.config.php into the new /wp-content/plugins/civicrm/civicrm, everything worked perfectly. Except for CRON jobs, of course -- but that's another matter.
  
  
  ---
  
  ### Answer by username_1 on 2017-08-08. Score: 0
  
  Ok that's odd - `require_once 'api/api/php';`
  has been there since CiviCRM switched from SVN to GitHub.
  
  <https://github.com/civicrm/civicrm-core/blame/master/CRM/Core/Config.php#L41>
  
  [![enter image description here](https://i.sstatic.net/IhZZg.png)](https://i.sstatic.net/IhZZg.png)
  
  So something else is going on; do you perhaps have two civicrm directories in your file structure? Simply renaming 4.7.22 to civicrm-old and 4.7.23 to civicrm will not work. Make sure to move the civicrm-old completely out and away.
  
  Added: make sure you do everything in exact order:
  
  * move 4.7.23 code out and away
  * revert back to 4.7.22 db
  * move 4.7.22 code -> civicrm
  * make sure it's working
  * remove 4.7.22 code out and way
  * put the 4.7.23 code -> civicrm
  * run the database upgrade script
  * make sure it's working
  
  > **Comments:**
  > **username_0**: Thank you for your answer, Karin. You're absolutely right: `require_once 'api/api/php';` is right where it should be in 4.7.22 -- I was in a rush to post my question, and I made the stupid mistake of trusting the search engine in my file manager when it found the string in 4.7.23 and didn't find it in the previous version. I had to open Config.php in 4.7.22 just now to see that it was there. In past updates, I've never had a problem playing the name game with the civicrm directories. Upload the new, rename the new and the old, and run the db update script ... but not this time.  
  > **username_0**: That said, moving the old civicrm directory out of my root directory doesn't help. When I do that, I still get a 500 error with every civi page I try to access. Something is amiss in 4.7.23, but I have no idea *what*.  
  > **username_1**: There are no widespread install issues for 4.7.23 so this is specific to your setup/procedures. Added some notes to my answer.  
  > **username_0**: Finally realized my omission of pasting the old civicrm.config.php into the new civicrm/civicrm folder was breaking the system. There was no need to move 4.7.22 away -- once I renamed the civicrm folder, it became effectively inactive, and the newly renamed civicrm folder (previously 4.7.23) became active. Now that the current version is installed & working and the db was successfully upgraded, I can remove the 4.7.22 folder.  
  
  ---
  
  