Answers.Body: <p>I don't think there's an intentional change in system requirements.  However, looking at civicrm.config.php, I can see it's undergone recent changes.  It looks like you're having trouble because your PHP configuration doesn't allow running the "exec" command.  That's often done for security - but if you can change your configuration to allow it, I think you'll be better off.  </p>
  
  <p>If not, maybe <a href="https://github.com/civicrm/civicrm-wordpress/blame/master/civicrm.config.php.wordpress#L401" rel="nofollow">change line 401</a> in civicrm.config.php to read:</p>
  
  <pre><code>if (true) {
  </code></pre>
  
  <p>to force it to use the alternate method of finding your search directory?</p>
  
  <p>Please try either changing that line or your PHP configuration to allow "exec" and let us know if it solved the problem for you!</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-06-15T09:19:53.427Z
Answers.Text: Many thanks @jon-g. I'll give that advice a spin and will report back in this thread.
Answers.UserDisplayName: Graham
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-12-21T15:34:39.063Z
Answers.Text: @Graham Any work on whether this worked out for you?  I'm about to close the ticket on Jira.
Answers.UserDisplayName: Jon G - Megaphone Tech
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-12-21T15:43:03.683Z
Answers.Text: Well the issue was resolved, but for the life of me I can't recall what I did to correct things, which is annoying as I forgot to write it down here. Apologies.
Answers.UserDisplayName: Graham
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-12-21T15:45:11.073Z
Answers.Text: I actually looked this over a bit more - I'm pretty sure my original statement is correct, based on the errors you're seeing.  I think I found a way to rewrite the code to a) not use "exec" and b) still work when Civi is symlinked.  I'll report back on the ticket.
Answers.UserDisplayName: Jon G - Megaphone Tech
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-06-11T19:36:55.857Z
Answers.LastActivityDate: 2016-06-11T19:36:55.857Z
Answers.UserDisplayName: Jon G - Megaphone Tech
Answers.Body: <p>There used to be a requirement that the URLs that Andrei referred to above could not contain symbolic links. I don't know if that is still the case, but make sure that all directories in that path are true directories and not symbolic links.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-06-11T19:37:54.610Z
Answers.Text: I believe it's the code to handle symbolic links that's causing the issue Graham is seeing.  Unfortunate!
Answers.UserDisplayName: Jon G - Megaphone Tech
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-06-07T21:10:02.047Z
Answers.LastActivityDate: 2016-06-07T21:10:02.047Z
Answers.UserDisplayName: BobS
Body: <p>I've just upgrade a site, which as far as I'm aware was working fine, from CiviCRM 4.6.x to 4.7.8. Only now the file/image browser and file upload facility within the CKEditor (which I understand is provided by KCFinder, is displaying nothing in the file/image browser and won't let me upload anything.
  Don't know if this is a bug in the 4.7.8 release for Wordpress. I've never come across this issue before in CiviCRM, on dozens of different sites.
  I've read that KCFinder is fussy about paths and permissions.
  Any pointers about how to fix this very welcome.</p>
  
  <p>Update: from the error log I see that each time I open up the KCFinder browse window I get a pattern of notices and warnings, ending with a fatal error:</p>
  
  <blockquote>
    <p>PHP Notice:  Undefined variable: output in
    /home/account/sites/default/wp-content/plugins/civicrm/civicrm/civicrm.config.php
    on line 403, referer:
    <a href="http://account.co.uk/wp-admin/admin.php?page=CiviCRM&amp;q=civicrm%2Fevent%2Fadd&amp;reset=1&amp;action=add" rel="nofollow">http://account.co.uk/wp-admin/admin.php?page=CiviCRM&amp;q=civicrm%2Fevent%2Fadd&amp;reset=1&amp;action=add</a></p>
    
    <p>PHP Warning:  exec() has been disabled for security reasons in
    /home/account/sites/default/wp-content/plugins/civicrm/civicrm/civicrm.config.php
    on line 403, referer:
    <a href="http://account.co.uk/wp-admin/admin.php?page=CiviCRM&amp;q=civicrm%2Fevent%2Fadd&amp;reset=1&amp;action=add" rel="nofollow">http://account.co.uk/wp-admin/admin.php?page=CiviCRM&amp;q=civicrm%2Fevent%2Fadd&amp;reset=1&amp;action=add</a></p>
    
    <p>PHP Notice:  Undefined variable: output in
    /home/account/sites/default/wp-content/plugins/civicrm/civicrm/civicrm.config.php
    on line 404, referer:
    <a href="http://account.co.uk/wp-admin/admin.php?page=CiviCRM&amp;q=civicrm%2Fevent%2Fadd&amp;reset=1&amp;action=add" rel="nofollow">http://account.co.uk/wp-admin/admin.php?page=CiviCRM&amp;q=civicrm%2Fevent%2Fadd&amp;reset=1&amp;action=add</a></p>
    
    <p>PHP Warning:  implode(): Invalid arguments passed in
    /home/account/sites/default/wp-content/plugins/civicrm/civicrm/civicrm.config.php
    on line 404, referer:
    <a href="http://account.co.uk/wp-admin/admin.php?page=CiviCRM&amp;q=civicrm%2Fevent%2Fadd&amp;reset=1&amp;action=add" rel="nofollow">http://account.co.uk/wp-admin/admin.php?page=CiviCRM&amp;q=civicrm%2Fevent%2Fadd&amp;reset=1&amp;action=add</a></p>
    
    <p>PHP Fatal error:  Uncaught exception 'Exception' with message 'Failed
    to locate civicrm.settings.php. Please boot with settingsFile, search,
    or CIVICRM_SETTINGS; or normalize your directory structure.' in
    /home/account/sites/default/wp-content/plugins/civicrm/civicrm/civicrm.config.php:125\nStack
    trace:\n#0
    /home/account/sites/default/wp-content/plugins/civicrm/civicrm/civicrm.config.php(413):
    Civi\Cv\Bootstrap->boot()\n#1
    /home/account/sites/default/wp-content/plugins/civicrm/civicrm/packages/kcfinder/integration/civicrm.php(45):
    require_once('/home/account/si...')\n#2
    /home/account/sites/default/wp-content/plugins/civicrm/civicrm/packages/kcfinder/integration/civicrm.php(140):
    checkAuthentication()\n#3
    /home/account/sites/default/wp-content/plugins/civicrm/civicrm/packages/kcfinder/core/bootstrap.php(39):
    require('/home/account/si...')\n#4
    /home/account/sites/default/wp-content/plugins/civicrm/civicrm/packages/kcfinder/browse.php(15):
    require('/home/account/si...')\n#5 {main}\n  thrown in
    /home/account/sites/default/wp-content/plugins/civicrm/civicrm/civicrm.config.php
    on line 125, referer:
    <a href="http://account.co.uk/wp-admin/admin.php?page=CiviCRM&amp;q=civicrm%2Fevent%2Fadd&amp;reset=1&amp;action=add" rel="nofollow">http://account.co.uk/wp-admin/admin.php?page=CiviCRM&amp;q=civicrm%2Fevent%2Fadd&amp;reset=1&amp;action=add</a></p>
  </blockquote>
  
  <p>I've got 4.6.x sites running on the exact same server set-up with no issues. This is the first site with 4.7.x on this server. </p>
  
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2016-06-07T19:27:23.810Z
Comments.Text: I would start looking at the __Image Upload URL__ under __Resource URLs__, navigating to Administer-System Settings-Resource URLs, in 4.7.X it should look like [civicrm.files]/persist/contribute, check permissions of the folder, also test with the absolute path ie `https://domain.com/wp-content/plugins/files/persist/contribute`
Comments.UserDisplayName: Andrei
Tags: <kcfinder>
Title: KCFinder browser shows empty pop-up window. How to debug?
ThreadText: # KCFinder browser shows empty pop-up window. How to debug?
  
  (Asked by: username_0 on 2016-06-07)
  
  I've just upgrade a site, which as far as I'm aware was working fine, from CiviCRM 4.6.x to 4.7.8. Only now the file/image browser and file upload facility within the CKEditor (which I understand is provided by KCFinder, is displaying nothing in the file/image browser and won't let me upload anything.
  Don't know if this is a bug in the 4.7.8 release for Wordpress. I've never come across this issue before in CiviCRM, on dozens of different sites.
  I've read that KCFinder is fussy about paths and permissions.
  Any pointers about how to fix this very welcome.
  
  Update: from the error log I see that each time I open up the KCFinder browse window I get a pattern of notices and warnings, ending with a fatal error:
  
  > PHP Notice: Undefined variable: output in
  > /home/account/sites/default/wp-content/plugins/civicrm/civicrm/civicrm.config.php
  > on line 403, referer:
  > <http://account.co.uk/wp-admin/admin.php?page=CiviCRM&q=civicrm%2Fevent%2Fadd&reset=1&action=add>
  >
  > PHP Warning: exec() has been disabled for security reasons in
  > /home/account/sites/default/wp-content/plugins/civicrm/civicrm/civicrm.config.php
  > on line 403, referer:
  > <http://account.co.uk/wp-admin/admin.php?page=CiviCRM&q=civicrm%2Fevent%2Fadd&reset=1&action=add>
  >
  > PHP Notice: Undefined variable: output in
  > /home/account/sites/default/wp-content/plugins/civicrm/civicrm/civicrm.config.php
  > on line 404, referer:
  > <http://account.co.uk/wp-admin/admin.php?page=CiviCRM&q=civicrm%2Fevent%2Fadd&reset=1&action=add>
  >
  > PHP Warning: implode(): Invalid arguments passed in
  > /home/account/sites/default/wp-content/plugins/civicrm/civicrm/civicrm.config.php
  > on line 404, referer:
  > <http://account.co.uk/wp-admin/admin.php?page=CiviCRM&q=civicrm%2Fevent%2Fadd&reset=1&action=add>
  >
  > PHP Fatal error: Uncaught exception 'Exception' with message 'Failed
  > to locate civicrm.settings.php. Please boot with settingsFile, search,
  > or CIVICRM\_SETTINGS; or normalize your directory structure.' in
  > /home/account/sites/default/wp-content/plugins/civicrm/civicrm/civicrm.config.php:125\nStack
  > trace:\n#0
  > /home/account/sites/default/wp-content/plugins/civicrm/civicrm/civicrm.config.php(413):
  > Civi\Cv\Bootstrap->boot()\n#1
  > /home/account/sites/default/wp-content/plugins/civicrm/civicrm/packages/kcfinder/integration/civicrm.php(45):
  > require\_once('/home/account/si...')\n#2
  > /home/account/sites/default/wp-content/plugins/civicrm/civicrm/packages/kcfinder/integration/civicrm.php(140):
  > checkAuthentication()\n#3
  > /home/account/sites/default/wp-content/plugins/civicrm/civicrm/packages/kcfinder/core/bootstrap.php(39):
  > require('/home/account/si...')\n#4
  > /home/account/sites/default/wp-content/plugins/civicrm/civicrm/packages/kcfinder/browse.php(15):
  > require('/home/account/si...')\n#5 {main}\n thrown in
  > /home/account/sites/default/wp-content/plugins/civicrm/civicrm/civicrm.config.php
  > on line 125, referer:
  > <http://account.co.uk/wp-admin/admin.php?page=CiviCRM&q=civicrm%2Fevent%2Fadd&reset=1&action=add>
  
  I've got 4.6.x sites running on the exact same server set-up with no issues. This is the first site with 4.7.x on this server.
  
  **Tags:** kcfinder
  
  > **Comments:**
  > **username_1**: I would start looking at the __Image Upload URL__ under __Resource URLs__, navigating to Administer-System Settings-Resource URLs, in 4.7.X it should look like [civicrm.files]/persist/contribute, check permissions of the folder, also test with the absolute path ie `https://domain.com/wp-content/plugins/files/persist/contribute`  
  
  ---
  
  ## 2 answers
  
  ### Answer by username_2 on 2016-06-11. Score: 1
  
  I don't think there's an intentional change in system requirements. However, looking at civicrm.config.php, I can see it's undergone recent changes. It looks like you're having trouble because your PHP configuration doesn't allow running the "exec" command. That's often done for security - but if you can change your configuration to allow it, I think you'll be better off.
  
  If not, maybe [change line 401](https://github.com/civicrm/civicrm-wordpress/blame/master/civicrm.config.php.wordpress#L401) in civicrm.config.php to read:
  
  ```
  if (true) {
  
  ```
  
  to force it to use the alternate method of finding your search directory?
  
  Please try either changing that line or your PHP configuration to allow "exec" and let us know if it solved the problem for you!
  
  > **Comments:**
  > **username_0**: Many thanks @jon-g. I'll give that advice a spin and will report back in this thread.  
  > **username_2**: @username_0 Any work on whether this worked out for you?  I'm about to close the ticket on Jira.  
  > **username_0**: Well the issue was resolved, but for the life of me I can't recall what I did to correct things, which is annoying as I forgot to write it down here. Apologies.  
  > **username_2**: I actually looked this over a bit more - I'm pretty sure my original statement is correct, based on the errors you're seeing.  I think I found a way to rewrite the code to a) not use "exec" and b) still work when Civi is symlinked.  I'll report back on the ticket.  
  
  ---
  
  ### Answer by username_3 on 2016-06-07. Score: 1
  
  There used to be a requirement that the URLs that username_1 referred to above could not contain symbolic links. I don't know if that is still the case, but make sure that all directories in that path are true directories and not symbolic links.
  
  > **Comments:**
  > **username_2**: I believe it's the code to handle symbolic links that's causing the issue username_0 is seeing.  Unfortunate!  
  
  ---
  
  