Forums | Mahara Community

Support /
Export Portfolio Not Working


anonymous profile picture
Account deleted
Posts: 3

17 March 2010, 8:22

I have successfully installed and integrated Mahara and Moodle on my hosted linux server. Everything works fine except the My Portfolio > Export link. Whenever I click on Export I see the following message “Your system does not have the zip command. Please install zip to enable this feature”.

Here is what I know (I think):

  • Apache is the web server
  • I recently upgraded (successfull) to Mahara version 1.2.3 (2009111010)
  • The html and leap plugin export extensions are enabled
  • I've confirmed the path of '/usr/bin/zip'
  • My $cfg->dataroot path is correct
  • The "uploaddir" is outside the root and is writeable

Is there a config setting I am missing somewhere on the admin side?
Is there another plugin / extension that I need to install?

I would appreciate any help / support / direction you can offer to help me resolve this problem.

Thanks so much in advance!

 D_

 


anonymous profile picture
Account deleted
Posts: 228

17 March 2010, 9:48

Hi Darin,

That test is done with php's is_executable function. It may be that the user that your webserver is running as doesn't have the ability to execute /usr/bin/zip. Can you check the permissions on /usr/bin/zip?

anonymous profile picture
Account deleted
Posts: 3

17 March 2010, 15:00

Thanks for your reply.  I know enough to be dangerous.Tongue out

 Can you tell me how would I check the permissions on /usr/bin/zip?

Another thought...Is there a way in the config or lib / config settings to change the location of "pathtozip" so that the function can work elsewhere? Is it tryig to write to the temp folder in the uploaddir?

D_

 

anonymous profile picture
Account deleted
Posts: 228

19 March 2010, 7:49

Well that depends - how did you verify the path was correct in the first place?  If you have a shell account you could try ls -l /usr/bin/zip -  do you know how to read unix permissions? You're looking for an x in the last column.

anonymous profile picture
Account deleted
Posts: 3

22 March 2010, 8:54

Perhaps this workaround will help others on a hosted linux server like mine...

I am able to export both formats of portfolios by commenting out the code in mahara/export/index.php file around line 45  like this:

/*
if (!is_executable(get_config('pathtozip'))) {

    log_info("Either you do not have the 'zip' command installed, or the config setting 'pathtozip' is not pointing at your zip command."
        . " Until you fix this, you will not be able to use the export system.");
    die_info(get_string('zipnotinstalled', 'export'));
}
*/

 D_

anonymous profile picture
Account deleted
Posts: 4

22 March 2010, 22:42

i have the same problem with you.
After comment the code, i can access the export page, but still cannot download the zip file.
(the process bar was stopped)

anonymous profile picture
Account deleted
Posts: 228

23 March 2010, 9:39

Hi,

It sounds as though you actually don't have the zip binary installed.  Mahara needs this to zip up the exported data.  Can you possibly contact your hosting provider and ask them to install it?

anonymous profile picture
Account deleted
Posts: 4

23 March 2010, 11:03

Hi Penny,

The server is builded up by myself. Windows XP with WAMPServer.
Is it install the zip into mahara folder somewhere?
i have no idea

anonymous profile picture
Account deleted
Posts: 228

23 March 2010, 12:19

Oh I'm sorry I don't know anything about Windows.  Maybe someone else on the forums will be able to help you.

Good luck.

Iñaki Arenaza's profile picture
Posts: 253

30 March 2010, 14:07

You can install the zip/unzip executables (beware, not Winzip, but the real zip/unzip for Win32) in any place you want. I'd place them in a directory without white space in it's name, e.g. C:\bin\zip.exe and C:\bin\unzip.exe.

Then in  your config.php file add the following two lines (note the use of forward slashes instead of backward slashes):

$cfg->pathtounzip = 'C:/bin/unzip.exe';
$cfg->pathtozip   = 'C:/bin/zip.exe';

That should do it.

Saludos,
Iñaki.

18 results