Smart Image Processor PHP 2 Support Product Page
This topic was archived
Image processor php 2 resize problem
Asked 08 Mar 2009 22:59:54
1
has this question
08 Mar 2009 22:59:54 Paul Edwards posted:
Hi, I have pure php upload and smart image processor 2 and i have also downloaded the updates but i am having trouble with the smart image processor, i have created a site thats works great, i then exsported the database as sql and reimported it into my sites database and change the name on the connection string to work with my database, it did not work at first but then i delited the recordset and php upload and image processsor and when i reinstalled them everything works apart from my images are not resized
Can anyone help please
p.s i am using dreamweaver cs3
thankyou
Paul Edwards
ps2 i have ticked the box saying resize and chosen the width 208 by 150 also chosen the images file and set permisions on this file too, there is no errer message just a white screen and page says done.
Replies
Replied 11 Mar 2009 12:17:16
11 Mar 2009 12:17:16 George Petrov replied:
Hi Paul,
Do you have a live url to your site so we can check it out?
Thanks,
George
Do you have a live url to your site so we can check it out?
Thanks,
George
Replied 06 May 2009 19:02:03
06 May 2009 19:02:03 Paul Edwards replied:
yeah
its www.rebootco.co.uk/index.php as this is still hidden and not part of the live site i can show username and password to all so go to login page and use xxxx and xxxx as username and password , i can show this part of site as pics and text on this part of site are not relavent at the mo so once in use link that says upload small pics and see it doesnt work.
Many Thanks
Paul Edwards
its www.rebootco.co.uk/index.php as this is still hidden and not part of the live site i can show username and password to all so go to login page and use xxxx and xxxx as username and password , i can show this part of site as pics and text on this part of site are not relavent at the mo so once in use link that says upload small pics and see it doesnt work.
Many Thanks
Paul Edwards
Replied 06 May 2009 19:07:42
06 May 2009 19:07:42 Paul Edwards replied:
And here is my code
<?php require_once('ScriptLibrary/incPureUpload.php'); ?>
<?php require_once('ScriptLibrary/cGraphicMediator.php'); ?>
<?php
// Pure PHP Upload 2.1.7
$ppu = new pureFileUpload();
$ppu->path = "images";
$ppu->extensions = "";
$ppu->formName = "upload";
$ppu->storeType = "file";
$ppu->sizeLimit = "";
$ppu->nameConflict = "over";
$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 = "";
$ppu->checkVersion("2.1.7"
;
$ppu->doUpload();
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";
}
}
?><?php
// Smart Image Processor PHP 2.0.5
if (isset($_GET['GP_upload'])) {
$sipp2 = new cGraphicMediator("upload", $ppu, ""
;
$sipp2->setComponent("Auto"
;
$sipp2->setMatteColor("#FFFFFF"
;
$sipp2->resize(100, 150, true);
$sipp2->overwrite = true;
$sipp2->saveJPEG(80);
$sipp2->process();
$sipp2GoTo = "index.php";
if (isset($_SERVER['QUERY_STRING'])) {
$sipp2GoTo .= (strpos($sipp2GoTo, '?')) ? "&" : "?";
$sipp2GoTo .= $_SERVER['QUERY_STRING'];
}
header(sprintf("Location: %s", $sipp2GoTo));
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Small picture upload page, Reboot Computers</title>
<link href="css/style.css" rel="stylesheet" type="text/css" />
<script src='ScriptLibrary/incPureUpload.js' type="text/javascript"></script>
</head>
<body>
<div id="container-home">
<div id="header"><img src="graphics/header.jpg" alt="www.rebootco.co.uk" width="760" height="90" /></div>
<div id="navigation"><a href="upload.php"> Upload small Pictures </a>|<a href="bigupload.php"> Upload Big Pics </a>|<a href="edit.php"> Home Page </a></a>|<a href="fileupload.php"> Upload a File </a>|<a href="edit2.php"> Web Design </a>|<a href="edit3.php"> Pc Repairs </a></div>
<br />
<div id="content-upload">
<h1>Choose Small Pictures</h1>
<form action="<?php echo $GP_uploadAction; ?>" method="post" enctype="multipart/form-data" name="upload" id="upload" onsubmit="checkFileUpload(this,'',true,'','','','','','','');return document.MM_returnValue">
<input name="button" type="file" onchange="checkOneFileUpload(this,'',true,'','','','','','','')" />
<br />
<input name="Submit" type="submit" value="Upload" />
</form>
<h1>Instructions</h1>
<p>Please make sure all pictures are renamed as follows.
<br />
<br />
All pictures are named pic11.jpg or pic12.jpg through to pic44.jpg (or if changed pictures will be called <br />
what the cms is set to)</p>
</div>
<div id="footer"><img src="graphics/footer.jpg" alt="www.the-seal.com" width="760" height="60" /></div>
</div>
</body>
</html>
<?php require_once('ScriptLibrary/incPureUpload.php'); ?>
<?php require_once('ScriptLibrary/cGraphicMediator.php'); ?>
<?php
// Pure PHP Upload 2.1.7
$ppu = new pureFileUpload();
$ppu->path = "images";
$ppu->extensions = "";
$ppu->formName = "upload";
$ppu->storeType = "file";
$ppu->sizeLimit = "";
$ppu->nameConflict = "over";
$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 = "";
$ppu->checkVersion("2.1.7"
$ppu->doUpload();
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";
}
}
?><?php
// Smart Image Processor PHP 2.0.5
if (isset($_GET['GP_upload'])) {
$sipp2 = new cGraphicMediator("upload", $ppu, ""
$sipp2->setComponent("Auto"
$sipp2->setMatteColor("#FFFFFF"
$sipp2->resize(100, 150, true);
$sipp2->overwrite = true;
$sipp2->saveJPEG(80);
$sipp2->process();
$sipp2GoTo = "index.php";
if (isset($_SERVER['QUERY_STRING'])) {
$sipp2GoTo .= (strpos($sipp2GoTo, '?')) ? "&" : "?";
$sipp2GoTo .= $_SERVER['QUERY_STRING'];
}
header(sprintf("Location: %s", $sipp2GoTo));
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Small picture upload page, Reboot Computers</title>
<link href="css/style.css" rel="stylesheet" type="text/css" />
<script src='ScriptLibrary/incPureUpload.js' type="text/javascript"></script>
</head>
<body>
<div id="container-home">
<div id="header"><img src="graphics/header.jpg" alt="www.rebootco.co.uk" width="760" height="90" /></div>
<div id="navigation"><a href="upload.php"> Upload small Pictures </a>|<a href="bigupload.php"> Upload Big Pics </a>|<a href="edit.php"> Home Page </a></a>|<a href="fileupload.php"> Upload a File </a>|<a href="edit2.php"> Web Design </a>|<a href="edit3.php"> Pc Repairs </a></div>
<br />
<div id="content-upload">
<h1>Choose Small Pictures</h1>
<form action="<?php echo $GP_uploadAction; ?>" method="post" enctype="multipart/form-data" name="upload" id="upload" onsubmit="checkFileUpload(this,'',true,'','','','','','','');return document.MM_returnValue">
<input name="button" type="file" onchange="checkOneFileUpload(this,'',true,'','','','','','','')" />
<br />
<input name="Submit" type="submit" value="Upload" />
</form>
<h1>Instructions</h1>
<p>Please make sure all pictures are renamed as follows.
<br />
<br />
All pictures are named pic11.jpg or pic12.jpg through to pic44.jpg (or if changed pictures will be called <br />
what the cms is set to)</p>
</div>
<div id="footer"><img src="graphics/footer.jpg" alt="www.the-seal.com" width="760" height="60" /></div>
</div>
</body>
</html>
Replied 07 May 2009 16:30:44
07 May 2009 16:30:44 Teodor Kuduschiev replied:
Dear Paul,
For your own security, please don't post login information in public. Please continue your communication with our representatives on privete by email.

