Smart Image Processor PHP 2 Support Product Page
Image Upload Limit Bug
Reported 09 Aug 2010 23:08:04
1
has this problem
09 Aug 2010 23:08:04 Celeste Pretzel posted:
size limit isn't working.I set it to 100000Kb and it won't allow me to upload any more than 500Kb-ish.
php info is showing 8Mb limit.
Please help. My deadline has arrived and I can not ask the client to pre-edit photos. that is why i purchased this product.
<-- Removed by Admin -->
<?php require_once('../ScriptLibrary/incPureUpload.php'); ?> <?php require_once('../ScriptLibrary/cGraphicMediator.php'); ?> <?php require_once('../Connections/wassenaar_db.php'); ?> <?php // Pure PHP Upload 2.1.10 $ppu = new pureFileUpload(); $ppu->path = "../imgs/gall_lg"; $ppu->extensions = "GIF,JPG,JPEG,BMP,PNG"; $ppu->formName = "uploadImage"; $ppu->storeType = "file"; $ppu->sizeLimit = "100000"; $ppu->nameConflict = "uniq"; $ppu->requireUpload = "true"; $ppu->minWidth = ""; $ppu->minHeight = ""; $ppu->maxWidth = ""; $ppu->maxHeight = ""; $ppu->saveWidth = ""; $ppu->saveHeight = ""; $ppu->timeout = "600"; $ppu->progressBar = ""; $ppu->progressWidth = ""; $ppu->progressHeight = ""; $ppu->redirectURL = "galleries_view.php?gallery_id=".$_GET['gallery_id']; $ppu->checkVersion("2.1.10"); $ppu->doUpload(); ?> <?php // Smart Image Processor PHP 2.0.7 if (isset($_GET['GP_upload'])) { $sipp2 = new cGraphicMediator("upload", $ppu, "file_name"); $sipp2->setComponent("Auto"); $sipp2->setMatteColor("#FFFFFF"); $sipp2->resize(600, 600, true); $sipp2->overwrite = true; $sipp2->saveJPEG(100); $sipp2->process(); } ?> <?php // Smart Image Processor PHP 2.0.7 if (isset($_GET['GP_upload'])) { $sipp1 = new cGraphicMediator("upload", $ppu, ""); $sipp1->setComponent("Auto"); $sipp1->setMatteColor("#FFFFFF"); $sipp1->resize(150, 150, true); $sipp1->cropPos("Center-Center", 99, 99); $sipp1->overwrite = false; $sipp1->setMask("##path##sm_##name##.jpg"); $sipp1->saveJPEG(100); $sipp1->process(); } ?> <?php if (!function_exists("GetSQLValueString")) { function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "") { if (PHP_VERSION < 6) { $theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue; } $theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue); switch ($theType) { case "text": $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL"; break; case "long": case "int": $theValue = ($theValue != "") ? intval($theValue) : "NULL"; break; case "double": $theValue = ($theValue != "") ? doubleval($theValue) : "NULL"; break; case "date": $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL"; break; case "defined": $theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue; break; } return $theValue; } if (isset($editFormAction)) { if (isset($_SERVER['QUERY_STRING'])) { if (!eregi("GP_upload=true", $_SERVER['QUERY_STRING'])) { $editFormAction .= "&GP_upload=true"; } } else { $editFormAction .= "?GP_upload=true"; } } if ((isset($_POST["MM_insert"])) && ($_POST["MM_insert"] == "uploadImage")) { $insertSQL = sprintf("INSERT INTO galleries_data (file_name, file_galleries_id, file_desc) VALUES (%s, %s, %s)", GetSQLValueString($_POST['file_name'], "text"), GetSQLValueString($_POST['file_galleries_id'], "int"), GetSQLValueString($_POST['file_desc'], "text")); mysql_select_db($database_wassenaar_db, $wassenaar_db); $Result1 = mysql_query($insertSQL, $wassenaar_db) or die(mysql_error()); } $colname_Recordset1 = "-1"; if (isset($_GET['gallery_id'])) { $colname_Recordset1 = $_GET['gallery_id']; } mysql_select_db($database_wassenaar_db, $wassenaar_db); $query_Recordset1 = sprintf("SELECT * FROM galleries WHERE gallery_id = %s", GetSQLValueString($colname_Recordset1, "int")); $Recordset1 = mysql_query($query_Recordset1, $wassenaar_db) or die(mysql_error()); $row_Recordset1 = mysql_fetch_assoc($Recordset1); $totalRows_Recordset1 = mysql_num_rows($Recordset1); } $editFormAction = $_SERVER['PHP_SELF']; if (isset($_SERVER['QUERY_STRING'])) { $editFormAction .= "?" . htmlentities($_SERVER['QUERY_STRING']); } ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Untitled Document</title> <link href="admin.css" rel="stylesheet" type="text/css" /> <script language='JavaScript' src='../ScriptLibrary/incPureUpload.js' type="text/javascript"></script> </head> <body> <div id="container"> <div id="mainContent"> <div id="navigation"><a href="galleries.php">Galleries</a> > <a href="galleries_view.php?gallery_id=<? echo $_GET['gallery_id'];?>"><?php echo $row_Recordset1['gallery_name']; ?></a></div> <form action="<?php echo $GP_uploadAction; ?>" method="POST" enctype="multipart/form-data" name="uploadImage" id="uploadImage" onsubmit="checkFileUpload(this,'GIF,JPG,JPEG,BMP,PNG',true,4000,'','','','','','');return document.MM_returnValue"> <p>Photo <br /> <input name="file_name" type="file" id="file_name" onchange="checkOneFileUpload(this,'GIF,JPG,JPEG,BMP,PNG',true,4000,'','','','','','')" /> </p> <p>Photo Description<br /> <textarea name="file_desc" id="file_desc" cols="45" rows="5"></textarea> </p> <p> <input type="submit" name="button" id="button" value="Submit" /> <input name="file_galleries_id" type="hidden" id="file_gallery_id" value="<?php echo $row_Recordset1['gallery_id']; ?>" /> </p> <input type="hidden" name="MM_insert" value="uploadImage" /> </form> <!-- end #mainContent --></div> <!-- end #container --> </div> </body> </html> <?php mysql_free_result($Recordset1); ?>
Edited by - Celeste Pretzel on 09 Aug 2010 23:27:04
Replies
Replied 10 Aug 2010 09:56:44
10 Aug 2010 09:56:44 Miroslav Zografski replied:
Hello Celeste,
Increase the memory limit to 128Mb in your php.ini.
Set the Size limit in Pure Upload to 8192Kb = 8Mb -> your php.ini setting.
Regards,
Increase the memory limit to 128Mb in your php.ini.
Set the Size limit in Pure Upload to 8192Kb = 8Mb -> your php.ini setting.
Regards,