about zipping in 1.4

about zipping in 1.4

by vivin v -
Number of replies: 1

helloo,

i have one system running in moodle 1.4.when we are trying to make a zip of any folder in the system,and when trying to unzip it,its giving the error as "path_creation_failed" in status column.

If anybody had faced this problem before,please help me to fix it.

any help would be higly appreciated. 

Average of ratings: -
In reply to vivin v

Re: about zipping in 1.4

by Timothy Takemoto -

You have a vintage moodle!

I don't think that it is either of these problems but
1) The path to the zip/unzip and pathtodu, in your Admin >> variables, assuming  you are using zip/unzip routines. You could aslo try removing any path that you have entered, temporarily. 
2) That your dataroot folder has permissions, full write permissions if it is above the the web accessible folder. 
 
In lib/pcizip/pcizip.lib.php there is

    // ----- Check the directory availability and create it if necessary
    else {
      if ((($p_entry['external']&0x00000010)==0x00000010) || (substr($p_entry['filename'], -1) == '/'))
        $v_dir_to_check = $p_entry['filename'];
      else if (!strstr($p_entry['filename'], "/"))
        $v_dir_to_check = "";
      else
        $v_dir_to_check = dirname($p_entry['filename']);

      if (($v_result = $this->privDirCheck($v_dir_to_check, (($p_entry['external']&0x00000010)==0x00000010))) != 1) {
        //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "Unable to create path for '".$p_entry['filename']."'");

        // ----- Change the file status
        $p_entry['status'] = "path_creation_fail";

        // ----- Return
        ////--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result);
        //return $v_result;
        $v_result = 1;
      }
    }

But I am not sure why that would fail.  You could try using an external zip routine if you are not using one already.

On the open internet there is this problem with creating foldernames containing special characters on a Windows machine, and an almost definately unrelated NetBSD Kernel error.