Title: PHP Memory Limit &#8211; wrong value in WP-Stats?
Last modified: August 30, 2016

---

# PHP Memory Limit – wrong value in WP-Stats?

 *  Resolved [haemse](https://wordpress.org/support/users/haemse/)
 * (@haemse)
 * [10 years, 7 months ago](https://wordpress.org/support/topic/php-memory-limit-wrong-value-in-wp-stats/)
 * Hi,
 * in my PHP.ini my memory_limit is set to 512 while on the optimization page of
   wp-statistics settings it says:
 * PHP Memory Limit: 256M
    The memory limit a script is allowed to consume, set 
   in php.ini.
 * Where does it take this value from? Is this a bug?
 * [https://wordpress.org/plugins/wp-statistics/](https://wordpress.org/plugins/wp-statistics/)

Viewing 15 replies - 1 through 15 (of 20 total)

1 [2](https://wordpress.org/support/topic/php-memory-limit-wrong-value-in-wp-stats/page/2/?output_format=md)
[→](https://wordpress.org/support/topic/php-memory-limit-wrong-value-in-wp-stats/page/2/?output_format=md)

 *  Plugin Contributor [Greg Ross](https://wordpress.org/support/users/gregross/)
 * (@gregross)
 * [10 years, 7 months ago](https://wordpress.org/support/topic/php-memory-limit-wrong-value-in-wp-stats/#post-6698340)
 * We use PHP’s ini_get() function to retrieve this value. It should match.
 * Maybe you’ve updated the wrong php.ini?
 *  Thread Starter [haemse](https://wordpress.org/support/users/haemse/)
 * (@haemse)
 * [10 years, 7 months ago](https://wordpress.org/support/topic/php-memory-limit-wrong-value-in-wp-stats/#post-6698343)
 * [http://php.net/manual/de/ini.core.php#ini.memory-limit](http://php.net/manual/de/ini.core.php#ini.memory-limit)
 * As said, i’ve set mine to “512M” in /etc/php5/apache2/php.ini
 *  Plugin Contributor [Greg Ross](https://wordpress.org/support/users/gregross/)
 * (@gregross)
 * [10 years, 7 months ago](https://wordpress.org/support/topic/php-memory-limit-wrong-value-in-wp-stats/#post-6698346)
 * Have you restarted Apache since you made the change?
 *  Thread Starter [haemse](https://wordpress.org/support/users/haemse/)
 * (@haemse)
 * [10 years, 7 months ago](https://wordpress.org/support/topic/php-memory-limit-wrong-value-in-wp-stats/#post-6698351)
 * Yes, several times.
 * See for your self: [https://www.enad.eu/infophp.php](https://www.enad.eu/infophp.php)
 *  Thread Starter [haemse](https://wordpress.org/support/users/haemse/)
 * (@haemse)
 * [10 years, 7 months ago](https://wordpress.org/support/topic/php-memory-limit-wrong-value-in-wp-stats/#post-6698353)
 * [https://www.enad.eu/Capture.PNG](https://www.enad.eu/Capture.PNG)
 *  Plugin Contributor [Greg Ross](https://wordpress.org/support/users/gregross/)
 * (@gregross)
 * [10 years, 7 months ago](https://wordpress.org/support/topic/php-memory-limit-wrong-value-in-wp-stats/#post-6698362)
 * You may need to talk to your hosting provider, we just report back what PHP’s
   ini_get() returns so since it’s wrong it will be beyond our ability to correct.
 *  Thread Starter [haemse](https://wordpress.org/support/users/haemse/)
 * (@haemse)
 * [10 years, 7 months ago](https://wordpress.org/support/topic/php-memory-limit-wrong-value-in-wp-stats/#post-6698365)
 * vServer KVM Debian Apache
 * That’s really strange!
 *  Thread Starter [haemse](https://wordpress.org/support/users/haemse/)
 * (@haemse)
 * [10 years, 7 months ago](https://wordpress.org/support/topic/php-memory-limit-wrong-value-in-wp-stats/#post-6698366)
 * Do you know where the script section is, so i can have a look at it?
 *  Plugin Contributor [Greg Ross](https://wordpress.org/support/users/gregross/)
 * (@gregross)
 * [10 years, 7 months ago](https://wordpress.org/support/topic/php-memory-limit-wrong-value-in-wp-stats/#post-6698375)
 * The WP Statistics code is in wordpress/wp-content/plugins/wp-statistics/includes/
   optimization/tabs/wps-optimization-resources.php
 *  Thread Starter [haemse](https://wordpress.org/support/users/haemse/)
 * (@haemse)
 * [10 years, 7 months ago](https://wordpress.org/support/topic/php-memory-limit-wrong-value-in-wp-stats/#post-6698416)
 * Now this is interesting. If I put
 * `<strong><?php echo ini_get('memory_limit'); ?></strong>`
 * into a .php file the value will adjust according to the main php.ini file after
   apache restart.
 * But the value in the wp statistics resources table will absolutely not change–
   no chance.
 * I changed the value in all my php.ini files on the system (3) and also the suhosin.
   memory_limit value – but still no chance.
 * Also cleared browser cache each time. Isn’t that strange?
 *  Plugin Contributor [Greg Ross](https://wordpress.org/support/users/gregross/)
 * (@gregross)
 * [10 years, 7 months ago](https://wordpress.org/support/topic/php-memory-limit-wrong-value-in-wp-stats/#post-6698419)
 * Very strange. Something must be cached somewhere.
 * Your not using a caching plug are you?
 * Or eAccelorator?
 *  Thread Starter [haemse](https://wordpress.org/support/users/haemse/)
 * (@haemse)
 * [10 years, 7 months ago](https://wordpress.org/support/topic/php-memory-limit-wrong-value-in-wp-stats/#post-6698446)
 * No, none of them … 😐
 * Thanks for your interest in that issue!
 * BTW: wouldn’t it be kind of nice to load the statistics content dynamicly? Quicker,
   easier, cleaner …
 *  Plugin Contributor [Greg Ross](https://wordpress.org/support/users/gregross/)
 * (@gregross)
 * [10 years, 7 months ago](https://wordpress.org/support/topic/php-memory-limit-wrong-value-in-wp-stats/#post-6698459)
 * That’s very strange. I wonder if another plugin is messing with the value for
   some reason. Two things you might want to try:
 * 1. Temporarily disable your other plugins
    2. Grab [http://thisismyurl.com/downloads/wordpress-phpinfo/](http://thisismyurl.com/downloads/wordpress-phpinfo/)
   and see what php_info() reports from within WordPress.
 * Dynamic loading is none of those things 😉 It’s slower (multiple connections 
   back to the servers), harder (lots of javascript and server side code to support
   it) and messier (a whole new layer of code to go wrong).
 *  [chupo_cro](https://wordpress.org/support/users/chupo_cro/)
 * (@chupo_cro)
 * [10 years, 3 months ago](https://wordpress.org/support/topic/php-memory-limit-wrong-value-in-wp-stats/#post-6698654)
 * Same here. From **phpinfo()**:
 * `memory_limit 128M 128M`
 * Reported **by WP-Stats**:
 * `PHP Memory Limit: 256M`
 * The server is mine, fresh WP install, no cache-ing, no interference with other
   plugins.
 *  Plugin Contributor [Greg Ross](https://wordpress.org/support/users/gregross/)
 * (@gregross)
 * [10 years, 3 months ago](https://wordpress.org/support/topic/php-memory-limit-wrong-value-in-wp-stats/#post-6698655)
 * We pull the value through PHP, so if it’s being reported incorrectly we have 
   no control over it.

Viewing 15 replies - 1 through 15 (of 20 total)

1 [2](https://wordpress.org/support/topic/php-memory-limit-wrong-value-in-wp-stats/page/2/?output_format=md)
[→](https://wordpress.org/support/topic/php-memory-limit-wrong-value-in-wp-stats/page/2/?output_format=md)

The topic ‘PHP Memory Limit – wrong value in WP-Stats?’ is closed to new replies.

 * ![](https://ps.w.org/wp-statistics/assets/icon.svg?rev=3081064)
 * [WP Statistics – Simple, privacy-friendly Google Analytics alternative](https://wordpress.org/plugins/wp-statistics/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wp-statistics/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wp-statistics/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-statistics/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-statistics/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-statistics/reviews/)

 * 20 replies
 * 3 participants
 * Last reply from: [chupo_cro](https://wordpress.org/support/users/chupo_cro/)
 * Last activity: [10 years, 3 months ago](https://wordpress.org/support/topic/php-memory-limit-wrong-value-in-wp-stats/page/2/#post-6698662)
 * Status: resolved