Changing Local PHP Memory Limit

This forum is for issues with installing Joomla! 2.5 (All 1.6 and 1.7 releases have reached end of life and should be updated to 2.5.) on IIS webservers.

Moderator: General Support Moderators

Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
Forum Post Assistant - If you are serious about wanting help, you will use this tool to help you post.
Locked
JackStone
Joomla! Fledgling
Joomla! Fledgling
Posts: 1
Joined: Sun Sep 23, 2012 1:18 am

Changing Local PHP Memory Limit

Post by JackStone » Sun Sep 23, 2012 1:22 am

Hi,

I have an issue with Joomla 2.5.7 running on an IIS 7.5 with PHP 5.4. No matter what I do, I am unable to change the LOCAL php memory limit. It always stays at 128M.
I managed to change the master value but the local value is still 128M.

I also added the ini_set('memory_limit','2048M') to index.php, configuration.php and so on but nothing worked.

You have any tip how to progress here? Probably setting memory limit local in a web.config file?

Thanks for help!

Regards,
Jack

User avatar
Per Yngve Berg
Joomla! Master
Joomla! Master
Posts: 26201
Joined: Mon Oct 27, 2008 9:27 pm
Location: Akershus, Norway

Re: Changing Local PHP Memory Limit

Post by Per Yngve Berg » Sun Sep 23, 2012 11:03 am

Mod. Note: Relocated the topic to the Installation J2.5 on IIS web server.

The file for a IIS server is web.config.

Why do you need such a huge amount of memory? 128M is enough for most sites. Maybe try to change it to 256M.

User avatar
humvee
Joomla! Master
Joomla! Master
Posts: 14713
Joined: Wed Aug 17, 2005 10:27 pm
Location: Kent, England

Re: Changing Local PHP Memory Limit

Post by humvee » Sun Sep 23, 2012 3:07 pm

Also you need to check whether the host, if you are on one, allows local editing of the the memory limit.

You should not add the additional code to any Joomla files whatsoever as it has nothing to do with the Joomla Platform or CMS.

If you are running a localhost installation IIS MySQL and PHP then you edit the main php.ini file in the php/ directory of the installation.

If you are on a remote host and your host permits you to make the changes to your memory_limit then you could try adding the changes to a php.ini file placed in the joomla_root/ and joomla_root/administrator/ directories. Unlike the htaccess file php.ini files do not cascade to lower files and directories so you must have both of them. Or as stated use the web.config file. Either way the code must be correctly added in accordance with PHP rules.

Finally, I would concur with the query - why do you need a 2GB memory limit when most servers function perfectly with 128MB?


Locked

Return to “Joomla! 2.5 on IIS webserver”