methos gallery error

Started on the old forum in May 2009 · view the original in the archive · old links redirect here

6 replies · 516 views · started 17 years ago · 1 min read

4 participants
johnny Junior · 47 posts #1

hello can anyone help me with this why i m geting this error wen i m trying to upload any pic in gallery

file not uploaded to the wanted location Error: Destination directory can't be created. Can't carry on a process

Learner lolz

riderz Lead · 975 posts #2

I just had the same error go and chmod ur file to 777 then try upload pic again and it not working go to upload.php and change the place where u upload ur pic


Jacques jacques@gw-designs.co.za http://coding.biz.tm Come join and lets make it a place to learn all the noobies how to code


NEVER FORGET TO CLICK THE TANX BUTTON IF U LIKE WHAT IM SHARING OR HELPING WITH

johnny Junior · 47 posts #3

tried both bt still nt working

<?php
include("xhtmlfunctions.php");
header("Content-type: text/html; charset=ISO-8859-1");
echo "<?xml version=\"1.0\" encoding=\"ISO-8859-1\" ?>";
echo "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">";

?>

<?php
include('class.upload.php');
include("config.php");
include("core.php");

$bcon = connectdb();

$sid = $_GET["sid"];
$uid = getuid_sid($sid);

set_time_limit(0);

if(islogged($sid)==false)
{
      $pstyle = gettheme1("1");
      echo xhtmlhead("Methos",$pstyle);
      echo "<p align=\"center\">";
      echo "You are not logged in<br/>";
      echo "Or Your session has been expired<br/><br/>";
      echo "<a href=\"index.php\">Login</a>";
      echo "</p>";
  echo xhtmlfoot();
      exit();
    }

if(isbanned($uid))
    {
      $pstyle = gettheme($sid);
      echo xhtmlhead("Methos",$pstyle);
      echo "<p align=\"center\">";
      echo "<img src=\"http://coding-talk.com/images/notok.gif\" alt=\"x\"/><br/>";
      echo "You are <b>Banned</b><br/>";
      $banto = mysql_fetch_array(mysql_query("SELECT timeto FROM ibwf_metpenaltiespl WHERE uid='".$uid."' AND penalty='1'"));
	  $banres = mysql_fetch_array(mysql_query("SELECT lastpnreas FROM ibwf_users WHERE id='".$uid."'"));
	  
      $remain = $banto[0]- (time() - $timeadjust) ;
      $rmsg = gettimemsg($remain);
      echo "Time to finish your penalty: $rmsg<br/><br/>";
	  echo "Ban Reason: $banres[0]";
      //echo "<a href=\"index.php\">Login</a>";
      echo "</p>";
  echo xhtmlfoot();
      exit();
    }

//////////////////////////////////Members List

error_reporting(E_ALL); 

// we first include the upload class, as we will need it here to deal with the uploaded file

$userinfo = mysql_fetch_array(mysql_query("SELECT name, sex FROM ibwf_users WHERE id='".$uid."'"));
$membername = $userinfo[0];

// we have three forms on the test page, so we redirect accordingly
if ($_POST['action'] == 'image') {
      $pstyle = gettheme($sid);
      echo xhtmlhead("Methos",$pstyle);
      echo "<p align=\"center\">";

    // ---------- IMAGE UPLOAD ----------

    
    // we create an instance of the class, giving as argument the PHP object 
    // corresponding to the file field from the form
    // All the uploads are accessible from the PHP object $_FILES
    $handle = new Upload($_FILES['my_field']);

    // then we check if the file has been uploaded properly
    // in its *temporary* location in the server (often, it is /tmp)
    if ($handle->uploaded) {
        
        // yes, the file is on the server
        // below are some example settings which can be used if the uploaded file is an image.
        $handle->image_resize = true;
        $handle->image_ratio_y = true;
        $handle->image_x = 150;
	$handle->image_watermark = 'images/watermark.gif';
	$handle->image_watermark_x = 5;
	$handle->image_watermark_y = 5;
	$handle->image_watermark_position = 'BR';
	$handle->image_bevel = 3;
	$handle->image_bevel_color1 = '#FFFFFF';
	$handle->image_bevel_color2 = '#000000';
	

        // now, we start the upload 'process'. That is, to copy the uploaded file
        // from its temporary location to the wanted location
        // It could be something like $handle->Process('/home/www/my_uploads/');
        $handle->Process('/methos/usergallery/');

        
        // we check if everything went OK
        if ($handle->processed) {
            // everything was fine !

            echo '  file uploaded with success<br/>';
            echo '  <img src="/methos/usergallery/' . $handle->file_dst_name . '" /><br/>';
            $info = getimagesize($handle->file_dst_pathname);
            echo '  link to the file just uploaded: <a href="/methos/usergallery/' . $handle->file_dst_name . '">' . $handle->file_dst_name . '</a><br/>';
            $imageurl = "/methos/usergallery/$handle->file_dst_name";
            $reg = mysql_query("INSERT INTO ibwf_usergallery SET uid='".$uid."', imageurl='".$imageurl."', sex='".$userinfo[1]."', time='".(time() - $timeadjust)."'");

        } else {
            // one error occured

            echo '  file not uploaded to the wanted location<br/>';
            echo '  Error: ' . $handle->error . '<br/>';

        }

        // we delete the temporary files
        $handle-> Clean();

    } else {
        // if we're here, the upload file failed for some reasons
        // i.e. the server didn't receive the file

        echo '  file not uploaded on the server<br/>';
        echo '  Error: ' . $handle->error . '';
    }
    

    echo "</p>"; 
  ////// UNTILL HERE >> 
    echo "<p align=\"center\">";
   echo "<br/><br/><a href=\"usergallery.php?action=main&sid=$sid\">«Back to Gallery</a><br/>";
    echo "<a href=\"index.php?action=main&sid=$sid\"><img src=\"http://coding-talk.com/images/home.gif\" alt=\"*\"/>";
echo "Home</a>";
  echo "</p>";

echo xhtmlfoot();
}
?>

Learner lolz

capofret Developer · 225 posts #4

check this part if you really have that folder

$handle->Process('/methos/usergallery/');

or u also check on the class.upload.php

LDSWAPWORLD site closed. im busy with other things in life like facebook , send me PM so i can add you 🙂 www.pinoySG.com

don't ask for help if you're not even helping yourself! i am tired of seeing the line "best site", i want to see something NEW and UNIQUE. maybe if i find one, ill go back to my wap life again.

External image (may be gone)

riderz Lead · 975 posts #5

hey johnny mine is as follow

  // we check if everything went OK
        if ($handle->processed) {
            // everything was fine !

            echo '  file uploaded with success<br/>';
            echo '  <img src="http://coding-talk.com/f14/usergallery/' . $handle->file_dst_name . '" /><br/>';
            $info = getimagesize($handle->file_dst_pathname);
            echo '  link to the file just uploaded: <a href="http://coding-talk.com/f14/usergallery/' . $handle->file_dst_name . '">' . $handle->file_dst_name . '</a><br/>';
            $imageurl = "../usergallery/$handle->file_dst_name";
            $reg = mysql_query("INSERT INTO ibwf_usergallery SET uid='".$uid."', imageurl='".$imageurl."', sex='".$userinfo[1]."', time='".(time() - $timeadjust)."'");

        } else

then i have a usergallery folder and it works


Jacques jacques@gw-designs.co.za http://coding.biz.tm Come join and lets make it a place to learn all the noobies how to code


NEVER FORGET TO CLICK THE TANX BUTTON IF U LIKE WHAT IM SHARING OR HELPING WITH

johnny Junior · 47 posts #7

thanks it worked 🙂

Learner lolz

Sign in to reply.

Similar topics

Keyboard shortcuts

g f
Go to forums
g h
Go to your feed
g m
Go to messages
r
Reply (in a topic)
/
Search
j
Next post
k
Previous post
?
This list
Ctrl/⌘ + Enter
Send what you are writing
Ctrl/⌘ + B / I
Bold / italic while writing
Esc
Close