Build Your Own Database-Driven Website Using PHP MySQL [Electronic resources] نسخه متنی

اینجــــا یک کتابخانه دیجیتالی است

با بیش از 100000 منبع الکترونیکی رایگان به زبان فارسی ، عربی و انگلیسی

Build Your Own Database-Driven Website Using PHP MySQL [Electronic resources] - نسخه متنی

Kevin Yank

| نمايش فراداده ، افزودن یک نقد و بررسی
افزودن به کتابخانه شخصی
ارسال به دوستان
جستجو در متن کتاب
بیشتر
تنظیمات قلم

فونت

اندازه قلم

+ - پیش فرض

حالت نمایش

روز نیمروز شب
جستجو در لغت نامه
بیشتر
توضیحات
افزودن یادداشت جدید







Advanced Considerations

In systems like that developed above, large files present some unique
challenges to the developer. I'll explain these here briefly, but fully-developed
solutions to these problems are beyond the scope of this book.


MySQL Packet Size


By default, MySQL does not accept commands (packets) that are longer
than 1MB. This default puts a reasonably severe limit on the maximum file
size you can store, unless you're prepared to write your file data in 1MB
chunks, using an INSERT followed by several UPDATEs.
You can increase the maximum packet size by setting the max_allowed_packet option
in your my.cnf (or my.ini) file. Refer to the MySQL
manual
for more information about this issue.


PHP Script Timeout


PHP is configured by default to kill PHP scripts that run for more than
30 seconds. For large downloads over slow connections, this limit will be
reached fairly quickly! Use PHP's set_time_limit function
to set an appropriate limit for the download to occur, or simply set the time
limit to zero, which allows the script to run to completion, however long
it takes. Don't do this unless you're positive your script will always terminate,
and not run into an infinite loop!

/ 190