Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    New Coder
    Join Date
    Feb 2009
    Posts
    10
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Problem with memory limit

    Hi all,

    I have a problem with writing a table from php to an excel table. and I got the following message in the excel instead

    "Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 328 bytes) in \\apsg-build7\www\petra\lib\excel\ExcelWriter.php on line 312"

    the error appear just recently, possibly after more data is added into the table.

    Now I googled the error and is said that I should increase the memory limit in php.ini, I did that already, and it wasn't even 32M to start with. I also checked .htaccess file to check it is overwritten, but it also doesn't.

    Any idea what can happen here?

    Thank you

  • #2
    New Coder
    Join Date
    Feb 2009
    Posts
    38
    Thanks
    0
    Thanked 1 Time in 1 Post
    It could be memory limit problem or it could be problem with excel data.
    The data you are trying to enter should not exceed the memory limit or the max number of rows for the excel application.
    The max number is 65536 rows.
    And for memory limit problems, try this
    write the below code at the top of your php file.
    PHP Code:
    init_set("memory_limit",-1

  • #3
    New Coder
    Join Date
    Feb 2009
    Posts
    10
    Thanks
    2
    Thanked 0 Times in 0 Posts
    hi,

    it didn't work.
    I also changed the php.ini file memory limit to -1, and I checked in phpinfo() the limit already set to -1
    and the excel file doesn't exceed 65536

    any idea what else can cause this?


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •