0

I'm trying to resize my memory limit by change the php.ini

enter image description here


But when I check using phpinfo() the result is this :

enter image description here

the memory limit still the same as default. I've restart MAMP and nothing changed.
I hope someone can help me to solve this. Thank you.

3 Answers 3

2

Check the config in phpinfo():

  • Configuration File (php.ini) Path => path
  • Loaded Configuration File => path

Is the path the same with the file you changed? Have you restart the apache?

Sign up to request clarification or add additional context in comments.

3 Comments

Configuration File (php.ini) Path is /Applications/MAMP/bin/php/php7.0.12/conf Loaded Configuration File is /Applications/MAMP/bin/php/php7.0.12/conf/php.ini what should I do ?
It seems the php.ini has not been loaded correctly. Is the picture in /Applications/MAMP/bin/php/? If so, try to create a dir named conf and copy the php.ini into the dir. It may work.
oooh, got it. I set the wrong php.ini. Thank you mate :D
0

Here is how it works:

Start MAMP PRO

Stop the server if it's running

Choose Menu -> File -> Edit Template -> PHP4 php.ini (If you want to change the memory limit for PHP5, then choose PHP5 php.ini)

The PHP ini file will be opened.

If a dialogue box pops up, read it and confirm with OK

Search (Command-F) for "memory_limit" (without quotes)

You should get the following line:

memory_limit = 8M ; Maximum amount of memory a script may consume (8M) Now you can change the default value of 8M. For instance. into 32M or even more (like 128M)

Save (Command-S) your changes.

Close (Command-W) the file.

Start the Server.

Credits : http://blog-en.mamp.info/2009/09/increase-php-memory-limit-with-mamp-pro.html

Comments

0

Most probably you're editing the wrong php.ini configuration file.

Check the Loaded Configuration File from phpinfo() output and make sure you're editing the correct php.ini configuration file.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.