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

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Erwin Moller

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


    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\Apac he2.2\htdocs\wa v_edit\WavForge Erwin.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\Apac he2.2\htdocs\wa v_edit\index.ph p"

    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.d ll"
    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/)

    #2
    Re: Memory limit troubles on XP(sp3) with PHP5.2.6

    On 19 Aug, 10:28, Erwin Moller
    <Since_humans_r ead_this_I_am_s pammed_too_m... @spamyourself.c omwrote:
    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\Apac he2.2\htdocs\wa v_edit\WavForge Erwin.php on line 95
    >
    So that's 1.9 Gb
    I setted in php.ini:
    memory_limit = 8000000000
    8Gb
    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:



    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.

    Comment

    • Erwin Moller

      #3
      Re: Memory limit troubles on XP(sp3) with PHP5.2.6


      Erwin Moller schreef:
      >
      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\Apac he2.2\htdocs\wa v_edit\WavForge Erwin.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\Apac he2.2\htdocs\wa v_edit\index.ph p"
      >
      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.d ll"
      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/
      =============== =============

      Comment

      • Sashka Mish

        #4
        Re: Memory limit troubles on XP(sp3) with PHP5.2.6

        Erwin Moller wrote:
        >
        Erwin Moller schreef:
        >>
        >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\Apa che2.2\htdocs\w av_edit\WavForg eErwin.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\Apa che2.2\htdocs\w av_edit\index.p hp"
        >>
        >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.d ll"
        >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.

        Comment

        • Erwin Moller

          #5
          Re: Memory limit troubles on XP(sp3) with PHP5.2.6


          Sashka Mish schreef:
          Erwin Moller wrote:
          >>
          >Erwin Moller schreef:
          >>>
          >>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\Ap ache2.2\htdocs\ wav_edit\WavFor geErwin.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_limi t = 8000000000
          >>and
          >>memory_limi t = 8G
          >>and
          >>memory_limi t = 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\Ap ache2.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.d ll"
          >>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/
          =============== =============

          Comment

          Working...