Gallery Help Please

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Gallery Help Please

    Hi,the following file worked up until the sites went of line last week,but i now get the following error and dont know why

    Warning: copy(misc/beutDayPurpleSexyFairyDark.gif) [function.copy]: failed to open stream: Permission denied in /home/******/public_html/addmisc.php on line 24
    Couldn't copy file.


    <?php
    include("config.inc.php");
    echo &#39;<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html"/>
    <meta http-equiv="Cache-Control" content="no-cache" forua="true"/>
    <title>add pic</title></head>
    <body bgcolor="#FFFFFF" text="#000000" link="#0000FF" vlink="#800080">
    &#39;;
    if ($upload="upload"&&$superdat_name){

    if (!eregi("\.(gif|jpg|png|jpeg|wbmp)$",$superdat_nam e)){
    print "Unsuported File extention!!!";
    }else{
    $superdat_name = preg_replace(
    &#39;/[^a-zA-Z0-9\.\$\%\&#39;\`\-\@\{\}\~\!\#\(\)\&\_\^]/&#39;
    ,&#39;&#39;,str_replace(array(&#39; &#39;,&#39;%20&#39;),array(&#39;_&#39;,&#39;_&#39; ),$superdat_name));
    if(strlen($superdat_name)>53){ print "File Name to long!!!";
    }else{
    if (empty($superdat)) {
    print "No input file specified!!!";
    }else{
    copy("$superdat", "misc/$superdat_name") or
    die("Couldn&#39;t copy file.");
    }
    echo "$superdat_name has been successfully uploaded";
    }
    }
    }
    $result=mysql_query("select * from members where username=&#39;$username&#39; and password=&#39;$password&#39;");
    $number_of_rows = mysql_num_rows($result);
    if ($number_of_rows>0)
    echo "<a href=\"welcome.php?username=$username&amp;password =$password\">Main Page</a>";
    {

    ?>
    <FORM ACTION="addmisc.php?username=$username" METHOD="POST" ENCTYPE="multipart/form-data">
    File to be sent :

    <input type="file" name="superdat">
    <input type="hidden" name="upload" value="upload"/>

    <INPUT TYPE=SUBMIT NAME="submit" VALUE="Upload File">


    <?}?>
    </FORM>
    </body>
    </html>

    #2
    Hi,the following file worked up until the sites went of line last week,but i now get the following error and dont know why

    Warning: copy(misc/beutDayPurpleSexyFairyDark.gif) [function.copy]: failed to open stream: Permission denied in /home/******/public_html/addmisc.php on line 24
    Couldn&#39;t copy file.
    <?php
    include("config.inc.php");
    echo &#39;<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html"/>
    <meta http-equiv="Cache-Control" content="no-cache" forua="true"/>
    <title>add pic</title></head>
    <body bgcolor="#FFFFFF" text="#000000" link="#0000FF" vlink="#800080">
    &#39;;
    if ($upload="upload"&&$superdat_name){

    if (!eregi("\.(gif|jpg|png|jpeg|wbmp)$",$superdat_nam e)){
    print "Unsuported File extention!!!";
    }else{
    $superdat_name = preg_replace(
    &#39;/[^a-zA-Z0-9\.\$\%\&#39;\`\-\@\{\}\~\!\#\(\)\&\_\^]/&#39;
    ,&#39;&#39;,str_replace(array(&#39; &#39;,&#39;%20&#39;),array(&#39;_&#39;,&#39;_&#39; ),$superdat_name));
    if(strlen($superdat_name)>53){ print "File Name to long!!!";
    }else{
    if (empty($superdat)) {
    print "No input file specified!!!";
    }else{
    copy("$superdat", "misc/$superdat_name") or
    die("Couldn&#39;t copy file.");
    }
    echo "$superdat_name has been successfully uploaded";
    }
    }
    }
    $result=mysql_query("select * from members where username=&#39;$username&#39; and password=&#39;$password&#39;");
    $number_of_rows = mysql_num_rows($result);
    if ($number_of_rows>0)
    echo "<a href=\"welcome.php?username=$username&amp;password =$password\">Main Page</a>";
    {

    ?>
    <FORM ACTION="addmisc.php?username=$username" METHOD="POST" ENCTYPE="multipart/form-data">
    File to be sent :

    <input type="file" name="superdat">
    <input type="hidden" name="upload" value="upload"/>

    <INPUT TYPE=SUBMIT NAME="submit" VALUE="Upload File">


    <?}?>
    </FORM>
    </body>
    </html>[/b]

    have u lost ya misc folder in the downtime.
    Wapchat4u


    Topsites4u

    Comment


      #3
      have u lost ya misc folder in the downtime.[/b]
      No the folders are still there, it happens in all cats, everything was working ok till site went of line for a few days, hits counter is no longer working either worked hard on the site as well ,took me ages to get the gallery working in the first place

      Comment

      Working...
      X