Advanced HTML Editor 3 Support Product Page

Solved

Image upload never completes

Reported 12 Feb 2014 15:30:53
1
has this problem
12 Feb 2014 15:30:53 David Ross posted:
I have AHTMLE 3.5.2 with Pure PHP File Upload 2.1.12 and Smart Image Processor PHP 2.1.1. Since upgrading to AHTMLE 3.5.2 I cannot upload any images. The image progress bar goes to the end, but the image preview never appears.

I've restarted DW CS5.5, reinserted the text area preferences many times, and used 3 different browsers. Nothing works; the images never finish uploading. There is no error message. I've checked on the server, and the image upload folder is set to 777 (I tried it with 755 too), and the images are definitely not in the upload folder. The upload_authorize_for_dmxEditor file is in the upload folder, but it has a file size of 0 kb.

My code looks like this:
<textarea name="Paragraph1" class="dmxEditor" style="width:800px;height:200px" id="Paragraph1"></textarea>
<script type="text/javascript">
  // <![CDATA[
 jQuery(document).ready(
   function()
     {
       jQuery("#Paragraph1").dmxEditor(
       {"width": 800, "height": 300, "textColor": "#444444", "lineBreak": "br", "allowUpload": true, "uploadPath": "/images/", "uploadProcessor": "php", "allowResize": true, "resizeMaxWidth": 300, "resizeMaxHeight": 240, "includeCss": "/styles/new.css", "formatterSettings": {"linkType": "abs"}}
       );
     }
 );
  // ]]>
</script>


What can I do to get back my ability to upload images?

Replies

Replied 12 Feb 2014 15:54:51
12 Feb 2014 15:54:51 Teodor Kuduschiev replied:
Hello David,
Please provide a link to your page to:
Replied 12 Feb 2014 16:10:31
12 Feb 2014 16:10:31 David Ross replied:
Hi Teodor,

Thanks for getting back to me. I have sent an email to with a link to a page showing the problem I'm having.

Thanks,
David
Replied 12 Feb 2014 16:18:22
12 Feb 2014 16:18:22 Teodor Kuduschiev replied:
Hello David,
The response from your server is: 500 Internal Server Error which in general does not tell nothing specific. Can you please contact your hosting provider to enable detailed error reports or to check what exactly the error message returned on upload is?
Replied 12 Feb 2014 16:37:34
12 Feb 2014 16:37:34 David Ross replied:
Hi Teodor,
I've taken a look at the php error logs and it looks like its an problem with the include path. Here a sample of the errors I see:

[12-Feb-2014 16:26:05 Europe/London] PHP Warning:  require_once(/ScriptLibrary/incPureUpload.php) [<a href='function.require-once'>function.require-once</a>]: failed to open stream: No such file or directory in /home/dbr1066/public_html/ScriptLibrary/dmxEditor/dialogs/upload_resize.php on line 10
[12-Feb-2014 16:26:05 Europe/London] PHP Fatal error:  require_once() [<a href='function.require'>function.require</a>]: Failed opening required '/ScriptLibrary/incPureUpload.php' (include_path='.:/usr/lib64/php:/usr/lib/php:/home/dbr1066/public_html/includes') in /home/dbr1066/public_html/ScriptLibrary/dmxEditor/dialogs/upload_resize.php on line 10
[12-Feb-2014 16:26:56 Europe/London] PHP Warning:  require_once(/ScriptLibrary/incPureUpload.php) [<a href='function.require-once'>function.require-once</a>]: failed to open stream: No such file or directory in /home/dbr1066/public_html/ScriptLibrary/dmxEditor/dialogs/upload_resize.php on line 10
[12-Feb-2014 16:26:56 Europe/London] PHP Fatal error:  require_once() [<a href='function.require'>function.require</a>]: Failed opening required '/ScriptLibrary/incPureUpload.php' (include_path='.:/usr/lib64/php:/usr/lib/php:/home/dbr1066/public_html/includes') in /home/dbr1066/public_html/ScriptLibrary/dmxEditor/dialogs/upload_resize.php on line 10


I've checked and the /ScriptLibrary/incPureUpload.php is there (that is, there is a folder named ScriptLibrary in the site root and a file named incPureUpload.php inside that ScriptLibrary folder). It looks like the script is looking in my normal server include path instead of in the /ScriptLibrary folder, or can you see something I might be missing?

Thanks,
David
Replied 12 Feb 2014 16:39:04
12 Feb 2014 16:39:04 Teodor Kuduschiev replied:
If you are using paths relative to site root, please change this to relative to document in your site configuration settings in dreamweaver.
Replied 12 Feb 2014 16:55:15
12 Feb 2014 16:55:15 David Ross replied:
Hi Teodor,

I tried that - so in this case the code looks like

"uploadPath": "../images/attractions/editor2"

But the same thing happens. I checked the php error log and upload_resize.php is still encountering a fatal error on line 10 when it tries to include /ScriptLibrary/incPureUpload.php
Replied 12 Feb 2014 16:59:39
12 Feb 2014 16:59:39 Teodor Kuduschiev replied:
Please when you change this in your site preferences, reapply the editor.
Replied 12 Feb 2014 17:04:59
12 Feb 2014 17:04:59 David Ross replied:
Hi Teodor,
I understand now. I started from scratch and it now uploads an image properly - BUT the img src link is now relative (that is, it looks like <img src="../directory/image.jpg ... ), which actually won't be useful at all, as in my case the textarea is used to prepare an article to go into a database, so we need the image path to be absolute. I can try to remember to change the src attribute to an absolute path AFTER it uploads, but that's going to be very tedious :-)
Replied 12 Feb 2014 17:12:47
12 Feb 2014 17:12:47 David Ross replied:
Hi Teodor,

My apologies. I've now tested this several times, and my initial impression appears to be wrong. The images do appear to be uploaded with an absolute src path. I was sure the first couple of times I tried they weren't doing that! Now when I upload an image it seems to work properly again.

Thank you for your help.

David

Reply to this topic