Answers.Body: <p>I ran into this as well. The issue is caused by the CachedCiviContainer cache -- which will write a .php file.</p>
  
  <p>A workaround for this is to set the following constant in the civicrm.settings.php file:</p>
  
  <pre><code>define('CIVICRM_CONTAINER_CACHE', 'never');
  </code></pre>
  
  <p>Not ideal, as it disables the container cache altogether. But it avoids these issues.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-05-11T02:11:19.620Z
Answers.LastActivityDate: 2019-05-11T02:11:19.620Z
Answers.UserDisplayName: lcdservices
Answers.Body: <p>Since CiviCRM is software, yes, in theory it could be changed to work differently. The question is always <em>who</em> is going to do that work?</p>
  
  <p>You could start the ball rolling by identifying where in the code .php files are being generated, and suggest an alternative way of doing it.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-05-10T21:35:11.687Z
Answers.Text: I just ran into this. The error occurs in symfony/filesystem/Filesystem.php when we rename CachedCiviContainer.[HASH].php[hash] to CachedCiviContainer.[HASH].php. The problem occurs with guest users (as the post indicates) -- as WPEngine doesn't allow guest users to write php files. FWIW -- I tried disabling asset caching, but it stills throws errors. WPEngine is a headache to work with -- but it's very popular. May be worth some investigation to see if we can work around that restriction.
Answers.UserDisplayName: lcdservices
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-11-24T14:19:14.050Z
Answers.LastActivityDate: 2016-11-24T14:19:14.050Z
Answers.UserDisplayName: Coleman
Body: <p>Is it possible in CiviCRM to change extension of cached php files from <strong>.php</strong> to something else (e.g. .php_ or .txt)? Our host (WPEngine) does not allow guest users to write to <strong>php</strong> files on production environment.</p>
  
  <p>We run cron by calling the cron URL from another server using curl, but scheduled reminder emails fail because CiviCRM can't write .php files as guest user (more info: <a href="https://civicrm.stackexchange.com/questions/15600/scheduled-reminder-email-is-empty">Scheduled Reminder Email is Empty</a>).</p>
  
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2016-11-22T07:12:59.750Z
Comments.Text: hi, you should try asking this @ http://civicrm.stackexchange.com/
Comments.UserDisplayName: michaelmcandrew
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2016-11-22T14:47:15.570Z
Comments.Text: Hi michaelmcandrew. Is this not civicrm.stackexchange.com?! The URL starts with: **[http://civicrm.stackexchange.com](http://civicrm.stackexchange.com)** and the logo says **CiviCRM beta**.
Comments.UserDisplayName: Soroush Zo
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2016-11-23T06:04:11.497Z
Comments.Text: You're in the right place! Welcome to civicrm.stackexchange.com :D
Comments.UserDisplayName: Chris Burgess
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2016-11-23T22:01:24.830Z
Comments.Text: erm, sorry about that!! yes, you are in the right place :)
Comments.UserDisplayName: michaelmcandrew
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2016-12-02T07:21:43.197Z
Comments.Text: Hi, Soroush, when I do search on WPEngine on stack exchange site I get the impression that hosting on WPEngine is possible but not easy. For example http://civicrm.stackexchange.com/questions/7057/in-wordpress-i-want-to-convert-my-installation-from-an-external-database-to-use/.  A valuable comment in this question that WPEngine support says they have some customers running CiviCRM. So you can ask them, what did they do? A hack to change to the extension of the compiled Smarty files or did they relax the permissions?
Comments.UserDisplayName: Kainuk - CiviCooP
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2016-12-02T16:13:20.170Z
Comments.Text: Thank you Kainuk for looking into this. Fortunately WP Engine fixed the issue yesterday by adding an exception on the firewall for CiviCRM cron URL.
Comments.UserDisplayName: Soroush Zo
Tags: <email><scheduled-reminders><smarty><cache>
Title: Is it possible in CiviCRM to change extension of cached php files from .php to something else (e.g. .php_ or .txt)?
ThreadText: # Is it possible in CiviCRM to change extension of cached php files from .php to something else (e.g. .php_ or .txt)?
  
  (Asked by: username_0 on 2016-11-21)
  
  Is it possible in CiviCRM to change extension of cached php files from **.php** to something else (e.g. .php\_ or .txt)? Our host (WPEngine) does not allow guest users to write to **php** files on production environment.
  
  We run cron by calling the cron URL from another server using curl, but scheduled reminder emails fail because CiviCRM can't write .php files as guest user (more info: [Scheduled Reminder Email is Empty](https://civicrm.stackexchange.com/questions/15600/scheduled-reminder-email-is-empty)).
  
  **Tags:** email, scheduled-reminders, smarty, cache
  
  > **Comments:**
  > **username_1**: hi, you should try asking this @ http://civicrm.stackexchange.com/  
  > **username_0**: Hi username_1. Is this not civicrm.stackexchange.com?! The URL starts with: **[http://civicrm.stackexchange.com](http://civicrm.stackexchange.com)** and the logo says **CiviCRM beta**.  
  > **username_2**: You're in the right place! Welcome to civicrm.stackexchange.com :D  
  > **username_1**: erm, sorry about that!! yes, you are in the right place :)  
  > **username_3**: Hi, username_0, when I do search on WPEngine on stack exchange site I get the impression that hosting on WPEngine is possible but not easy. For example http://civicrm.stackexchange.com/questions/7057/in-wordpress-i-want-to-convert-my-installation-from-an-external-database-to-use/.  A valuable comment in this question that WPEngine support says they have some customers running CiviCRM. So you can ask them, what did they do? A hack to change to the extension of the compiled Smarty files or did they relax the permissions?  
  > **username_0**: Thank you username_3 for looking into this. Fortunately WP Engine fixed the issue yesterday by adding an exception on the firewall for CiviCRM cron URL.  
  
  ---
  
  ## 2 answers
  
  ### Answer by username_4 on 2019-05-11. Score: 1
  
  I ran into this as well. The issue is caused by the CachedCiviContainer cache -- which will write a .php file.
  
  A workaround for this is to set the following constant in the civicrm.settings.php file:
  
  ```
  define('CIVICRM_CONTAINER_CACHE', 'never');
  
  ```
  
  Not ideal, as it disables the container cache altogether. But it avoids these issues.
  
  
  ---
  
  ### Answer by username_5 on 2016-11-24. Score: 0
  
  Since CiviCRM is software, yes, in theory it could be changed to work differently. The question is always *who* is going to do that work?
  
  You could start the ball rolling by identifying where in the code .php files are being generated, and suggest an alternative way of doing it.
  
  > **Comments:**
  > **username_4**: I just ran into this. The error occurs in symfony/filesystem/Filesystem.php when we rename CachedCiviContainer.[HASH].php[hash] to CachedCiviContainer.[HASH].php. The problem occurs with guest users (as the post indicates) -- as WPEngine doesn't allow guest users to write php files. FWIW -- I tried disabling asset caching, but it stills throws errors. WPEngine is a headache to work with -- but it's very popular. May be worth some investigation to see if we can work around that restriction.  
  
  ---
  
  