upload JPG images using js on centos 6.5 over ISPconfig 3.0.5.4p8

Discussion in 'ISPConfig 3 Priority Support' started by nmazza, Oct 12, 2015.

  1. nmazza

    nmazza New Member HowtoForge Supporter

    Dear, support
    During some weeks ago I had implemented the following code, using Wamp Server on my Workstation in localhost, for upload images.
    In localhost is working fine,
    but in the Remote Server, I had received ( ERROR 500 - Internal Server Error!)
    What's the best way to solve this situation, because my Clients cliams me upload products images without any FTP Client software.
    Let me show you a piece of php code I had implemented ...
    <?php
    if ( (isset($_POST["sent"])) && ($_POST["sent"] == "form1") ) {
    $image_file = $_FILES["userfile"]["name"] ;
    move_uploaded_file($_FILES["userfile"]["tmp_name"], "images/products/".$image_file);
    ?>
    <script>
    opener.document.form1.strImage.value="<?php echo $image_file; ?>";
    self.close();
    </script>
    <?php
    }
    ?>

    I need upload products images using a little php form without using ftp user and passwd
    I'll appreciate your cooperation.
    Nestor Mazza
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    Check the website error.log for the detailed error message.
     
  3. nmazza

    nmazza New Member HowtoForge Supporter

  4. nmazza

    nmazza New Member HowtoForge Supporter

    Dear, support
    Why no more answer?
    Thanks
    Nestor Mazza
     
  5. till

    till Super Moderator Staff Member ISPConfig Developer

    Is the error message really from error.log and not access.log? There should be more then this line in the error.log for this issue.
     
  6. nmazza

    nmazza New Member HowtoForge Supporter

  7. nmazza

    nmazza New Member HowtoForge Supporter

    Dear, support
    I had solved the issue, so I have been thinking in access permissions.
    I had updated my fcgid.com
    vim /etc/httpd/conf.d/fcgid.conf
    with the following ..
    #FcgidMaxRequestLen 2000000
    <IfModule mod_fcgid.c>
    AddHandler fcgid-script .fcgi
    FcgidConnectTimeout 20
    FcgidMaxRequestLen 51200000
    </IfModule>

    And now is working fine ..
    Thanks for all
    Nestor Mazza
     

Share This Page