• 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?

    https://www.ads-software.com/extend/plugins/contact-form-7/

Viewing 14 replies - 1 through 14 (of 14 total)
  • Hi, perhaps a server restart?

    Thread Starter KristyO

    (@kristyo)

    how do you do that?

    Thread Starter KristyO

    (@kristyo)

    IPage hosting

    Thread Starter KristyO

    (@kristyo)

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

    Webhost providers usually take care of server restart.

    Could you please copy and paste the shortcode you use.

    Thread Starter KristyO

    (@kristyo)

    [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>
    Thread Starter KristyO

    (@kristyo)

    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.”

    There are more possibilites:

    1. Check your php parameters with phpinfo() if they are really changed as you set https://codex.www.ads-software.com/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>

    Thread Starter KristyO

    (@kristyo)

    I’m not in Multi-site

    and here the phpinfo https://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

    Thread Starter KristyO

    (@kristyo)

    I’m not in Multi-site

    and here the phpinfo https://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

    Thread Starter KristyO

    (@kristyo)

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

    Thread Starter KristyO

    (@kristyo)

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

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

    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;

Viewing 14 replies - 1 through 14 (of 14 total)
  • The topic ‘[Plugin: Contact Form 7] Upload File Size’ is closed to new replies.