Online Page Editor Add-on Support Product Page

Error adding image

Reported 14 Oct 2012 08:19:58
1
has this problem
14 Oct 2012 08:19:58 christine Weald posted:
No matter what I do I cannot get past this error. www.dmxzone.com/images/forum/smilies/icon_smile_sad.png I am using PHP server, testing on MAMP setup. I have installed purephp upload, OPE, AHE3 and assigned server folder 'Uploads' with chmod of 777. I have also installed smart image PHP processor, and specifed folder as the uploads but I cannot get past this error.

Replies

Replied 14 Oct 2012 10:50:38
14 Oct 2012 10:50:38 Teodor Kuduschiev replied:
Hello,

Can you please paste the exact error message you are seeing?
Replied 14 Oct 2012 12:17:34
14 Oct 2012 12:17:34 christine Weald replied:
Hi Teo,
The error message is:
The following error(s) occured:

• This folder is not authorized for upload!
Please make sure it has write permissions and the authorization file is in it.

The uploads folder on the testing server does have the upload-authorize-for dmxEditor in it. I know the editor works OK for text changes. I'm not sure I have used the smart image upload correctly - the manual doesn't explain how to install it from scratch. I created html file and added the server behaviour smart image processor, which created php file thus
<?php require_once('ScriptLibrary/cGraphicMediator.php'); ?>
<?php
// Smart Image Processor PHP 2.0.9
$sipp2 = new cGraphicMediator("folder", "../uploads" );
$sipp2->setComponent("Auto";
$sipp2->setMatteColor("#FFFFFF";
$sipp2->resizeEx(500, 350, true, false);
$sipp2->overwrite = false;
$sipp2->setMask("##path##thumb_##name##.jpg";
$sipp2->save();
$sipp2->process();
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>ImageProc</title>
</head><body></body></html>

As a user I get into the editor, click on the image and in the 'upload' box browse to any folder on my PC/Mac and the image would be uploaded to the 'uploads' folder.

The upload.php file uses the same folder namely:
// Pure PHP Upload 2.1.12
$ppu = new pureFileUpload();
$ppu->path = "../uploads";
$ppu->extensions = "GIF,JPG,JPEG,BMP,PNG";
$ppu->formName = "upload";
$ppu->storeType = "file";
$ppu->sizeLimit = "1000";
$ppu->nameConflict = "over";
$ppu->nameToLower = false;
$ppu->requireUpload = true;
$ppu->minWidth = "100";
$ppu->minHeight = "100";
$ppu->maxWidth = "500";
$ppu->maxHeight = "450";
$ppu->saveWidth = "";
$ppu->saveHeight = "";
$ppu->timeout = "600";
$ppu->progressBar = "";
$ppu->progressWidth = "300";
$ppu->progressHeight = "100";
$ppu->redirectURL = "";
$ppu->checkVersion("2.1.12";
$ppu->doUpload();

and the first time I use this and pick any image from any folder on PC I don't get the message but do get "No file chosen" in the preview box. If I repeat the upload I get the error message. The uploads folder does have r/w privileges for everyone.
Replied 15 Oct 2012 07:19:12
15 Oct 2012 07:19:12 Teodor Kuduschiev replied:
Hello christine,

Can you please tell us if you are trying to use the smart image processor on the page with an upload field or within the Online Page Editor Add-on??
Replied 15 Oct 2012 07:47:00
15 Oct 2012 07:47:00 christine Weald replied:
Hi Teo, The last I think, I'm not sure - as I don't have a cms or database, I have added the online Page Editor to a template and created a page from this. I created a Dw form page and added the purephpupload behaviour to this, created an uploads folder and changed its permissions. As I had ticked the box in the OPE for file resize and uploads file and the uploading hadn't worked, I then created another basic d/w page and added the smart image processor behaviour to that.
I'm only testing out the procedures to create a site that a user can easily edit for text and add / remove images. I'm using the Ajax user/psw method.

I can start again if you could outline the steps for me - I think I'm OK with the start - ie creating template, adding php upload with the Adv.Html addon, creating uploads folder and a template based page.
Replied 15 Oct 2012 07:56:17
15 Oct 2012 07:56:17 Teodor Kuduschiev replied:
Okay,

It seems you messed up the things.
Please start again following these steps:
1. Add the Online Page Editor Add-on on your page
2. In the options - Enable Upload and upload resize and set an upload folder
3. Save your changes

You do not need to add separately Pure Upload or Smart Image Processor.

Please also check the user's manual.
Replied 15 Oct 2012 14:09:00
15 Oct 2012 14:09:00 christine Weald replied:
Thank you Teo. Eventually I removed everything and started from scratch and it all works. So yes things had gotten messed up! May I suggest that the text on p7 of the manual ( Rich Image Upload & Resize directly from the editor - Great support for Pure PHP/ ASP Upload and Smart Image Processor PHP/ ASP) be enhanced as it implies you need these, which presumably you would if you called OPE from the AdvHtmlEditor and used ftp to access the editor. Now it is working as you intended it, it does give a user a very simple tool to edit and upload images. Thank you. I can now play on the CSS and layouts.

Only one change - I had problems setting the permissions on the html files. If I set this to 666 then I couldn't login into the editor. The dialogue box appeared but after I entered the user/psw the screen displayed but without access to edit it. If I left the permissions alone ie 644 then this worked. Also the uploads folder - was only set to 755and this worked.

Thanks for your help.

Reply to this topic