Forums | Mahara Community

Support /
corrupt uploads


paul gillary's profile picture
Posts: 18

22 June 2013, 4:42 AM

Firstly thanks for helping with my previous issues. I'm getting them resolved one by one.

I'm have an issue with all uploads using the Files functionality. Images as well as documents are not uploading properly. The file names appear in my list of files but when I click the link to view I get this message:

The image “http://www.website.com/mahara2/artefact/file/download.php?file=229” cannot be displayed because it contains errors

Any thoughts would be greatly appreciated. I'm using V 1.71. The maharadata folder has 777 permissions.

Thanks

Paul

 

 

Aaron Wells's profile picture
Posts: 896

24 June 2013, 11:59 PM

Probably what's happening is that the download.php script is printing a warning or error message, which is screwing up the browser's ability to understand the file itself (basically it's mixing the ASCII warning message into the file's binary).

If you have your site set up to print error/warning messages to the screen, try turning that off and see if it resolves the problem.

If so, then you should also try to resolve the error/warning message. Check out your PHP error logs, or access the URL using a command-line program like curl, to read the actual error message.

Good luck!

paul gillary's profile picture
Posts: 18

26 June 2013, 1:20 AM

I can't determine whether my site is set up for displaying error messages on screen. Is this a maraha setting or hosting configuration?

 

 

Kristina Hoeppner's profile picture
Posts: 3418

26 June 2013, 8:15 AM

Hello Paul,

Whether error messages are printed to the screen or not is determined in the config.php file in the Mahara folder. Look for:

$cfg->log_dbg_targets     = LOG_TARGET_SCREEN | LOG_TARGET_ERRORLOG;
$cfg->log_info_targets    = LOG_TARGET_SCREEN | LOG_TARGET_ERRORLOG;
$cfg->log_warn_targets    = LOG_TARGET_SCREEN | LOG_TARGET_ERRORLOG;
$cfg->log_environ_targets = LOG_TARGET_SCREEN | LOG_TARGET_ERRORLOG;

and then take out "LOG_TARGET_SCREEN |".

Cheers

Kristina

Aaron Wells's profile picture
Posts: 896

26 June 2013, 11:07 AM

Also, if you're using Mahara 1.7 or later, make sure you have:

   $cfg->productionmode = true;

Cheers,
Aaron

5 results