Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Check-in problem for large files

I'm trying to Check-in new revision to some documents. At the check-in page, when i submit the new file, opendocman simply redirects to <!-- m --><a class="postlink" href="http://mysite.mysite/opendocman/check-in.php">http://mysite.mysite/opendocman/check-in.php</a><!-- m --> and shows a blank page. Somehow, this happens only for large pdf files( ~ 30Mbs), and not for smaller text files. Any ideas? Should I mess around with some PHP or Apache settings?

Amitoj Cheema
I have the same problem since yesterday, but it does not affect large files to be checked-in only, but any files, I'm getting following error, any time I try to check-in a document (changing owners and rights of files didn't work for me at all):

Warning: mkdir() [function.mkdir]: SAFE MODE Restriction in effect. The script whose uid is 0 is not allowed to access /var/www/document_repository/revisionDir owned by uid 33 in /var/www/opendocman/check-in.php on line 200

Warning: Cannot modify header information - headers already sent by (output started at /var/www/opendocman/check-in.php:200) in /var/www/opendocman/check-in.php on line 203

I've tried to locate the problem-code myself, but I didn't find anything I could edit to solve this problem...

// query to ensure that user has modify rights
    $fileobj = new FileData($_POST['id'], $GLOBALS['connection'], $GLOBALS['database']);
    if($fileobj->getError() == '' and $fileobj->getStatus() == $_SESSION['uid'])
        //look to see how many revision are there
        $query = "SELECT * FROM {$GLOBALS['CONFIG']['db_prefix']}log WHERE id = $_POST[id]";
        $result = mysql_query($query, $GLOBALS['connection']) or die ("Error in query: $query. " . mysql_error());
        $lrevision_num = mysql_num_rows($result);
        // if dir not available, create it
        if( !is_dir($GLOBALS['CONFIG']['revisionDir']) )
                        if (!mkdir($GLOBALS['CONFIG']['revisionDir'], 0775))
                                $last_message='Directory Creation for ' . $GLOBALS['CONFIG']['revisionDir'] . ' Failed';
                                header('Location:error.php?ec=23&last_message=' . urlencode($last_message));
        if( !is_dir($GLOBALS['CONFIG']['revisionDir'] . $_POST['id']) )
                        if (!mkdir($GLOBALS['CONFIG']['revisionDir'] . $_POST['id'], 0775)
                                $last_message='Directory Creation for ' . $GLOBALS['CONFIG']['revisionDir'] .  $_POST['id'] . ' Failed';
                                header('Location:error.php?ec=23&last_message=' . urlencode($last_message));

        $lfilename = $GLOBALS['CONFIG']['dataDir'] . $_POST['id'] .'.dat';
        //read and close...

@Stephen Is this a PHP-SAFE-MODE - Restriction problem? Is there any way to fix it (changing owners and rights of files in any way didn't help) without turning the SAFE-MODE off? Until now I've managed to solve any problem without having to turn the SAFE-MODE off, so I just hope for some other solution... Thx!
I don't think odm will work in safe mode.

Forum Jump:

Users browsing this thread: 1 Guest(s)