views:

154

answers:

1

When you are using the latests version of OSX (10.6), does the memory limit of 8M (or whatever you have yours set to) mean that you are now running with 8 000 000 bytes rather than 8 388 608?

+1  A: 

Hi,

There is an entry in the PHP FAQ about shorthand notation :

A few PHP directives may also take on shorthand byte values, as opposed to only integer byte values. What are all the available shorthand byte options? And can I use these outside of php.ini?

The available options are K (for Kilobytes), M (for Megabytes) and G (for Gigabytes; available since PHP 5.1.0), these are case insensitive. Anything else assumes bytes. 1M equals one Megabyte or 1048576 bytes. 1K equals one Kilobyte or 1024 bytes. You may not use these shorthand notations outside of php.ini, instead use an integer value of bytes. See the ini_get() documentation for an example on how to convert these values.

So, in your case, 8M doesn't mean 8 000 000 bytes, but does mean 8 388 608 bytes.

(This doesn't depend on the operating system you are using : the calculation is done by PHP, and memory_limit is implemented by PHP too)

Pascal MARTIN
Thanks, I guess that rules that out as the problem then.
SeanJA