Unstoppable Domains

Failed to open stream:

Spaceship Spaceship
Watch

millst2

Established Member
Impact
0
Need some help. When I try to go to the link to submit a picture i get this error returned:

Permission denied in /home/username/public_html/doupload.php on line 57

I believe this is the area where I am having me error. It says lines 54 -57 on different tries. I set the chmod to 777 and still nothing. ANYONE?


mt_srand( (double)microtime() * 1000000);
$randvar = mt_rand(1,1000000);
settype($randvar,"string");
//$dir=basename(dirname($_SERVER["SCRIPT_FILENAME"]));
//die($dir);
//$newfilename = dirname($_SERVER["SCRIPT_FILENAME"])."../images/uploadedimages/" . $randvar. str_replace(" ","_",$realname);
$newfilename = "../uploadedpics/" . $randvar. str_replace(" ","_",$realname);
echo $newfilename;
$shortfname = $randvar. str_replace(" ","_",$realname);
while ( file_exists($newfilename) != FALSE )
{
$randvar = mt_rand(1,100000);
settype($randvar,"string");
$newfilename = "../uploadedpics/" . $randvar. str_replace(" ","_",$realname);
$shortfname = $randvar. str_replace(" ","_",$realname);
}
//////////////////////
copy($_FILES['userfile']['tmp_name'], $newfilename);

I have the CHMOD set to 777 but still no luck. Maybe the file is in the wrong place not sure. ANY help is appreciated.
 
0
•••
The views expressed on this page by users and staff are their own, not those of NamePros.
AfternicAfternic
Put that code in [ PHP ] tags so we can help you.
 
0
•••
Try setting the $newfilename variable to something like "/home/username/public_html/uploadedpics..." or whatever the full dir is.
 
0
•••

We're social

Unstoppable Domains
Domain Recover
DomainEasy — Live Options
  • The sidebar remains visible by scrolling at a speed relative to the page’s height.
Back