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 »
  • Using CiviCRM »
  • Using Core CiviCRM Functions (Moderator: Yashodha Chaku) »
  • Unable to upload images - get "Unknown error"
Pages: [1]

Author Topic: Unable to upload images - get "Unknown error"  (Read 4128 times)

Patricia43

  • I post occasionally
  • **
  • Posts: 50
  • Karma: 1
  • CiviCRM version: 4.0
  • CMS version: Drupal 7
  • MySQL version: 5.1
  • PHP version: 5.3
Unable to upload images - get "Unknown error"
September 20, 2012, 12:45:16 pm
I had some problems uploading files so I modified the paths in the extensions page to what should be the correct directories. I got no errors so I assume that I did it correctly. However, now when I attempt to upload the image after I browse and select the image I get an "Unknown error" message. I also do not see the image that is in the folder in question.

Hershel

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4640
  • Karma: 176
    • CiviHosting
  • CiviCRM version: Latest
  • CMS version: Mostly WordPress and Drupal
Re: Unable to upload images - get "Unknown error"
September 20, 2012, 01:30:40 pm
Can you confirm that you have write permissions (or Apache does) on the upload directory?
CiviHosting and CiviOnline -- The CiviCRM hosting experts, since 2007

See here for the official: What to do if you think you've found a bug.

Patricia43

  • I post occasionally
  • **
  • Posts: 50
  • Karma: 1
  • CiviCRM version: 4.0
  • CMS version: Drupal 7
  • MySQL version: 5.1
  • PHP version: 5.3
Re: Unable to upload images - get "Unknown error"
September 21, 2012, 11:19:11 am
I probably am doing something wrong but the permissions look alright.

However, when I go to the CiviCRM settings page I get this message:
 Your extensions directory is not set or is not writable. Click here to set the extensions directory.

When I click to set the page that comes up has valid settings for:
  • Temporary Files    
  • Images    
  • Custom Files
and the other entries for:
  • Custom Templates    
  • Custom PHP Path Directory    
  • CiviCRM Extensions Directory
are empty.
Is the last empty setting the one that is causing problems?

Hershel

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4640
  • Karma: 176
    • CiviHosting
  • CiviCRM version: Latest
  • CMS version: Mostly WordPress and Drupal
Re: Unable to upload images - get "Unknown error"
September 22, 2012, 12:13:49 pm
No, the last 3 can be empty (and should be generally). Your issue is the second or third one.
CiviHosting and CiviOnline -- The CiviCRM hosting experts, since 2007

See here for the official: What to do if you think you've found a bug.

Patricia43

  • I post occasionally
  • **
  • Posts: 50
  • Karma: 1
  • CiviCRM version: 4.0
  • CMS version: Drupal 7
  • MySQL version: 5.1
  • PHP version: 5.3
Re: Unable to upload images - get "Unknown error"
September 22, 2012, 01:10:58 pm
I have used the same directory for all three - could that be the cause?

I notice that when I hover over the Images icon when browsing for an image it has kcdir:/Images. It looks like a variable has not been set. I see reference to it in folders.js.
« Last Edit: September 22, 2012, 01:46:57 pm by Patricia43 »

Hershel

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4640
  • Karma: 176
    • CiviHosting
  • CiviCRM version: Latest
  • CMS version: Mostly WordPress and Drupal
Re: Unable to upload images - get "Unknown error"
September 22, 2012, 01:50:15 pm
They could be the same directory, but usually each is different. See here:

http://drupal.demo.civicrm.org/civicrm/admin/setting/path?reset=1

for a sample.
CiviHosting and CiviOnline -- The CiviCRM hosting experts, since 2007

See here for the official: What to do if you think you've found a bug.

bcobin

  • I post frequently
  • ***
  • Posts: 337
  • Karma: 9
    • InterCreative Media
  • CiviCRM version: 4.3.3
  • CMS version: Drupal 7.22
  • MySQL version: 5.5.9
  • PHP version: 5.3
Re: Unable to upload images - get "Unknown error"
October 03, 2012, 10:03:29 am
I've verified that the demo installation doesn't work - either with TinyMCE or with CK Editor. CK Editor shows an unknown error and TinyMCE displays a blank screen that hangs.

On my installation, the Drupal default editor works (cool new option!), so I can get by.

Patricia43

  • I post occasionally
  • **
  • Posts: 50
  • Karma: 1
  • CiviCRM version: 4.0
  • CMS version: Drupal 7
  • MySQL version: 5.1
  • PHP version: 5.3
Re: Unable to upload images - get "Unknown error"
November 24, 2012, 11:31:16 am
In my case, the strange thing is that I have 2 sites with the same versions of Drupal and CiviCRM and one works and the other doesn't. Like you, as long as I can upload images via Drupal I am OK but it is strange and I'd like to fix it.

Shai

  • I post frequently
  • ***
  • Posts: 202
  • Karma: 8
    • Content2zero
  • CiviCRM version: 4.3.x, 4.4.x, 4.5.x
  • CMS version: Drupal 7
  • MySQL version: 5.5.x
  • PHP version: 5.3.x, 5.4.x
Re: Unable to upload images - get "Unknown error"
November 25, 2012, 09:01:07 am
Hi,

I just moved a site to a new server and began getting this error on the new server. I did not get this error on the old server.

The PHP versions are different on the two servers.

The old server was running latest 5.2.x while the new server is running the latest 5.3.x.

My version of CiviCRM is 4.1.6.

Would upgrading to CiviCRM 4.2 solve it?

If there is a quick fix for 4.1.6, I'd prefer that.

Shai
Don't miss out! Sign up now for free expert advice on CiviCRM's new StackExchange help site.

Patricia43

  • I post occasionally
  • **
  • Posts: 50
  • Karma: 1
  • CiviCRM version: 4.0
  • CMS version: Drupal 7
  • MySQL version: 5.1
  • PHP version: 5.3
Re: Unable to upload images - get "Unknown error"
November 26, 2012, 06:37:03 am
Shai, I'm using CiviCRM 4.2.4 on both systems so I do not think that upgrading to 4.2 will help.

However, I wonder if the version of PHP is an issue. The site that is working has PHP 5.2.17 and the one that is getting the error has PHP 5.3.18.


Patricia43

  • I post occasionally
  • **
  • Posts: 50
  • Karma: 1
  • CiviCRM version: 4.0
  • CMS version: Drupal 7
  • MySQL version: 5.1
  • PHP version: 5.3
Re: Unable to upload images - get "Unknown error"
November 26, 2012, 08:17:21 am
A bit more information: (Note: I'm a hacker not a PHP expert)

I did a var_dump on $_FILES and it returns two elements in the array:

the first is "upload" and appears to have all the five elements ("name", "type", "tmp_name", "error", "size")
the second element is empty (""=>&NULL.) Could this be the problem?

This is probably the source of the error. Another thread reported that the name was missing.

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: Unable to upload images - get "Unknown error"
November 26, 2012, 06:32:46 pm

can you do the same experiment using the older version of PHP and see if u get the same values in $_FILES

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

Patricia43

  • I post occasionally
  • **
  • Posts: 50
  • Karma: 1
  • CiviCRM version: 4.0
  • CMS version: Drupal 7
  • MySQL version: 5.1
  • PHP version: 5.3
Re: Unable to upload images - get "Unknown error"
November 30, 2012, 08:28:50 am
I posted this to another thread but forgot to do so here. After making a number of changes and then restoring to the production code my uploads started to work without problem. The only thing that might have affected this is that I changed the permissions in the kcfinder/config.php

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using Core CiviCRM Functions (Moderator: Yashodha Chaku) »
  • Unable to upload images - get "Unknown error"

This forum was archived on 2017-11-26.