Jump to content

Warning: mkdir() [function.mkdir]: Permission denied in


skoobi

Recommended Posts

Hi im getting these errors when im trying to convert my rsgallery to joomgallery...

 

SELECT id, parent, name, description, published, checked_out, checked_out_time, ordering, date, hits, params, user, uid, allowed, thumb_id FROM jos_rsgallery2_galleries ORDER BY id 1
INSERT INTO jos_joomgallery_catg (cid, name, parent, description, ordering, access, published, owner, catimage, img_position, catpath) VALUES (1, 'Test', 0, '', 1,  0 , 1, 62, '', 0 , '1'); 
ERROR: INSERT INTO jos_joomgallery_catg (cid, name, parent, description, ordering, access, published, owner, catimage, img_position, catpath) VALUES (1, 'Test', 0, '', 1,  0 , 1, 62, '', 0 , '1'); 
SELECT id, name, descr, gallery_id, title, hits, date, rating, votes, comments, published, checked_out, checked_out_time, ordering, approved, userid, params FROM jos_rsgallery2_files ORDER BY id1
INSERT INTO jos_joomgallery (id, catid, imgtitle, imgauthor, imgtext, imgdate, imgcounter, imgvotes, imgvotesum, published, imgfilename, imgthumbname, 
checked_out, owner, approved, useruploaded, ordering) VALUES ( 1, 1, 'Test', NULL , '', '1259415705', 0, 0, 0, 1, '5334_124549840239_626390239_3379060_8030341_n.jpg', '5334_124549840239_626390239_3379060_8030341_n.jpg', 0, 62, 1, 1, 1); 
ERROR: INSERT INTO jos_joomgallery (id, catid, imgtitle, imgauthor, imgtext, imgdate, imgcounter, imgvotes, imgvotesum, published, imgfilename, imgthumbname, 
checked_out, owner, approved, useruploaded, ordering) VALUES ( 1, 1, 'Test', NULL , '', '1259415705', 0, 0, 0, 1, '5334_124549840239_626390239_3379060_8030341_n.jpg', '5334_124549840239_626390239_3379060_8030341_n.jpg', 0, 62, 1, 1, 1); 
/home/skoobi/public_html/projects/images/rsgallery/display/5334_124549840239_626390239_3379060_8030341_n.jpg -> /home/skoobi/public_html/projects/components/com_joomgallery/img_pictures/1/5334_124549840239_626390239_3379060_8030341_n.jpg

/home/skoobi/public_html/projects/images/rsgallery/display/5334_124549840239_626390239_3379060_8030341_n.jpg -> /home/skoobi/public_html/projects/components/com_joomgallery/img_pictures/1/5334_124549840239_626390239_3379060_8030341_n.jpg



Warning:  copy(/home/skoobi/public_html/projects/images/rsgallery/display/5334_124549840239_626390239_3379060_8030341_n.jpg) [function.copy]: failed to open stream: No such file or directory in /home/skoobi/public_html/projects/blue/convert.php on line 109

/home/skoobi/public_html/projects/images/rsgallery/thumb/5334_124549840239_626390239_3379060_8030341_n.jpg -> /home/skoobi/public_html/projects/components/com_joomgallery/img_thumbnails/1/5334_124549840239_626390239_3379060_8030341_n.jpg

/home/skoobi/public_html/projects/images/rsgallery/thumb/5334_124549840239_626390239_3379060_8030341_n.jpg -> /home/skoobi/public_html/projects/components/com_joomgallery/img_thumbnails/1/5334_124549840239_626390239_3379060_8030341_n.jpg



Warning:  copy(/home/skoobi/public_html/projects/images/rsgallery/thumb/5334_124549840239_626390239_3379060_8030341_n.jpg) [function.copy]: failed to open stream: No such file or directory in /home/skoobi/public_html/projects/blue/convert.php on line 109


 

Ive set the permissions to 777 and this is still the case the code for the script im running is:

 

<pre>
<?php
$db_addr                ="localhost";
$db_username            ="user";
$db_password            ="pass";
$db_name                ="dbname";

$rsg_folder  = "/home/user/public_html/projects/images/rsgallery/";
$joom_folder = "/home/user/public_html/projects/components/com_joomgallery/";


$mysql = @mysql_connect($db_addr, $db_username, $db_password) or die("Location: $db_error");
@mysql_select_db($db_name, $mysql) or die("Location: $db_virhesivu");

$sql = "SELECT id, parent, name, description, published, checked_out, checked_out_time, ordering, date, hits, params, user, uid, allowed, thumb_id FROM jos_rsgallery2_galleries ORDER BY id ";
echo $sql;

$mysql_result = @mysql_query($sql);
$mysql_result_number = @mysql_numrows($mysql_result); 

if ($mysql_result_number != 0) {
  echo $mysql_result_number . "\n";

  while ($row = @mysql_fetch_array($mysql_result)) {

    $sql  = "INSERT INTO jos_joomgallery_catg (cid, name, parent, description, ordering, access, published, owner, catimage, img_position, catpath) VALUES (" ;
    $sql .= $row['id'] . ", '";
    $sql .= $row['name'] . "', ";
    $sql .= $row['parent'] . ", '";
    $sql .= $row['description'] . "', ";
    $sql .= $row['ordering'] . ", ";
    $sql .= " 0 , "; // access
    $sql .= $row['published'] . ", ";
    $sql .= $row['uid'] . ", ";
    $sql .= "'', "; // catimage
    $sql .= "0 , '"; // img pos
    $sql .= $row['id'] . "'); "; // catpath

    echo $sql . "\n";

    $mysql_result2 = @mysql_query($sql);
    if ($mysql_result2 == false) {
      echo "ERROR: " . $sql . "\n";
    }

  }
}

$sql = "SELECT id, name, descr, gallery_id, title, hits, date, rating, votes, comments, published, checked_out, checked_out_time, ordering, approved, userid, params FROM jos_rsgallery2_files ORDER BY id";
echo $sql;

$mysql_result = @mysql_query($sql);
$mysql_result_number = @mysql_numrows($mysql_result); 

if ($mysql_result_number != 0) {
  echo $mysql_result_number . "\n";

  while ($row = @mysql_fetch_array($mysql_result)) {

    $sql  = "INSERT INTO jos_joomgallery (id, catid, imgtitle, imgauthor, imgtext, imgdate, imgcounter, imgvotes, imgvotesum, published, imgfilename, imgthumbname, 
checked_out, owner, approved, useruploaded, ordering) VALUES ( ";
    $sql .= $row['id'] . ", ";
    $sql .= $row['gallery_id'] . ", '";
    $sql .= $row['title'] . "', ";
    $sql .= "NULL , '"; //imgauthor
    $sql .= $row['descr'] . "', '";
    $sql .= strtotime($row['date']) . "', ";
    $sql .= $row['hits'] . ", ";
    $sql .= $row['votes'] . ", ";
    $sql .= "0, ";
    $sql .= $row['published'] . ", '";
    $sql .= strtolower($row['name']) . "', '";
    $sql .= strtolower($row['name']) . "', ";
    $sql .= $row['checked_out'] . ", ";
    $sql .= $row['userid'] . ", ";
    $sql .= "1, "; //approved
    $sql .= "1, "; //useruploaded
    $sql .= $row['ordering'] . "); ";

    echo $sql . "\n";

    $mysql_result2 = @mysql_query($sql);
    if ($mysql_result2 == false) {
      echo "ERROR: " . $sql . "\n";
    }

    $srcThumb = $rsg_folder . "thumb/" . $row['name'] ;
    $srcImg = $rsg_folder . "display/" . $row['name'];

    $dstThumb = strtolower($joom_folder . "img_thumbnails/" . $row['gallery_id'] . "/" . $row['name']);
    $dstImg = strtolower($joom_folder . "img_pictures/" . $row['gallery_id'] . "/" . $row['name']);

    copyFile($srcImg, $dstImg);
    copyFile($srcThumb, $dstThumb);
  }
}

function copyFile($src, $dst) {

  echo $src . " -> " . $dst . "\n\n";
  echo $src . " -> " . $dst . "\n\n";
  
  // echo dirname($dst) . "\n";
  if (! is_dir(dirname($dst) ) ) {
    mkdir(dirname($dst), 0777,true);
// echo " created \n";
  }

  copy($src, $dst);
}

?>
</pre>

 

 

Im out of ideas i cant see what else to do the permissions are all 777 which is the main reason as far as i can find for this error... Any help would be greatful...

 

Thanks

Chris

the users configured for ownership in the server of those files and directories you create, as when you create a file or directory the server assigns ownership to a user of that server, the default owner being assigned to the files might not have permission there.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.