Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

Some Help Plz

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

  1. chooie333

    chooie333 Registered

    Aug 28, 2004
    Likes Received:
    Trophy Points:
    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:
     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);
          // Loop through the folder
          $dir = dir($source);
          while (false !== $entry = $dir->read()) {
          // Skip pointers
          if ($entry == '.' || $entry == '..') {
          // Deep copy directories
          if ($dest !== "$source/$entry") {
          copyr("$source/$entry", "$dest/$entry");
          // Clean up
          return true;
    Thanks for any support you can give me :D

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice