The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Some Help Plz

Discussion in 'General Discussion' started by chooie333, Sep 13, 2007.

  1. chooie333

    chooie333 Registered

    Joined:
    Aug 28, 2004
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    1
    I think I am posting this in the correct spot, but I am not sure....

    anyways, I have a script where a user can sign up for a site, selecting an option 1, 2, or 3

    All sites are created the same way however based on the number they choose would put a certain file into their public_html directory.

    the scritp creates the accounts fine, however when the script goes to create the file i get an error:

    I have done Exclude Protection for open_basedir from the security panel, but that has done nothing.


    Here is the copy script that is trying to run:
    Code:
     function copyr($source, $dest){
          // Simple copy for a file
          if (is_file($source)) {
          $c = copy($source, $dest);
          chmod($dest, 0777);
          return $c;
          }
           
          // Make destination directory
          if (!is_dir($dest)) {
          $oldumask = umask(0);
          mkdir($dest, 0777);
          umask($oldumask);
          }
    
          // 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;
          }
    
    Thanks for any support you can give me :D
     
Loading...

Share This Page