Sunday, October 26, 2008

Re: File Download Problem

I just discovered that the default value on mysql server is 1MB. You
can increase the value by adding the following lines to /etc/my.cnf.

[mysqld]
max_allowed_packet=8M

On Oct 23, 1:49 pm, Smelly_Eddie <OlliT...@gmail.com> wrote:
> I know your uploading to MySQL, but it might be the php engine that
> iss cutting you off.
> Check max_upload_size in php.ini, it might be set to 1 MB.
>
> My site's db only uses a Medium blob, and as you can see I have a 1.3
> MB file, among others.
> 1       [BLOB - 23.7 KiB]
> 1       [BLOB - 715 B]
> 1       [BLOB - 13.7 KiB]
> 1       [BLOB - 255.0 KiB]
> 1       [BLOB - 1.3 MiB]
> 1       [BLOB - 756.8 KiB]
>
> And here is the sql i used to create the table. I made no other
> special settings. you'll notice it is a binary table though
>
> CREATE TABLE `digbiz_project_files` (
>   `id` int(11) NOT NULL auto_increment,
>   `project_id` int(11) NOT NULL,
>   `user_id` bigint(20) NOT NULL,
>   `name` varchar(75) collate utf8_bin NOT NULL,
>   `type` varchar(255) collate utf8_bin NOT NULL,
>   `size` int(11) NOT NULL,
>   `data` mediumblob NOT NULL,
>   `created` datetime default NULL,
>   `modified` datetime default NULL,
>   PRIMARY KEY  (`id`),
>   KEY `project_id` (`project_id`),
>   KEY `user_id` (`user_id`)
> ) ENGINE=MyISAM  DEFAULT CHARSET=utf8 COLLATE=utf8_bin
> AUTO_INCREMENT=9 ;
>
> How did you come up with the 999kb limit? Are you sure it is not
> related to the time (php timing out etc)
>
> How do you move the file from the temporary uploaded location to the
> db?
>
> Regards,
>
> Eddie
>
> On Oct 22, 5:38 am, "Da-Omiete Iboroma" <dameli...@gmail.com> wrote:
>
> > Thanks but I  am using just that.  But it cannotuploadany file that
> > is more than 999kb.
>
> > Is there any configuration that I will do to phpmyadmin so that it can
> >uploadfiles that are more than 999kb?
>
> > Thanks
>
> > On 10/21/08, Thanga Durai <pthangadu...@gmail.com> wrote:
>
> > > If you are using blob data type make it as longblob.
>
> > > Thangadurai.
>
> > > On Tue, Oct 21, 2008 at 4:57 PM, AD7six <andydawso...@gmail.com> wrote:
>
> > >> On Oct 20, 3:41 pm, "Da-Omiete Iboroma" <dameli...@gmail.com> wrote:
> > >> > Please I am having problem downloading pdf (Acrobat reader) files that
> > >> > I uploaded in mysql database.
>
> > >> > The file downloads but it does not embed the pdf file in the browser.
>
> > >> > Instead, it opens the pdf file and make the current page blank
>
> > >> > Below is the file download code.  Pls help me
>
> > >> > <?php
> > >> >  $db_name = "database_name";
> > >> > $table_name = "books_table";
> > >> > $connection = mysql_connect("localhost", "username", "password") or
> > >> > die("couldn't connect.");
>
> > >> As this has nothing to do with using CakePHP, thread closed.
>
> > >> Cheers,
>
> > >> AD- Hide quoted text -
>
> > - Show quoted text -
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to cake-php+unsubscribe@googlegroups.com
For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

No comments: