• Resolved xa2

    (@xa2)


    Hi there!
    I’m trying to find where the variable called $ServerMaxUploadSizeMega is defined (right now it’s 2MB). I thought that the value was taken from php.ini so I modified the “max_upload_filesize” to 5MB, but found that the max_upload_size still remains 2MB…

    Where does $ServerMaxUploadSizeMega take value from?

    Thanks!

    https://www.ads-software.com/plugins/profile-builder/

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Contributor barinagabriel

    (@barinagabriel)

    Hello,

    the constant (not variable) WPPB_SERVER_MAX_UPLOAD_SIZE_MEGA is defined in the profile-builder\index.php file, line 60, and holds the value of the “upload_max_filesize” from php.ini, not sure about “max_upload_filesize” (if it even exists).

    There are even filters in place, should you need to change this values in PB *only*.

    Let me know if there is anything else!

    Gabriel

    Thread Starter xa2

    (@xa2)

    In my personal case the value “upload_max_filesize” (in line 60 of index.php) is not taken from php.ini, because I have upload_max_filesize = 5M at php.ini and the plugin is displaying 2M.

    I decided to write the following:

    define( ‘ServerMaxUploadSizeMega’, ‘5M’ );

    But anyway I’m not able to upload files bigger than 2M…

    Thread Starter xa2

    (@xa2)

    If you could re-open this ticket, as the incidence is not resolved…

    Plugin Contributor barinagabriel

    (@barinagabriel)

    Doing echo ini_get ( ‘upload_max_filesize’ ); for instance in the function.php file what value gets returned?

    Thread Starter xa2

    (@xa2)

    the echo statement displays 2M, but “upload_max_filesize” is set to 5M in my php.ini…it seems like the plugin is not reading from php.ini, isn’t it?

    Plugin Contributor barinagabriel

    (@barinagabriel)

    To be honest, the way I see it, is you either didn’t change all of the needed constants, or changed it in the wrong file.

    As you could see, PB uses a different value, than the one you have set.
    Also, nobody else mentioned this, so in all fairness, I doubt PB is malfunctioning.

    Please re-check the .ini file, and let me know what you found out.

    Gabriel

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Where does $ServerMaxUploadSizeMega initialize??’ is closed to new replies.