php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #42519 misleading comment in php.ini
Submitted: 2007-09-02 13:23 UTC Modified: 2007-09-02 16:38 UTC
From: erich dot iseli at iseli dot org Assigned:
Status: Not a bug Package: Documentation problem
PHP Version: Irrelevant OS: linux
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: erich dot iseli at iseli dot org
New email:
PHP Version: OS:

 

 [2007-09-02 13:23 UTC] erich dot iseli at iseli dot org
Description:
------------
In the following line in php.ini

memory_limit = 8M      ; Maximum amount of memory a script may consume (8MB)

the comment mentions "8MB" but if one really writes "memory_limit = 8MB" then apache would hang when restarting even though it says:

/etc/init.d/apache2 start
 * Starting apache 2.0 web server...     [ ok ]

I'm writing this bug report because I've just experienced this problem and while fixing it, I found out that many others have had the same issue.



Reproduce code:
---------------
replace memory_limit = 8M with
memory_limit = 8MB

Expected result:
----------------
- no misleading comment so that one doesn't even attempt to write "MB" instead of M
- don't say "[ok]" but "[fail]" when restarting apache with the mention that "8MB" is not known, assuming "8 bytes" or "did you mean "8M"? (ok, that would be an apache bug, but I think php should provide this failure message to apache, doesn't it?)
- write more verbose error message to apache error.log


Actual result:
--------------
apache hangs when restarting, consuming a lot of CPU and only writing this to error.log
Allowed memory size of 8 bytes exhausted (tried to allocate 9 bytes)

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2007-09-02 16:38 UTC] nlopess@php.net
we cannot change the way of how apache works nor we want to do that.
I think that the error message in apache log is good enough. Anyway this is not a documentation issue.
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Fri Nov 21 01:00:01 2025 UTC