sending files via email or other software

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts
  • asvogal
    Private First Class

    • Aug 2007
    • 6

    sending files via email or other software

    Hi
    I am setting up online ordering for my print business. and need a way for customers to send their artwork files with their order.

    Files can be from small to quite large - up to 20mb would cover most, although a way to send any size file would be useful.

    I am not expecting high volumes so bandwidth and storage should not be a problem.

    I have set up a form with a browse button, but it will only send really small files.

    Any suggestions will be helpful.

    Trevor
  • Vasili
    Moderator

    • Mar 2006
    • 14683

    #2
    Re: sending files via email or other software

    There are a lot out there, but www.YouSendIt.com comes to mind...
    . VodaWebs....Luxury Group
    * Success Is Potential Realized *

    Comment

    • navaldesign
      General & Forum Moderator

      • Oct 2005
      • 12080

      #3
      Re: sending files via email or other software

      Each server has it's own setings as for max filesize that you can upload.

      Some VH servers are set to 4.7, some to 8, and last, some are set to 32 MB.

      The only way to find that out and actually set the limit to a larger number, is by using the phpinfo() command (to gather the info) and using yet another script to create a local php.ini file. This is quite easily done with a small script, that reads the server php.ini file, it changes whatever needs to be changed, and it then saves a copy of it in your own folder. Here it is:

      <!-- /* SCRIPT NAME: modify_php_ini.php */ -->
      <?php
      // Put all the php.ini parameters you want to change below. One per line.
      // Follow the example format $parm[] = "parameter = value";

      $parm[] = "upload_max_filesize = 50M";
      $parm[] = "post_max_size = 50M";
      // full unix path - location of the default php.ini file at your host
      // you can determine the location of the default file using phpinfo()
      $defaultPath = '/usr/local/lib/php.ini';
      // full unix path - location where you want your custom php.ini file
      //$customPath = "/path/php.ini";
      $customPath = "php.ini";
      // nothing should change below this line.
      if (file_exists($defaultPath)) {
      $contents = file_get_contents($defaultPath);
      $contents .= "\n\n; MODIFIED THE FOLLOWING USER PARAMETERS:\n\n";
      foreach ($parm as $value) $contents .= $value . " \n";
      if (file_put_contents($customPath,$contents)) {
      if (chmod($customPath,0600)) $message = "<b>PHP.INI File modified and copied.</b>";
      else $message = "PROCESS ERROR - Failed to upadate php.ini.";
      } else {
      $message = "PROCESS ERROR - Failed to write php.ini file.";
      }
      } else {
      $message = "PROCESS ERROR - php.ini file not found.";
      }
      echo $message;
      ?>


      Copy the above code, paste it in Notepad, save is as "modify_php_ini.php". Upload it on your server and run it (type in your browser "http://www.yourdomain.com/modify_php_ini.php")

      It will modify the allowable file size to 50 Mb. If you need less, change it to 10, 20 or 30M, whatever you need.

      It only affects your own site, not any other hosted on the same server.


      In the script, it is assumed that your php.ini path is '/usr/local/lib/php.ini'

      If you get from the script a message that php.ini was not found, use this other script:


      <?php
      phpinfo();
      ?>

      Upload it on your site as phpinfo.php and run it (http://www.yourdomain.com/phpinfo.php)

      It will display all your server php settings, and among them, you will be able to see your php.ini path and your max upload file size




      Tip: since a php.ini file locally saved is loaded each time a request takes place, if you only use it to override the file size issue, i suggest that you publish your form inside a dedicated folder, and also load this script and run it only for that folder. This way, when users visit your normal pages, in your public_html (or www, whatever it is named) folder, the local php.ini file is not loaded at all.
      Navaldesign
      Logger Lite: Low Cost, Customizable, multifeatured Login script
      Instant Download Cart: a Powerfull, Customized, in site, DB driven, e-products Cart
      DBTechnosystems.com Forms, Databases, Shopping Carts, Instant Download Carts, Loggin Systems and more....
      Advanced BlueVoda Form Processor : No coding form processor! Just install and use! Now with built in CAPTCHA!

      Comment

      • asvogal
        Private First Class

        • Aug 2007
        • 6

        #4
        Re: sending files via email or other software

        Thanks

        Comment

        Working...
        X