Connecting Tech Pros Worldwide Forums | Help | Site Map

Memory limit troubles on XP(sp3) with PHP5.2.6

Erwin Moller
Guest
 
Posts: n/a
#1: Aug 19 '08

Hi group,

I have an annoying "Out of memory" problem I cannot solve.

Here is the error:
Fatal error: Out of memory (allocated 2028994560) (tried to allocate 35
bytes) in C:\Program Files\Apache Software
Foundation\Apache2.2\htdocs\wav_edit\WavForgeErwin .php on line 95

The PHP file in question DOES need a lot of memory for soundeditting.
My problem is I cannot seem to increase the memorylimit.

I setted in php.ini:
memory_limit = 8000000000
and
memory_limit = 8G
and
memory_limit = 4G
(And restarted Apache)

But all fail around the 2G mentioned above.

I tried php-cgi too:
C:\php>php-cgi.exe -c C:\php -f "C:\Program Files\Apache Software
Foundation\Apache2.2\htdocs\wav_edit\index.php"

But that gave excactly the same error.

I am running:
PHP5.2.6
Apache 2.2
XP prof (SP3) with 4G mem (3.2G adressable)

In Apache conf I have:

# For PHP 5 do something like this:
LoadModule php5_module "c:/php/php5apache2_2.dll"
AddType application/x-httpd-php .php
# configure the path to php.ini
PHPIniDir "C:/php"


As far as I can see PHP in Apache cannot adres more than 2G.

I COULD approach my current problem in another way (cut the file in
little pieces), but that will be a lot of work, since I also have to
change a lot of cuepoints from other sources.

So I hope somebody can help me increasing the memorylimit.

Thanks for your time.

Regards,
Erwin Moller

--
============================
Erwin Moller
Now dropping all postings from googlegroups.
Why? http://improve-usenet.org/
============================
C. (http://symcbean.blogspot.com/)
Guest
 
Posts: n/a
#2: Aug 19 '08

re: Memory limit troubles on XP(sp3) with PHP5.2.6


On 19 Aug, 10:28, Erwin Moller
<Since_humans_read_this_I_am_spammed_too_m...@spam yourself.comwrote:
Quote:
Hi group,
>
I have an annoying "Out of memory" problem I cannot solve.
>
Here is the error:
Fatal error: Out of memory (allocated 2028994560) (tried to allocate 35
bytes) in C:\Program Files\Apache Software
Foundation\Apache2.2\htdocs\wav_edit\WavForgeErwin .php on line 95
>
So that's 1.9 Gb
Quote:
I setted in php.ini:
memory_limit = 8000000000
8Gb
Quote:
XP prof (SP3) with 4G mem (3.2G adressable)
>
So with only 3.2 Gb physically available, how do you expect to
allocate 8Gb?

You are also running into a limit on the intel/PC architecture that
more than 4Gb of memory needs special handling (typically PAE) - and
cannot be allocated as a contigious block (think 32-bit numbers). In
practice ISR that there is a lower limit on XP - something like 3Gb -
a quick google turned up this:

http://www.codinghorror.com/blog/archives/000811.html

If you really need to edit such large files then you'll need to switch
to a 64-bit OS running on fully 64-bit hardware.

C.
Erwin Moller
Guest
 
Posts: n/a
#3: Aug 19 '08

re: Memory limit troubles on XP(sp3) with PHP5.2.6



Erwin Moller schreef:
Quote:
>
Hi group,
>
I have an annoying "Out of memory" problem I cannot solve.
>
Here is the error:
Fatal error: Out of memory (allocated 2028994560) (tried to allocate 35
bytes) in C:\Program Files\Apache Software
Foundation\Apache2.2\htdocs\wav_edit\WavForgeErwin .php on line 95
>
The PHP file in question DOES need a lot of memory for soundeditting.
My problem is I cannot seem to increase the memorylimit.
>
I setted in php.ini:
memory_limit = 8000000000
and
memory_limit = 8G
and
memory_limit = 4G
(And restarted Apache)
>
But all fail around the 2G mentioned above.
>
I tried php-cgi too:
C:\php>php-cgi.exe -c C:\php -f "C:\Program Files\Apache Software
Foundation\Apache2.2\htdocs\wav_edit\index.php"
>
But that gave excactly the same error.
>
I am running:
PHP5.2.6
Apache 2.2
XP prof (SP3) with 4G mem (3.2G adressable)
>
In Apache conf I have:
>
# For PHP 5 do something like this:
LoadModule php5_module "c:/php/php5apache2_2.dll"
AddType application/x-httpd-php .php
# configure the path to php.ini
PHPIniDir "C:/php"
>
>
As far as I can see PHP in Apache cannot adres more than 2G.
>
I COULD approach my current problem in another way (cut the file in
little pieces), but that will be a lot of work, since I also have to
change a lot of cuepoints from other sources.
>
So I hope somebody can help me increasing the memorylimit.
>
Thanks for your time.
>
Regards,
Erwin Moller
>
Hi,

Update: I rewote my class and now it is less memory hungy (and doesn't
fail anymore because of the memorylimit.)
So my problem is solved, but I still wonder if PHP is limitted to 2GB
somehow.

Regards,
Erwin Moller

--
============================
Erwin Moller
Now dropping all postings from googlegroups.
Why? http://improve-usenet.org/
============================
Sashka Mish
Guest
 
Posts: n/a
#4: Aug 20 '08

re: Memory limit troubles on XP(sp3) with PHP5.2.6


Erwin Moller wrote:
Quote:
>
Erwin Moller schreef:
Quote:
>>
>Hi group,
>>
>I have an annoying "Out of memory" problem I cannot solve.
>>
>Here is the error:
>Fatal error: Out of memory (allocated 2028994560) (tried to allocate
>35 bytes) in C:\Program Files\Apache Software
>Foundation\Apache2.2\htdocs\wav_edit\WavForgeErwi n.php on line 95
>>
>The PHP file in question DOES need a lot of memory for soundeditting.
>My problem is I cannot seem to increase the memorylimit.
>>
>I setted in php.ini:
>memory_limit = 8000000000
>and
>memory_limit = 8G
>and
>memory_limit = 4G
>(And restarted Apache)
>>
>But all fail around the 2G mentioned above.
>>
>I tried php-cgi too:
>C:\php>php-cgi.exe -c C:\php -f "C:\Program Files\Apache Software
>Foundation\Apache2.2\htdocs\wav_edit\index.php"
>>
>But that gave excactly the same error.
>>
>I am running:
>PHP5.2.6
>Apache 2.2
>XP prof (SP3) with 4G mem (3.2G adressable)
>>
>In Apache conf I have:
>>
># For PHP 5 do something like this:
>LoadModule php5_module "c:/php/php5apache2_2.dll"
>AddType application/x-httpd-php .php
># configure the path to php.ini
>PHPIniDir "C:/php"
>>
>>
>As far as I can see PHP in Apache cannot adres more than 2G.
>>
>I COULD approach my current problem in another way (cut the file in
>little pieces), but that will be a lot of work, since I also have to
>change a lot of cuepoints from other sources.
>>
>So I hope somebody can help me increasing the memorylimit.
>>
>Thanks for your time.
>>
>Regards,
>Erwin Moller
>>
>
Hi,
>
Update: I rewote my class and now it is less memory hungy (and doesn't
fail anymore because of the memorylimit.)
So my problem is solved, but I still wonder if PHP is limitted to 2GB
somehow.
>
Regards,
Erwin Moller
>
PHP is not limited to anything, but no 32-bit Windows application can
use more then 2Gb of memory. You can allocate to your script more then
2Gb if you used it on OS that can handle more memory per process.
Erwin Moller
Guest
 
Posts: n/a
#5: Aug 20 '08

re: Memory limit troubles on XP(sp3) with PHP5.2.6



Sashka Mish schreef:
Quote:
Erwin Moller wrote:
Quote:
>>
>Erwin Moller schreef:
Quote:
>>>
>>Hi group,
>>>
>>I have an annoying "Out of memory" problem I cannot solve.
>>>
>>Here is the error:
>>Fatal error: Out of memory (allocated 2028994560) (tried to allocate
>>35 bytes) in C:\Program Files\Apache Software
>>Foundation\Apache2.2\htdocs\wav_edit\WavForgeErw in.php on line 95
>>>
>>The PHP file in question DOES need a lot of memory for soundeditting.
>>My problem is I cannot seem to increase the memorylimit.
>>>
>>I setted in php.ini:
>>memory_limit = 8000000000
>>and
>>memory_limit = 8G
>>and
>>memory_limit = 4G
>>(And restarted Apache)
>>>
>>But all fail around the 2G mentioned above.
>>>
>>I tried php-cgi too:
>>C:\php>php-cgi.exe -c C:\php -f "C:\Program Files\Apache Software
>>Foundation\Apache2.2\htdocs\wav_edit\index.php "
>>>
>>But that gave excactly the same error.
>>>
>>I am running:
>>PHP5.2.6
>>Apache 2.2
>>XP prof (SP3) with 4G mem (3.2G adressable)
>>>
>>In Apache conf I have:
>>>
>># For PHP 5 do something like this:
>>LoadModule php5_module "c:/php/php5apache2_2.dll"
>>AddType application/x-httpd-php .php
>># configure the path to php.ini
>>PHPIniDir "C:/php"
>>>
>>>
>>As far as I can see PHP in Apache cannot adres more than 2G.
>>>
>>I COULD approach my current problem in another way (cut the file in
>>little pieces), but that will be a lot of work, since I also have to
>>change a lot of cuepoints from other sources.
>>>
>>So I hope somebody can help me increasing the memorylimit.
>>>
>>Thanks for your time.
>>>
>>Regards,
>>Erwin Moller
>>>
>>
>Hi,
>>
>Update: I rewote my class and now it is less memory hungy (and doesn't
>fail anymore because of the memorylimit.)
>So my problem is solved, but I still wonder if PHP is limitted to 2GB
>somehow.
>>
>Regards,
>Erwin Moller
>>
PHP is not limited to anything, but no 32-bit Windows application can
use more then 2Gb of memory. You can allocate to your script more then
2Gb if you used it on OS that can handle more memory per process.
Thanks Sashka, that must be the resaon then. :-)
Now you tell me, I am quite sure I heard this somewhere before. (I
should fix my own memory.)
Thanks for your time.

Regards,
Erwin Moller

--
============================
Erwin Moller
Now dropping all postings from googlegroups.
Why? http://improve-usenet.org/
============================
Closed Thread