All permissions are set as described on the KU IT website. Folders (public_html and cgi-bin) are at 711 and store.php is at 644. Still nothing...Thanks, though. Jeremy
On Apr 24, 2:05 pm, poof65 <[email protected]> wrote: > maybe a problem with rights on store.php file ? try with 644 > > On Fri, Apr 24, 2009 at 7:20 PM, jmtrombley <[email protected]> wrote: > > > Hey everyone, I was hoping someone could help me out on this. I'm > > trying to set up a tiddlywiki for my student group website (http:// > > groups.ku.edu/~uaa) with uploadplugin and store.php. > > I just got the KU IT folks to enable suexec for my server. I used > > their instructions and ran their test (https://www2.ku.edu/ > > ~webservices/reference/suexec/using.shtml), and everything works fine > > (http://groups.ku.edu/~uaa/cgi-bin/test.shtml). However, when I > > follow the same directions for store.php, I get the Internal Server > > Error (500) (http://groups.ku.edu/~uaa/cgi-bin/store.php). If I try > > putting store.php in the same folder as my tiddlywiki file, I just get > > the code for the store.php (http://groups.ku.edu/~uaa/store.php). > > Is there something wrong with the code I'm using (below) or is this a > > flaw with my server? > > Thanks, > > Jeremy > > > <?php\ > > /***\ > > ! User settings\ > > Edit these lines according to your need\ > > ***/\ > > //\{\{\{\ > > $AUTHENTICATE_USER = true; // true | false\ > > $USERS = array(\ > > 'Test1'=>'test1', \ > > 'UserName2'=>'Password2', \ > > 'UserName3'=>'Password3') // set usernames and strong passwords\ > > $DEBUG = false; // true | false\ > > $CLEAN_BACKUP = true; // during backuping a file, remove overmuch > > backups\ > > $FOLD_JS = true; // if javascript files have been > > expanded during > > download the fold them\ > > error_reporting(E_ERROR | E_WARNING | E_PARSE);\ > > //\}\}\}\ > > /***\ > > !Code\ > > No change needed under\ > > ***/\ > > //\{\{\{\ > > \ > > /***\ > > * store.php - upload a file in this directory\ > > * version :1.6.1 - 2007/08/01 - [email protected]\ > > * \ > > * see : \ > > * http://tiddlywiki.bidi.info/#UploadPluginfor usage\ > > * http://www.php.net/manual/en/features.file-upload.php\ > > * for details on uploading files\ > > * usage : \ > > * POST \ > > * UploadPlugin > > [backupDir=<backupdir>;user=<user>;password=<password>;uploadir=<uploaddir>; > > [debug=1];;]\ > > * userfile <file>\ > > * GET\ > > *\ > > * each external javascript file included by download.php is change by > > a reference (src=...)\ > > *\ > > * Revision history\ > > * V1.6.1 - 2007/08/01\ > > * Enhancement: Add javascript folding\ > > * V1.6.0 - 2007/05/17\ > > * Enhancement: Add backup management\ > > * V1.5.2 - 2007/02/13\ > > * Enhancement: Add optional debug option in client parameters\ > > * V1.5.1 - 2007/02/01\ > > * Enhancement: Check value of file_uploads in php.ini. Thanks to > > Didier Corbi\'e8re\ > > * V1.5.0 - 2007/01/15\ > > * Correct: a bug in moving uploadFile in uploadDir thanks to DaniGuti > > \'e9rrez for reporting\ > > * Refactoring\ > > * V 1.4.3 - 2006/10/17 \ > > * Test if $filename.lock exists for GroupAuthoring compatibility\ > > * return mtime, destfile and backupfile after the message line\ > > * V 1.4.2 - 2006/10/12\ > > * add error_reporting(E_PARSE);\ > > * v 1.4.1 - 2006/03/15\ > > * add chmo 0664 on the uploadedFile\ > > * v 1.4 - 2006/02/23\ > > * add uploaddir option : a path for the uploaded file relative to > > the current directory\ > > * backupdir is a relative path\ > > * make recusively directories if necessary for backupDir and uploadDir > > \ > > * v 1.3 - 2006/02/17\ > > * presence and value of user are checked with $USERS Array (thanks to > > PauloSoares)\ > > * v 1.2 - 2006/02/12 \ > > * POST \ > > * UploadPlugin > > [backupDir=<backupdir>;user=<user>;password=<password>;]\ > > * userfile <file>\ > > * if $AUTHENTICATE_USER\ > > * presence and value of user and password are checked with \ > > * $USER and $PASSWORD\ > > * v 1.1 - 2005/12/23 \ > > * POST UploadPlugin[backupDir=<backupdir>] userfile <file>\ > > * v 1.0 - 2005/12/12 \ > > * POST userfile <file>\ > > *\ > > * Copyright (c) [email protected] 2005-2007\ > > ***/\ > > //\}\}\}\ > > \ > > //\{\{\{\ > > \ > > if ($_SERVER['REQUEST_METHOD'] == 'GET') \{\ > > /*\ > > * GET Request\ > > */\ > > ?>\ > > <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">\ > > <html>\ > > <head>\ > > <meta http-equiv="Content-Type" > > content="text/html;charset=utf-8" >\ > > <title>BidiX.info - TiddlyWiki UploadPlugin - Store > > script</title>\ > > </head>\ > > <body>\ > > <p>\ > > <p>store.php V 1.6.1\ > > <p>[email protected]\ > > <p> </p>\ > > <p> </p>\ > > <p> </p>\ > > <p align="center">This page is designed to upload a <a > > href="http:// > >www.tiddlywiki.com/">TiddlyWiki<a>.</p>\ > > <p align="center">for details see : <a href="http:// > > TiddlyWiki.bidix.info/#HowToUpload">TiddlyWiki.bidix.info/ > > #HowToUpload<a>.</p> \ > > </body>\ > > </html>\ > > <?php\ > > exit;\ > > \}\ > > \ > > /*\ > > * POST Request\ > > */\ > > \ > > // Recursive mkdir\ > > function mkdirs($dir) \{\ > > if( is_null($dir) || $dir === "" )\{\ > > return false;\ > > \}\ > > if( is_dir($dir) || $dir === "/" )\{\ > > return true;\ > > \}\ > > if( mkdirs(dirname($dir)) )\{\ > > return mkdir($dir);\ > > \}\ > > return false;\ > > \}\ > > \ > > function toExit() \{\ > > global $DEBUG, $filename, $backupFilename, $options;\ > > if ($DEBUG) \{\ > > echo ("\\nHere is some debugging info : \\n");\ > > echo("\\$filename : $filename \\n");\ > > echo("\\$backupFilename : $backupFilename \\n");\ > > print ("\\$_FILES : \\n");\ > > print_r($_FILES);\ > > print ("\\$options : \\n");\ > > print_r($options);\ > > \}\ > > exit;\ > > \}\ > > \ > > function ParseTWFileDate($s) \{\ > > // parse date element\ > > preg_match ( > > '/^(\\d\\d\\d\\d)(\\d\\d)(\\d\\d)\\.(\\d\\d)(\\d\\d)(\\d\ > > \d)/', $s , $m );\ > > // make a date object\ > > $d = mktime($m[4], $m[5], $m[6], $m[2], $m[3], $m[1]);\ > > // get the week number\ > > $w = date("W",$d);\ > > \ > > return array(\ > > 'year' => $m[1], \ > > 'mon' => $m[2], \ > > 'mday' => $m[3], \ > > 'hours' => $m[4], \ > > 'minutes' => $m[5], \ > > 'seconds' => $m[6], \ > > 'week' => $w);\ > > \}\ > > \ > > function cleanFiles($dirname, $prefix) \{\ > > $now = getdate();\ > > $now['week'] = date("W");\ > > \ > > $hours = Array();\ > > $mday = Array();\ > > $year = Array();\ > > \ > > $toDelete = Array();\ > > \ > > // need files recent first\ > > $files = Array();\ > > ($dir = opendir($dirname)) || die ("can't open dir '$dirname'");\ > > while (false !== ($file = readdir($dir))) \{\ > > if (preg_match("/^$prefix/", $file))\ > > array_push($files, $file);\ > > \}\ > > $files = array_reverse($files);\ > > \ > > // decides for each file\ > > foreach ($files as $file) \{\ > > $fileTime = ParseTWFileDate(substr($file,strpos($file, > > '.')+1,strrpos > > ($file,'.') - strpos($file, '.') -1));\ > > if (($now['year'] == $fileTime['year']) &&\ > > ($now['mon'] == $fileTime['mon']) &&\ > > ($now['mday'] == $fileTime['mday']) &&\ > > ($now['hours'] == $fileTime['hours']))\ > > continue;\ > > elseif (($now['year'] == $fileTime['year']) &&\ > > ($now['mon'] == $fileTime['mon']) &&\ > > ($now['mday'] == $fileTime['mday'])) \{\ > > if (isset($hours[$fileTime['hours']]))\ > > array_push($toDelete, $file);\ > > else \ > > $hours[$fileTime['hours']] = true;\ > > \}\ > > elseif (($now['year'] == $fileTime['year']) &&\ > > ($now['mon'] == $fileTime['mon'])) \{\ > > if (isset($mday[$fileTime['mday']]))\ > > array_push($toDelete, $file);\ > > else\ > > $mday[$fileTime['mday']] = true;\ > > \}\ > > else \{\ > > if > > (isset($year[$fileTime['year']][$fileTime['mon']]))\ > > array_push($toDelete, $file);\ > > else\ > > $year[$fileTime['year']][$fileTime['mon']] = > > true;\ > > \}\ > > \}\ > > return $toDelete;\ > > \}\ > > \ > > function replaceJSContentIn($content) \{\ > > if (preg_match > > ("/(.*?)<!--DOWNLOAD-INSERT-FILE:\\"(.*?)\\"--><script\ > > ... > > read more » --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "TiddlyWiki" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/TiddlyWiki?hl=en -~----------~----~----~----~------~----~------~--~---

