WordPress.org

Ready to get started?Download WordPress

Forums

Contact Form 7
Upload File Size (15 posts)

  1. KristyO
    Member
    Posted 1 year ago #

    Hi,

    I'm trying to be able to upload 3 file each with a max of 20mb through the attach file option in this form. I can not seem to upload anything larger then 2mb.

    I have already gone in and altered the php.ini file with these values

    post_max_size = 30M
    upload_max_filesize = 100M
    max_execution_time = 900
    memory_limit = 100M

    How can i get larger files to upload?

    http://wordpress.org/extend/plugins/contact-form-7/

  2. lilike
    Member
    Posted 1 year ago #

    Hi, perhaps a server restart?

  3. KristyO
    Member
    Posted 1 year ago #

    how do you do that?

  4. KristyO
    Member
    Posted 1 year ago #

    IPage hosting

  5. lilike
    Member
    Posted 1 year ago #

  6. KristyO
    Member
    Posted 1 year ago #

    What does that mean to change it to php5.ini, I only have one option for editing php.ini in Ipage

  7. lilike
    Member
    Posted 1 year ago #

    Webhost providers usually take care of server restart.

    Could you please copy and paste the shortcode you use.

  8. KristyO
    Member
    Posted 1 year ago #

    [contact-form-7 id="582" title="Prolab File Submit"]

    <p><b>Upload File 1*</b><i> (required)</i>
    [file* proupload1 id:proupload1 limit:20971520]
    <i> Max file size: 20MB</i></p>
    
    <p><b>Upload File 2 </b>
    [file proupload2 id:proupload2 limit:20971520]
    <i> Max file size: 20MB</i></p>
    
    <p><b>Upload File 3</b>
    [file proupload3 id:proupload3 limit:20971520]
    <i> Max file size: 20MB</i></p>
    
    <p>Your Name (required)<br />
        [text* your-name] </p>
    
    <p>Your Email (required)<br />
        [email* your-email] </p>
    
    <p><b>Your Phone Number*</b> <i> (required)</i>
    [text* PhoneNumber /12 id:PhoneNumber]</p>
    
    <p><b>Your Shipping Address</b>
    <i>Line 1</i> [text ShippingAddress id:shippingaddress1]
    <i>Line 2</i> [text addressline2 id:addressline2]
    <i>City</i> [text city 20/ id:city] <i>State</i> [text state 20/ id:state]
    <i>Zip</i> [text zip 7/5 id:zip] <i>Country</i> [text country 30/ id:Country]
    
    <p>Your Message<br />
        [textarea your-message] </p>
    
    <p>[submit "Send"]</p>
  9. KristyO
    Member
    Posted 1 year ago #

    then after about 30 sec to a minute it returns this

    "Failed to send your message. Please try later or contact the administrator by another method."

  10. lilike
    Member
    Posted 1 year ago #

    There are more possibilites:

    1. Check your php parameters with phpinfo() if they are really changed as you set http://codex.wordpress.org/User:Ipstenu/How_to_create_a_phpinfo%28%29_page

    2. Append the wp_config.php with
    define('WP_MEMORY_LIMIT' , '100M');

    3. If you are using WP Multisite, there is a Network Admin setting that will override all of the others. Go to Network Admin->Settings and change the 'Max upload file size'.

    4. Create a .htaccess file with

    <IfModule mod_php5.c>
    php_value post_max_size           30M
    php_value upload_max_filesize     100M
    php_value memory_limit            100M
    </IfModule>
  11. KristyO
    Member
    Posted 1 year ago #

    I'm not in Multi-site

    and here the phpinfo http://www.printmypictureonline.com/phpinfo.php

    but I still can't get it to work... added htaccess info to file in main directory and appended the wp_config.php

  12. KristyO
    Member
    Posted 1 year ago #

    I'm not in Multi-site

    and here the phpinfo http://www.printmypictureonline.com/phpinfo.php

    but I still can't get it to work... added htaccess info to file in main directory and appended the wp_config.php

  13. KristyO
    Member
    Posted 1 year ago #

    Could this have anything to do with e-mail properties or e-mail settings?

  14. KristyO
    Member
    Posted 1 year ago #

    This is a very time sensitive manner, please any other suggestions?

    http://www.printmypictureonline.com/getting-started/

  15. Pixelboy45
    Member
    Posted 1 year ago #

    Well this is what I did and it worked first go, successfully sent a 9 meg file.

    Went to

    public_html/wp-content/plugins/contact-form-7/modules/file.php

    Saved a backup copy, and made a modified copy. In the modified copy I changed the file size from 1mb to 10mb, then added a zero after the 1 on all the instances of "$allowed_filesize = 1048576" "$allowed_size *= 1024" & "$allowed_size *= 1024 * 1024" saved it and pasted it over the original file.

    Example modified code below

    $allowed_size = 10048576; // default size 10 MB

    foreach ( $options as $option ) {
    if ( preg_match( '%^filetypes:(.+)$%', $option, $matches ) ) {
    $file_types = explode( '|', $matches[1] );
    foreach ( $file_types as $file_type ) {
    $file_type = trim( $file_type, '.' );
    $file_type = str_replace(
    array( '.', '+', '*', '?' ), array( '\.', '\+', '\*', '\?' ), $file_type );
    $file_type_pattern .= '|' . $file_type;
    }

    } elseif ( preg_match( '/^limit:([1-9][0-9]*)([kKmM]?[bB])?$/', $option, $matches ) ) {
    $allowed_size = (int) $matches[1];

    $kbmb = strtolower( $matches[2] );
    if ( 'kb' == $kbmb ) {
    $allowed_size *= 10024;
    } elseif ( 'mb' == $kbmb ) {
    $allowed_size *= 10024 * 10024;

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic