Allowed memory size of 8388608 bytes exhausted

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

  • Paul
    Guest replied
    Re: Allowed memory size of 8388608 bytes exhausted

    Yes!! Changing the call to use md5_file seemed to do the trick.

    Thanks very much!

    Paul
    -----
    MeerKat <liquidlaughter 2000@blueyonder .co.uk> wrote in message news:<UNT9b.404 0$z11.2769@news-binary.blueyond er.co.uk>...[color=blue]
    > Paul wrote:
    >[color=green]
    > > As suggested, here's some code snippet:
    > >
    > > 25 function insert_file($ga lleryId,$name,$ description,$fi lename, $data,
    > > $size,$type ,$user,$path)
    > > 26 {
    > > 27 global $fgal_use_db, $fgal_use_dir;
    > > 28 $name = addslashes(stri p_tags($name));
    > > 29 if ($fgal_use_db == 'n') {
    > > 30 $checksum = md5(implode('', file($fgal_use_ dir.$path)));
    > > 31 } else {
    > > 32 $checksum = md5($data);
    > > 33 }
    > >
    > > Line 30 seems harmless enough ... just 2 calls to standard PHP
    > > functions...[/color]
    >
    > on line 30, would:
    > $checksum = md5_file($fgal_ use_dir.$path);
    > do a better job? And similar for 32:
    > $checksum = md5_file($data) ;
    >
    > Just a thought...
    >[color=green]
    > > Ideas anyone?
    > >
    > > Paul
    > > --------
    > > Billy.Harvey@th rillseeker.net wrote in message news:<7taa31-aq.ln1@kudzu.th rillseeker.net> ...
    > >[color=darkred]
    > >>In article <6Lr8b.942075$r o6.18730922@new s2.calgary.shaw .ca>,
    > >>Randell D. <you.can.email. me.at.randelld@ yahoo.com> wrote:
    > >>
    > >>>"Paul" <Paul.Sue@telus .com> wrote in message
    > >>>news:8757b52 9.0309120929.41 b47557@posting. google.com...
    > >>>
    > >>>>Hi,
    > >>>>
    > >>>>I'm using TikiWiki and was using its file upload feature, trying to
    > >>>>upload a 2MB file. I get this error:
    > >>>>
    > >>>>Fatal error: Allowed memory size of 8388608 bytes exhausted (tried to
    > >>>>allocate 1677706 bytes) in
    > >>>>/var/html/www/tiki/lib/filegals/filegallib.php on line 30
    > >>
    > >>
    > >>
    > >>>I don't know if I can help - but someone might if you supply some code
    > >>>around line 30 in your script
    > >>>/var/html/www/tiki/lib/filegals/filegallib.php on line 30
    > >>>
    > >>>Perhaps your script is caught in some loop and is eating resources...
    > >>
    > >>I was getting this error recently (yesterday) when attempting to write an
    > >>empty string to a file using fwrite. The loop the write was in would
    > >>not terminate and the file being written to would keep growing.
    > >>
    > >>Billy[/color][/color][/color]

    Leave a comment:


  • Billy.Harvey@thrillseeker.net
    Guest replied
    Re: Allowed memory size of 8388608 bytes exhausted

    In article <6Lr8b.942075$r o6.18730922@new s2.calgary.shaw .ca>,
    Randell D. <you.can.email. me.at.randelld@ yahoo.com> wrote:[color=blue]
    >
    >"Paul" <Paul.Sue@telus .com> wrote in message
    >news:8757b529. 0309120929.41b4 7557@posting.go ogle.com...[color=green]
    >> Hi,
    >>
    >> I'm using TikiWiki and was using its file upload feature, trying to
    >> upload a 2MB file. I get this error:
    >>
    >> Fatal error: Allowed memory size of 8388608 bytes exhausted (tried to
    >> allocate 1677706 bytes) in
    >> /var/html/www/tiki/lib/filegals/filegallib.php on line 30[/color][/color]
    [color=blue]
    >I don't know if I can help - but someone might if you supply some code
    >around line 30 in your script
    >/var/html/www/tiki/lib/filegals/filegallib.php on line 30
    >
    >Perhaps your script is caught in some loop and is eating resources...[/color]

    I was getting this error recently (yesterday) when attempting to write an
    empty string to a file using fwrite. The loop the write was in would
    not terminate and the file being written to would keep growing.

    Billy

    Leave a comment:


  • Randell D.
    Guest replied
    Re: Allowed memory size of 8388608 bytes exhausted


    "Paul" <Paul.Sue@telus .com> wrote in message
    news:8757b529.0 309120929.41b47 557@posting.goo gle.com...[color=blue]
    > Hi,
    >
    > I'm using TikiWiki and was using its file upload feature, trying to
    > upload a 2MB file. I get this error:
    >
    > Fatal error: Allowed memory size of 8388608 bytes exhausted (tried to
    > allocate 1677706 bytes) in
    > /var/html/www/tiki/lib/filegals/filegallib.php on line 30
    >
    > Fatal error: Allowed memory size of 8388608 bytes exhausted (tried to
    > allocate 40 bytes) in Unknown on line 0
    >
    > Fatal error: Allowed memory size of 8388608 bytes exhausted (tried to
    > allocate 134 bytes) in Unknown on line 0
    >
    > My settings are:
    >
    > PHP Version 4.2.2
    > Apache/2.0.40 (Red Hat Linux)
    > memory_limit 8M
    > post_max_size 8M
    > upload_max_file size 5M
    > upload_tmp_dir no value
    > (the machine has 512 MB RAM)
    >
    > No one else is using this server, and that was the only thing I was
    > trying to do (i.e. upload a 2MB file).[/color]

    I don't know if I can help - but someone might if you supply some code
    around line 30 in your script
    /var/html/www/tiki/lib/filegals/filegallib.php on line 30

    Perhaps your script is caught in some loop and is eating resources...


    Leave a comment:


  • Paul
    Guest started a topic Allowed memory size of 8388608 bytes exhausted

    Allowed memory size of 8388608 bytes exhausted

    Hi,

    I'm using TikiWiki and was using its file upload feature, trying to
    upload a 2MB file. I get this error:

    Fatal error: Allowed memory size of 8388608 bytes exhausted (tried to
    allocate 1677706 bytes) in
    /var/html/www/tiki/lib/filegals/filegallib.php on line 30

    Fatal error: Allowed memory size of 8388608 bytes exhausted (tried to
    allocate 40 bytes) in Unknown on line 0

    Fatal error: Allowed memory size of 8388608 bytes exhausted (tried to
    allocate 134 bytes) in Unknown on line 0

    My settings are:

    PHP Version 4.2.2
    Apache/2.0.40 (Red Hat Linux)
    memory_limit 8M
    post_max_size 8M
    upload_max_file size 5M
    upload_tmp_dir no value
    (the machine has 512 MB RAM)

    No one else is using this server, and that was the only thing I was
    trying to do (i.e. upload a 2MB file).
Working...