Answers.Body: <p>When you install CiviCRM in Joomla, that file is re-written to a Joomla-specific version -- which basically just has references back to the civicrm.settings.php file one directory up. The installation package will always have the default version which was built with Drupal in mind. The rewrite happens during installation.</p>
  
  <p>If your site version of that file is the same as the package version, it suggests there may have been a problem installing CiviCRM in Joomla. Try reinstalling CiviCRM on top of your existing installation and see if the file is generated properly.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-03-28T17:07:08.397Z
Answers.Text: Thanks for the clarification. I had done an upgrade, but it did not rewrite this file. It just replaced my previous one with this Drupal one, without rewrites. Clearly it had write permissions since it was able to replace the file, so it is odd that it did not rewrite. I did not get any warnings or errors during the upgrade process. Perhaps the rewrite only happens on *installation* but not during upgrades. And maybe I had overwritten the file manually, when I should not have.
Answers.UserDisplayName: Casper Voogt
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-03-28T03:56:06.857Z
Answers.LastActivityDate: 2016-03-28T03:56:06.857Z
Answers.UserDisplayName: lcdservices
Answers.Body: <p>It <a href="https://github.com/civicrm/civicrm-core/blob/9cd899c38d80396c36b33e7943a71e4ff8c5bae9/CRM/Core/CodeGen/Config.php#L17" rel="nofollow">does look like Joomla should be excluded from having <code>civicrm.config.php</code> generated</a> for it. So you might try <strong>moving</strong> that file away from the directory it's in - keep a backup in case! - and see if Joomla "comes right".</p>
  
  <p>If this fixes the problem for you, the issue should be reported to the CiviCRM bugtracker @ <a href="https://issues.civicrm.org/" rel="nofollow">https://issues.civicrm.org/</a></p>
  
  <p>You might also look back at older CiviCRM downloads (eg Joomla for 4.6.10) and see if the <code>civicrm.config.php</code> was recently added to the Joomla zip.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-03-28T17:04:45.417Z
Answers.Text: I did try removing the file and ensure that Joomla/CiviCRM have write permissions, but the file did not get regenerated, and the cron jobs still failed. I ended up restoring the previous civicrm.config.php file from my backup, which did the trick... but I still don't understand why my CiviCRM upgrade did not generate this for me.
Answers.UserDisplayName: Casper Voogt
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-03-29T01:45:01.073Z
Answers.Text: Can you share the previous and 4.7.4 civicrm.config.php files? Maybe redact any sensitive data (if any) and post them on an issue in CiviCRM's JIRA or a Github "[gist](https://gist.github.com)"?
Answers.UserDisplayName: Chris Burgess
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-03-30T20:29:43.757Z
Answers.Text: Gist: https://gist.github.com/anonymous/2faf26db674adf1067cd77179e1b1931    . Note I am using this on 4.7.4 although this file is actually from 4.6.8. It seems to work fine though.
Answers.UserDisplayName: Casper Voogt
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-03-27T20:39:16.983Z
Answers.LastActivityDate: 2016-03-27T20:39:16.983Z
Answers.UserDisplayName: Chris Burgess
Body: <p>I just downloaded and extracted <a href="https://download.civicrm.org/civicrm-4.7.4-joomla.zip" rel="nofollow">https://download.civicrm.org/civicrm-4.7.4-joomla.zip</a>. Within /admin I found civicrm.zip. When I extract that and go into the civicrm folder, it contains civicrm.config.php. This file's code looks like Drupaly code, not Joomla-specific code. For example, line 36 is "function civicrm_conf_init() {". That's a Drupal function call ... the Joomla version of this file should look very different.</p>
  
  <p>So my question is: is it correct that this file contains what look like Drupal functions? This appears to be preventing my CiviCRM cron jobs from running. The cron job errors out with:</p>
  
  <p>"Could not load the settings file at: /var/www/public_html/administrator/components/com_civicrm/civicrm/../..//default/civicrm.settings.php"</p>
  
  <p>I am pretty sure it is due to this civicrm.config.php being a Drupal version rather than a Joomla version. Seems the zip file needs to get updated to include the correct Joomla file. </p>
  
  <p>EDIT: Just wanted to clarify that I was attempting to upgrade CiviCRM from 4.6.8 to 4.7.4, after which I encountered the above issues.</p>
  
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2017-11-12T09:33:28.687Z
Comments.Text: Just letting you know I have experienced this bug as well for the last two releases. Even with the latest 4.7.27, the upgrade is overwriting the file and I've had to restore from a backup. Just wondering if this has already been reported in the bug tracker?
Comments.UserDisplayName: lightspeed
Tags: <joomla>
Title: CiviCRM 4.7.4 (Joomla version) contains Drupal version of civicrm.config.php
ThreadText: # CiviCRM 4.7.4 (Joomla version) contains Drupal version of civicrm.config.php
  
  (Asked by: username_0 on 2016-03-26)
  
  I just downloaded and extracted <https://download.civicrm.org/civicrm-4.7.4-joomla.zip>. Within /admin I found civicrm.zip. When I extract that and go into the civicrm folder, it contains civicrm.config.php. This file's code looks like Drupaly code, not Joomla-specific code. For example, line 36 is "function civicrm\_conf\_init() {". That's a Drupal function call ... the Joomla version of this file should look very different.
  
  So my question is: is it correct that this file contains what look like Drupal functions? This appears to be preventing my CiviCRM cron jobs from running. The cron job errors out with:
  
  "Could not load the settings file at: /var/www/public\_html/administrator/components/com\_civicrm/civicrm/../..//default/civicrm.settings.php"
  
  I am pretty sure it is due to this civicrm.config.php being a Drupal version rather than a Joomla version. Seems the zip file needs to get updated to include the correct Joomla file.
  
  EDIT: Just wanted to clarify that I was attempting to upgrade CiviCRM from 4.6.8 to 4.7.4, after which I encountered the above issues.
  
  **Tags:** joomla
  
  > **Comments:**
  > **username_1**: Just letting you know I have experienced this bug as well for the last two releases. Even with the latest 4.7.27, the upgrade is overwriting the file and I've had to restore from a backup. Just wondering if this has already been reported in the bug tracker?  
  
  ---
  
  ## 2 answers
  
  ### Answer by username_2 on 2016-03-28. Score: 1 | Accepted answer
  
  When you install CiviCRM in Joomla, that file is re-written to a Joomla-specific version -- which basically just has references back to the civicrm.settings.php file one directory up. The installation package will always have the default version which was built with Drupal in mind. The rewrite happens during installation.
  
  If your site version of that file is the same as the package version, it suggests there may have been a problem installing CiviCRM in Joomla. Try reinstalling CiviCRM on top of your existing installation and see if the file is generated properly.
  
  > **Comments:**
  > **username_0**: Thanks for the clarification. I had done an upgrade, but it did not rewrite this file. It just replaced my previous one with this Drupal one, without rewrites. Clearly it had write permissions since it was able to replace the file, so it is odd that it did not rewrite. I did not get any warnings or errors during the upgrade process. Perhaps the rewrite only happens on *installation* but not during upgrades. And maybe I had overwritten the file manually, when I should not have.  
  
  ---
  
  ### Answer by username_3 on 2016-03-27. Score: 1
  
  It [does look like Joomla should be excluded from having `civicrm.config.php` generated](https://github.com/civicrm/civicrm-core/blob/9cd899c38d80396c36b33e7943a71e4ff8c5bae9/CRM/Core/CodeGen/Config.php#L17) for it. So you might try **moving** that file away from the directory it's in - keep a backup in case! - and see if Joomla "comes right".
  
  If this fixes the problem for you, the issue should be reported to the CiviCRM bugtracker @ <https://issues.civicrm.org/>
  
  You might also look back at older CiviCRM downloads (eg Joomla for 4.6.10) and see if the `civicrm.config.php` was recently added to the Joomla zip.
  
  > **Comments:**
  > **username_0**: I did try removing the file and ensure that Joomla/CiviCRM have write permissions, but the file did not get regenerated, and the cron jobs still failed. I ended up restoring the previous civicrm.config.php file from my backup, which did the trick... but I still don't understand why my CiviCRM upgrade did not generate this for me.  
  > **username_3**: Can you share the previous and 4.7.4 civicrm.config.php files? Maybe redact any sensitive data (if any) and post them on an issue in CiviCRM's JIRA or a Github "[gist](https://gist.github.com)"?  
  > **username_0**: Gist: https://gist.github.com/anonymous/2faf26db674adf1067cd77179e1b1931    . Note I am using this on 4.7.4 although this file is actually from 4.6.8. It seems to work fine though.  
  
  ---
  
  