CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Upgrading CiviCRM (Moderator: Deepak Srivastava) »
  • file_put_contents(Config.IDS.ini): Permission denied
Pages: [1]

Author Topic: file_put_contents(Config.IDS.ini): Permission denied  (Read 1347 times)

mvonrose

  • Guest
file_put_contents(Config.IDS.ini): Permission denied
July 22, 2009, 09:52:02 am
I just moved my installation over to a new server (mediatemple DV) and am getting the following error on the admin page:
warning: file_put_contents(Config.IDS.ini) [function.file-put-contents]: failed to open stream: Permission denied in /var/www/vhosts/growfood.org/httpdocs/sites/all/modules/civicrm/CRM/Core/IDS.php on line 114.

and any civi page i go to -- for example civicrm/admin -- resolves in a blank page.

I carefully followed the instructions here (http://wiki.civicrm.org/confluence/display/CRMDOC/Moving+an+Existing+Installation+to+a+New+Server+or+Location), safe_mode is Off, and I've been clearing any caches/files that I could think of. Any ideas of why this is happening?

Dave Greenberg

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 5760
  • Karma: 226
    • My CiviCRM Blog
Re: file_put_contents(Config.IDS.ini): Permission denied
July 22, 2009, 12:22:43 pm
Your webserver needs write permissions on CiviCRM's configured "Upload Directory" (which by defualt is your site's Drupal "files" directory - sites/default/files for most installs). Can you check on that?
Protect your investment in CiviCRM by  becoming a Member!

mvonrose

  • Guest
Re: file_put_contents(Config.IDS.ini): Permission denied
July 22, 2009, 06:43:42 pm
All the files and folders, as well as "files" itself, under /sites/default/files have chmod 777... Also, in my server error.log, there is the following error as well (the previous posted error is what shows up simultaneously in Drupal):

Code: [Select]
[Wed Jul 22 18:40:42 2009] [error] [client 98.247.137.15] PHP Fatal error: Uncaught exception 'Exception' with message 'Configuration file could not be found' in /var/www/vhosts/growfood.org/httpdocs/sites/all/modules/civicrm/packages/IDS/Init.php:134\nStack trace:\n#0 /var/www/vhosts/growfood.org/httpdocs/sites/all/modules/civicrm/packages/IDS/Init.php(87): IDS_Init->setConfigPath('Config.IDS.ini')\n#1 /var/www/vhosts/growfood.org/httpdocs/sites/all/modules/civicrm/packages/IDS/Init.php(115): IDS_Init->__construct('Config.IDS.ini')\n#2 /var/www/vhosts/growfood.org/httpdocs/sites/all/modules/civicrm/CRM/Core/IDS.php(130): IDS_Init::init('Config.IDS.ini')\n#3 /var/www/vhosts/growfood.org/httpdocs/sites/all/modules/civicrm/CRM/Core/Invoke.php(74): CRM_Core_IDS->check(Array)\n#4 /var/www/vhosts/growfood.org/httpdocs/sites/all/modules/civicrm/drupal/civicrm.module(339): CRM_Core_Invoke::invoke(Array)\n#5 [internal function]: civicrm_invoke('pledge')\n#6 /var/www/vhosts/growfood.org/httpdocs/includes/menu.inc(348): call_user_func_array('civicrm_invoke', Array)\n#7 /var/www/vhosts/growfood.org/htt in /var/www/vhosts/growfood.org/httpdocs/sites/all/modules/civicrm/packages/IDS/Init.php on line 134, referer: http://xxx.xxx.xxx.xxx/admin

after thought: is there anyway it would be trying to upload to some other folder? could a value have changed while moving servers?

After thought of after thought: I was also reading that even if I set file permissions to 777 through FTP that the script itself running on the server may find the files/folders to have permissions that are set by Apache and which can be different. Is this true?
« Last Edit: July 22, 2009, 06:59:54 pm by mvonrose »

Dave Greenberg

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 5760
  • Karma: 226
    • My CiviCRM Blog
Re: file_put_contents(Config.IDS.ini): Permission denied
July 23, 2009, 06:51:03 am
If you've done all the other steps for "moving to a new server / location" (including setting civicrm_domain.config_backend to NULL), then try deleting Config.IDS.ini (it will be recreated automatically).
Protect your investment in CiviCRM by  becoming a Member!

mvonrose

  • Guest
Re: file_put_contents(Config.IDS.ini): Permission denied
July 23, 2009, 09:48:08 am
It's SO weird: I just did all of that again, for kicks, for the 5th or 6th time last night and it finally worked. No idea what happened. I did set the open_basedir to NONE in my vhost.conf file, then ran these:
mysql> truncate civicrm_menu;
mysql> truncate civicrm_cache;
mysql> update civicrm_domain set config_backend = null;

then went to /civicrm/admin/setting/updateConfigBackend?reset=1

Hope this helps people out there.... spent 4 days trying to get this work and apparently just trying the same thing over and over wasn't insanity, but actually worked.

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Upgrading CiviCRM (Moderator: Deepak Srivastava) »
  • file_put_contents(Config.IDS.ini): Permission denied

This forum was archived on 2017-11-26.