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 »
  • Installing CiviCRM »
  • Joomla! Installations (Moderator: Deepak Srivastava) »
  • Why is this error message appearing? How to correct it?
Pages: [1] 2

Author Topic: Why is this error message appearing? How to correct it?  (Read 6273 times)

WP1

  • Guest
Why is this error message appearing? How to correct it?
January 25, 2009, 05:57:40 pm
Hello All!

For over a week I have been trying to get CiviCRM to install as a component to Joomla. NO SUCCESS

(1) The following has been done:
  • Have searched for help from other posts - No joy
  • Have followed advice after posting - No joy
  • Have CHMODed folders and files to 777 as indicated in the following link:
http://docs.joomla.org/How_to_solve_Installation_errors_Extension_Manager - No joy

(2) A partial install occurs after each attempt:
  • CiviCRM appears in the Components Menu
  • CiviCRM tables are created in the Joomla Database
  • CiviCRM folder with files are created in

home/abc/public_html/z_zoom/joomla/administrator/components/com_civicrm
  • CiviCRM folder with files are created in

home/abc/public_html/z_zoom/joomla/components/com_civicrm

(3) At the point the install should be finished and a message that the Component was successfully installed should be present, the following is what is seen:

Warning: mkdir() [function.mkdir]: Permission denied in /home/abc/public_html/z_zoom/joomla/administrator/components/com_civicrm/configure.php on line 36

Warning: mkdir() [function.mkdir]: No such file or directory in /home/abc/public_html/z_zoom/joomla/administrator/components/com_civicrm/configure.php on line 41

Warning: fopen(/home/abc/public_html/z_zoom/joomla/administrator/components/com_civicrm/civicrm.settings.php) [function.fopen]: failed to open stream: Permission denied in /home/abc/public_html/z_zoom/joomla/administrator/components/com_civicrm/configure.php on line 54
Cannot open /home/abc/public_html/z_zoom/joomla/administrator/components/com_civicrm/civicrm.settings.php

(4) Also when any of the CiviCRM links in the Components Menu is clicked additional error messages are displayed.

(5) Safe Mode is Off.

(6) Maybe this will help:

Diagnostic Information
Joomla! Version: Joomla! 1.5.9 Production/Stable [ Vatani ] 9-January-2009 23:00 GMT
configuration.php: Writable (Mode: 777 ) | RG_EMULATION: N/A
Architecture/Platform: Linux 2.6.9-023stab046.2-enterprise ( i686) | Web Server: Apache/2.2.11 (Unix) mod_ssl/2.2.11 OpenSSL/0.9.7a mod_auth_passthrough/2.1 mod_bwlimited/1.4 FrontPage/5.0.2.2635 PHP/5.2.6 ( example.host.com) | PHP Version: 5.2.6
PHP Requirements: register_globals: Disabled | magic_quotes_gpc: Enabled | safe_mode: Disabled | MySQL Support: Yes | XML Support: Yes | zlib Support: Yes
mbstring Support (1.5): Yes | iconv Support (1.5): No | save.session_path: Not Writable | Max.Execution Time: 30 seconds | File Uploads:  Enabled
MySQL Version: 5.0.67-community ( Localhost via UNIX socket )

Extended Information:
SEF: Disabled (without ReWrite)  | FTP Layer: Enabled | htaccess: Not Implemented
PHP/suExec: User and Web Server accounts are not the same. (PHP/suExec probably not installed)
PHP Environment: API: apache2handler | MySQLi: Yes | Max. Memory: 64M | Max. Upload Size: 2M | Max. Post Size: 8M | Max. Input Time: 60 | Zend Version: 2.2.0
Disabled Functions:
MySQL Client: 5.0.67 ( latin1 )

            
QUESTIONS
  • Why is this error message appearing? 
  • How to correct it?


Thanks in advance for any and all responses,

WP1

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Why is this error message appearing? How to correct it?
January 25, 2009, 08:25:12 pm

1. you will need to uninstall civicrm

2. You will need to give write permissions to apache for the folder:

/home/abc/public_html/z_zoom/joomla/media

lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

WP1

  • Guest
Re: Why is this error message appearing? How to correct it?
January 26, 2009, 07:31:59 am
Hi Lobo!

Thanks for your help.

What was done:
  • Uninstalled the component installation of CivicCRM
  • CHOMODed the "media" directory to 777.
  • Attempted another reinstallation from the directory

Results:
Warning: fopen(/home/abc/public_html/z_zoom/joomla/administrator/components/com_civicrm/civicrm.settings.php) [function.fopen]: failed to open stream: Permission denied in /home/abc/public_html/z_zoom/joomla/administrator/components/com_civicrm/configure.php on line 54
Cannot open /home/abc/public_html/z_zoom/joomla/administrator/components/com_civicrm/civicrm.settings.php

Line 54 in configure.php:
 
Code: [Select]
$fd  = fopen( $name, "w" );
Again, thanks for your help.

WP1

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Why is this error message appearing? How to correct it?
January 26, 2009, 07:54:11 am

you need to ensure that:

/home/abc/public_html/z_zoom/joomla/administrator/components/com_civicrm
/home/abc/public_html/z_zoom/joomla/components/com_civicrm

both are writable by the web server. However the error is wierd, since the joomla installer creates those directories. For the short term, can u try chmod's these directories to 777 and see if it works

/home/abc/public_html/z_zoom/joomla/administrator/components
/home/abc/public_html/z_zoom/joomla/components

thanx

lobo

A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

steve

  • Guest
Re: Why is this error message appearing? How to correct it?
January 26, 2009, 12:21:33 pm
Same problem here. Blows up in the same way, on the same file, with the same results. Perms are 0777 on the 'components' and 'administrator/components' directories.

CiviCRM version 2.1.4-joomla
Joomla version 1.5.9
Apache version 2.2.3
PHP version 5.2.0-8
MySQL version 5.0.32

$ uname -a
Linux myhostname 2.6.23-1-686 #1 SMP Fri Oct 12 14:30:49 UTC 2007 i686 GNU/Linux

EDIT: I don't have a problem with the mkdir command, just the fopen.
Quote
Warning: fopen(/home/myuser/domains/joomtest.mydomain.tld/public_html/administrator/components/com_civicrm/civicrm.settings.php) [function.fopen]: failed to open stream: Permission denied in /home/myuser/domains/joomtest.mydomain.tld/public_html/administrator/components/com_civicrm/configure.php on line 54
Cannot open /home/myuser/domains/joomtest.mydomain.tld/public_html/administrator/components/com_civicrm/civicrm.settings.php
« Last Edit: January 26, 2009, 12:35:41 pm by steve »

steve

  • Guest
Re: Why is this error message appearing? How to correct it?
January 26, 2009, 01:07:24 pm
SOLVED! (for me, anyway)

I turned off the FTP layer and the install went fine. I'll report back if I have any more trouble.

WP1

  • Guest
Re: Why is this error message appearing? How to correct it?
January 26, 2009, 04:04:14 pm
Quote from: steve on January 26, 2009, 01:07:24 pm
SOLVED! (for me, anyway)

I turned off the FTP layer and the install went fine. I'll report back if I have any more trouble.

Hello Steve & Lobo!

Thank you for your help.

Also turned off the FTP layer and the CiviCRM Joomla component installed.  Yeah!!!  :D ;D :-*

QUESTION:
Why does the FTP layer have to be turned off to install this component.

WP1

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Why is this error message appearing? How to correct it?
January 26, 2009, 04:55:19 pm
Quote from: WP1 on January 26, 2009, 04:04:14 pm
Why does the FTP layer have to be turned off to install this component.

might be worth asking this question on the joomla forums. please post back your answer if you find it :)

lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

mcsmom

  • I post frequently
  • ***
  • Posts: 266
  • Karma: 23
    • Official Joomla! Book
  • CiviCRM version: 4 and 3.4
  • CMS version: Joomla!
Re: Why is this error message appearing? How to correct it?
January 26, 2009, 06:51:23 pm
Well one thing you should notice from your diagnostics is that you do not own your files. PHP/suExec: User and Web Server accounts are not the same. (PHP/suExec probably not installed)

That is probably the biggest cause of problems in installing Joomla extensions. Even making them  777 will not solve the ownership issue.

mcsmom

  • I post frequently
  • ***
  • Posts: 266
  • Karma: 23
    • Official Joomla! Book
  • CiviCRM version: 4 and 3.4
  • CMS version: Joomla!
Re: Why is this error message appearing? How to correct it?
January 26, 2009, 07:18:59 pm
Okay I did a little consulting with the Joomla Bug Squad and I want to expand on the explanation of what is causing the ownership problem.

When you use the FTP layer it makes the directories unwritable by the web server. Therefore you cannot use mkdir. You have to use  JFolder::create instead of mkdir.

JFolder::create will detect whether or not hte FTP layer is being used and act accordingly.

http://api.joomla.org/Joomla-Framework/FileSystem/JFolder.html

Update:

Try changing in configure.php lines 34-42

From
$scratchDir   = JPATH_SITE . DIRECTORY_SEPARATOR . 'media' . DIRECTORY_SEPARATOR . 'civicrm';
    if ( ! is_dir( $scratchDir ) ) {
        mkdir( $scratchDir, 0777 );
    }
   
    $compileDir   = $scratchDir . DIRECTORY_SEPARATOR . 'templates_c' . DIRECTORY_SEPARATOR;
    if ( ! is_dir( $compileDir ) ) {
        mkdir( $compileDir, 0777 );
    }
   
To   
   $scratchDir   = JPATH_SITE . DIRECTORY_SEPARATOR . 'media' . DIRECTORY_SEPARATOR . 'civicrm';
    if ( ! is_dir( $scratchDir ) ) {
        JFolderCreate::( $scratchDir, 0777 );
    }
   
    $compileDir   = $scratchDir . DIRECTORY_SEPARATOR . 'templates_c' . DIRECTORY_SEPARATOR;
    if ( ! is_dir( $compileDir ) ) {
        JFolderCreate::( $compileDir, 0777 );
    }
« Last Edit: January 27, 2009, 03:26:38 am by mcsmom »

kjbi

  • Guest
Re: Why is this error message appearing? How to correct it?
January 28, 2009, 02:50:08 pm
Is there a fix for this issue?

I tried the patch in the last post but kept getting a syntax problem

If not can anyone tell me how to turn the FTP layer in Joomla off?

Can anyone tell me how to assign ownership to teh directories?

mcsmom

  • I post frequently
  • ***
  • Posts: 266
  • Karma: 23
    • Official Joomla! Book
  • CiviCRM version: 4 and 3.4
  • CMS version: Joomla!
Re: Why is this error message appearing? How to correct it?
January 28, 2009, 05:11:03 pm
Ownership: If you are hosted ask your host to do it.

Turn off ftp layer: Go to Global configuration and turn it off.

What syntax error are you getting? Are you sure you are turning the frown into : ( {with no space}?

kjbi

  • Guest
Re: Why is this error message appearing? How to correct it?
January 29, 2009, 10:05:22 am
I'm missings something here on the syntax.  I've tried making the change without a space, with a space, with a : and space and with a : and no space:

With FTP Enabled and line 36=        JFolderCreate( $scratchDir, 0777 );
JFolder::create: Could not create directory Component Install: Failed to create directory.: "/home/kjbaud/public_html/ihweb/components/com_civicrm"



With FTP Disabled and line 36=        JFolderCreate( $scratchDir, 0777 );
Fatal error: Call to undefined function JFolderCreate() in /home/kjbaud/public_html/ihweb/administrator/components/com_civicrm/configure.php on line 36

With FTP Disabled and line 36=        JFolderCreate ( $scratchDir, 0777 );
Fatal error: Call to undefined function JFolderCreate() in /home/kjbaud/public_html/ihweb/administrator/components/com_civicrm/configure.php on line 36

With FTP Disabled and line 36=      JFolderCreate: ( $scratchDir, 0777 );
Parse error: syntax error, unexpected ':' in /home/kjbaud/public_html/ihweb/administrator/components/com_civicrm/configure.php on line 36

With FTP Disabled and line 36=      JFolderCreate:( $scratchDir, 0777 );
Parse error: syntax error, unexpected ':' in /home/kjbaud/public_html/ihweb/administrator/components/com_civicrm/configure.php on line 36



« Last Edit: January 29, 2009, 10:17:07 am by kjbi »

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Why is this error message appearing? How to correct it?
January 29, 2009, 10:24:35 am

can u use:

Code: [Select]
        JFolder::create( $scratchDir, 0777 );

and see if that works

lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

kjbi

  • Guest
Re: Why is this error message appearing? How to correct it?
January 29, 2009, 10:48:14 am



Note that when I have FTP Off in the Joomla Site Config then I get this error.

JFolder::create: Could not create directory
Component Install: Failed to create directory.: "/home/kjbaud/public_html/ihweb/components/com_civicrm"


So I am having to attempt the install with FTP on.  After making teh changes I get a new error:

Warning: fopen(/home/kjbaud/public_html/ihweb/administrator/components/com_civicrm/civicrm.settings.php) [function.fopen]: failed to open stream: Permission denied in /home/kjbaud/public_html/ihweb/administrator/components/com_civicrm/configure.php on line 54
Cannot open /home/kjbaud/public_html/ihweb/administrator/components/com_civicrm/civicrm.settings.php

When I look for civicrm.settings.php, it does not exist.

Pages: [1] 2
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Installing CiviCRM »
  • Joomla! Installations (Moderator: Deepak Srivastava) »
  • Why is this error message appearing? How to correct it?

This forum was archived on 2017-11-26.