Title: Where does $ServerMaxUploadSizeMega initialize??
Last modified: August 21, 2016

---

# Where does $ServerMaxUploadSizeMega initialize??

 *  Resolved [xa2](https://wordpress.org/support/users/xa2/)
 * (@xa2)
 * [12 years, 2 months ago](https://wordpress.org/support/topic/where-does-servermaxuploadsizemega-initialize/)
 * 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://wordpress.org/plugins/profile-builder/](https://wordpress.org/plugins/profile-builder/)

Viewing 6 replies - 1 through 6 (of 6 total)

 *  Plugin Contributor [barinagabriel](https://wordpress.org/support/users/barinagabriel/)
 * (@barinagabriel)
 * [12 years, 2 months ago](https://wordpress.org/support/topic/where-does-servermaxuploadsizemega-initialize/#post-4644515)
 * 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](https://wordpress.org/support/users/xa2/)
 * (@xa2)
 * [12 years, 2 months ago](https://wordpress.org/support/topic/where-does-servermaxuploadsizemega-initialize/#post-4644525)
 * 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](https://wordpress.org/support/users/xa2/)
 * (@xa2)
 * [12 years, 2 months ago](https://wordpress.org/support/topic/where-does-servermaxuploadsizemega-initialize/#post-4644530)
 * If you could re-open this ticket, as the incidence is not resolved…
 *  Plugin Contributor [barinagabriel](https://wordpress.org/support/users/barinagabriel/)
 * (@barinagabriel)
 * [12 years, 2 months ago](https://wordpress.org/support/topic/where-does-servermaxuploadsizemega-initialize/#post-4644531)
 * Doing echo ini_get ( ‘upload_max_filesize’ ); for instance in the function.php
   file what value gets returned?
 *  Thread Starter [xa2](https://wordpress.org/support/users/xa2/)
 * (@xa2)
 * [12 years, 2 months ago](https://wordpress.org/support/topic/where-does-servermaxuploadsizemega-initialize/#post-4644542)
 * 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](https://wordpress.org/support/users/barinagabriel/)
 * (@barinagabriel)
 * [12 years, 2 months ago](https://wordpress.org/support/topic/where-does-servermaxuploadsizemega-initialize/#post-4644567)
 * 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.

 * ![](https://ps.w.org/profile-builder/assets/icon-256x256.png?rev=2961144)
 * [User Profile Builder - Beautiful User Registration Forms, User Profiles & User Role Editor](https://wordpress.org/plugins/profile-builder/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/profile-builder/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/profile-builder/)
 * [Active Topics](https://wordpress.org/support/plugin/profile-builder/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/profile-builder/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/profile-builder/reviews/)

 * 6 replies
 * 2 participants
 * Last reply from: [barinagabriel](https://wordpress.org/support/users/barinagabriel/)
 * Last activity: [12 years, 2 months ago](https://wordpress.org/support/topic/where-does-servermaxuploadsizemega-initialize/#post-4644567)
 * Status: resolved