Jump to:

17452 Posts in 4473 Topics by 1971 members

Archive

SilverStripe Forums » Archive » Can't upload images

Our old forums are still available as a read-only archive.

Moderators: martimiz, Sean, biapar, Willr, Ingo, simon_w

Page: 1 2 3 4 5 6 7 8 9
Go to End
Author Topic: 394673 Views
  • Carel
    Avatar
    Community Member
    3 Posts

    Re: Can't upload images Link to this post

    >and you have write permissions on the folder?

    Is this a different permission from "Full administrative rights" ...? That is what I have set it to at the moment. I thought that was as permissive as it gets.

    Carel Struycken

  • mundgold
    Avatar
    Community Member
    19 Posts

    Re: Can't upload images Link to this post

    I have the same Problem again in my production environment. I am not able to upload images. The folders all set to 777 - I tried it with different browsers on different os.

    I get no errormessages or warnings in my logfiles.
    I added the host to Director::set_dev_servers()
    I turned apache save_mode off and included every required directory to open_basedir

    Perhaps somebody from the coreteam could give us a hint to solve this problem

    PHP Version 5.2.0
    Apache/2.2.3 (Linux/SUSE)

    Thanks a lot
    Roland

  • mundgold
    Avatar
    Community Member
    19 Posts

    Re: Can't upload images Link to this post

    Hello again,

    I set the debug variable in 'cms/javascript/Upload.js' line 65 to true and compared the output while I uploaded a file on my testserver and on the staging server :

    The debug output of the testserver where everything works fine:

    SWF DEBUG: UploadFile: Browsing files. *.jpeg;*.jpg;*.jpe;*.png;*.gif;
    SWF DEBUG: Event: Files Selected from Dialog. Processing file list
    SWF DEBUG: onSelect: File within size limit and of valid type. Adding to queue and making callback.
    SWF DEBUG: onSelect: Uploads set to begin immediately. Calling StartUpload.
    SWF DEBUG: StartUpload(): Starting Upload. Next file in queue
    SWF DEBUG: StartFile: Next file in queue
    SWF DEBUG: File Post Item: action_doUpload=undefined
    SWF DEBUG: File Post Item: Files=undefined
    SWF DEBUG: File Post Item: MAX_FILE_SIZE=undefined
    SWF DEBUG: File Post Item: ID=undefined
    SWF DEBUG: startFile(): File Reference found. Starting upload to http://<mysite>/admin/assets/index/root?executeForm=UploadForm&SecurityID=1131280439&PHPSESSID=69d67493f47104c23503a7974de701ea. File ID: SWFUpload_0_0
    SWF DEBUG: Event: Progress: File ID: SWFUpload_0_0. Bytes: 2913. Total: 2913
    SWF DEBUG: Event: UploadCompleteData: File ID: SWFUpload_0_0 Data:          <script type="text/javascript">
    SWF DEBUG:          var form = parent.document.getElementById('Form_EditForm');
    SWF DEBUG:          form.getPageFromServer(form.elements.ID.value);
    SWF DEBUG:          parent.statusMessage("1 Dateien hochgeladen","good");
    SWF DEBUG:          
    SWF DEBUG:          parent.document.getElementById('sitetree').getTreeNodeByIdx( "85" ).getElementsByTagName('a')[0].className += ' contents';
    SWF DEBUG:          </script>
    SWF DEBUG: UploadComplete(): Upload complete. Removing File Reference and starting the next upload.
    SWF DEBUG: StartFile: Next file in queue
    SWF DEBUG: startFile(): No File Reference found. All uploads must be complete, cancelled, or errored out.
    SWF DEBUG: startFile(): Ending upload run. Completed Uploads: 1
    SWF DEBUG: startFile(): Queue is

    the staging output:

    SWF DEBUG: UploadFile: Browsing files. *.jpeg;*.jpg;*.jpe;*.png;*.gif;
    SWF DEBUG: Event: Files Selected from Dialog. Processing file list
    SWF DEBUG: onSelect: File within size limit and of valid type. Adding to queue and making callback.
    SWF DEBUG: onSelect: Uploads set to begin immediately. Calling StartUpload.
    SWF DEBUG: StartUpload(): Starting Upload. Next file in queue
    SWF DEBUG: StartFile: Next file in queue
    SWF DEBUG: File Post Item: MAX_FILE_SIZE=undefined
    SWF DEBUG: File Post Item: action_doUpload=undefined
    SWF DEBUG: File Post Item: ID=undefined
    SWF DEBUG: File Post Item: Files=undefined
    SWF DEBUG: startFile(): File Reference found. Starting upload to http://<mysite>/admin/assets/index/root?executeForm=UploadForm&SecurityID=1148967132&PHPSESSID=or=jHfUf0haPfY-nYaG7zN6i13nlPJGcIFns01nbdiQSmQ.. File ID: SWFUpload_0_0
    SWF DEBUG: Event: Progress: File ID: SWFUpload_0_0. Bytes: 3046. Total: 3046
    SWF DEBUG: Event: UploadCompleteData: File ID: SWFUpload_0_0 Data: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
    SWF DEBUG:
    SWF DEBUG: <html xmlns="http://www.w3.org/1999/xhtml" lang="de" lang="de">
    SWF DEBUG: <head>
    --> here comes the whole html ouptput of the loginpage <--
    SWF DEBUG: </body>
    SWF DEBUG: </html>
    SWF DEBUG: UploadComplete(): Upload complete. Removing File Reference and starting the next upload.
    SWF DEBUG: StartFile: Next file in queue
    SWF DEBUG: startFile(): No File Reference found. All uploads must be complete, cancelled, or errored out.
    SWF DEBUG: startFile(): Ending upload run. Completed Uploads: 1
    SWF DEBUG: startFile(): Queue is complete and at least one file has been uploaded. Making QueueComplete callback.

    Has anybody an idea?

    Thank you
    Roland

  • mundgold
    Avatar
    Community Member
    19 Posts

    Re: Can't upload images Link to this post

    Now I tried the browser-change again - and I get a interresting behaviour on IE. After upload the images I got the "login-page" in the I-Frame. Another try and it showed me an alert-box with the message "The server logged you out".

    Could it be, that something destroy the session or some cookies - or perhaps isn't able to write sessions or cookies?

    I have no idea - thank you for some help

    Cheers Roland

  • hitautodestruct
    Avatar
    Community Member
    19 Posts

    Re: Can't upload images Link to this post

    Hey I had a problem with uploading images.
    I kept getting a strange SWFUpload error in IE7 and no error in FF2
    And I managed to fix it.

    Firstly I downloaded the latest version of SWFUpload and copied the entire FlashDevelop dir into:
    /jsparty/SWFUpload/
    That helped and I was able to upload GIF's smoothly.

    BUT!

    Then I got a problem with the GDLib command: imagecreatefromjpeg().
    Which was being called from the /sapphire/filesystem/GD.php file.

    Apparently support for this function has to be custom compiled in PHP5. So I recompiled PHP5 on my server with the command (for linux): ./configure --with-jpeg-dir=/usr/lib --with-png-dir=/usr/lib
    (also added the other line for png support)

    Follow this link for windows based servers: http://il2.php.net/manual/en/function.imagecreatefromjpeg.php#75184

    And now all is well.
    Hope this helps someone out there.

    And maybe the dev team can take note that the SWFUpload script found in the basic installation of SilverStripe 2.2.1 is not the latest to date.

  • mundgold
    Avatar
    Community Member
    19 Posts

    Re: Can't upload images Link to this post

    I've done that. And now I am able to upload Images in the "assets" section.
    But I can not upload Images or create Folders in the left sidebar of the tiny_mce any more. If I click on the Button "upload" or "create folder" I will redirected to the frontend.

    Cheers Roland

  • hitautodestruct
    Avatar
    Community Member
    19 Posts

    Re: Can't upload images Link to this post

    Try uploading from the "Files & Images" section.
    That's what I do when the image pane doesn't work.
    It's also more robust in terms of managing your assets files.

  • mundgold
    Avatar
    Community Member
    19 Posts

    Re: Can't upload images Link to this post

    I've done that

    I called it "assets-section" instead of "files & images" in case of other translations.

    Roland

    394673 Views
Page: 1 2 3 4 5 6 7 8 9
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.