Jump to content

Test basic site


ldb358

Recommended Posts

heres the upload script:

 

function upload($maxsize, $upload, $name, $desc){
if(isset($_SESSION['username'])){
$finfo = finfo_open(FILEINFO_MIME, "/usr/share/misc/magic");
$type = finfo_file($finfo, $filename);
finfo_close($finfo);
if((($type == "image/jpeg") || ($type == "image/pjpeg") || ($type == "image/gif") || ($type == "image/png")) && ($upload['size'] < "104857600") ){
            if(strlen($upload['name']) < 60){

                if($upload['error'] == 0){  
			$artistFill = $_SESSION['username'];
			$newSrc = $artistFill . "/" . $upload['name'];		
			if(!file_exists($newSrc)){
			$findArr = array('_', '(', ')', ' ');
                		$nameFill = str_replace($findArr , '' ,$upload['name']);
                		$artistFill = $_SESSION['username'];
			$sizeFill = (int)$upload['size']; 
			$thisdir = getcwd(); 
			$newdir = $thisdir ."/" . $artistFill;
			if(!file_exists($newdir)){
			mkdir($newdir);
			}				mysql_query("INSERT INTO photos (`id`, `username`, `src`, `name`, `desc`) VALUES ('null', '$artistFill', '$nameFill', '$name', '$desc');") or die(mysql_error());
			move_uploaded_file($upload['tmp_name'], $artistFill . "/" . $nameFill);
			echo "file uploaded";
			}else{
			    echo "file already exists?";
			}
		}
            }else{
                echo "filename is too long please shorten it to under 60 character";
            }
	}else{
		echo "invalid file type";
	}
}else{
home("You must be logged in order to upload an image");
}
}

and heres the exact error:

 


Fatal error: Call to undefined function finfo_open() in /home/vol4/summerhost.info/sum_2677639/lbflash.com/htdocs/functions.php on line 536

Link to comment
Share on other sites

Clicked "My Profile", and received the following warning:

 

Warning: Missing argument 1 for home(), called in /home/vol4/summerhost.info/sum_2677639/lbflash.com/htdocs/functions.php on line 202 and defined in /home/vol4/summerhost.info/sum_2677639/lbflash.com/htdocs/functions.php on line 330

 

Clicked on a user and received the following warnings:

 

Warning: Missing argument 2 for viewUser(), called in /home/vol4/summerhost.info/sum_2677639/lbflash.com/htdocs/functions.php on line 72 and defined in /home/vol4/summerhost.info/sum_2677639/lbflash.com/htdocs/functions.php on line 441

Warning: Missing argument 3 for viewUser(), called in /home/vol4/summerhost.info/sum_2677639/lbflash.com/htdocs/functions.php on line 72 and defined in /home/vol4/summerhost.info/sum_2677639/lbflash.com/htdocs/functions.php on line 441

Link to comment
Share on other sites

to mac that was proboly because i had error reporting on that is fixed

and darkfreak i have version 5.2.10 i doubt my host will upgrade what is the replacment?

 

Maq*  Yes, they are merely warnings, which should be fixed, but error_reporting should be turned off on production anyway and set to max during development.

Link to comment
Share on other sites

okay maq sorry about the name as about the errors it was on for an emergancey fix only my local server is up to date with version where as host apearaltly is not

 

and to darkfreak it gets the same error hmm... ill have to work on a work around unless my host gets to fixing

 

Link to comment
Share on other sites

  • 1 month later...
×
×
  • 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.