Body: <p>If I want to add a membership from a contact's profile I'm getting a 500 error that I can't really dig into: <code>https://inec.gestad.net/wp-admin/admin.php?page=CiviCRM&amp;q=civicrm/contact/view/membership&amp;action=add&amp;cid=7175&amp;context=membership&amp;snippet=json</code></p>
  <p>The page loads without end but actually the membership is created and recorded (I have the same issue only with adding a 'employee relationship', other relationship types work fine). So it works half, it's just not user friendly and makes us wonder about the stability of this instance.</p>
  <p>Adding the membership from the membership menu leads to a white screen error but still also creates the membership.</p>
  <p>We've spent hours unsuccessfully trying to find out the issue, among others:</p>
  <ul>
  <li>disabling all CiviCRM and WP extensions</li>
  <li>clearing all caches</li>
  <li>checking in web browser's console, the stack only relates to many js and jquery files</li>
  <li>setting wp_debug and CiviCRM debug/backtrace mode on</li>
  <li>checking the logs on the server</li>
  <li>modifying PHP version between 7.3 and 7.4</li>
  <li>upgrading WP to last version (5.9.3)</li>
  <li>reading documentation and SE</li>
  <li>creating and testing another test membership and options</li>
  <li>checking the database and tables for foreign keys and primary keys</li>
  <li>comparing the prod and the sandbox</li>
  <li>comparing on other instances that also run under 5.48.2</li>
  <li>... and so on</li>
  </ul>
  <p>This happens on CiviCRM 5.48.2 but the client was already complaining before.</p>
  <p>Any idea to help us?</p>
  <p>EDIT1: Apache log shows this error:</p>
  <p><code>2022-05-05 12:08:08    Error   2001:8d8:1800:86cb::1   AH01630: client denied by server configuration: /var/www/vhosts/.../httpdocs/wp-content/uploads/civicrm/ConfigAndLog/CiviCRM.3512e01e8d0b84834c3197cf.log   Erreur Apache 2022-05-05 12:08:08 Error   2001:8d8:1800:86cb::1   AH01630: client denied by server configuration: /var/www/vhosts/.../httpdocs/wp-content/uploads/civicrm/upload/delete-this-wU9BGVyOxw   Erreur Apache 2022-05-05 12:08:08 Error   2001:8d8:1800:86cb::1   AH01630: client denied by server configuration: /var/www/vhosts/.../httpdocs/wp-content/uploads/civicrm/custom/delete-this-UOimdlywFG</code></p>
  <p>EDIT 2: I found this error elsewhere and I guess it's related to server's security settings...</p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2022-05-04T16:10:32.157Z
Comments.Text: If it is a 500 can you check php error log?
Comments.UserDisplayName: Pradeep Nayak
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2022-05-05T10:15:03.803Z
Comments.Text: I've updated my post with some logs from Apache. Could this be related to the .htaccess file in the folders upload and custom?
Comments.UserDisplayName: Guillaume Sorel
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2022-05-05T16:49:42.967Z
Comments.Text: The second error you can ignore - that's just from a system status check - but the first error looks like a permissions error. The apache user should be able to write in ConfigAndLog.
Comments.UserDisplayName: Demerit
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2022-05-05T16:59:43.353Z
Comments.Text: that helps to find out. thanks.
Comments.UserDisplayName: Guillaume Sorel
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2022-05-06T09:43:05.133Z
Comments.Text: what is strange with the first error is that the log file is filled with entries. Could there be a limitation only for Apache?
Comments.UserDisplayName: Guillaume Sorel
Tags: <json>
Title: Can't add a membership from the contact's profile but it's created!
ThreadText: # Can't add a membership from the contact's profile but it's created!
  
  (Asked by: username_0 on 2022-05-04)
  
  If I want to add a membership from a contact's profile I'm getting a 500 error that I can't really dig into: `https://inec.gestad.net/wp-admin/admin.php?page=CiviCRM&q=civicrm/contact/view/membership&action=add&cid=7175&context=membership&snippet=json`
  
  The page loads without end but actually the membership is created and recorded (I have the same issue only with adding a 'employee relationship', other relationship types work fine). So it works half, it's just not user friendly and makes us wonder about the stability of this instance.
  
  Adding the membership from the membership menu leads to a white screen error but still also creates the membership.
  
  We've spent hours unsuccessfully trying to find out the issue, among others:
  
  * disabling all CiviCRM and WP extensions
  * clearing all caches
  * checking in web browser's console, the stack only relates to many js and jquery files
  * setting wp\_debug and CiviCRM debug/backtrace mode on
  * checking the logs on the server
  * modifying PHP version between 7.3 and 7.4
  * upgrading WP to last version (5.9.3)
  * reading documentation and SE
  * creating and testing another test membership and options
  * checking the database and tables for foreign keys and primary keys
  * comparing the prod and the sandbox
  * comparing on other instances that also run under 5.48.2
  * ... and so on
  
  This happens on CiviCRM 5.48.2 but the client was already complaining before.
  
  Any idea to help us?
  
  EDIT1: Apache log shows this error:
  
  `2022-05-05 12:08:08 Error 2001:8d8:1800:86cb::1 AH01630: client denied by server configuration: /var/www/vhosts/.../httpdocs/wp-content/uploads/civicrm/ConfigAndLog/CiviCRM.3512e01e8d0b84834c3197cf.log Erreur Apache 2022-05-05 12:08:08 Error 2001:8d8:1800:86cb::1 AH01630: client denied by server configuration: /var/www/vhosts/.../httpdocs/wp-content/uploads/civicrm/upload/delete-this-wU9BGVyOxw Erreur Apache 2022-05-05 12:08:08 Error 2001:8d8:1800:86cb::1 AH01630: client denied by server configuration: /var/www/vhosts/.../httpdocs/wp-content/uploads/civicrm/custom/delete-this-UOimdlywFG`
  
  EDIT 2: I found this error elsewhere and I guess it's related to server's security settings...
  
  **Tags:** json
  
  > **Comments:**
  > **username_1**: If it is a 500 can you check php error log?  
  > **username_0**: I've updated my post with some logs from Apache. Could this be related to the .htaccess file in the folders upload and custom?  
  > **username_2**: The second error you can ignore - that's just from a system status check - but the first error looks like a permissions error. The apache user should be able to write in ConfigAndLog.  
  > **username_0**: that helps to find out. thanks.  
  > **username_0**: what is strange with the first error is that the log file is filled with entries. Could there be a limitation only for Apache?  
  
  ---
  
  ## 0 answers
  
  