Апатичный details archive php.

The Internet Archive offers over 15,000,000 freely downloadable books and texts. There is also a collection of that may be borrowed by anyone with a free сайт account.

Alternatively, our portable Table Top Scanner can also be purchased and used on-site within libraries and archives. To read more about our TT Scribe, please visit .

Since 2005, the Internet Archive has collaborated and built digital collections with over 1,100 Library Institutions and other content providers. Partnerships include: , the and the . These collections are digitized from various mediatypes including: , and a wide variety of . Significant contributions have come from partners in North America ( and Libraries), and , representing more than 184 languages.


The Internet Archive encourages our global community to contribute physical items, as well as uploading digital materials directly to the Internet Archive. If you have digital items that you would like to add to the Internet Archive, please a new item using the uploader interface. Click here to apply the specific creative commons license Creative Commons license to communicate how the material can be used.

For donation of physical books or items, please contact info@сайт


Free to read, download, print, and enjoy. Some have restrictions on bulk re-use and commercial use, please see the collection or the sponsor of a book. By providing near-unrestricted access to these texts, we hope to encourage widespread use of texts in new contexts by people who might not have used them before.

Here are the most important news items we have published in 2007 on сайт.

Security Enhancements and Fixes in PHP 5.2.5:

  • Fixed dl() to only accept filenames. Reported by Laurent Gaffie.
  • Fixed dl() to limit argument size to MAXPATHLEN (CVE-2007-4887). Reported by Laurent Gaffie.
  • Fixed htmlentities/htmlspecialchars not to accept partial multibyte sequences. Reported by Rasmus Lerdorf
  • Fixed possible triggering of buffer overflows inside glibc implementations of the fnmatch(), setlocale() and glob() functions. Reported by Laurent Gaffie.
  • Fixed "mail.force_extra_parameters" php.ini directive not to be modifiable in .htaccess due to the security implications. Reported by SecurityReason.
  • Fixed bug #42869 (automatic session id insertion adds sessions id to non-local forms).
  • Fixed bug #41561 (Values set with php_admin_* in httpd.conf can be overwritten with ini_set()).

For users upgrading to PHP 5.2 from PHP 5.0 and PHP 5.1, an upgrade guide is available , detailing the changes between those releases and PHP 5.2.5.

Security Enhancements and Fixes in PHP 5.2.4:

  • Fixed a floating point exception inside wordwrap() (Reported by Mattias Bengtsson)
  • Fixed several integer overflows inside the GD extension (Reported by Mattias Bengtsson)
  • Fixed size calculation in chunk_split() (Reported by Gerhard Wagner)
  • Fixed integer overflow in str[c]spn(). (Reported by Mattias Bengtsson)
  • Fixed money_format() not to accept multiple %i or %n tokens. (Reported by Stanislav Malyshev)
  • Fixed zend_alter_ini_entry() memory_limit interruption vulnerability. (Reported by Stefan Esser)
  • Fixed INFILE LOCAL option handling with MySQL extensions not to be allowed when open_basedir or safe_mode is active. (Reported by Mattias Bengtsson)
  • Fixed session.save_path and error_log values to be checked against open_basedir and safe_mode (CVE-2007-3378) (Reported by Maksymilian Arciemowicz)
  • Fixed a possible invalid read in glob() win32 implementation (CVE-2007-3806) (Reported by shinnai)
  • Fixed a possible buffer overflow in php_openssl_make_REQ (Reported by zatanzlatan at hotbrev dot com)
  • Fixed an open_basedir bypass inside glob() function (Reported by dr at peytz dot dk)
  • Fixed a possible open_basedir bypass inside session extension when the session file is a symlink (Reported by c dot i dot morris at durham dot ac dot uk)
  • Improved fix for MOPB-03-2007.
  • Corrected fix for CVE-2007-2872.

For users upgrading to PHP 5.2 from PHP 5.0 and PHP 5.1, an upgrade guide is available , detailing the changes between those releases and PHP 5.2.4.

Security Enhancements and Fixes in PHP 5.2.3:

  • Fixed an integer overflow inside chunk_split() (by Gerhard Wagner, CVE-2007-2872)
  • Fixed possible infinite loop in imagecreatefrompng. (by Xavier Roche, CVE-2007-2756)
  • Fixed ext/filter Email Validation Vulnerability (MOPB-45 by Stefan Esser, CVE-2007-1900)
  • Fixed bug #41492 (open_basedir/safe_mode bypass inside realpath()) (by bugs dot php dot net at chsc dot dk)
  • Improved fix for CVE-2007-1887 to work with non-bundled sqlite2 lib.
  • Added mysql_set_charset() to allow runtime altering of connection encoding.

For users upgrading to PHP 5.2 from PHP 5.0 and PHP 5.1, an upgrade guide is available , detailing the changes between those releases and PHP 5.2.3.

Security Enhancements and Fixes in PHP 5.2.2 and PHP 4.4.7:

  • Fixed CVE-2007-1001, GD wbmp used with invalid image size (by Ivan Fratric)
  • Fixed asciiz byte truncation inside mail() (MOPB-33 by Stefan Esser)
  • Fixed a bug in mb_parse_str() that can be used to activate register_globals (MOPB-26 by Stefan Esser)
  • Fixed unallocated memory access/double free in in array_user_key_compare() (MOPB-24 by Stefan Esser)
  • Fixed a double free inside session_regenerate_id() (MOPB-22 by Stefan Esser)
  • Added missing open_basedir & safe_mode checks to zip:// and bzip:// wrappers. (MOPB-21 by Stefan Esser).
  • Fixed CRLF injection inside ftp_putcmd(). (by loveshellBug.Center.Team)
  • Fixed a remotely trigger-able buffer overflow inside bundled libxmlrpc library. (by Stanislav Malyshev)

Security Enhancements and Fixes in PHP 5.2.2 only:

  • Fixed a header injection via Subject and To parameters to the mail() function (MOPB-34 by Stefan Esser)
  • Fixed wrong length calculation in unserialize S type (MOPB-29 by Stefan Esser)
  • Fixed substr_compare and substr_count information leak (MOPB-14 by Stefan Esser) (Stas, Ilia)
  • Fixed a remotely trigger-able buffer overflow inside make_http_soap_request(). (by Ilia Alshanetsky)
  • Fixed a buffer overflow inside user_filter_factory_create(). (by Ilia Alshanetsky)
  • Fixed a possible super-global overwrite inside import_request_variables(). (by Stefano Di Paola, Stefan Esser)
  • Limit nesting level of input variables with max_input_nesting_level as fix for (MOPB-03 by Stefan Esser)

Security Enhancements and Fixes in PHP 4.4.7 only:

  • XSS in phpinfo() (MOPB-8 by Stefan Esser)

While majority of the issues outlined above are local, in some circumstances given specific code paths they can be triggered externally. Therefor, we strongly recommend that if you use code utilizing the functions and extensions identified as having had vulnerabilities in them, you consider upgrading your PHP.

For users upgrading to PHP 5.2 from PHP 5.0 and PHP 5.1, an upgrade guide is available , detailing the changes between those releases and PHP 5.2.2.

Update: May 4th; The PHP 4.4.7 Windows build was updated due to the faulty Apache2 module shipped with the original

Update: May 23th; By accident a couple of fixes where listed as fixed in both PHP 5.2.2 and 4.4.7 but where however only fixed in PHP 5.2.2. The PHP 4 ChangeLog was not affected.

The main issue that this release addresses is a crash problem that was introduced in PHP 4.4.5. The problem occurs when session variables are used while register_globals is enabled.

Details about the PHP 4.4.6 release can be found in the release announcement for 4.4.6 , the full list of changes is available in the ChangeLog for PHP 4 .

Security Enhancements and Fixes in PHP 5.2.1 and PHP 4.4.5:

  • Fixed possible safe_mode & open_basedir bypasses inside the session extension.
  • Fixed unserialize() abuse on 64 bit systems with certain input strings.
  • Fixed possible overflows and stack corruptions in the session extension.
  • Fixed an underflow inside the internal sapi_header_op() function.
  • Fixed non-validated resource destruction inside the shmop extension.
  • Fixed a possible overflow in the str_replace() function.
  • Fixed possible clobbering of super-globals in several code paths.
  • Fixed a possible information disclosure inside the wddx extension.
  • Fixed a possible string format vulnerability in *print() functions on 64 bit systems.
  • Fixed a possible buffer overflow inside ibase_{delete,add,modify}_user() functions.
  • Fixed a string format vulnerability inside the odbc_result_all() function.

Security Enhancements and Fixes in PHP 5.2.1 only:

  • Prevent search engines from indexing the phpinfo() page.
  • Fixed a number of input processing bugs inside the filter extension.
  • Fixed allocation bugs caused by attempts to allocate negative values in some code paths.
  • Fixed possible stack/buffer overflows inside zip, imap & sqlite extensions.
  • Fixed several possible buffer overflows inside the stream filters.
  • Memory limit is now enabled by default.
  • Added internal heap protection.
  • Extended filter extension support for $_SERVER in CGI and apache2 SAPIs.

Security Enhancements and Fixes in PHP 4.4.5 only:

  • Fixed possible overflows inside zip & imap extensions.
  • Fixed a possible buffer overflow inside mail() function on Windows.
  • Unbundled the ovrimos extension.

The majority of the security vulnerabilities discovered and resolved can in most cases be only abused by local users and cannot be triggered remotely. However, some of the above issues can be triggered remotely in certain situations, or exploited by malicious local users on shared hosting setups utilizing PHP as an Apache module. Therefore, we strongly advise all users of PHP, regardless of the version to upgrade to the 5.2.1 or 4.4.5 releases as soon as possible.

For users upgrading to PHP 5.2 from PHP 5.0 and PHP 5.1, an upgrade guide is available , detailing the changes between those releases and PHP 5.2.1.

Update: Feb 14th; Added release information for PHP 4.4.5.

Update: Feb 12th; The Windows install package had problems with upgrading from previous PHP versions. That has now been fixed and new file posted in the download section .

The front page has changed

The news on the front page of сайт has changed, the conference announcements are now located on their own page. The idea is to keep сайт specific news clear and also opens the door for additional news entries, like for RC releases. More changes are on the way so keep an eye out.

PHP Québec is pleased to announce the fifth edition of the PHP Québec Conference . The conference will take place in Montréal, Canada on March 14-15-16th 2007. It features 2 days of technicals talks and an additional day of workshop . Among the speakers, the well know PHP experts such has: Rasmus Lerdorf, Andrei Zmievski, Derick Rethans, Ilia Alshanetsky, John Coggeshall, Damien Séguy, and many more.

The conference has three distinct tracks: Advanced Techniques, Data Availability, PHP: Beyound Theory. With over 35 sessions and workshops, the PHP Québec Conference is great opportunity to learn about the latest development and professional techniques to help you build high quality PHP software and meet with PHP.

Когда нужно быстро выкачать исходники сайта с сервера, даже относительно быстрый SSH тонель не дает нужной скорости. И ждать приходиться очень и очень долго. А еще многие хостинг провайдеры не предоставляют этого доступа, а заставляют довольствоваться FTP, который в разы медленнее.

Лично для себя я определил выход. На сервер закачивается небольшой скрипт и запускается. Через некоторое время получаем архив со всеми исходниками. А один файл, даже по древнему FTP качается гораздо быстрее нежели сотня маленьких.

Ранее на страницах этого блога библиотека zipArchive . Однако, тогда речь шла о распаковке архива.

Для начала, нам потребуется узнать, есть ли на сервере поддержка zipArchive. Это популярная библиотека установлена на подавляющем числе хостингов.

Библиотека жестко ограничена параметрами php и сервера. Огромные базы и банки фотографий заархивировать не получится. Даже базы старой доброй программы 1С для бухгалтерии . Казалось бы в них должны быть лишь текстовые данные. Но нет.

Советую использовать библиотеку, лишь при архивировании относительно небольших сайтов, с огромным числом мелких файлов.

Проверим доступна ли работа с библиотекой

If (!extension_loaded("zip")) { return false; }

Если все хорошо, скрипт продолжит свое выполнение дальше.

Небольшой оффтоп, для таких проверок. Проверки стоит делать именно так, избегая больших конструкций с вложенными скобками. Так код будет более атомарным, и легко будет поддаваться отладке. Сравните

If(a==b){ if(c==d){ if(e==f){ echo "Все условия сработали"; }else echo "e<>f"; }else echo "c<>d"; }else echo "a<>b;

и такой код

If(a!=b) exit("a<>b); if(c!=d) exit("c<>d); if(e!=f) exit("e<>f); echo "Все условия сработали";

Код приятнее и не разрастается на огромные вложенные конструкции.

Простите за оффтоп, но хотелось поделится этой находкой.

Теперь создадим объект и архив.

$zip = new ZipArchive(); if (!$zip->open($destination, ZIPARCHIVE::CREATE)) { return false; }

где $destination - это полный путь до архива. Если архив уже создан, то файлы будут в него дозаписываться.

$zip->addEmptyDir(str_replace($source . "/", "", $file . "/"));

где $source это полный путь до нашей категории (которую мы изначально архивировали), $file - это полный путь до текущей папки. Это сделано для того, чтобы в архиве не было полных путей, а лишь относительные.

Добавление файла работает похожим образом, но нужно сперва прочитать его в строку.

$zip->addFromString(str_replace($source . "/", "", $file), file_get_contents($file));

В конце надо закрыть архив.

Return $zip->close();

Как пробежать все файлы и поддиректории в папке, думаю объяснять не надо. Погуглите, что-то вроде Рекурсивный обход папок на php

Мне подошел такой вариант

Function Zip($source, $destination){ if (!extension_loaded("zip") || !file_exists($source)) { return false; } $zip = new ZipArchive(); if (!$zip->open($destination, ZIPARCHIVE::CREATE)) { return false; } $source = str_replace("\\", "/", realpath($source)); if (is_dir($source) === true){ $files = new RecursiveIteratorIterator(new RecursiveDirectoryIterator($source), RecursiveIteratorIterator::SELF_FIRST); foreach ($files as $file){ $file = str_replace("\\", "/", $file); // Ignore "." and ".." folders if(in_array(substr($file, strrpos($file, "/")+1), array(".", ".."))) continue; $file = realpath($file); $file = str_replace("\\", "/", $file); if (is_dir($file) === true){ $zip->addEmptyDir(str_replace($source . "/", "", $file . "/")); }else if (is_file($file) === true){ $zip->addFromString(str_replace($source . "/", "", $file), file_get_contents($file)); } } }else if (is_file($source) === true){ $zip->addFromString(basename($source), file_get_contents($source)); } return $zip->close(); }