Loading ...
Sorry, an error occurred while loading the content.

how to copy large file to blob

Expand Messages
  • Sumon
    Hi xprets, Pls inform how I can save a large file to mysql table. I read an uploaded file by the function fread() as ////////////
    Message 1 of 18 , Jul 1, 2005
    • 0 Attachment
      Hi xprets,
      Pls inform how I can save a large file to mysql
      table.

      I read an uploaded file by the function fread() as
      ////////////
      $tmp_file=$HTTP_POST_FILES['userfile']['tmp_name'];
      $fp=fopen($tmp_file,"rb");
      $song=fread($fp,filesize($tmp_file));
      $song=addslashes($song);

      mysql_query("insert into mp3_song
      values('$id','$song')");
      //////////////////
      then if I save the variable '$song' to database table
      at the field longblob, then if the file is greater
      than 2mb,Then it is not saved to database.but <2mb is
      saved.

      Here I configured my php.ini, where maximum upload
      size
      28MB(which is by default 2mb), memory 32MB, the
      maximum size of post data 32mb(which is by default
      8mb)and the necessary changes as i know.

      I can copy the large file (>2mb) to other directory,
      but not to table. So please help me about the filesize
      and php.ini and other which is needed for it.
      NB:- Here the Apache server is at WINDOWS OS
      ///////
      Again,the Apache server at Linux-7.2 os the files of
      type *.mp3,*.wma, etc I cannot upload. When I select
      these type of files by form and submit it to next
      page,
      The browser cannot find the file, but This is not
      happened for *.jpg, *.doc etc.

      Plese inform about the problem and how it can be
      solved.
      Thank u all.

      __________________________________________________
      Do You Yahoo!?
      Tired of spam? Yahoo! Mail has the best spam protection around
      http://mail.yahoo.com
    • Shadow Warrior
      Hi sumon, Saving large files in a database hampers the performance at a great extent. You should not perform this, rather you can store the file in a secured
      Message 2 of 18 , Jul 1, 2005
      • 0 Attachment
        Hi sumon,
        Saving large files in a database hampers the performance at a great
        extent. You should not perform this, rather you can store the file in
        a secured directory in server and save the filename in database.

        before 4/5 months, I was appointed to debug a software. In which they
        store image of all members in MSSQL db. The developer company
        guranteed that the software will not collapse or slow down. But the
        truth is that whole system collapsed after insertion of 2000 records.
        Each select query took arround 3-4 minute to complete. This happen
        only for using those ***** blob fileds without planning.

        Thanks for you snippet. Take care

        Hasin Hayder



        --- In phpexperts@yahoogroups.com, Sumon <sumon_ruet99@y...> wrote:
        >
        > Hi xprets,
        > Pls inform how I can save a large file to mysql
        > table.
        >
        > I read an uploaded file by the function fread() as
        > ////////////
        > $tmp_file=$HTTP_POST_FILES['userfile']['tmp_name'];
        > $fp=fopen($tmp_file,"rb");
        > $song=fread($fp,filesize($tmp_file));
        > $song=addslashes($song);
        >
        > mysql_query("insert into mp3_song
        > values('$id','$song')");
        > //////////////////
        > then if I save the variable '$song' to database table
        > at the field longblob, then if the file is greater
        > than 2mb,Then it is not saved to database.but <2mb is
        > saved.
        >
        > Here I configured my php.ini, where maximum upload
        > size
        > 28MB(which is by default 2mb), memory 32MB, the
        > maximum size of post data 32mb(which is by default
        > 8mb)and the necessary changes as i know.
        >
        > I can copy the large file (>2mb) to other directory,
        > but not to table. So please help me about the filesize
        > and php.ini and other which is needed for it.
        > NB:- Here the Apache server is at WINDOWS OS
        > ///////
        > Again,the Apache server at Linux-7.2 os the files of
        > type *.mp3,*.wma, etc I cannot upload. When I select
        > these type of files by form and submit it to next
        > page,
        > The browser cannot find the file, but This is not
        > happened for *.jpg, *.doc etc.
        >
        > Plese inform about the problem and how it can be
        > solved.
        > Thank u all.
        >
        > __________________________________________________
        > Do You Yahoo!?
        > Tired of spam? Yahoo! Mail has the best spam protection around
        > http://mail.yahoo.com
      • Zip Zap
        Dear Friends, what is the Maximum storage capacity of mySQL?? Regd. Vishal Goyal __________________________________________________ Do You Yahoo!? Tired of
        Message 3 of 18 , Jul 1, 2005
        • 0 Attachment
          Dear Friends,
                            what is the Maximum storage capacity of mySQL??
           
          Regd.
          Vishal Goyal

          __________________________________________________
          Do You Yahoo!?
          Tired of spam? Yahoo! Mail has the best spam protection around
          http://mail.yahoo.com

        • ( *_* )
          Thanks 4 ur information Razon, I refer this PHP function because Rupom wants to know is there any function in PHP which can be use to check this property (see
          Message 4 of 18 , Jul 1, 2005
          • 0 Attachment
            Thanks 4 ur information Razon, I refer this PHP function because Rupom
            wants to know is there any function in PHP which can be use to check
            this property (see below: rupom's post). I just want inform him there
            is a function is PHP and he can give this a try, so I just give the
            link to the manual.
            But ur information will help others' to check out; also rupom himself.

            Thanks
            ( *_* )Emon

            --- In phpexperts@yahoogroups.com, "Md. Shahadat Hossain Khan"
            <razonklnbd@y...> wrote:
            > Hello Emon,
            > If you want to use get_browser() function you need browscap.ini file.
            > And here you need to view your client a extra page. You need to check
            > browser silently from your client. I think this is not possible with
            > this get_browser() function...! But i am not sure cause i can't check
            > this function at my server (www.suchona.com/test/get_growser.php) for
            > browscap.ini file. Yes the advantage of this function is that once you
            > able to execute that function you will get all the information..!
            > Thanks & don't mind its my opinion
            >
            > Razon
            >
            > --- In phpexperts@yahoogroups.com, "( *_* )" <ekramok@y...> wrote:
            > > I think you need this
            > > http://www.php.net/manual/en/function.get-browser.php
            > >
            > > ( *_* )Emon
            > >
            > > --- In phpexperts@yahoogroups.com, Rupom <rupom_315@y...> wrote:
            > > > Hi Xperts,
            > > > How can I check by PHP whether my browser is JS enabled or not? It's
            > > simple and can be done may ways. But I want to know whether there is
            > > any PHP function by which we can check this property.
            > > >
          • ( *_* )
            Thanks 4 ur kind words. u r welcome. ( *_* )Emon
            Message 5 of 18 , Jul 2, 2005
            • 0 Attachment
              Thanks 4 ur kind words.
              u r welcome.

              ( *_* )Emon

              --- In phpexperts@yahoogroups.com, Rupom <rupom_315@y...> wrote:
              >
              > Dear Emon Bhai,
              > Thnx for ur reference. I was really looking this
              > thing.
              > After receiving ur mail, I have implemented it by
              > setting the browscap.ini. And I am successful. I am
              > sharing my success. I am really happy bcoz I have
              > found it in PHP what I was looking.
              >
              > ////My Test Code
              >
              > $browser = get_browser(NULL, true);
              >
              > if($browser['javascript']==1)
              > echo "JS Enabled...";
              > else
              > echo "JS not Enabled...";
              >
              > ///End of My Test Code
              >
              >
              > Thnx and regards,
              >
              > Rupom
              >
              > --- "( *_* )" <ekramok@y...> wrote:
              >
              > > I think you need this
              > >
              > http://www.php.net/manual/en/function.get-browser.php
              > >
              > > ( *_* )Emon
              > >
              > > --- In phpexperts@yahoogroups.com, Rupom
              > > <rupom_315@y...> wrote:
              > > > Hi Xperts,
              > > > How can I check by PHP whether my browser is JS
              > > enabled or not? It's
              > > simple and can be done many ways. But I want to know
              > > whether there is
              > > any PHP function by which we can check this
              > > property.
              > > >
              > > > I m waiting for ur anwsers.
              > > >
              > > > Regards,
              > > >
              > > > Rupom
              > > >
              > > >
              > > > ---------------------------------
              > > > Yahoo! Sports
              > > > Rekindle the Rivalries. Sign up for Fantasy
              > > Football
              > >
              > >
              > >
              > >
              > >
              >
              >
              >
              >
              > ____________________________________________________
              > Yahoo! Sports
              > Rekindle the Rivalries. Sign up for Fantasy Football
              > http://football.fantasysports.yahoo.com
            • Mohammad Sajjad Hossain
              Vishal, You can visit the following link for your answer. http://dev.mysql.com/doc/mysql/en/table-size.html Sajjad Zip Zap wrote: Dear
              Message 6 of 18 , Jul 2, 2005
              • 0 Attachment
                Vishal,
                You can visit the following link for your answer.
                 
                 
                 
                Sajjad
                 

                Zip Zap <zipzap_zen@...> wrote:
                Dear Friends,
                                  what is the Maximum storage capacity of mySQL??
                 
                Regd.
                Vishal Goyal

                __________________________________________________
                Do You Yahoo!?
                Tired of spam? Yahoo! Mail has the best spam protection around
                http://mail.yahoo.com

                Visit ProjectsHosted, online directory for PHP software : http://dev6.php5.nedlinux.com


                Yahoo! Sports
                Rekindle the Rivalries. Sign up for Fantasy Football

              • Rupom
                Emon Bhai & Razon Bhai, First time, i also was not able to work with the default browscap.ini file. But after dowloading the latest browscap.ini from
                Message 7 of 18 , Jul 2, 2005
                • 0 Attachment
                  Emon Bhai & Razon Bhai,

                  First time, i also was not able to work with the
                  default browscap.ini file. But after dowloading the
                  latest browscap.ini from
                  "http://www.garykeith.com/browsers/downloads.asp", I
                  was able to test and it returns all the values related
                  to the browser. I have tested it on localhost.

                  I could not understand why we need to show an extra
                  page?And why we need to check browser silently in the
                  client side? Please make me clear. I will also try to
                  implement it online.

                  Waiting for ur responses.

                  Regards,

                  Rupom
                  --- "( *_* )" <ekramok@...> wrote:

                  > Thanks 4 ur information Razon, I refer this PHP
                  > function because Rupom
                  > wants to know is there any function in PHP which can
                  > be use to check
                  > this property (see below: rupom's post). I just want
                  > inform him there
                  > is a function is PHP and he can give this a try, so
                  > I just give the
                  > link to the manual.
                  > But ur information will help others' to check out;
                  > also rupom himself.
                  >
                  > Thanks
                  > ( *_* )Emon
                  >
                  > --- In phpexperts@yahoogroups.com, "Md. Shahadat
                  > Hossain Khan"
                  > <razonklnbd@y...> wrote:
                  > > Hello Emon,
                  > > If you want to use get_browser() function you need
                  > browscap.ini file.
                  > > And here you need to view your client a extra
                  > page. You need to check
                  > > browser silently from your client. I think this is
                  > not possible with
                  > > this get_browser() function...! But i am not sure
                  > cause i can't check
                  > > this function at my server
                  > (www.suchona.com/test/get_growser.php) for
                  > > browscap.ini file. Yes the advantage of this
                  > function is that once you
                  > > able to execute that function you will get all the
                  > information..!
                  > > Thanks & don't mind its my opinion
                  > >
                  > > Razon
                  > >
                  > > --- In phpexperts@yahoogroups.com, "( *_* )"
                  > <ekramok@y...> wrote:
                  > > > I think you need this
                  > > >
                  >
                  http://www.php.net/manual/en/function.get-browser.php
                  > > >
                  > > > ( *_* )Emon
                  > > >
                  > > > --- In phpexperts@yahoogroups.com, Rupom
                  > <rupom_315@y...> wrote:
                  > > > > Hi Xperts,
                  > > > > How can I check by PHP whether my browser is
                  > JS enabled or not? It's
                  > > > simple and can be done may ways. But I want to
                  > know whether there is
                  > > > any PHP function by which we can check this
                  > property.
                  > > > >
                  >
                  >
                  >
                  >
                  >




                  __________________________________
                  Do you Yahoo!?
                  Read only the mail you want - Yahoo! Mail SpamGuard.
                  http://promotions.yahoo.com/new_mail
                • ( *_* )
                  Ok, rupom there are many ways to check the weather target browser is JavaScript enabled or disabled. Some are already posted in this forum. Omar Al Zabi shows
                  Message 8 of 18 , Jul 2, 2005
                  • 0 Attachment
                    Ok, rupom there are many ways to check the weather target browser is
                    JavaScript enabled or disabled. Some are already posted in this forum.
                    Omar Al Zabi shows another easy trick in his post (Message no 1468)

                    And PHP have a built in function get_browser() but need some
                    configuration directives. So you need to access the PHP ini file which
                    is not possible all the time if you use shared hosting.

                    It is good thinking to make your web application as stable as
                    possible. Consider the condition you write a php script that is ok
                    when PHP's magic_quotes_gpc configuration is turn on but your hosting
                    server make it off in their PHP configuration file. So you make some
                    change in your script and now it's ok to deal with that new server
                    configuration. After several months you need to change your hosting
                    company and found new PHP configuration that doesn't match with your
                    needs. And so …. .

                    But isn't it butter to code such way that will work ok in both
                    configuration or not depend on any configaration?

                    You know your goal
                    Choice is yours

                    ( * _* ) Emon




                    --- In phpexperts@yahoogroups.com, Rupom <rupom_315@y...> wrote:
                    >
                    > Emon Bhai & Razon Bhai,
                    >
                    > First time, i also was not able to work with the
                    > default browscap.ini file. But after dowloading the
                    > latest browscap.ini from
                    > "http://www.garykeith.com/browsers/downloads.asp", I
                    > was able to test and it returns all the values related
                    > to the browser. I have tested it on localhost.
                    >
                    > I could not understand why we need to show an extra
                    > page?And why we need to check browser silently in the
                    > client side? Please make me clear. I will also try to
                    > implement it online.
                    >
                    > Waiting for ur responses.
                    >
                    > Regards,
                    >
                    > Rupom
                    > --- "( *_* )" <ekramok@y...> wrote:
                    >
                    > > Thanks 4 ur information Razon, I refer this PHP
                    > > function because Rupom
                    > > wants to know is there any function in PHP which can
                    > > be use to check
                    > > this property (see below: rupom's post). I just want
                    > > inform him there
                    > > is a function is PHP and he can give this a try, so
                    > > I just give the
                    > > link to the manual.
                    > > But ur information will help others' to check out;
                    > > also rupom himself.
                    > >
                    > > Thanks
                    > > ( *_* )Emon
                    > >
                    > > --- In phpexperts@yahoogroups.com, "Md. Shahadat
                    > > Hossain Khan"
                    > > <razonklnbd@y...> wrote:
                    > > > Hello Emon,
                    > > > If you want to use get_browser() function you need
                    > > browscap.ini file.
                    > > > And here you need to view your client a extra
                    > > page. You need to check
                    > > > browser silently from your client. I think this is
                    > > not possible with
                    > > > this get_browser() function...! But i am not sure
                    > > cause i can't check
                    > > > this function at my server
                    > > (www.suchona.com/test/get_growser.php) for
                    > > > browscap.ini file. Yes the advantage of this
                    > > function is that once you
                    > > > able to execute that function you will get all the
                    > > information..!
                    > > > Thanks & don't mind its my opinion
                    > > >
                    > > > Razon
                    > > >
                    > > > --- In phpexperts@yahoogroups.com, "( *_* )"
                    > > <ekramok@y...> wrote:
                    > > > > I think you need this
                    > > > >
                    > >
                    > http://www.php.net/manual/en/function.get-browser.php
                    > > > >
                    > > > > ( *_* )Emon
                    > > > >
                    > > > > --- In phpexperts@yahoogroups.com, Rupom
                    > > <rupom_315@y...> wrote:
                    > > > > > Hi Xperts,
                    > > > > > How can I check by PHP whether my browser is
                    > > JS enabled or not? It's
                    > > > > simple and can be done may ways. But I want to
                    > > know whether there is
                    > > > > any PHP function by which we can check this
                    > > property.
                    > > > > >
                    > >
                    > >
                    > >
                    > >
                    > >
                    >
                    >
                    >
                    >
                    > __________________________________
                    > Do you Yahoo!?
                    > Read only the mail you want - Yahoo! Mail SpamGuard.
                    > http://promotions.yahoo.com/new_mail
                  • imran rahi
                    Hi Its 4GB... But still try to get int confirmed form others too. Thanks Zip Zap wrote: Dear Friends, what is the Maximum storage
                    Message 9 of 18 , Jul 5, 2005
                    • 0 Attachment
                      Hi
                      Its 4GB...
                      But still try to get int confirmed form others too.
                      Thanks

                      Zip Zap <zipzap_zen@...> wrote:
                      Dear Friends,
                                        what is the Maximum storage capacity of mySQL??
                       
                      Regd.
                      Vishal Goyal

                      __________________________________________________
                      Do You Yahoo!?
                      Tired of spam? Yahoo! Mail has the best spam protection around
                      http://mail.yahoo.com

                      Visit ProjectsHosted, online directory for PHP software : http://dev6.php5.nedlinux.com


                      Yahoo! Sports
                      Rekindle the Rivalries. Sign up for Fantasy Football

                    • Md. Rafiqul Islam
                      Hi Xperts, Maximum storage capacity of MySql depends on MySql version. MySql v3.22 storage capacity: 4GB MySql v3.23 storage capacity: 8 Million TB You may ask
                      Message 10 of 18 , Jul 5, 2005
                      • 0 Attachment
                        Hi Xperts,
                         
                          Maximum storage capacity of MySql depends on MySql version.
                         
                        MySql v3.22 storage capacity: 4GB
                        MySql v3.23 storage capacity: 8 Million TB  
                         
                        You may ask how much can be the number of column of a table can be
                        and it is : 3398
                         
                        Feel free to ask more......
                         
                        Regards
                        Md Rafiqul Islam (Rafiq)


                        imran rahi <imranforphp@...> wrote:
                        Hi
                        Its 4GB...
                        But still try to get int confirmed form others too.
                        Thanks

                        Zip Zap <zipzap_zen@...> wrote:
                        Dear Friends,
                                          what is the Maximum storage capacity of mySQL??
                         
                        Regd.
                        Vishal Goyal

                        __________________________________________________
                        Do You Yahoo!?
                        Tired of spam? Yahoo! Mail has the best spam protection around
                        http://mail.yahoo.com

                        Visit ProjectsHosted, online directory for PHP software : http://dev6.php5.nedlinux.com


                        Yahoo! Sports
                        Rekindle the Rivalries. Sign up for Fantasy Football

                        Visit ProjectsHosted, online directory for PHP software : http://dev6.php5.nedlinux.com

                        Send instant messages to your online friends http://uk.messenger.yahoo.com

                      • Zip Zap
                        Dear Friends, I want to make a e-com website for hotel reservation system can u help me how I start with it… Main Issues are 1) from where I get free
                        Message 11 of 18 , Jul 6, 2005
                        • 0 Attachment

                           

                           

                           

                          Dear Friends,

                                      I want to make a e-com website for hotel reservation system can u help me how I start with it…

                           

                          Main Issues are

                          1)      from where I get free Credit-Card authorization

                          2)      How I connect with mysite

                          3)      How I conform the payments/ get the payments  

                           

                          Regards

                          Vishal Goyal

                          __________________________________________________
                          Do You Yahoo!?
                          Tired of spam? Yahoo! Mail has the best spam protection around
                          http://mail.yahoo.com

                        • Shadow Warrior
                          Hi, follow these steps 1. Create and account in PayPal 2. Check out their marchent tools and setup the call back IPN 3. The callback IPN will be fetched
                          Message 12 of 18 , Jul 6, 2005
                          • 0 Attachment
                            Hi,
                            follow these steps

                            1. Create and account in PayPal
                            2. Check out their marchent tools and setup the call back IPN
                            3. The callback IPN will be fetched everytime when a transaction takes
                            place, with appropiate parameters by which you can know whether it is
                            successful or failed


                            Thanks
                            Hasin

                            --- In phpexperts@yahoogroups.com, Zip Zap <zipzap_zen@y...> wrote:
                            >
                            >
                            >
                            >
                            >
                            >
                            >
                            > Dear Friends,
                            >
                            > I want to make a e-com website for hotel reservation
                            system can u help me how I start with it…
                            >
                            >
                            >
                            > Main Issues are
                            >
                            > 1) from where I get free Credit-Card authorization
                            >
                            > 2) How I connect with mysite
                            >
                            > 3) How I conform the payments/ get the payments
                            >
                            >
                            >
                            > Regards
                            >
                            > Vishal Goyal
                            >
                            >
                            > __________________________________________________
                            > Do You Yahoo!?
                            > Tired of spam? Yahoo! Mail has the best spam protection around
                            > http://mail.yahoo.com
                          • Sadiqur Rahman
                            Hello Dear, You suggest to open an account in PayPal. But PayPal doesn`t support any account from Bangladesh. there are not Bangladesh at Country list in
                            Message 13 of 18 , Jul 6, 2005
                            • 0 Attachment
                              Hello Dear,
                              You suggest to open an account in PayPal. But PayPal doesn`t support
                              any account from Bangladesh. there are not "Bangladesh" at Country
                              list in signUp Page of PayPal. so How Can I Open an account at
                              PayPal And How can My Account be verified by payPal ?

                              Sadiqur Rahman

                              --- In phpexperts@yahoogroups.com, "Shadow Warrior"
                              <augustwind16@y...> wrote:
                              > Hi,
                              > follow these steps
                              >
                              > 1. Create and account in PayPal
                              > 2. Check out their marchent tools and setup the call back IPN
                              > 3. The callback IPN will be fetched everytime when a transaction
                              takes
                              > place, with appropiate parameters by which you can know whether it
                              is
                              > successful or failed
                              >
                              >
                              > Thanks
                              > Hasin
                              >
                              > --- In phpexperts@yahoogroups.com, Zip Zap <zipzap_zen@y...> wrote:
                              > >
                              > >
                              > >
                              > >
                              > >
                              > >
                              > >
                              > > Dear Friends,
                              > >
                              > > I want to make a e-com website for hotel reservation
                              > system can u help me how I start with it…
                              > >
                              > >
                              > >
                              > > Main Issues are
                              > >
                              > > 1) from where I get free Credit-Card authorization
                              > >
                              > > 2) How I connect with mysite
                              > >
                              > > 3) How I conform the payments/ get the payments
                              > >
                              > >
                              > >
                              > > Regards
                              > >
                              > > Vishal Goyal
                              > >
                              > >
                              > > __________________________________________________
                              > > Do You Yahoo!?
                              > > Tired of spam? Yahoo! Mail has the best spam protection around
                              > > http://mail.yahoo.com
                            • StringFella Hawk
                              ll u dont get authorization 4 free. You have to pay something .Try paypal.Best i guess. Support india too ...
                              Message 14 of 18 , Jul 7, 2005
                              • 0 Attachment
                                ll u dont get authorization 4 free.
                                You have to pay something .Try paypal.Best i guess.
                                Support india too

                                --- Zip Zap <zipzap_zen@...> wrote:

                                >
                                >
                                >
                                >
                                >
                                >
                                >
                                > Dear Friends,
                                >
                                > I want to make a e-com website for hotel
                                > reservation system can u help me how I start with
                                > it…
                                >
                                >
                                >
                                > Main Issues are
                                >
                                > 1) from where I get free Credit-Card
                                > authorization
                                >
                                > 2) How I connect with mysite
                                >
                                > 3) How I conform the payments/ get the payments
                                >
                                >
                                >
                                >
                                > Regards
                                >
                                > Vishal Goyal
                                >
                                >
                                > __________________________________________________
                                > Do You Yahoo!?
                                > Tired of spam? Yahoo! Mail has the best spam
                                > protection around
                                > http://mail.yahoo.com




                                ____________________________________________________
                                Sell on Yahoo! Auctions – no fees. Bid on great items.
                                http://auctions.yahoo.com/
                              Your message has been successfully submitted and would be delivered to recipients shortly.