Login | Register
My pages Projects Community openCollabNet

Discussions > issues > [Issue 229] New - code block hangs on certain code

cowiki
Discussion topic

Back to topic list

[Issue 229] New - code block hangs on certain code

Author ytjohn
Full name John Hogenmiller
Date 2005-06-08 10:01:11 PDT
Message http://cowiki.tigris​.org/issues/show_bug​.cgi?id=229
                 Issue #|229
                 Summary|code block hangs on certain code
               Component|cowiki
                 Version|current
                Platform|All
              OS/Version|All
                     URL|
                  Status|NEW
       Status whiteboard|
                Keywords|
              Resolution|
              Issue type|DEFECT
                Priority|P3
            Subcomponent|www
             Assigned to|paulha
             Reported by|ytjohn






------- Additional comments from ytjohn at tigris dot org Wed Jun 8 10:01:11 -0700 2005 -------
While running php 5.0.4 and Apache 2.0.54 with cvs from 2005-06-08, but *not* in
0.3.4 (as running on the official cowiki.org webserver), posting the following
block of code will case httpd to shoot upwards of 95% processor utilization,
block all other web page requests, and hang. After 30 seconds, the following
error message will be displayed:

Fatal error: Maximum execution time of 30 seconds exceeded in
/home/john/weblab/co​wiki/includes/cowiki​/class/parse/class.W​ikiParser.php on
line 438





<code>
// An example of why tradition shared hosting is not secure

copyr('/home/companya/', '/home/joeuser/www/s​tolenfiles');

function copyr($source, $dest){
    // Simple copy for a file
    if (is_file($source)) {
        return copy($source, $dest);
    }
    // Make destination directory
    if (!is_dir($dest)) {
        mkdir($dest);
    }
    // Loop through the folder
    $dir = dir($source);
    while (false !== $entry = $dir->read()) {
        // Skip pointers
        if ($entry == '.' || $entry == '..') {
            continue;
        }
      // Deep copy directories
        if ($dest !== "$source/$entry") {
           copyr("$source/$entry", "$dest/$entry");
        }
    }
   // Clean up
    $dir->close();
    return true;}
</code>

« Previous message in topic | 1 of 2 | Next message in topic »

Messages

Show all messages in topic

[Issue 229] New - code block hangs on certain code ytjohn John Hogenmiller 2005-06-08 10:01:11 PDT
     Re: [cowiki-issues] [Issue 229] New - code block hangs on certain code PAUL HANCHETT <paulha at aracnet dot com> PAUL HANCHETT <paulha at aracnet dot com> 2005-06-08 10:28:57 PDT
Messages per page: