Answers.Body: <p>Check that the URL configured for your WordPress site matches the URL in your CiviCRM civicrm.settings.php</p>
  
  <p>If these have different URLs, you will appear to be logged out when you move "between sites". This sounds like it could match what you're describing.</p>
  
  <p>The URLs must match for all of protocol (http vs HTTPS), domain (example.org vs example.com) and hostname (www.example.com vs example.com).</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-11-21T06:48:50.820Z
Answers.LastActivityDate: 2015-11-21T06:48:50.820Z
Answers.UserDisplayName: Chris Burgess
Answers.Body: <p>I was about to give up on this issue when I found the solution! When you install Wordpress one of the settings is the base URL for the site, and you can choose the URL format to include or exclude the 'www.' part. When I installed Wordpress, I decided to exclude the www from the base URL, but when I set up Civicrm I put the www in the base URL! I know there is some settings in the .htaccess that sorts all this out but it appears that if these settings are different, for some features of CiviCRM, there ends up with a 'redirect' path in the URL. Result - confusion and logout! If anyone else has this problem, don't just look at the settings for sub-domains/directories, look at the www settings as well! I changed my paths to be consistent, and no longer get logged out!!</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-11-26T09:05:13.867Z
Answers.LastActivityDate: 2015-11-26T09:05:13.867Z
Answers.UserDisplayName: Richard Adams
Answers.Body: <p>File permission issue?</p>
  
  <p>It seems that your web server user does not have permission to write to the temporary/file folder....</p>
  
  <p>Your files should in general have 755 permissions for directories and 644 for files... The owner of the files should be the the web server process for this to work properly... </p>
  
  <p>Quick fix to set directories to 755 and files to 644, assuming linux install ...</p>
  
  <p>sudo find /yourwwwroot/wp-content/plugins/civicrm -type d -exec chmod 755 {} +</p>
  
  <p>sudo find /yourwwwroot/wp-content/plugins/civicrm -type f -exec chmod 644 {} +</p>
  
  <p>sudo find /yourwwwroot/wp-content/plugins/files/civicrm -type d -exec chmod 755 {} +
  sudo find /yourwwwroot/wp-content/plugins/files/civicrm -type f -exec chmod 644 {} +</p>
  
  <p>Oh and also check the file owner... if you copied it, it might belong to you and not the web server so it's process can't write to it...</p>
  
  <p>Hope this helps... </p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-11-21T00:37:14.170Z
Answers.LastActivityDate: 2015-11-21T00:37:14.170Z
Answers.UserDisplayName: Serge
Answers.Body: <p>This is happening to me as well on my Civicrm installation under Wordpress.  I think I have linked it to a path problem but I don't know how to fix it.  I have wordpress in its own directory and am using a .htaccess file in the root and directory of the installation.  Using Civicrm 4.6.10 with Wordpress 4.3.1.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-11-20T11:59:37.627Z
Answers.Text: I think it may be a path setup problem as well, but it seems strange that some functions that only require a READ of database data, work OK, but functions that require a WRITE to the database, such as editing a contact cause the logout problem. I would have thought that if it was a path problem both read and write functions would be affected? And anyway, why does it cause a logout instead of a page not found or something?
Answers.UserDisplayName: Richard Adams
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-11-20T13:46:15.833Z
Answers.Text: More information on my problem - server error message as follows: lighthousechristiancare.co.uk [Fri Nov 20 13:41:24 2015] [error] [client 89.243.174.76:49383] AH01215: PHP Warning:  Unknown: open_basedir restriction in effect. File(/tmp) is not within the allowed path(s): (/home/sites/lighthousechristiancare.co.uk/public_html) in Unknown on line 0: /home/sites/lighthousechristiancare.co.uk/public_html/crm/wp-admin/admin.php
Answers.UserDisplayName: Richard Adams
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-11-20T13:49:23.000Z
Answers.Text: Another server error message: lighthousechristiancare.co.uk [Fri Nov 20 13:41:24 2015] [error] [client 89.243.174.76:49383] AH01215: PHP Warning:  File upload error - unable to create a temporary file in Unknown on line 0: /home/sites/lighthousechristiancare.co.uk/public_html/crm/wp-admin/admin.php
  Do these messages mean anything to anyone??
Answers.UserDisplayName: Richard Adams
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-11-22T21:34:53.687Z
Answers.Text: @RichardAdams the functions which *write* data make POST requests to the server, and those (which use HTML_QuickForm, anyway) submit to an absolute path as configured in `civicrm.settings.php`. When that is not matched to the URL you logged into, you land on a URL where you're not logged in. See my answer.
Answers.UserDisplayName: Chris Burgess
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-11-23T22:35:50.277Z
Answers.Text: This problem is this!!  When you have wordpress in its own directory, the url will be the domain/directory.  The home will be the domain.  I think cviicrm is using the home to find files and doesn't think you are logged in.
Answers.UserDisplayName: user21507
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-11-25T20:43:28.127Z
Answers.Text: Thanks for all the comments, guys - I have looked at all the permissions, paths etc. and can't find where the problem is. I put the Civicrm plugin into a separate Wordpress installation in a subdirectory of the main site, but in fact I have 'solved' the problem for me by moving the CiviCRM to the main site, and it now works OK! That seems to reinforce the theory that it was a path/permissions issue, and I am sure that the suggestions here will help anyone else with a similar problem, but I haven't got time to investigate my original problem any further. Thanks for your help.
Answers.UserDisplayName: Richard Adams
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-11-19T22:47:31.273Z
Answers.LastActivityDate: 2015-11-19T22:47:31.273Z
Answers.UserDisplayName: user21507
Body: <p>When I am doing various things in CiviCRM and want to save the changes, I keep getting logged out of the admin panel. As an example, but not the only scenario, I was trying to set up a custom profile for an event form. Set up the profile name and other data, hit save....went straight to the WP login screen! Anyone got any ideas? Most other functions working OK, but this is really annoying! Also happens when editing an event details, and select 'save and done' - 'save' works OK! HELP!</p>
  
  <p>Using latest CIVICRM build 4.6.10 and Google Chrome on Windows 10.</p>
  
Tags: <civievent><wordpress>
Title: Why does CiviCRM keep logging me out of the website admin?
ThreadText: # Why does CiviCRM keep logging me out of the website admin?
  
  (Asked by: username_0 on 2015-11-19)
  
  When I am doing various things in CiviCRM and want to save the changes, I keep getting logged out of the admin panel. As an example, but not the only scenario, I was trying to set up a custom profile for an event form. Set up the profile name and other data, hit save....went straight to the WP login screen! Anyone got any ideas? Most other functions working OK, but this is really annoying! Also happens when editing an event details, and select 'save and done' - 'save' works OK! HELP!
  
  Using latest CIVICRM build 4.6.10 and Google Chrome on Windows 10.
  
  **Tags:** civievent, wordpress
  
  
  ---
  
  ## 4 answers
  
  ### Answer by username_1 on 2015-11-21. Score: 5
  
  Check that the URL configured for your WordPress site matches the URL in your CiviCRM civicrm.settings.php
  
  If these have different URLs, you will appear to be logged out when you move "between sites". This sounds like it could match what you're describing.
  
  The URLs must match for all of protocol (http vs HTTPS), domain (example.org vs example.com) and hostname (www.example.com vs example.com).
  
  
  ---
  
  ### Answer by username_0 on 2015-11-26. Score: 2
  
  I was about to give up on this issue when I found the solution! When you install Wordpress one of the settings is the base URL for the site, and you can choose the URL format to include or exclude the 'www.' part. When I installed Wordpress, I decided to exclude the www from the base URL, but when I set up Civicrm I put the www in the base URL! I know there is some settings in the .htaccess that sorts all this out but it appears that if these settings are different, for some features of CiviCRM, there ends up with a 'redirect' path in the URL. Result - confusion and logout! If anyone else has this problem, don't just look at the settings for sub-domains/directories, look at the www settings as well! I changed my paths to be consistent, and no longer get logged out!!
  
  
  ---
  
  ### Answer by username_2 on 2015-11-21. Score: 1
  
  File permission issue?
  
  It seems that your web server user does not have permission to write to the temporary/file folder....
  
  Your files should in general have 755 permissions for directories and 644 for files... The owner of the files should be the the web server process for this to work properly...
  
  Quick fix to set directories to 755 and files to 644, assuming linux install ...
  
  sudo find /yourwwwroot/wp-content/plugins/civicrm -type d -exec chmod 755 {} +
  
  sudo find /yourwwwroot/wp-content/plugins/civicrm -type f -exec chmod 644 {} +
  
  sudo find /yourwwwroot/wp-content/plugins/files/civicrm -type d -exec chmod 755 {} +
  sudo find /yourwwwroot/wp-content/plugins/files/civicrm -type f -exec chmod 644 {} +
  
  Oh and also check the file owner... if you copied it, it might belong to you and not the web server so it's process can't write to it...
  
  Hope this helps...
  
  
  ---
  
  ### Answer by username_3 on 2015-11-19. Score: 0
  
  This is happening to me as well on my Civicrm installation under Wordpress. I think I have linked it to a path problem but I don't know how to fix it. I have wordpress in its own directory and am using a .htaccess file in the root and directory of the installation. Using Civicrm 4.6.10 with Wordpress 4.3.1.
  
  > **Comments:**
  > **username_0**: I think it may be a path setup problem as well, but it seems strange that some functions that only require a READ of database data, work OK, but functions that require a WRITE to the database, such as editing a contact cause the logout problem. I would have thought that if it was a path problem both read and write functions would be affected? And anyway, why does it cause a logout instead of a page not found or something?  
  > **username_0**: More information on my problem - server error message as follows: lighthousechristiancare.co.uk [Fri Nov 20 13:41:24 2015] [error] [client 89.243.174.76:49383] AH01215: PHP Warning:  Unknown: open_basedir restriction in effect. File(/tmp) is not within the allowed path(s): (/home/sites/lighthousechristiancare.co.uk/public_html) in Unknown on line 0: /home/sites/lighthousechristiancare.co.uk/public_html/crm/wp-admin/admin.php  
  > **username_0**: Another server error message: lighthousechristiancare.co.uk [Fri Nov 20 13:41:24 2015] [error] [client 89.243.174.76:49383] AH01215: PHP Warning:  File upload error - unable to create a temporary file in Unknown on line 0: /home/sites/lighthousechristiancare.co.uk/public_html/crm/wp-admin/admin.php Do these messages mean anything to anyone??  
  > **username_1**: @RichardAdams the functions which *write* data make POST requests to the server, and those (which use HTML_QuickForm, anyway) submit to an absolute path as configured in `civicrm.settings.php`. When that is not matched to the URL you logged into, you land on a URL where you're not logged in. See my answer.  
  > **username_3**: This problem is this!!  When you have wordpress in its own directory, the url will be the domain/directory.  The home will be the domain.  I think cviicrm is using the home to find files and doesn't think you are logged in.  
  > **username_0**: Thanks for all the comments, guys - I have looked at all the permissions, paths etc. and can't find where the problem is. I put the Civicrm plugin into a separate Wordpress installation in a subdirectory of the main site, but in fact I have 'solved' the problem for me by moving the CiviCRM to the main site, and it now works OK! That seems to reinforce the theory that it was a path/permissions issue, and I am sure that the suggestions here will help anyone else with a similar problem, but I haven't got time to investigate my original problem any further. Thanks for your help.  
  
  ---
  
  