From: Hartleigh Burton on
Hi All,

I am having some problems while uploading a file to a MySQL database
relating to file sizes. I have created a script which successfully
uploads most files to the database, however anything roughly over 1MB
in size seems to return a PHP error. I am not trying to upload
anything larger than 15MB. The error I am getting is as follows:

Fatal error: Allowed memory size of 67108864 bytes exhausted (tried
to allocate 8439363 bytes) in C:\Program Files\Apache Software
Foundation\Apache2.2\htdocs\_dev\mraintranet\settings\common.php on
line 78 (memory_limit = 64M)

I have done a fair bit of reading on the google-net and found that
this is a very common problem. So I started changing the
configuration of the php.ini file to try and resolve it the same way
others have. Currently I have the memory_limit set to 64M, which is
significantly more than the 8M or 12M that is set by default in the
php.ini file. When I bump it up to say 128M or 256M I get the same
error with different exhausted/allocated sizes. I have tried putting
this up to 512M. Example:

Fatal error: Allowed memory size of 134217728 bytes exhausted (tried
to allocate 7311167 bytes) in C:\Program Files\Apache Software
Foundation\Apache2.2\htdocs\_dev\mraintranet\settings\common.php on
line 77 (memory_limit = 128M)

That is uploading the exact same file (which is approximately 3.5MB).
I don't understand why the 'tried to allocate' size is different. I
also don't understand why the error is occurring on different lines.
I have changed post_max_size to 20M. I upgraded to PHP 5.2.1 after
first noticing the problem and reading that this version of PHP had a
lot of memory bug fixes in it. I am using the following software:

Windows 2000 (SP4)
PHP 5.2.1
Apache 2.2.4
MySQL 5.0.27

If anyone has any ideas on how to solve this then the help is greatly
appreciated.



Regards,
Hartleigh Burton.
From: "bedul" on
same here not work for me
----- Original Message -----
From: "Hartleigh Burton" <hburton(a)mraentertainment.com>
To: <php-windows(a)lists.php.net>
Sent: Monday, March 05, 2007 9:13 AM
Subject: [PHP-WIN] Fatal Error: Allocated memory size problem...


> Hi All,
>
> I am having some problems while uploading a file to a MySQL database
> relating to file sizes. I have created a script which successfully
> uploads most files to the database, however anything roughly over 1MB
> in size seems to return a PHP error. I am not trying to upload
> anything larger than 15MB. The error I am getting is as follows:

that's weird.. i upload a pic 1mb more.. it error.. database say.. mysql is
DEAD!! or something like that

to avoid this.. i upload the file to a folder not to database.. is not what
i want but it worked..
why not try upload to localhost instead?
From: Hartleigh Burton on
Hi Bedul,

I appreciate the prompt reply however I am pretty keen to get the
files going directly to the database, mainly for backup reasons.

In a way I am kind of glad that I am not the only person having this
problem.



On 05/03/2007, at 3:57 PM, bedul wrote:

> same here not work for me
> ----- Original Message -----
> From: "Hartleigh Burton" <hburton(a)mraentertainment.com>
> To: <php-windows(a)lists.php.net>
> Sent: Monday, March 05, 2007 9:13 AM
> Subject: [PHP-WIN] Fatal Error: Allocated memory size problem...
>
>
>> Hi All,
>>
>> I am having some problems while uploading a file to a MySQL database
>> relating to file sizes. I have created a script which successfully
>> uploads most files to the database, however anything roughly over 1MB
>> in size seems to return a PHP error. I am not trying to upload
>> anything larger than 15MB. The error I am getting is as follows:
>
> that's weird.. i upload a pic 1mb more.. it error.. database say..
> mysql is
> DEAD!! or something like that
>
> to avoid this.. i upload the file to a folder not to database.. is
> not what
> i want but it worked..
> why not try upload to localhost instead?
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>





Regards,
Hartleigh Burton.


From: Gustav Wiberg on
Hi there!

What fieldtype do you try to store the file in?

Best regards
/Gustav Wiberg


-----Original Message-----
From: Hartleigh Burton [mailto:hburton(a)mraentertainment.com]
Sent: Monday, March 05, 2007 3:14 AM
To: php-windows(a)lists.php.net
Subject: [PHP-WIN] Fatal Error: Allocated memory size problem...

Hi All,

I am having some problems while uploading a file to a MySQL database
relating to file sizes. I have created a script which successfully
uploads most files to the database, however anything roughly over 1MB
in size seems to return a PHP error. I am not trying to upload
anything larger than 15MB. The error I am getting is as follows:

Fatal error: Allowed memory size of 67108864 bytes exhausted (tried
to allocate 8439363 bytes) in C:\Program Files\Apache Software
Foundation\Apache2.2\htdocs\_dev\mraintranet\settings\common.php on
line 78 (memory_limit = 64M)

I have done a fair bit of reading on the google-net and found that
this is a very common problem. So I started changing the
configuration of the php.ini file to try and resolve it the same way
others have. Currently I have the memory_limit set to 64M, which is
significantly more than the 8M or 12M that is set by default in the
php.ini file. When I bump it up to say 128M or 256M I get the same
error with different exhausted/allocated sizes. I have tried putting
this up to 512M. Example:

Fatal error: Allowed memory size of 134217728 bytes exhausted (tried
to allocate 7311167 bytes) in C:\Program Files\Apache Software
Foundation\Apache2.2\htdocs\_dev\mraintranet\settings\common.php on
line 77 (memory_limit = 128M)

That is uploading the exact same file (which is approximately 3.5MB).
I don't understand why the 'tried to allocate' size is different. I
also don't understand why the error is occurring on different lines.
I have changed post_max_size to 20M. I upgraded to PHP 5.2.1 after
first noticing the problem and reading that this version of PHP had a
lot of memory bug fixes in it. I am using the following software:

Windows 2000 (SP4)
PHP 5.2.1
Apache 2.2.4
MySQL 5.0.27

If anyone has any ideas on how to solve this then the help is greatly
appreciated.



Regards,
Hartleigh Burton.
From: "bedul" on

----- Original Message -----
From: "Gustav Wiberg" <gustav(a)hmn.se>
To: "'Hartleigh Burton'" <hburton(a)mraentertainment.com>;
<php-windows(a)lists.php.net>
Sent: Monday, March 05, 2007 2:22 PM
Subject: RE: [PHP-WIN] Fatal Error: Allocated memory size problem...


Hi there!

What fieldtype do you try to store the file in?

[bedul]
since i have same problem. i hope my answer are same as Hartleigh Burton
i use longblob.. it says able to take 2mb?? but i try to execute with 1mb..
it false?
====================================
Best regards
/Gustav Wiberg

-----Original Message-----
From: Hartleigh Burton [mailto:hburton(a)mraentertainment.com]
Sent: Monday, March 05, 2007 3:14 AM
To: php-windows(a)lists.php.net
Subject: [PHP-WIN] Fatal Error: Allocated memory size problem...

Hi All,

I am having some problems while uploading a file to a MySQL database
relating to file sizes. I have created a script which successfully
uploads most files to the database, however anything roughly over 1MB
in size seems to return a PHP error. I am not trying to upload
anything larger than 15MB. The error I am getting is as follows:

Fatal error: Allowed memory size of 67108864 bytes exhausted (tried
to allocate 8439363 bytes) in C:\Program Files\Apache Software
Foundation\Apache2.2\htdocs\_dev\mraintranet\settings\common.php on
line 78 (memory_limit = 64M)

I have done a fair bit of reading on the google-net and found that
this is a very common problem. So I started changing the
configuration of the php.ini file to try and resolve it the same way
others have. Currently I have the memory_limit set to 64M, which is
significantly more than the 8M or 12M that is set by default in the
php.ini file. When I bump it up to say 128M or 256M I get the same
error with different exhausted/allocated sizes. I have tried putting
this up to 512M. Example:

Fatal error: Allowed memory size of 134217728 bytes exhausted (tried
to allocate 7311167 bytes) in C:\Program Files\Apache Software
Foundation\Apache2.2\htdocs\_dev\mraintranet\settings\common.php on
line 77 (memory_limit = 128M)

That is uploading the exact same file (which is approximately 3.5MB).
I don't understand why the 'tried to allocate' size is different. I
also don't understand why the error is occurring on different lines.
I have changed post_max_size to 20M. I upgraded to PHP 5.2.1 after
first noticing the problem and reading that this version of PHP had a
lot of memory bug fixes in it. I am using the following software:

Windows 2000 (SP4)
PHP 5.2.1
Apache 2.2.4
MySQL 5.0.27

If anyone has any ideas on how to solve this then the help is greatly
appreciated.



Regards,
Hartleigh Burton.