Avatar billede crapmaster Nybegynder
20. juni 2003 - 14:17 Der er 27 kommentarer og
1 løsning

Picturegallery driller

Hej alle....

Jeg sider med et galleri hvor man kan uploade billeder i, Mit pro er nu at den kommer med en fejl hele tiden.

Fejl:
Warning: Unable to create '/var/www/hotels/1go/nokia3510i/html/albums/albums/userpics/bob_hund.jpg': No such file or directory in /var/www/hotels/1go/nokia3510i/html/functions.php on line 623

<<Min kode i functions.php>>

<?
/*************************************************
* PHPhotoalbum v0.4
* by: Henning Støverud
* e-mail: henning@stoverud.com
* URL: http://www.stoverud.com/PHPhotoalbum/
*************************************************/

require("config.inc.php");


// Function for writing a pageheader
function pageheader($section)
{
global $config;
echo "<html>\n";
echo "<head>\n";
echo "    <title>PHPhotoalbum - $section</title>\n";
echo "    <link rel=\"stylesheet\" href=\"style.css\">\n";
?>
<script language="JavaScript" type="text/javascript">
<!--

function go(){
  if (document.jumpto.pids.options[document.jumpto.pids.selectedIndex].value != "none") {
    location = document.jumpto.pids.options[document.jumpto.pids.selectedIndex].value;
  }
}

function confirmAlbum(stuffid)
{
    var is_confirmed = confirm("Are you sure you want to DELETE this album? (id: " + stuffid + ") \n\nWARNING: All the pictures and comments in this album will \nalso be deleted!");
    if (is_confirmed) {
        // Do nothing...
    }
    return is_confirmed;
}

function confirmPicture(stuffid)
{
    var is_confirmed = confirm("Are you sure you want to DELETE this picture? (id: " + stuffid + ") \nComments will also be deleted.");
    if (is_confirmed) {
        // Do nothing...
    }
    return is_confirmed;
}

function confirmComment(stuffid)
{
    var is_confirmed = confirm("Are you sure you want to DELETE this comment? (id: " + stuffid + ")");
    if (is_confirmed) {
        // Do nothing...
    }

    return is_confirmed;
}
//-->
</script>
<?php
echo "</head>\n";
echo "<body>\n";
}


// Function for writing a pagefooter
function pagefooter($width)
{
global $config;
$width2 = $width-2;
echo "
<table width=\"$width\" align=\"center\">
  <td bgcolor=\"#000000\" width=\"$width\">
  <table bgcolor=\"#f9f9f9\" width=\"$width2\">
      <tr>
        <td>
        <div class=\"footer\" align=\"right\">
        <a href=\"http://www.stoverud.com/PHPhotoalbum/\">PHPhotoalbum</a> v$config[ver] by ";
        writeEmail(); // Write e-mail address
echo "    </div>
        </td>
      </tr>
  </table>
</td>
</table>
</body></html>";
}


// Writes cryptic e-mail address
function writeEmail()
{
?>
<script type="text/javascript">
<!--
    var first = 'ma';
    var second = 'il';
    var third = 'to:';
    var address = '&#104;&#101;&#110;&#110;&#105;&#110;&#103;';
    var domain = '&#115;&#116;&#111;&#118;&#101;&#114;&#117;&#100;&#46;&#99;&#111;&#109;';
    document.write('<a href="');
    document.write(first+second+third);
    document.write(address);
    document.write('&#64;');
    document.write(domain);
    document.write('" title="">');
    document.write('Henning St&oslash;verud<\/a>');
// -->
</script>   
<?
}


// Function for DB connection
function db_connect()
{
  global $config;
  $result = @mysql_pconnect($config['dbserver'], $config['dbuser'], $config['dbpass']);
  if (!$result)
      return false;
  if (!mysql_select_db($config['dbname']))
      return false;
  return $result;
}

// Function for convert DB-result to array
function db_result_to_array($result)
{
  $res_array = array();

  for ($count=0; $row = @mysql_fetch_array($result); $count++)
    $res_array[$count] = $row;

  return $res_array;
}


// Prints thumbnails of all pictures in an album
function thumbnails($album, $thumbcols)
{
    global $config, $logged_in;
    if(!isset($album))
    {
    echo "You have to choose an album.<br><br>\n";
    echo "<b>- <a href=\"index.php\">List of albums</a></b>";
    exit;
    }
  $conn = db_connect();
  $result = mysql_query("SELECT * from $config[TABLE_PICTURES] WHERE aid='$album'");
  $count = mysql_num_rows($result);
    echo "<div style=\"thumbnails\" align=\"right\"><h3>Album $album<hr></h3></div>\n";
    echo "<tr>\n";
  $i = 1; // Col counter starts at 1.

  // Displays thumbs if the query returns a result.
  if($count > 0){
  while($row = mysql_fetch_array($result))
      {
        $comments = get_comments($row["pid"]);
        $ant_cmts = count($comments);
        $imagesize = getImageSize("$config[fullpath]"."$row[filepath]thumb_$row[filename]");
        echo "<td valign=\"top\" class=\"thumbnails\" align=\"center\">";
        echo "<a href=\"displayimage.php?pid=".$row["pid"]."\" class=\"thumbnails\">";
        echo "<img src=\"$config[albumdir]".$row["filepath"]."thumb_".$row["filename"]."\" $imagesize[3] border=\"1\"></a>";
        if($ant_cmts > 0)
            echo "<br><div class=\"ant_cmts\">$ant_cmts comment(s)</div>";
        if($logged_in)
            show_picturemenu_small($row["pid"]);
        echo "</td>\n";
        if($i==$thumbcols) // Checks with config.inc.php how many cols are set..
            {
            echo "</tr>\n";
            echo "<tr>\n";
            $i = 1;
            }
        else
            {
            $i++;
            }
          }
      }
      else {
        echo "<td valign=\"top\" class=\"thumbnails\">";
        echo "<b>Album $album does not contain any images.<br>\n";
        echo "<li><a href=\"admin.php?album=$album\">Add images</a><br>\n";
        echo "<li><a href=\"index.php\">Back to album index</a><br>\n";

        echo "</td>\n";
      }
}


// Prints the total number of pictures in the database
function countpics()
{
  global $config;
  $connection = db_connect();
  $result = mysql_query("SELECT * from $config[TABLE_PICTURES]");
  $count = MYSQL_NUMROWS($result);
    echo $count;
  mysql_close($connection);
}


// Prints the total number of pictures in a certain album.
// You have to specify an album. (aid).
function countalbumpics($album)
{
  global $config;
  $connection = db_connect();
  $result = mysql_query("SELECT * from $config[TABLE_PICTURES] where aid=$album");
  $count = mysql_num_rows($result);
  echo $count;
}


// Prints the total number of comments in the database
function countcomments()
{
  global $config;
  $connection = db_connect();
  $result = mysql_query("SELECT * from $config[TABLE_COMMENTS]");
  $count = mysql_num_rows($result);
  echo $count;

}


// Prints the total number of comments for a certain picture
function countpiccomments($pid)
{
  global $config;
  $connection = db_connect();
  $result = mysql_query("SELECT * from $config[TABLE_COMMENTS] where pid=$pid");
  $count = mysql_num_rows($result);
  echo $count;
}


// Prints the total number of picviews
function countpicviews()
{
  global $config;
  $connection = db_connect();
  $result = mysql_query("SELECT sum(hits) from $config[TABLE_PICTURES]");
  $count = mysql_result($result, 0);
  echo $count;
}


// Displays comments for each picture
function showcomments($pid)
{
  global $config;
  global $PHP_SELF, $logged_in;
  $connection = db_connect();
  $result = mysql_query("SELECT * from $config[TABLE_COMMENTS] where pid=$pid ORDER by msg_date asc");

  echo "<table width=\"100%\" cellspacing=0>";
  while($row = mysql_fetch_array($result))
  {
  echo "<tr><td bgcolor=\"$config[color_comment_heading]\"><b>".$row["msg_subject"]."</b>"." <font size=\"-2\" color=\"#5F5F5F\">[". $row["msg_date"]."]</font></td>";
  echo "<td bgcolor=\"$config[color_comment_heading]\" align=\"right\">";
  if($logged_in)
      show_commentsmenu($row['msg_id']);
  echo "</td";
  echo "</tr>\n";
  echo "<tr><td colspan=\"2\" bgcolor=\"$config[color_comment_body]\">".$row["msg_body"]."</td></tr>\n";
  echo "<tr><td colspan=\"2\"><img src=\"$webdir/images/spacer.gif\" width=\"1\" height=\"4\"></td></tr>\n";
  }
  echo "</table>";
  // REMOVES ADD_COMMENT link from addcomment form.
  if ($PHP_SELF != "$config[webdir]"."addcomment.php"){
    echo "<b><a href=\"addcomment.php?pid=$pid#comment\">Add comment</a></b>";   
  }
}

// Displays comments for each picture
function get_comments($pid)
{
  global $config;
  global $PHP_SELF;
  $connection = db_connect();
  $result = mysql_query("SELECT * from $config[TABLE_COMMENTS] where pid=$pid ORDER by msg_date asc");

  while($row = mysql_fetch_array($result))
  {
    $comment[$i++] = $row[0];
  }
  return $comment;
}

// This is the most complex function
// Displays a picture with navigation and picture-info
function showpicture($pid)
{
  addhit($pid); // Hit counter
  global $config;
  global $hits, $maxpid, $album, $row, $current_pic;
  $connection = db_connect();
  $result = mysql_query("SELECT * from $config[TABLE_PICTURES] where pid='$pid'");
  $row = mysql_fetch_array($result);
  $navresult = mysql_query("SELECT pid from $config[TABLE_PICTURES] where aid='$row[aid]'");
  $maxpid = mysql_num_rows($navresult);

// Makes an array with all valid pids.
// First key is 1 not 0...
$nav_array = array();
$i=1;
while($query_data = mysql_fetch_array($navresult))
    {
      $nav_array[$i] = $query_data[pid];
      $i++;
    }

// Prints all values in $nav_array
while($array_cell = each($nav_array))
{
  if($array_cell['value'] == $pid)
    {
    $current_pic = $array_cell['key'];
    }
}

  echo "<div class=\"navmenu_pic\" align=\"center\">\n";
  echo "<a href=\"$config[albumdir]$row[filepath]$row[filename]\" border=\"0\">";
  if(file_exists("$config[fullpath]$row[filepath]"."normal_"."$row[filename]")) {
    $picturename = "$config[albumdir]$row[filepath]"."normal_"."$row[filename]";
      $imagesize = getImageSize("$config[fullpath]$row[filepath]"."normal_$row[filename]");
  }
  else {
    $picturename = "$config[albumdir]$row[filepath]$row[filename]";
    $imagesize = getImageSize("$config[fullpath]$row[filepath]$row[filename]");
    }

  echo "<img src=\"$picturename\" $imagesize[3] border=\"1\"></a><br>\n"; 

  echo "<img src=\"$webdir"."images/spacer.gif\" width=\"1\" height=\"2\"><br>";
//  echo "<a href=\"$PHP_SELF?pid=$prev\" class=\"navmenu_pic\">&lt;&lt;prev</a> |pic ";
  echo "pic ";
  listallpids();
//  echo " / $maxpid | <a href=\"displayimage?pid=$next_pid\" class=\"navmenu_pic\">next&gt;&gt;</a><br>\n";
  echo " of $maxpid";
  echo "<br>\n";
  echo "<a href=\"thumbnails.php?album=$row[aid]\" class=\"navmenu\">&lt;&lt; back to thumbnails</a><br>\n";
  echo "</div>\n";
 
  // Pictureinfo
  echo "<div class=\"pictureinfo\">\n";
  echo "<hr>";
  echo "Picture ID: $row[pid]<br>\n";
  echo "Album: $row[aid]<br>\n";
  echo "filename: $row[filename]<br>\n";
  echo "Dimentions: $row[pwidth] x $row[pheight]<br>\n";
  echo "Displayed: $hits times\n";
  echo "<hr>\n";
  echo "</div>\n";
}




//Prints the top-navigation menu
function navmenu($width)
{
global $logged_in, $config;
$width2 = $width-2;
  echo" <table width=\"$width\" align=\"center\">
  <td bgcolor=\"#000000\" width=\"$width\">
  <table bgcolor=\"$config[color_nav]\" width=\"$width2\">
      <tr>
        <td>";
  echo "<div class=\"navmenu\">";
  echo "<a href=\"index.php\" class=\"navmenu\"> &lt&lt ALBUMS</a> | <a href=\"admin.php\" class=\"navmenu\">ADMIN</a> | <a href=\"statistics.php\" class=\"navmenu\">STATISTICS</a> | <a href=\"upload.php\" class=\"navmenu\">UPLOAD PICTURE</a> | ";
 
    if($logged_in)
      echo "<a href=\"logout.php\" class=\"navmenu\">LOGOUT</a>";
    else
      echo "<a href=\"login.php\" class=\"navmenu\">LOGIN</a>"; 
 
  echo "<br>\n";
  echo "</div>";
  echo "</td>
      </tr>
  </table>
  </td>
</table>";
}


// Adds 1 everytime a picture is viewed.
function addhit($pid)
{
  global $hits;
  global $config;
  $connection = db_connect();
  $result = mysql_query("SELECT hits from $config[TABLE_PICTURES] where pid='$pid'");
  $query_data = mysql_fetch_row($result);
  $hits = $query_data[0];
  $hits++;
  $insert = mysql_query("UPDATE $config[TABLE_PICTURES] SET hits='$hits' WHERE pid='$pid'");
}


// Top x list
function toplist($length, $textlength)
{
  global $config;
  $connection = db_connect();
  $result = mysql_query("SELECT pid, filename, hits from $config[TABLE_PICTURES] order by hits desc limit $length");
  $i=1;
    while($query_data = mysql_fetch_row($result))
    {
      $pid = $query_data[0];
      $filename = $query_data[1];
      $hits = $query_data[2];
        echo "$i. <a href=\"displayimage.php?pid=$pid\">". substr($filename, 0,$textlength) ."</a> ($hits hits)";
        echo "<br>";
    $i++;
    }
}

// Shows last comments
function lastcomments($length)
{
global $config;
$connection = db_connect();
$result = mysql_query("SELECT pid, msg_subject, msg_date, msg_body from $config[TABLE_COMMENTS] order by msg_date desc limit $length");
if(mysql_num_rows($result) <= 0){
  echo "none..<br>";
  return false;
}
$i=1;
  while($query_data = mysql_fetch_row($result))
  {
    $pid = $query_data[0];
    $filename = $query_data[1];
    if($query_data[1] != "")
      $filename = $query_data[1];
    else
      $filename = $query_data[3];
    $hits = $query_data[2];
        echo "<a href=\"displayimage.php?pid=$pid\">". substr($filename, 0,25) ."</a> ";
        echo "<br>";
    $i++;
  }
}

// Shows last uploads
function lastuploads($length)
{
global $config;
$connection = db_connect();
$result = mysql_query("SELECT pid, filename FROM $config[TABLE_PICTURES] ORDER BY pid DESC LIMIT $length");
if(mysql_num_rows($result) <= 0) {
  echo "none..";
  return false;
}
$i=1;
  while($query_data = mysql_fetch_row($result))
  {
    $pid = $query_data[0];
    $filename = $query_data[1];
      echo "<a href=\"displayimage.php?pid=$pid\">". substr($filename, 0,25) ."</a> ";
      echo "<br>";
    $i++;
  }
}


// It's listing all the pids and picturenumber and puts them in a select-box
function listallpids()
{
  global $maxpid, $color_nav, $color_main, $row, $current_pic;
  global $config;
  $connection = db_connect();
  $result2 = mysql_query("SELECT pid from $config[TABLE_PICTURES] where aid=$row[aid]");
  $count = mysql_num_rows($result2);
  $i=1;
  echo "<select name=\"pids\" onchange=\"go()\" STYLE=\"FONT-FAMILY:VERDANA, GENEVA, ARIAL, HELVETICA; FONT-SIZE:9px; BORDER-STYLE : groove;\">\n";
  while($row2 = mysql_fetch_array($result2))
  {
    if($i == $current_pic)
    {
    echo "<option value=\"displayimage?pid=".$row2["pid"]."\" selected>$i</option>\n";
    }
    else
    {
      echo "<option value=\"?show=$webdir/displayimage&pid=".$row2["pid"]."\">$i</option>\n";
    }
    $i++;
  }
  echo "</select>\n";
}


// List all albums
function albums()
{
  global $config, $logged_in;
  $connection = db_connect();
  if(!$connection) {
      echo "Could not connect to the database. Check your config.inc.php";
    exit;
  }
     
  $result = mysql_query("SELECT * from $config[TABLE_ALBUMS] order by aid asc");
  if(!$result){
      echo "Could not find any data. Make sure you've created a database and tables from album.sql";
    exit;
  }
 
  $nrOfAlbums = mysql_num_rows($result);
  if($nrOfAlbums <= 0){
      echo "No albums avaliable.<br>";
    echo "<a href=\"admin.php\">Click here</a> to create one.";
  }
  while($row = mysql_fetch_array($result))
  {
    $result2 = mysql_query("SELECT * from $config[TABLE_PICTURES] where aid=$row[aid]");
    $picture = mysql_fetch_array($result2);
    echo "<tr><td valign=\"top\" class=\"thumbnails\">";
    echo "<a href=\"thumbnails.php?album=".$row["aid"]."\" class=\"albums\">Album ";
    echo $row["aid"];
    echo "<br>";
      // Count the number of pictures for the actual album
      $count = mysql_num_rows($result2);
  // Inserts a small thumbnail if the album contains 1 or more images
  if($count > 0){
    echo "<img src=\"$config[albumdir]$picture[2]"."thumb_$picture[3]\" width=\"54\" height=\"30\" border=\"1\"></a>";
    }else {
    echo "<img src=\"images/nopics.gif\" width=\"54\" height=\"30\" border=\"1\"></a>";
    }
    echo "</td><td valign=\"bottom\" class=\"thumbnails_info\">";
    echo "<b>AID</b>:"." ".$row["aid"];
    echo "<br>\n";   
    echo "<b>Pics</b>: ";
    echo $count;
    echo "<br>\n";
    echo "<b>Desc</b>:"." ". $row["description"];
    if($logged_in)
      show_albummenu($row['aid']);
    echo "</td></tr>\n";
  }
}


// Lists all albums in a dropdown-menu.
function listallalbums($album)
{
  global $config;
  $connection = db_connect();
  $result2 = mysql_query("SELECT * FROM $config[TABLE_ALBUMS] ORDER BY aid ASC");
  echo "<select name=\"album\" STYLE=\"WIDTH: 120; FONT-FAMILY:VERDANA, GENEVA, ARIAL, HELVETICA; FONT-SIZE:9px; BORDER-STYLE : groove;\">\n";
  while($row2 = mysql_fetch_array($result2))
    {
    if($row2['aid'] == $album)
      $selected = "SELECTED";
    else
      $selected = "";
      echo "<option value=\"".$row2["aid"]."\" $selected>".$row2["aid"]." - ".$row2["description"]."</option>\n";
    $i++;
    }
  echo "</select>\n";
}

// Function for imageresizeing. Used to make thumbnails
function album_resizeImage($src_file, $dest_file, $newWidth, $method)
{
// find the image size
$imginfo = @getimagesize($src_file);
if ($imginfo == NULL)
  return false;

// height/width
$srcWidth = $imginfo[0];
$srcHeight = $imginfo[1];

$ratioWidth = $srcWidth/$newWidth;
$ratioHeight = 0;
$destWidth = $newWidth;
$destHeight = $srcHeight / $ratioWidth;

// Choose method for thumb creation
switch($method)
{
  case "im" :
  {
    // Resize the picture
    exec("convert -quality 100 -antialias -sample \"".$destWidth."x".(int)$destHeight."\" \"$src_file\" \"$dest_file\"");
    break;
  }
  case "php" :
  {
    $src_img = imagecreatefromjpeg($src_file);
    $dst_img = imagecreate($destWidth,$destHeight);
    imagecopyresized($dst_img, $src_img, 0, 0, 0, 0, $destWidth,(int)$destHeight, $srcWidth, $srcHeight);
    imagejpeg($dst_img, $dest_file, 100); // Quality = 100
    imagedestroy($src_img);
    imagedestroy($dst_img); 
    break;
  }
  default:
  {
    // Resize the picture
    exec("convert -quality 100 -antialias -sample \"".$destWidth."x".(int)$destHeight."\" \"$src_file\" \"$dest_file\"");
    break;
  }
} // End switch


return $dest_file;
}


function album_upload_picture($file, $filename)
{
global $config;
//include("config.inc.php");
$filepath = "$config[fullpath]"."userpics/"; // Change upload path in config.inc.php
$destinationname = $filepath.$filename;
if ($file != "none")
{
  if(move_uploaded_file($file, $destinationname))
  {
    chmod($destinationname, 0644);
      return $filename;
  }
  else
      return false;
  }
else
    return false;
}



// Lists all albums in a dropdown-menu.
function getAlbumsUploadable()
{
  global $config;
  $connection = db_connect();
  $result = mysql_query("SELECT * FROM $config[TABLE_ALBUMS] WHERE uploads='YES' ORDER BY description ASC");
  $albums = array();
  return db_result_to_array($result);
}



function show_picturemenu($id)
{
echo "<div class=\"admin_menu\">[ <a href=\"delete_picture.php?id=$id\"  class=\"adm_menu\" onclick=\"return confirmPicture($id)\"\">DELETE</a> ]</div>";
}

function show_picturemenu_small($id)
{
echo "<div class=\"admin_menu_thumb\">[ <a href=\"delete_picture.php?id=$id\"  class=\"adm_menu\" onclick=\"return confirmPicture($id)\"\">DELETE</a> ]</div>";
}

function show_commentsmenu($id)
{
echo "<div class=\"admin_menu_thumb\" align=\"center\">[ <a href=\"delete_comment.php?id=$id\"  class=\"adm_menu\" onclick=\"return confirmComment($id)\"\">DELETE</a> ]</div>";
}

function show_albummenu($id)
{
echo "<div class=\"admin_menu\">[ <a href=\"delete_album.php?id=$id\"  class=\"adm_menu\" onclick=\"return confirmAlbum($id)\"\">DELETE</a> ]</div>";
}

// Checks if the filetype is allowed.
function okfiletype($filename)
{
  global $config;
 
  for($i = 0; $i < count($config['filetypes']); $i++)
  {
    if(strtolower($config['filetypes'][$i]) == strtolower(substr($filename, -3))  || strtolower($config['filetypes'][$i]) == strtolower(substr($filename, -4)))
      return true;
   
  }
 
  return false;
}

// Rename file if filename is the same
function rename_file($filename, $nr)
{
  $pos = strrpos($filename, ".");
  $name = substr($filename, 0, $pos);
  $ext = substr($filename, $pos, strlen($filename)-$pos);
  if(ereg("[0-9]", substr($name, -1) ))
    $string = substr($name, 0, strlen($name)-1) . "$nr" . "$ext";
  else
      $string = "$name" . "_$nr" . "$ext";
  return $string;
}

?>

Håber der er en der kan hjælpe mig
Avatar billede crapmaster Nybegynder
20. juni 2003 - 14:19 #1
UPS et lille link til siden....

http://nokia3510i.1go.dk/
Avatar billede ahv Nybegynder
20. juni 2003 - 14:20 #2
Har du husket ->
//include("config.inc.php"); <- Der skal // vel væk så den bliver includeret også står der i scriptet ->
// Change upload path in config.inc.php <- Har du husket det?
Avatar billede ahv Nybegynder
20. juni 2003 - 14:24 #3
Den med den include, det bliver den i toppen kan jeg se.
Men du har husket at ændre navnet på mappen den skal uplaode til og muligvis have chmod det til 777?
Avatar billede crapmaster Nybegynder
20. juni 2003 - 14:26 #4
Ja jeg har, Det er derfor jeg ikke kan forstå det
Avatar billede ahv Nybegynder
20. juni 2003 - 14:36 #5
I config.inc.php står der som standart ->
$config['albumdir'] = "/PHPhotoalbum/albums/"; // Full web path to album dir on webserver
$config['fullpath'] = "/home/username/www/$config[albumdir]"; // Full Unix (windows?) path to albumdir

Prøv at rette den til ->
$config['albumdir'] = "/PHPhotoalbum/albums/"; // Full web path to album dir on webserver
$config['fullpath'] = $_SERVER["DOCUMENT_ROOT"] ."$config[albumdir]"; // Full Unix (windows?) path to albumdir

I functions.php står der ->
$filepath = "$config[fullpath]"."userpics/"; // Change upload path in config.inc.php

Umiddelbart ligner det de sætter en ekstra mappe userpics på her, men det er cu vel klar over?
Avatar billede ahv Nybegynder
20. juni 2003 - 14:36 #6
Jo kan se den lægger der som standart, men prøv lige det første ->

I config.inc.php står der som standart ->
$config['albumdir'] = "/PHPhotoalbum/albums/"; // Full web path to album dir on webserver
$config['fullpath'] = "/home/username/www/$config[albumdir]"; // Full Unix (windows?) path to albumdir

Prøv at rette den til ->
$config['albumdir'] = "/PHPhotoalbum/albums/"; // Full web path to album dir on webserver
$config['fullpath'] = $_SERVER["DOCUMENT_ROOT"] ."$config[albumdir]"; // Full Unix (windows?) path to albumdir
Avatar billede crapmaster Nybegynder
20. juni 2003 - 14:45 #7
Jeg får samme fejl
Avatar billede ahv Nybegynder
20. juni 2003 - 14:46 #8
Prøv at CHMOD albums og userpics til 777.
Avatar billede crapmaster Nybegynder
20. juni 2003 - 14:46 #9
Det er gjort....
Avatar billede crapmaster Nybegynder
20. juni 2003 - 14:48 #10
Ville det hjælpe dig vis jeg lage en ( phpinfo.php ) fil ind.

Vis ja, kender du så koden det den
Avatar billede ahv Nybegynder
20. juni 2003 - 14:48 #11
Aaah, fejlen er vidst fundet, nu er det bare hvor den er i koden ;o)
Unable to create '/var/www/hotels/1go//PHPhotoalbum/albums/userpics/1.jpg'
Læg mærke til der er dobbelt // der må være en / et eller andet sted som ikke skal være der.
Avatar billede ahv Nybegynder
20. juni 2003 - 14:48 #12
Prøv at rette den til ->
$config['albumdir'] = "PHPhotoalbum/albums/"; // Full web path to album dir on webserver
$config['fullpath'] = $_SERVER["DOCUMENT_ROOT"] ."$config[albumdir]"; // Full Unix (windows?) path to albumdir
Avatar billede crapmaster Nybegynder
20. juni 2003 - 14:51 #13
Det er det samme.....
Avatar billede ahv Nybegynder
20. juni 2003 - 14:52 #14
Så vidt jeg kan se har du ingen ->
PHPhotoalbum mappe?
Avatar billede crapmaster Nybegynder
20. juni 2003 - 14:54 #15
Jo der er da,
Avatar billede ahv Nybegynder
20. juni 2003 - 14:57 #16
Jep, kom bare til at tilføje et s til sidst, prøv at lave en phpinfo fil så ->

<?php
echo phpinfo();
?>
Avatar billede crapmaster Nybegynder
20. juni 2003 - 14:57 #17
jeg har lagt en phpinfo.php til dig.

http://nokia3510i.1go.dk/phpinfo.php
Avatar billede crapmaster Nybegynder
20. juni 2003 - 14:57 #18
Sådan
Avatar billede crapmaster Nybegynder
20. juni 2003 - 14:58 #19
Vil du oxo ftp add
Avatar billede ahv Nybegynder
20. juni 2003 - 15:17 #20
Ok, kan vi spole båmdet tilbage? ->

Ret ->
$config['albumdir'] = "/PHPhotoalbum/albums/"; // Full web path to album dir on webserver
$config['fullpath'] = $_SERVER["DOCUMENT_ROOT"] ."$config[albumdir]"; // Full Unix (windows?) path to albumdir

Til ->

$config['albumdir'] = "/PHPhotoalbum/albums/"; // Full web path to album dir on webserver
$config['fullpath'] = "/home/username/www/$config[albumdir]"; // Full Unix (windows?) path to albumdir

Hvor du ændre ->
/home/username/www/$config[albumdir]
Til den fulde sti som du havde i starten, hvad siger den så?

Tror nemlig at fejlen helt fra starten lå i at du havde skrevet forkert ved mappenavnet oven over, men prøv lige igen nu.
Avatar billede crapmaster Nybegynder
20. juni 2003 - 15:22 #21
Den kommer med en fejl:

Fejl:
Parse error: parse error in /var/www/hotels/1go/nokia3510i/html/config.inc.php on line 14

<<Min nye kode i config.inc.php>>

<?
/*************************************************
* PHPhotoalbum v0.4
* by: Henning Støverud
* e-mail: henning@stoverud.com
* URL: http://www.stoverud.com/PHPhotoalbum/
*************************************************/



// PICTURE AND THUMBNAIL SETTINGS
$config['albumdir'] = "/albums/"; // Full web path to album dir on webserver
$config['fullpath'] = "/home/username/www/$config[albumdir]"; // Full Unix (windows?)
path to albumdir
$config['filetypes'] = array("jpg", "jpeg", "gif", "png", "bmp"); // Allowed filetypes


$config['thumb_method'] = "im";    // Use ImageMagick for thumbnail creation (Best quality)
//$config['thumb_method'] = "php";  // Uncomment this if you want to use the built-in functions
                                    // for thumbnail creation. Required GD

                       
$config['thumbrows'] = "3";            // Number of rows on thumbnailpage (NOT YET IMPLEMENTED)
$config['thumbcols'] = "4";            // Number of cols on thumbnailpage
$config['thumb_width'] = "90";
$config['picture_width'] = "400";
$config['ver'] = "0.4";                // PH-Photoalbum version

$config['number_in_toplist'] = "100"; // Number of entries to show on the statistics page


// Admin login
$config['admin_username'] = "admin"; // Username for adminpages
$config['admin_password'] = "admin"; // Change this password!!!


// DATABASE SETTINGS
$config['dbserver'] = "localhost";    // Your databaseserver
$config['dbuser'] = "free14552";        // Your mysql username
$config['dbpass'] = "2712723125";        // Your mysql password
$config['dbname'] = "free14552";  // Your mysql databasename


$config['TABLE_PICTURES'] = "album_pictures";    // Tablename for pictures
$config['TABLE_ALBUMS'] = "album_albums";        // Tablename for albums
$config['TABLE_COMMENTS'] = "album_comments";    // Tablename for comments


// COLOR SETTINGS
$config['color_main'] = "#FFe7c6";
$config['color_nav'] = "#a2cafb";
$config['color_form'] = "#a2cafb";
$config['color_form_heading'] = "#cbcbcb";
$config['color_comment_heading'] = "#fed9c2";
$config['color_comment_body'] = "#fff5e1";

?>
Avatar billede ahv Nybegynder
20. juni 2003 - 15:25 #22
$config['albumdir'] = "/PHPhotoalbum/albums/"; // Full web path to album dir on webserver
$config['fullpath'] = "/home/username/www/$config[albumdir]"; // Full Unix (windows?)
path to albumdir
Avatar billede ahv Nybegynder
20. juni 2003 - 15:26 #23
Husk at rette ->
/home/username/www/
Til som i starten.
Avatar billede crapmaster Nybegynder
20. juni 2003 - 15:27 #24
Det er det samme som før.... :-(
Avatar billede ahv Nybegynder
20. juni 2003 - 15:27 #25
$config['albumdir'] = "/PHPhotoalbum/albums/"; // Full web path to album dir on webserver
$config['fullpath'] = "/var/www/hotels/1go/nokia3510i/html/$config[albumdir]"; // Full Unix (windows?)
path to albumdir

?
Avatar billede crapmaster Nybegynder
20. juni 2003 - 15:28 #26
Husk at rette ->
/home/username/www/
Til som i starten.


Hvad skal jeg rette det til ????
Avatar billede ahv Nybegynder
20. juni 2003 - 15:31 #27
crapmaster, har du ICQ eller MSN ? ->

ICQ: 82550004
MSN: alexander_hv@hotmail.com

Det ser ud til det vil være lidt lettere.
Avatar billede crapmaster Nybegynder
20. juni 2003 - 17:12 #28
Lukker
Avatar billede Ny bruger Nybegynder

Din løsning...

Tilladte BB-code-tags: [b]fed[/b] [i]kursiv[/i] [u]understreget[/u] Web- og emailadresser omdannes automatisk til links. Der sættes "nofollow" på alle links.

Loading billede Opret Preview
Kategori
Vi tilbyder markedets bedste kurser inden for webudvikling

Log ind eller opret profil

Hov!

For at kunne deltage på Computerworld Eksperten skal du være logget ind.

Det er heldigvis nemt at oprette en bruger: Det tager to minutter og du kan vælge at bruge enten e-mail, Facebook eller Google som login.

Du kan også logge ind via nedenstående tjenester