php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #38506 enabling memory limit in windows builds
Submitted: 2006-08-19 00:06 UTC Modified: 2010-12-22 12:58 UTC
Votes:9
Avg. Score:5.0 ± 0.0
Reproduced:5 of 5 (100.0%)
Same Version:5 (100.0%)
Same OS:5 (100.0%)
From: contact-nospampleaz at fplanque dot net Assigned: johannes (profile)
Status: Closed Package: *General Issues
PHP Version: 5.1.5 OS: wiin XP
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: contact-nospampleaz at fplanque dot net
New email:
PHP Version: OS:

 

 [2006-08-19 00:06 UTC] contact-nospampleaz at fplanque dot net
Description:
------------
I was expecting to use enable memory_get_usage() on windows.
It's still not compiled into version 5.1.5 win32. (Although someone said it would).

I would request this for the 4.x branch too. 

No wonder so much PHP code is not memory efficient if windows devs have no way of checking on it. PHP devs on windows are not going to recompile PHP themselves. Doesn't fit the profile! :>

Reproduce code:
---------------
echo memory_get_usage();

Expected result:
----------------
a value

Actual result:
--------------
Fatal error: Call to undefined function memory_get_usage() in c:\www\b2evo\blogs\inc\_misc\_misc.funcs.php on line 1961

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2006-08-20 08:29 UTC] derick@php.net
Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to report
a bug at http://bugs.php.net/how-to-report.php

memory limit is not enabled in our windows builds, which is a requirement for this function.
 [2006-08-23 19:40 UTC] contact-nospampleaz at fplanque dot net
Okay Derick, sorry for formulating this the wrong way around.

I guess this is a little feature/change request to the windows builds.

Would it be possible to enable memory limit in windows builds?

I could not find a reason to why it's not enabled in the manual.

A lot of PHP developers develop on Windows and then upload to a Linux server. Those developpers can't check for memory problems until it is too late. I think this results in a lot of memory inefficient code, because so many developpers have no way to easily check on the memory usage.

I also think most PHP devs on windows cannot help themselves here because they don't have the skills to recompile PHP and uploading to Linux every time is not efficient for them.
 [2010-12-22 12:58 UTC] johannes@php.net
-Status: Open +Status: Closed -Package: Feature/Change Request +Package: *General Issues -Assigned To: +Assigned To: johannes
 [2010-12-22 12:58 UTC] johannes@php.net
memory_limit was changed in that regard some time ago.
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Thu Jul 10 12:01:33 2025 UTC