PHP eats a lot of memory on IIS

50

Windows Cache Extension for PHP

There seem to be a plethora of issues that revolve around the windows cache extension for PHP which sets hard memory limits for php.

Microsoft IIS.net Article

There are examples and blog posts where removing wincache solves the issue but this may have a detrimental affect on performance of the site.

An Example of issues related to wincache that sound similar

Managing PHP Memory in IIS

  • php.ini - located in the root folder. Edit in TextPad and change the value for momory_limit. if 4M is not enough up to 8M, etc.

  • In admin.php (if your error is in here) add a memory limit line after ini_set 'memory_limit', '12M' if 12MB of memory is what you're looking to add

  • You can add a line to .htaccess: php_value memory_limit 32M

  • wp-config.php can control memory. You put a line in that looks like this

    define('WP_MEMORY_LIMIT', '32M');

Information pulled from phpbb.com and technet.microsoft.com

Share:
50

Related videos on Youtube

Marcos Gonzalez
Author by

Marcos Gonzalez

Updated on September 18, 2022

Comments

  • Marcos Gonzalez
    Marcos Gonzalez over 1 year

    Obviously the code below is too naive. How can an very large input be successfully compared with the largest int possible?

    #include <stdio.h>
    #include <limits.h>
    
    int main ( void ) 
    {
        unsigned long long input;
        
        printf("Enter a big integer: ");
        scanf ( "%llu", & input) ;
        
        if ( input > ULLONG_MAX ) printf ( " Too big!\n" ) ;
        else printf ( "%llu is not that big.\n" , input ) ; 
        
        return 0;
    }
    
    • Citizen
      Citizen over 9 years
      What version of IIS and Windows?
    • Novkovski Stevo Bato
      Novkovski Stevo Bato over 9 years
      iis 8.0, windows 2012 standard
  • Novkovski Stevo Bato
    Novkovski Stevo Bato over 9 years
    Tried to disable wincache, restarted iis, confirmed in phpinfo but still fastcgi process is eating all memory limit and tthrow this error...
  • the
    the over 8 years
    How is .htaccess relevant for IIS if not through Helicon Ape? superuser.com/questions/800261/using-htaccess-with-iis