IIS 7 and Above
migration from apache to IIS cause error "Allowed memory size exhaus...
Last post Sep 28, 2018 09:31 AM by Terry Peng
Sep 14, 2018 01:03 PM|mikamika|LINK
I made an little application on Apache and it works well. I have set the memory_conf at 256M in php.ini.
Today i tried to migrate from apache to IIS, and i got this error "Allowed memory size exhausted". I do not understand why the same php configuration do not work on IIS.
Is there something i missed ?
window server 2012R2
php 7.1.22 NTS VC14 X64
Sep 17, 2018 10:17 AM|Terry Peng|LINK
"Allowed memory size exhausted" is usually related to the memory_limit setting. Are you sure you are setting "memory_conf"? If yes, please try to edit memory_limit instead of memory_conf.
Usually the error message's format is "Fatal Error: Allowed memory size of xxxxxx bytes exhausted". xxxxx should be the memory limit(bytes) you set. For your setting 256M, the number should be 268435456. Please check if you got such number. If not, please
try to check the value of your memory_limit. If you change the setting, will the xxxxx number changed?
Sep 21, 2018 01:14 PM|mikamika|LINK
Hello Teerry thanks you for your answer.
When i come back to version 7 of max_memory error has disappeared.
Now i get this error:
HTTP Error 500.0 - Internal Server Error C: \ Program Files \ PHP \ v7.0 \ php-cgi.exe - The FastCGI process unexpectedly closed Most likely causes: IIS has received the request. However, an internal error occurred while processing the request. The
initial cause of this error depends on the module that handles the request and what happened in the worker process when the error occurred. IIS could not access the web.config file for the website or application. This can occur when NTFS permissions are set
incorrectly. < IIS could not configure the website or application. The authenticated user is not allowed to use this DLL. The request is mapped to a managed code handler, but the .NET Extensibility feature is not installed. Things you can try: Make sure
the NTFS permissions of the web.config file are correct and allow access to the web server's computer account. Check the event log to see if any information have been registered. Check the permissions of the DLL. Install the .NET Extensibility feature if
the request is mapped to a managed code manager. Create a tracking rule to track failed requests for this HTTP status code. For more information about creating a tracking rule for failed requests,
Sep 28, 2018 09:31 AM|Terry Peng|LINK
I'm wondering if you forget to install VC++ runtime.
Please try to go to https://www.microsoft.com/en-us/download/details.aspx?id=52685 to download and isntall VC++ runtime and then run your php site.