diff --git a/pisi-index.xml b/pisi-index.xml index afae196be2..4bafd2f401 100644 --- a/pisi-index.xml +++ b/pisi-index.xml @@ -7500,7 +7500,7 @@ Library requirements of the OpenCL C programming language Library requirements of the OpenCL C programming language Library requirements of the OpenCL C programming language - https://github.com/llvm/llvm-project/releases/download/llvmorg-16.0.6/libclc-16.0.6.src.tar.xz + https://github.com/llvm/llvm-project/releases/download/llvmorg-18.1.8/libclc-18.1.8.src.tar.xz clang32 @@ -7544,7 +7544,7 @@ libclc-devel Development files for libclc - libclc + libclc /usr/include @@ -7553,6 +7553,13 @@ + + 2024-11-28 + 18.1.8 + Version bump. + Pisi Linux Community + admin@pisilinux.org + 2023-11-04 16.0.6 @@ -13131,7 +13138,7 @@ Mesa, OpenGL belirtiminin (etkileşimli 3B grafiklerin gerçeklenmesi için bir sistem) açık kaynaklı bir uyarlamasıdır. Mesa jest open-source'ową implementacją specyfikacji OpenGL do renderowania trójwymiarowej grafiki. mesa - https://archive.mesa3d.org/mesa-24.2.7.tar.xz + https://archive.mesa3d.org/mesa-24.2.8.tar.xz crossfile.ini @@ -13289,7 +13296,7 @@ libXdamage-devel libXxf86vm-devel libxshmfence-devel - mesa + mesa /usr/include @@ -13368,7 +13375,7 @@ libclc-32bit libunwind-32bit xcb-util-keysyms-32bit - mesa + mesa llvm-32bit @@ -13377,6 +13384,13 @@ + + 2024-11-28 + 24.2.8 + Version bump. + Pisi Linux Community + admin@pisilinux.org + 2024-11-14 24.2.7 @@ -16903,7 +16917,7 @@ Cinnamon window manager based on Mutter Mutter tabanlı Cinnamon Pencere Yöneticisi muffin - https://github.com/linuxmint/muffin/archive/refs/tags/6.2.0.tar.gz + https://github.com/linuxmint/muffin/archive/refs/tags/6.4.0.tar.gz meson elogind-devel @@ -16933,7 +16947,7 @@ pipewire-devel gobject-introspection-devel libXcursor-devel - cinnamon-desktop-devel + cinnamon-desktop-devel libXdamage-devel libXext-devel libcanberra-gtk3-devel @@ -17016,7 +17030,7 @@ muffin-devel development - muffin + muffin atk-devel gtk3-devel cairo-devel @@ -17044,6 +17058,13 @@ + + 2024-11-27 + 6.4.0 + Version bump. + Pisi Linux Community + admin@pisilinux.org + 2024-06-12 6.2.0 @@ -30952,7 +30973,7 @@ Gnome session. Yönetici haklarıyla komut çalıştırma uygulaması sudo allows certain users/groups to run commands with root user privileges. sudo, belirli kullanıcıların ya da kullanıcı gruplarının komut ve uygulamaları yönetici kullanıcı (root) haklarıyla çalıştırmasına izin veren bir konsol uygulamasıdır. - https://www.sudo.ws/dist/sudo-1.9.16p1.tar.gz + https://www.sudo.ws/dist/sudo-1.9.16p2.tar.gz nss-devel pam-devel @@ -31000,6 +31021,13 @@ Gnome session. + + 2024-11-27 + 1.9.16_p2 + Version bump. + Pisi Linux Community + admin@pisilinux.org + 2024-11-15 1.9.16_p1 @@ -44817,7 +44845,7 @@ Gnome session. Translations for Cinnamon and Nemo Cinnamon ve Nemo için çeviriler cinnamon-language - https://github.com/linuxmint/cinnamon-translations/archive/refs/tags/6.2.2.tar.gz + https://github.com/linuxmint/cinnamon-translations/archive/refs/tags/6.4.0.tar.gz make @@ -44831,6 +44859,13 @@ Gnome session. + + 2024-11-27 + 6.4.0 + Version bump + Pisi Linux Community + admin@pisilinux.org + 2024-07-22 6.2.2 @@ -44933,7 +44968,7 @@ Gnome session. The Control Center for Cinnamon Cinnamon için kontrol merkezi cinnamon-control-center - https://github.com/linuxmint/cinnamon-control-center/archive/refs/tags/6.2.0.tar.gz + https://github.com/linuxmint/cinnamon-control-center/archive/refs/tags/6.4.0.tar.gz meson samurai @@ -44965,9 +45000,9 @@ Gnome session. iso-codes-devel mesa-devel desktop-file-utils - cinnamon-settings-daemon-devel - cinnamon-desktop-devel - cinnamon-menus-devel + cinnamon-settings-daemon-devel + cinnamon-desktop-devel + cinnamon-menus-devel docbook-xsl libgnomekbd-devel libxklavier-devel @@ -45036,7 +45071,7 @@ Gnome session. cinnamon-control-center için geliştirme dosyaları development - cinnamon-control-center + cinnamon-control-center gtk3-devel glib2-devel @@ -45046,6 +45081,13 @@ Gnome session. + + 2024-11-27 + 6.4.0 + Version bump + Pisi Linux Community + admin@pisilinux.org + 2024-06-12 6.2.0 @@ -45155,7 +45197,7 @@ Gnome session. Javascript Bindings for Cinnamon Cinnamon için Javascript Bağlayıcıları library - https://github.com/linuxmint/cjs/archive/refs/tags/6.2.0.tar.gz + https://github.com/linuxmint/cjs/archive/refs/tags/6.4.0.tar.gz meson samurai @@ -45196,7 +45238,7 @@ Gnome session. cjs için geliştirme dosyaları development - cjs + cjs glib2-devel cairo-devel libffi-devel @@ -45210,6 +45252,13 @@ Gnome session. + + 2024-11-27 + 6.4.0 + Version bump + Pisi Linux Community + admin@pisilinux.org + 2024-06-12 6.2.0 @@ -45345,7 +45394,7 @@ Gnome session. The Cinnamon Settings daemon Cinnamon ayarları servisi cinnamon - https://github.com/linuxmint/cinnamon-settings-daemon/archive/refs/tags/6.2.0.tar.gz + https://github.com/linuxmint/cinnamon-settings-daemon/archive/refs/tags/6.4.0.tar.gz meson samurai @@ -45353,7 +45402,7 @@ Gnome session. intltool libcanberra-devel dbus-glib-devel - cinnamon-desktop-devel + cinnamon-desktop-devel colord-devel cups-devel fontconfig-devel @@ -45444,7 +45493,7 @@ Gnome session. cinnamon-settings-daemon için geliştirme dosyaları development - cinnamon-settings-daemon + cinnamon-settings-daemon glib2-devel @@ -45453,6 +45502,13 @@ Gnome session. + + 2024-11-27 + 6.4.0 + Version bump + Pisi Linux Community + admin@pisilinux.org + 2024-06-12 6.2.0 @@ -45587,7 +45643,7 @@ Gnome session. Gtk3 timezone map widget, forked from gnome which forked from Ubiquity Gtk3 zaman bölge haritası aracı library - https://github.com/dashea/timezonemap/archive/refs/tags/0.4.5.1.tar.gz + https://github.com/dashea/timezonemap/archive/refs/tags/0.4.5.3.tar.gz gnome-common gobject-introspection-devel @@ -45625,7 +45681,7 @@ Gnome session. timezonemap-devel - timezonemap + timezonemap gtk3-devel glib2-devel json-glib-devel @@ -45637,6 +45693,13 @@ Gnome session. + + 2024-11-27 + 0.4.5.3 + Version bump. + Pisi Linux Community + admin@pisilinux.org + 2023-10-24 0.4.5.1 @@ -46308,7 +46371,7 @@ Gnome session. Screensaver designed to integrate well with the Cinnamon desktop Cinnamon masaüstü ile iyi entegre edilmiş bir ekran koruyucu. cinnamon-screensaver - https://github.com/linuxmint/cinnamon-screensaver/archive/refs/tags/6.2.0.tar.gz + https://github.com/linuxmint/cinnamon-screensaver/archive/refs/tags/6.4.0.tar.gz gnome-common meson @@ -46393,7 +46456,7 @@ Gnome session. cinnamon-screensaver için geliştirme dosyaları development - cinnamon-screensaver + cinnamon-screensaver gtk3-devel glib2-devel libX11-devel @@ -46408,6 +46471,13 @@ Gnome session. + + 2024-11-27 + 6.4.0 + Version bump + Pisi Linux Community + admin@pisilinux.org + 2024-06-12 6.2.0 @@ -46536,7 +46606,7 @@ Gnome session. A menu system for the Cinnamon project A menu system for the Cinnamon project cinnamon - https://github.com/linuxmint/cinnamon-menus/archive/refs/tags/6.2.0.tar.gz + https://github.com/linuxmint/cinnamon-menus/archive/refs/tags/6.4.0.tar.gz meson samurai @@ -46565,7 +46635,7 @@ Gnome session. development glib2-devel - cinnamon-menus + cinnamon-menus /usr/include @@ -46574,6 +46644,13 @@ Gnome session. + + 2024-11-27 + 6.4.0 + Version bump + Pisi Linux Community + admin@pisilinux.org + 2024-06-12 6.2.0 @@ -46634,7 +46711,7 @@ Gnome session. Library with common API for various Cinnamon modules Cinnamon modülleri için çeşitli API kitaplıkları cinnamon-desktop - https://github.com/linuxmint/cinnamon-desktop/archive/refs/tags/6.2.0.tar.gz + https://github.com/linuxmint/cinnamon-desktop/archive/refs/tags/6.4.0.tar.gz meson samurai @@ -46653,7 +46730,9 @@ Gnome session. libxkbfile-devel libXrandr-devel pulseaudio-libs-devel + eudev-devel libxml2-devel + iso-codes-devel config.patch @@ -46664,6 +46743,7 @@ Gnome session. cinnamon-desktop gtk3 + eudev cairo glib2 libX11 @@ -46698,7 +46778,7 @@ Gnome session. libxkbfile-devel pulseaudio-libs-devel gsettings-desktop-schemas-devel - cinnamon-desktop + cinnamon-desktop /usr/include @@ -46707,6 +46787,13 @@ Gnome session. + + 2024-11-27 + 6.4.0 + Version bump + Pisi Linux Community + admin@pisilinux.org + 2024-06-12 6.2.0 @@ -46788,7 +46875,7 @@ Gnome session. Cinnamon-session manages a Cinnamon desktop or GDM login session. It starts up the other core components and handles logout and saving the session. Cinnamon oturumu bir Cinnamon masaüstü veya GDM giriş oturumunu yönetir. cinnamon - https://github.com/linuxmint/cinnamon-session/archive/refs/tags/6.2.1.tar.gz + https://github.com/linuxmint/cinnamon-session/archive/refs/tags/6.4.0.tar.gz xmlto meson @@ -46822,7 +46909,7 @@ Gnome session. pangox-compat-devel xkeyboard-config util-linux - cinnamon-desktop-devel + cinnamon-desktop-devel desktop/cinnamon/cinnamon-session/pspec.xml @@ -46858,6 +46945,13 @@ Gnome session. + + 2024-11-27 + 6.4.0 + Version bump. + Pisi Linux Community + admin@pisilinux.org + 2024-07-20 6.2.1 @@ -46953,7 +47047,7 @@ Gnome session. File manager for Cinnamon Cinnamon için Dosya Yöneticisi nemo - https://github.com/linuxmint/nemo/archive/refs/tags/6.2.8.tar.gz + https://github.com/linuxmint/nemo/archive/refs/tags/6.4.0.tar.gz meson samurai @@ -46968,8 +47062,8 @@ Gnome session. libXext-devel librsvg-devel libXrender-devel - cinnamon-desktop-devel - cinnamon-translations + cinnamon-desktop-devel + cinnamon-translations libSM-devel atk-devel gsettings-desktop-schemas-devel @@ -46992,6 +47086,9 @@ Gnome session. gdk-pixbuf-devel json-glib-devel + + 6ae2a89.patch + desktop/cinnamon/nemo/pspec.xml @@ -47044,7 +47141,7 @@ Gnome session. nemo için geliştirme dosyaları development - nemo + nemo gtk3-devel glib2-devel @@ -47055,6 +47152,13 @@ Gnome session. + + 2024-11-27 + 6.4.0 + Version bump. + Pisi Linux Community + admin@pisilinux.org + 2024-08-09 6.2.8 @@ -47260,7 +47364,7 @@ Gnome session. Various extensions for Nemo Various extensions for Nemo nemo - https://github.com/linuxmint/nemo-extensions/archive/refs/tags/6.2.0.tar.gz + https://github.com/linuxmint/nemo-extensions/archive/refs/tags/6.4.0.tar.gz clutter-devel mozjs-102-devel @@ -47282,11 +47386,14 @@ Gnome session. gtksourceview4-devel musicbrainz5-devel dbus-glib-devel - nemo-devel - cinnamon-desktop-devel + nemo-devel + cinnamon-desktop-devel libcryptui-devel webkit2gtk-4.1-devel + + 9cd1e89.patch + desktop/cinnamon/nemo-extensions/pspec.xml @@ -47485,6 +47592,13 @@ Gnome session. + + 2024-11-27 + 6.4.0 + Version bump + Pisi Linux Community + admin@pisilinux.org + 2024-06-13 6.2.0 @@ -47719,7 +47833,7 @@ Gnome session. desktop.cinnamon Mint-X GTK2, GTK3, Metacity and Xfce theme. Mint-X GTK2, GTK3, Metacity and Xfce theme. - http://packages.linuxmint.com/pool/main/m/mint-themes/mint-themes_2.1.8.tar.xz + http://packages.linuxmint.com/pool/main/m/mint-themes/mint-themes_2.1.9.tar.xz sassc optipng @@ -47735,6 +47849,13 @@ Gnome session. + + 2024-11-27 + 2.1.9 + Version bump + Pisi Linux Community + admin@pisilinux.org + 2024-06-30 2.1.8 @@ -85373,7 +85494,7 @@ Gnome session. mate-notification-daemon is the server implementation of the Mate desktop notification specification. mate-notification-daemon Mate projesinin masaüstü bilgilendirme hizmeti uygulamasını içerir. mate-notification-properties - http://pub.mate-desktop.org/releases/1.28/mate-notification-daemon-1.28.1.tar.xz + http://pub.mate-desktop.org/releases/1.28/mate-notification-daemon-1.28.3.tar.xz intltool python3-devel @@ -85421,6 +85542,13 @@ Gnome session. + + 2024-11-27 + 1.28.3 + Version bump + Pisi Linux Community + admin@pisilinux.org + 2024-09-25 1.28.1 @@ -88823,7 +88951,7 @@ Gnome session. Applets for MATE panel. Applets for the MATE Desktop and Panel mate - http://pub.mate-desktop.org/releases/1.28/mate-applets-1.28.0.tar.xz + http://pub.mate-desktop.org/releases/1.28/mate-applets-1.28.1.tar.xz pam-devel libgtop-devel @@ -88898,6 +89026,13 @@ Gnome session. + + 2024-11-27 + 1.28.1 + Version bump. + Pisi Linux Community + admin@pisilinux.org + 2024-09-25 1.28.0 @@ -140822,7 +140957,7 @@ It supports email, address books, calendars, tasks, news feeds and much more.Kernel based performance profiler Çekirdek tabanlı performans profili oluşturucu Çekirdek tabanlı performans profili oluşturucu - https://download.gnome.org/sources/sysprof/47/sysprof-47.1.tar.xz + https://download.gnome.org/sources/sysprof/47/sysprof-47.2.tar.xz meson itstool @@ -140874,7 +141009,7 @@ It supports email, address books, calendars, tasks, news feeds and much more.sysprof-devel Development files for sysprof - sysprof + sysprof gtk4-devel glib2-devel libdex-devel @@ -140889,6 +141024,13 @@ It supports email, address books, calendars, tasks, news feeds and much more. + + 2024-11-27 + 47.2 + Version bump. + Pisi Linux Community + admin@pisilinux.org + 2024-11-05 47.1 @@ -416758,13 +416900,13 @@ functionality to build high-performing, platform-independent programs.Wireless daemon for Linux Linux için kablosuz arka plan programı Linux için kablosuz arka plan programı - https://mirrors.edge.kernel.org/pub/linux/network/wireless/iwd-3.1.tar.xz + https://mirrors.edge.kernel.org/pub/linux/network/wireless/iwd-3.2.tar.xz asciidoc dbus-devel readline-devel python3-docutils - ell-devel + ell-devel network/connection/iwd/pspec.xml @@ -416785,6 +416927,13 @@ functionality to build high-performing, platform-independent programs. + + 2024-11-27 + 3.2 + Version bump. + Pisi Linux Community + admin@pisilinux.org + 2024-11-08 3.1 @@ -426699,7 +426848,7 @@ complete albums that you have purchased from Amazon. Embedded Linux library Gömülü Linux kitaplığı Gömülü Linux kitaplığı - https://mirrors.edge.kernel.org/pub/linux/libs/ell/ell-0.70.tar.xz + https://mirrors.edge.kernel.org/pub/linux/libs/ell/ell-0.71.tar.xz network/misc/ell/pspec.xml @@ -426713,7 +426862,7 @@ complete albums that you have purchased from Amazon. ell-devel Development files for ell - ell + ell /usr/include @@ -426721,6 +426870,13 @@ complete albums that you have purchased from Amazon. + + 2024-11-27 + 0.71 + Version bump. + Pisi Linux Community + admin@pisilinux.org + 2024-11-08 0.70 @@ -442325,6 +442481,292 @@ provide integrated access to the cloud providers services. + + + php8 + http://www.php.net + + Fatih Turgel + turgelfatih@gmail.com + + PHP + library + programming.language.php + PHP7 is an HTML-embedded scripting language. The goal of the language is to allow web developers to write dynamically generated pages quickly + PHP7 is an HTML-embedded scripting language. Much of its syntax is borrowed from C, Java and Perl with a couple of unique PHP-specific features thrown in. The goal of the language is to allow web developers to write dynamically generated pages quickly. + https://www.php.net/distributions/php-8.3.13.tar.xz + + gd-devel + re2c + libzip-devel + harfbuzz-devel + apr-devel + apr-util-devel + apache + postfix + libxslt-devel + db-devel + mariadb-lib + libmcrypt-devel + mit-kerberos-devel + libc-client + postgresql-server + libjpeg-turbo-devel + zlib-devel + curl-devel + gdbm-devel + libpng-devel + freetype-devel + openssl-devel + sqlite-devel + oniguruma-devel + keyutils + + + db6.patch + + programming/php/php8/pspec.xml + + + php8-cli + + php-common + gd + curl + zlib + bzip2 + libpng + libxslt + libxml2 + freetype + mariadb-lib + libmcrypt + mit-kerberos + postgresql-lib + openldap-client + libjpeg-turbo + oniguruma + sqlite + openssl + + + /etc/php/cli + /usr/bin + /usr/share/man + + + php-cli + + + go-pear + + + + php8-common + Common config files for PHP + + db + gd + pam + gdbm + mit-kerberos + + + /usr/lib/php/modules + /usr/share/php7 + /etc/php/ext + + + php-common + + + + php8-devel + Development files for PHP + + php-common + + + /usr/bin/php-config + /usr/bin/phpize + /usr/include + /usr/lib/php/build + /usr/share/man/man1/php-config* + /usr/share/man/man1/phpize* + + + php-devel + + + + php8-pear + Development files for PHP + + php-common + + + /etc/pear.conf + /usr/bin/pear + /usr/bin/go-pear + /usr/lib/php/PEAR/ + /usr/lib/php/Structures + /usr/lib/php/.lock + /usr/lib/php/peclcmd.php + /usr/lib/php/pearcmd.php + /usr/lib/php/System.php + /usr/lib/php/PEAR.php + /usr/lib/php/.filemap + /usr/lib/php/.registry/ + /usr/lib/php/Console/Getopt.php + /usr/lib/php/XML/Util.php + /usr/lib/php/Archive/Tar.php + /usr/lib/php/test/XML_Util + /usr/lib/php/test/Structures_Graph + /usr/lib/php/test/Console_Getopt + /usr/lib/php/.channels + /usr/lib/php/doc/ + /usr/lib/php/data/PEAR/ + /usr/lib/php/OS/Guess.php + + + php-pear + + + + mod_php8 + server.web + + xz + pam + curl + zlib + bzip2 + libnsl + libpng + apache + libxml2 + freetype + libtool-ltdl + mariadb-lib + postgresql-lib + gd + libxslt + mit-kerberos + openldap-client + cyrus-sasl + harfbuzz + php-common + libmcrypt + libjpeg-turbo + sqlite + openssl + e2fsprogs + oniguruma + + + /usr/lib/apache2/modules/libphp.so + /etc/apache2 + /etc/php/apache2 + + + mod_php + + + 70_mod_php8.conf + + + + php8-zip + Zip extension for PHP + + php-common + pam + libzip + mit-kerberos + + + /usr/lib/php/modules/zip.so + /etc/php/cli/ext/10-php-zip.ini + /etc/php/ext/10-php-zip.ini + + + php-zip + + + 10-php-zip.ini + + + + php8-imap + Module for PHP to enable IMAP support + + pam + openssl + e2fsprogs + php-common + libc-client + mit-kerberos + + + /usr/lib/php/modules/imap.so + /etc/php/ext/11-php-imap.ini + /etc/php/cli/ext/11-php-imap.ini + /etc/php/apache2/ext/11-php-imap.ini + + + php-imap + + + 11-php-imap.ini + + + + php8-fpm + FPM for PHP + + libxslt + libmcrypt + php-common + libjpeg-turbo + postgresql-lib + openldap-client + curl + zlib + bzip2 + sqlite + libxml2 + openssl + oniguruma + + + /usr/sbin/php-fpm + /usr/share/man/man8/php-fpm.8 + /etc/php/ext/php-fpm.conf + /etc/php-fpm.d/www.conf.default + /usr/share/fpm + /run + /var/log + + + php-fpm + + + System.Service + + + php-fpm.conf + + + + + 2024-10-25 + 8.3.13 + First release + Pisi Linux Community + admin@pisilinux.org + + + php diff --git a/pisi-index.xml.sha1sum b/pisi-index.xml.sha1sum index 1119caa47c..10214273e2 100644 --- a/pisi-index.xml.sha1sum +++ b/pisi-index.xml.sha1sum @@ -1 +1 @@ -7a80210668d2360afe2a430d28e2f81190c1594c \ No newline at end of file +3d106a0880875c1f015a64872b42bbe1588a5847 \ No newline at end of file diff --git a/pisi-index.xml.xz b/pisi-index.xml.xz index ef7d35fdb2..57ab918718 100644 Binary files a/pisi-index.xml.xz and b/pisi-index.xml.xz differ diff --git a/pisi-index.xml.xz.sha1sum b/pisi-index.xml.xz.sha1sum index 38a56db95c..ec84fc9a99 100644 --- a/pisi-index.xml.xz.sha1sum +++ b/pisi-index.xml.xz.sha1sum @@ -1 +1 @@ -5a5fb1ef6a41f604e9c91b1076d443ef65baa0bb \ No newline at end of file +226fb1bdf2368649a4dcde065a6d3a44cb590b07 \ No newline at end of file diff --git a/programming/php/php8/actions.py b/programming/php/php8/actions.py new file mode 100644 index 0000000000..0c71f374d5 --- /dev/null +++ b/programming/php/php8/actions.py @@ -0,0 +1,210 @@ +#!/usr/bin/python +# -*- coding: utf-8 -*- +# +# Licensed under the GNU General Public License, version 3. +# See the file http://www.gnu.org/licenses/gpl.txt + +from pisi.actionsapi import get +from pisi.actionsapi import autotools +from pisi.actionsapi import pisitools +from pisi.actionsapi import shelltools + +def extensions(): + configure_disabled = [] + + configure_enabled = [ + 'exif', 'ftp', 'soap', 'sockets', 'bcmath', + 'dom', 'wddx', 'tokenizer', 'simplexml', 'mbstring', 'calendar', + 'gd-native-ttf', 'gd' + ] + configure_shared = [ + 'dba', 'embedded-mysqli', 'zip', 'gd' + ] + configure_with = [ + 'bz2', 'curl', 'iconv', 'mysql', 'mysqli', 'kerberos', 'sqlite3', + 'xsl', 'gdbm', 'db', 'ldap', 'gd', 'gettext', + 'regex=php', 'pic', 'pcre-regex', 'pgsql', 'pdo-mysql', 'pdo-pgsql', + 'openssl' + ] + configure_without = [] + + conf = [] + for i in configure_disabled: + conf.append("--disable-%s" % i) + for i in configure_enabled: + conf.append("--enable-%s " % i) + for i in configure_shared: + conf.append("--enable-%s=shared" % i) + for i in configure_with: + conf.append("--with-%s" % i) + for i in configure_without: + conf.append("--without-%s" % i) + + return ' '.join(conf) + +def setup(): + #shelltools.unlinkDir("ext/openssl") + + # create directories for apache, fcgi and fpm's Makefiles + shelltools.makedirs("fcgi") + shelltools.makedirs("apache") + shelltools.makedirs("fpm") + shelltools.makedirs("common") + + # link configure script + shelltools.sym("../configure", "fcgi/configure") + shelltools.sym("../configure", "apache/configure") + shelltools.sym("../configure", "fpm/configure") + shelltools.sym("../configure", "common/configure") + + shelltools.export("LC_ALL", "C") + shelltools.export("CFLAGS", "%s -fwrapv -lkrb5 -lgssapi_krb5 -lpam -DU_USING_ICU_NAMESPACE=1" % get.CFLAGS()) + shelltools.export("NO_INTERACTION", "1") + shelltools.export("EXTENSION_DIR", "/usr/lib/php/modules") + + # shelltools.system("sed -i '/APACHE_THREADED_MPM=/d' sapi/apache2handler/config.m4") + # pisitools.dosed("ext/pgsql/config.m4", "include/postgresql", " include/postgresql/pgsql") + + # Don't touch apache.conf + # for i in pisitools.ls("sapi/*/config.m4"): + # pisitools.dosed(i, "\\-i \\-a \\-n php8", "-i -n php8") + # pisitools.dosed(i, "\\-i \\-A \\-n php8", "-i -n php8") + + autotools.autoconf() + + # workaround for pkg-config 0.28 + pisitools.dosed("configure", " && test -n \"\$OPENSSL_INCS\"") + + common_options = "--sysconfdir=/etc \ + --cache-file=./config.cache \ + --with-zlib-dir=/usr/lib \ + --with-libxml-dir=/usr/lib \ + --with-jpeg-dir=/usr/lib/ \ + --with-png-dir=/usr/lib/ \ + --with-freetype-dir=/usr \ + --with-zend-vm=GOTO \ + --with-zend-vm=SWITCH \ + --with-db4=/usr/lib \ + --with-pic \ + --with-libzip \ + --with-gnu-ld \ + --enable-gd=shared \ + --with-external-gd \ + --config-cache \ + --with-system-tzdata=/usr/share/zoneinfo \ + --with-mcrypt=/usr/bin/mcrypt \ + --with-imap=shared \ + --with-imap-ssl \ + --with-mysql-sock=/run/mysqld/mysqld.sock \ + --with-pear \ + --with-zlib \ + --with-zip=shared \ + --disable-rpath \ + " + + # Enable FastCGI and CGI + shelltools.cd("fcgi") + autotools.configure("--enable-cgi \ + --disable-cli \ + --with-config-file-path=/etc/php/cli \ + --with-config-file-scan-dir=/etc/php/cli/ext \ + %s \ + %s" % (common_options, extensions())) + + # Enable Apache + shelltools.cd("../apache") + autotools.configure("--with-apxs2=/usr/bin/apxs \ + --disable-cli \ + --with-config-file-path=/etc/php/apache2 \ + --with-config-file-scan-dir=/etc/php/apache2/ext \ + %s \ + %s" % (common_options, extensions())) + # Enable FPM + shelltools.cd("../fpm") + autotools.configure("--enable-fpm \ + --disable-cli \ + --with-fpm-user=apache \ + --with-fpm-group=apache \ + --with-config-file-path=/etc/php/apache2 \ + --with-config-file-scan-dir=/etc/php/apache2/ext \ + %s \ + %s" % (common_options, extensions())) + + # Enable common + shelltools.cd("../common") + autotools.configure("--enable-cli \ + --enable-phpdbg \ + %s \ + %s" % (common_options, extensions())) + + +def build(): + shelltools.cd("fcgi") + shelltools.export("LC_ALL", "en_US.UTF-8") + autotools.make() + + shelltools.cd("../apache") + autotools.make() + + shelltools.cd("../fpm") + autotools.make() + + shelltools.cd("../common") + autotools.make() + + +def check(): + shelltools.cd("apache") + autotools.make("test") + +def install(): + shelltools.cd("fcgi") + # autotools.rawInstall("INSTALL_ROOT=\"%s\"" % get.installDIR(), "install-modules install-build install-headers install-programs install-pharcmd") + autotools.rawInstall("INSTALL_ROOT=\"%s\"" % get.installDIR(), "install-cgi") + autotools.rawInstall("INSTALL_ROOT=\"%s\"" % get.installDIR(), "install-sapi") + + shelltools.cd("../apache") + # autotools.rawInstall("INSTALL_ROOT=\"%s\"" % get.installDIR(), "install-modules install-sapi") + pisitools.insinto("/usr/lib/apache2/modules", "libs/libphp.so") + shelltools.chmod(get.installDIR() + "/usr/lib/apache2/modules/libphp.so") + + shelltools.cd("../fpm") + autotools.rawInstall("INSTALL_ROOT=\"%s\"" % get.installDIR(), "install-fpm") + + shelltools.cd("../common") + autotools.rawInstall("INSTALL_ROOT=\"%s\"" % get.installDIR(), "install") + + shelltools.cd("..") + + pisitools.insinto("/etc/php/apache2/", "php.ini-development", "php.ini") + pisitools.insinto("/etc/php/cli/", "php.ini-development", "php.ini") + + pisitools.dosed("%s/etc/php/*/php.ini" % get.installDIR(), "(extension_dir = .*)", ";\\1") + pisitools.dosed("%s/etc/php/*/php.ini" % get.installDIR(), r";include_path = \".:/php/includes\"", + "include_path = \".:/usr/share/php5/PEAR\"") + + pisitools.dodir("/etc/php/ext") + pisitools.dodir("/etc/php/apache2/ext") + pisitools.dodir("/etc/php/cli/ext") + + # Operations for php-zip package + pisitools.dosym("/etc/php/ext/10-php-zip.ini", "/etc/php/cli/ext/10-php-zip.ini") + + # Operations for php-imap package + pisitools.dosym("/etc/php/ext/11-php-imap.ini", "/etc/php/cli/ext/11-php-imap.ini") + pisitools.dosym("/etc/php/ext/11-php-imap.ini", "/etc/php/apache2/ext/11-php-imap.ini") + + # Move /var/run to run + pisitools.domove("/var/run", "/") + + pisitools.remove("/etc/php-fpm.conf.default") + + pisitools.dodir("/var/log/php-fpm/") + + pisitools.remove("/.depdb") + pisitools.remove("/.depdblock") + pisitools.remove("/.lock") + pisitools.remove("/.filemap") + pisitools.removeDir("/.channels") + pisitools.removeDir("/.registry") + diff --git a/programming/php/php8/comar/service.py b/programming/php/php8/comar/service.py new file mode 100644 index 0000000000..011ac709de --- /dev/null +++ b/programming/php/php8/comar/service.py @@ -0,0 +1,29 @@ +from comar.service import * +import os + +serviceType = "server" +serviceDesc = _({"en": "The PHP FastCGI Process Manager", + "tr": "The PHP FastCGI Süreç Yöneticisi"}) + +PIDFILE = "/run/php-fpm.pid" +CONFIG = "/etc/php/ext/php-fpm.conf" + +@synchronized +def start(): + startService(command="/usr/sbin/php-fpm", + args="-D -y %s" % CONFIG, + pidfile=PIDFILE, + donotify=True) + +@synchronized +def stop(): + stopService(pidfile=PIDFILE, + donotify=True) + + try: + os.unlink(PIDFILE) + except OSError: + pass + +def status(): + return isServiceRunning(PIDFILE) diff --git a/programming/php/php8/files/10-php-zip.ini b/programming/php/php8/files/10-php-zip.ini new file mode 100644 index 0000000000..22d9345d9a --- /dev/null +++ b/programming/php/php8/files/10-php-zip.ini @@ -0,0 +1,2 @@ +; Comment the following line to disable php-zip extension +extension = zip.so diff --git a/programming/php/php8/files/11-php-imap.ini b/programming/php/php8/files/11-php-imap.ini new file mode 100644 index 0000000000..6938de5525 --- /dev/null +++ b/programming/php/php8/files/11-php-imap.ini @@ -0,0 +1,2 @@ +; Comment the following line to disable php-imap extension +extension = imap.so diff --git a/programming/php/php8/files/70_mod_php5.conf b/programming/php/php8/files/70_mod_php5.conf new file mode 100644 index 0000000000..246e548980 --- /dev/null +++ b/programming/php/php8/files/70_mod_php5.conf @@ -0,0 +1,19 @@ +LoadModule php5_module modules/libphp5.so + +AddHandler php5-script .php + +# Set it to handle the files + + AddType application/x-httpd-php .php + AddType application/x-httpd-php .phtml + AddType application/x-httpd-php .php3 + AddType application/x-httpd-php .php4 + AddType application/x-httpd-php .php5 + AddType application/x-httpd-php-source .phps + + +# +# Add index.php to the list of files that will be served as directory +# indexes. +# +DirectoryIndex index.php index.phtml diff --git a/programming/php/php8/files/70_mod_php7.conf b/programming/php/php8/files/70_mod_php7.conf new file mode 100644 index 0000000000..e622bae617 --- /dev/null +++ b/programming/php/php8/files/70_mod_php7.conf @@ -0,0 +1,19 @@ +LoadModule php7_module modules/libphp7.so + +AddHandler php7-script .php + +# Set it to handle the files + + AddType application/x-httpd-php .php + AddType application/x-httpd-php .phtml + AddType application/x-httpd-php .php3 + AddType application/x-httpd-php .php4 + AddType application/x-httpd-php .php5 + AddType application/x-httpd-php-source .phps + + +# +# Add index.php to the list of files that will be served as directory +# indexes. +# +DirectoryIndex index.php index.phtml diff --git a/programming/php/php8/files/70_mod_php8.conf b/programming/php/php8/files/70_mod_php8.conf new file mode 100644 index 0000000000..33c35545b8 --- /dev/null +++ b/programming/php/php8/files/70_mod_php8.conf @@ -0,0 +1,19 @@ +LoadModule php_module modules/libphp.so + +AddHandler php-script .php + +# Set it to handle the files + + AddType application/x-httpd-php .php + AddType application/x-httpd-php .phtml + AddType application/x-httpd-php .php3 + AddType application/x-httpd-php .php4 + AddType application/x-httpd-php .php5 + AddType application/x-httpd-php-source .phps + + +# +# Add index.php to the list of files that will be served as directory +# indexes. +# +DirectoryIndex index.php index.phtml diff --git a/programming/php/php8/files/db6.patch b/programming/php/php8/files/db6.patch new file mode 100644 index 0000000000..0d04ce0490 --- /dev/null +++ b/programming/php/php8/files/db6.patch @@ -0,0 +1,59 @@ +--- configure 2013-07-03 08:16:15.000000000 +0200 ++++ configure 2013-08-07 19:19:16.797273766 +0200 +@@ -42409,7 +42409,7 @@ + /* end confdefs.h. */ + + #include "$THIS_INCLUDE" +-#if DB_VERSION_MAJOR == 4 || (4 == 4 && DB_VERSION_MAJOR == 5) ++#if DB_VERSION_MAJOR == 4 || (4 == 4 && DB_VERSION_MAJOR >= 5) + yes + #endif + +@@ -42785,7 +42785,7 @@ + /* end confdefs.h. */ + + #include "$THIS_INCLUDE" +-#if DB_VERSION_MAJOR == 3 || (3 == 4 && DB_VERSION_MAJOR == 5) ++#if DB_VERSION_MAJOR == 3 || (3 == 4 && DB_VERSION_MAJOR >= 5) + yes + #endif + +@@ -43161,7 +43161,7 @@ + /* end confdefs.h. */ + + #include "$THIS_INCLUDE" +-#if DB_VERSION_MAJOR == 2 || (2 == 4 && DB_VERSION_MAJOR == 5) ++#if DB_VERSION_MAJOR == 2 || (2 == 4 && DB_VERSION_MAJOR >= 5) + yes + #endif + +--- ext/dba/config.m4 2013-07-03 08:10:53.000000000 +0200 ++++ ext/dba/config.m4 2013-08-07 19:18:55.774448348 +0200 +@@ -245,7 +245,7 @@ + ],[ + AC_EGREP_CPP(yes,[ + #include "$THIS_INCLUDE" +-#if DB_VERSION_MAJOR == $1 || ($1 == 4 && DB_VERSION_MAJOR == 5) ++#if DB_VERSION_MAJOR == $1 || ($1 == 4 && DB_VERSION_MAJOR >= 5) + yes + #endif + ],[ +--- ext/dba/dba_db4.c 2013-07-03 08:10:53.000000000 +0200 ++++ ext/dba/dba_db4.c 2013-08-07 19:19:04.827562638 +0200 +@@ -44,7 +44,7 @@ + { + TSRMLS_FETCH(); + +-#if (DB_VERSION_MAJOR == 5 || (DB_VERSION_MAJOR == 4 && DB_VERSION_MINOR == 8)) ++#if (DB_VERSION_MAJOR >= 5 || (DB_VERSION_MAJOR == 4 && DB_VERSION_MINOR == 8)) + /* Bug 51086, Berkeley DB 4.8.26 */ + /* This code suppresses a BDB 4.8+ error message, thus keeping PHP test compatibility */ + { +--- ext/dba/tests/dba_db4_handlers.phpt 2013-07-03 08:10:53.000000000 +0200 ++++ ext/dba/tests/dba_db4_handlers.phpt 2013-08-07 20:39:34.640194224 +0200 +@@ -47,4 +47,4 @@ + Test 1 + Success: db4 enabled + Test 2 - full info +-.*Berkeley DB (4|5).* ++.*Berkeley DB (4|5|6).* diff --git a/programming/php/php8/files/go-pear b/programming/php/php8/files/go-pear new file mode 100644 index 0000000000..a90efcd92a --- /dev/null +++ b/programming/php/php8/files/go-pear @@ -0,0 +1,2676 @@ +#!/usr/bin/php -q + + * @author Stig Bakken + * @author Christian Dickmann + * @author Pierre-Alain Joye + * @author Greg Beaver + * @author Tias Guns + */ + + +$sapi_name = php_sapi_name(); + +$safe_mode = (bool)ini_get('safe_mode'); +if (!$safe_mode) { + set_time_limit(0); +} + +@ob_end_clean(); +ob_implicit_flush(true); +define('WEBINSTALLER', ($sapi_name != 'cli' && !(substr($sapi_name,0,3)=='cgi' && !isset($_SERVER['GATEWAY_INTERFACE'])))); + +ini_set('track_errors', true); +ini_set('html_errors', WEBINSTALLER); +ini_set('magic_quotes_runtime', false); +error_reporting( E_ALL & ~E_NOTICE); + +define('WINDOWS', (substr(PHP_OS, 0, 3) == 'WIN')); +define('GO_PEAR_VER', '1.1.2'); + +define('WIN32GUI', !WEBINSTALLER && WINDOWS && $sapi_name=='cli' && which('cscript')); + +/* + * See bug #23069 + */ +if ( WEBINSTALLER && WINDOWS ) { + $php_sapi_name = win32DetectPHPSAPI(); + if($php_sapi_name=='cgi'){ + $msg = nl2br(" +Sorry! The PEAR installer actually does not work on Windows platform +using CGI and Apache. Please install the module SAPI (see +http://www.php.net/manual/en/install.apache.php for the instructions) or +use the CLI (cli\php.exe) in the console. +"); + displayHTML('error', $msg); + } +} + +if (WEBINSTALLER && isset($_GET['action']) && $_GET['action'] == 'img' && isset($_GET['img'])) { + switch ($_GET['img']) + { + case 'note': + case 'pearlogo': + case 'smallpear': + showImage($_GET['img']); + exit; + default: + exit; + }; +} + +// Check if PHP version is sufficient +if (function_exists("version_compare") && version_compare(phpversion(), "4.3.0",'<')) { + die("Sorry! Your PHP version is too old. PEAR and this script requires at +least PHP 4.3.0 for stable operation. + +It may be that you have a newer version of PHP installed in your web +server, but an older version installed as the 'php' command. In this +case, you need to rebuilt PHP from source. +If your source is 4.3.x or newer, just make sure you don't run +'configure' with --disable-cli, rebuilt and copy sapi/cli/php. + +Please upgrade PHP to a newer version, and try again. See you then. + +"); +} + +$gopear_bundle_dir = dirname(__FILE__).'/go-pear-bundle'; + +$bootstrap_files = array( + 'PEAR.php' => 'http://cvs.php.net/viewvc.cgi/pear-core/PEAR.php?view=co&pathrev=PEAR_1_4', + 'Archive/Tar.php' => 'http://cvs.php.net/viewvc.cgi/pear/Archive_Tar/Archive/Tar.php?view=co&pathrev=RELEASE_1_3_2', + 'Console/Getopt.php' => 'http://cvs.php.net/viewvc.cgi/pear-core/Console/Getopt.php?view=co&pathrev=PEAR_1_4', + ); + +$bootstrap_pkgs = array( // uses URL like http://pear.php.net/get/%s + 'PEAR', + 'Structures_Graph' +); + +$installer_packages = array( + 'PEAR', + 'Structures_Graph-stable', + 'Archive_Tar-stable', + 'Console_Getopt-stable', +); + +$pfc_packages = array( + 'PEAR_Frontend_Web-beta' => 'Webbased PEAR Installer', + 'PEAR_Frontend_Gtk2' => 'Graphical PEAR installer based on PHP-Gtk2', + 'MDB2' => 'database abstraction layer.', +); + +$config_desc = array( + 'prefix' => 'Installation prefix ($prefix)', + 'temp_dir' => 'Temporary files directory', + 'bin_dir' => 'Binaries directory', + 'php_dir' => 'PHP code directory ($php_dir)', + 'doc_dir' => 'Documentation base directory', + 'data_dir' => 'Data base directory', + 'test_dir' => 'Tests base directory', +); + +if(!WEBINSTALLER && WINDOWS){ + $config_desc['php_bin'] = 'php.exe path'; +} + +if (WEBINSTALLER) { + $config_desc['cache_dir'] = 'PEAR Installer cache directory'; + $config_desc['cache_ttl'] = 'Cache TimeToLive'; + $config_desc['webfrontend_file'] = 'Filename of WebFrontend'; + $config_desc['php_bin'] = "php.exe path, optional (CLI command tools)"; +} + +if (my_env('HTTP_PROXY')) { + $http_proxy = my_env('HTTP_PROXY'); +} elseif (my_env('http_proxy')) { + $http_proxy = my_env('http_proxy'); +} else { + $http_proxy = ''; +} + +register_shutdown_function('bail'); + +detect_install_dirs(); + +if (WEBINSTALLER) { + @session_start(); + + // If welcome, just welcome + if (!isset($_GET['step'])) { + $_GET['step'] = 'Welcome'; + /* clean up old sessions datas */ + session_destroy(); + } + if ($_GET['step'] == 'Welcome') { + displayHTML('Welcome'); + exit(); + } + + if (!isset($_SESSION['go-pear']) || isset($_GET['restart'])) { + $_SESSION['go-pear'] = array( + 'http_proxy' => $http_proxy, + 'config' => array( + 'prefix' => dirname(__FILE__), + 'bin_dir' => $bin_dir, + 'php_bin' => $php_bin, + 'php_dir' => '$prefix/PEAR', + 'doc_dir' => $doc_dir, + 'data_dir' => $data_dir, + 'test_dir' => $test_dir, + 'temp_dir' => '$prefix/temp', + 'cache_dir' => '$php_dir/cache', + 'cache_ttl' => 300, + 'webfrontend_file' => '$prefix/index.php', + ), + 'install_pfc' => true, + 'install_optional_packages' => array(), + 'DHTML' => true, + ); + } + + // save submited values + if ($_GET['step'] == 'install') { + $_SESSION['go-pear']['http_proxy'] = strip_magic_quotes($_POST['proxy']['host']).':'.strip_magic_quotes($_POST['proxy']['port']); + if ($_SESSION['go-pear']['http_proxy'] == ':') { + $_SESSION['go-pear']['http_proxy'] = ''; + }; + + $config_errors = array(); + foreach($_POST['config'] as $key => $value) { + $_POST['config'][$key] = strip_magic_quotes($value); + if ($key != 'cache_ttl' && $key != 'php_bin') { + if ( empty($_POST['config'][$key]) ) { + $config_errors[$key] = 'Please fill this path, you can use $prefix, $php_dir or a full path.'; + } + } + } + + if( sizeof($config_errors)>0){ + $_GET['step'] = 'config'; + } + + $_SESSION['go-pear']['config'] = $_POST['config']; + $_SESSION['go-pear']['install_pfc'] = (isset($_POST['install_pfc']) && $_POST['install_pfc'] == 'on'); + // webinstaller allows to choose pfc packages individually + foreach ($pfc_packages as $key => $value) { + $pos = array_search($key, $_SESSION['go-pear']['install_optional_packages']); + if (isset($_POST[$key]) && $_POST[$key] == 'on' && $pos === false) { + $_SESSION['go-pear']['install_optional_packages'][] = $key; + } + if (!isset($_POST[$key]) && $pos !== false) { + unset($_SESSION['go-pear']['install_optional_packages'][$pos]); + } + } + $_SESSION['go-pear']['DHTML'] = isset($_POST['BCmode']) ? false : true; + } + + // export session values + $http_proxy = $_SESSION['go-pear']['http_proxy']; + $GLOBALS['config_vars'] = array_keys($config_desc); + array_unshift($GLOBALS['config_vars'], ''); + unset($GLOBALS['config_vars'][0]); // make indices run from 1... + foreach($_SESSION['go-pear']['config'] as $var => $value) { + $$var = $value; + } + $install_pfc = $_SESSION['go-pear']['install_pfc']; + $install_optional_packages = $_SESSION['go-pear']['install_optional_packages']; + + if ($_GET['step'] == 'config') { + displayHTML('config'); + exit(); + } + // Anything past this step has something to do with the installation +} + +if (!WEBINSTALLER) { + $tty = WINDOWS ? @fopen('\con', 'r') : @fopen('/dev/tty', 'r'); + + if (!$tty) { + $tty = fopen('php://stdin', 'r'); + } + + $local = isset($_SERVER['argv'][1]) && $_SERVER['argv'][1] == 'local'; + if ($local) { + $local = " +Running in local install mode +"; + } elseif (WINDOWS) { + $local = " +Use 'php " . $_SERVER['argv'][0] . " local' to install a local copy of PEAR. +"; + } + print "Welcome to go-pear! + +Go-pear will install the 'pear' command and all the files needed by +it. This command is your tool for PEAR installation and maintenance. +$local +Go-pear also lets you download and install the following optional PEAR +packages: " . implode(', ', array_keys($pfc_packages)) . ". + + +If you wish to abort, press Control-C now, or press Enter to continue: "; + + fgets($tty, 1024); + + print "\n"; + + print "HTTP proxy (http://user:password@proxy.myhost.com:port), or Enter for none:"; + + if (!empty($http_proxy)) { + print " [$http_proxy]"; + } + print ": "; + $tmp = trim(fgets($tty, 1024)); + if (!empty($tmp)) { + $http_proxy = $tmp; + } +} + +$origpwd = getcwd(); + +$config_vars = array_keys($config_desc); + +// make indices run from 1... +array_unshift($config_vars, ""); +unset($config_vars[0]); +reset($config_vars); +$desclen = max(array_map('strlen', $config_desc)); +$descfmt = "%-{$desclen}s"; +$first = key($config_vars); +end($config_vars); +$last = key($config_vars); + +$progress = 0; + +/* + * Checks PHP SAPI version under windows/CLI + */ +if( WINDOWS && !WEBINSTALLER && $php_bin=='') { + print " +We do not find any php.exe, please select the php.exe folder (CLI is +recommanded, usually in c:\php\cli\php.exe) +"; + $php_bin_set = false; +} elseif ( WINDOWS && !WEBINSTALLER && strlen($php_bin) ) { + $php_bin_sapi = win32DetectPHPSAPI(); + $php_bin_set = true; + switch($php_bin_sapi){ + case 'cli': + break; + case 'cgi': + print " +*NOTICE* +We found php.exe under $php_bin, it uses a $php_bin_sapi SAPI. PEAR commandline +tool works well with it, if you have a CLI php.exe available, we +recommand to use it. +"; + break; + default: + print " +*WARNING* +We found php.exe under $php_bin, it uses an unknown SAPI. PEAR commandline +tool has not been tested with it, if you have a CLI (or CGI) php.exe available, +we strongly recommand to use it. + +"; + break; + } +} + +while (!WEBINSTALLER) { + print " +Below is a suggested file layout for your new PEAR installation. To +change individual locations, type the number in front of the +directory. Type 'all' to change all of them or simply press Enter to +accept these locations. + +"; + + foreach ($config_vars as $n => $var) { + printf("%2d. $descfmt : %s\n", $n, $config_desc[$var], $$var); + } + + print "\n$first-$last, 'all' or Enter to continue: "; + $tmp = trim(fgets($tty, 1024)); + if ( empty($tmp) ) { + if( WINDOWS && !$php_bin_set ){ + echo "**ERROR** +Please, enter the php.exe path. + +"; + } else { + break; + } + } + if (isset($config_vars[(int)$tmp])) { + $var = $config_vars[(int)$tmp]; + $desc = $config_desc[$var]; + $current = $$var; + + if(WIN32GUI){ + $tmp = win32BrowseForFolder("$desc [$current] :"); + } else { + print "$desc [$current] : "; + $tmp = trim(fgets($tty, 1024)); + } + + $old = $$var; + if(WINDOWS && $var=='php_bin' ){ + if(file_exists($tmp.DIRECTORY_SEPARATOR.'php.exe')){ + $tmp = $tmp.DIRECTORY_SEPARATOR.'php.exe'; + $php_bin_sapi = win32DetectPHPSAPI(); + if($php_bin_sapi=='cgi'){ + print " +****************************************************************************** +NOTICE! We found php.exe under $php_bin, it uses a $php_bin_sapi SAPI. +PEAR commandline tool works well with it. +If you have a CLI php.exe available, we recommand to use it. + +"; + } elseif ($php_bin_sapi=='unknown') { + print " +****************************************************************************** +WARNING! We found php.exe under $php_bin, it uses an $php_bin_sapi SAPI. +PEAR commandline tool has not been tested with it. +If you have a CLI (or CGI) php.exe available, we strongly recommand to use it. + +"; + } + echo "php.exe (sapi: $php_bin_sapi) found.\n\n"; + $php_bin_set = true; + } else { + echo "**ERROR**: no php.exe found in this folder.\n"; + $tmp=''; + } + } + + if (!empty($tmp) ) { + $$var = parse_dirname($tmp); + } + } elseif ($tmp == 'all') { + foreach ($config_vars as $n => $var) { + $desc = $config_desc[$var]; + $current = $$var; + print "$desc [$current] : "; + $tmp = trim(fgets($tty, 1024)); + if (!empty($tmp)) { + $$var = $tmp; + } + } + } +} + +#### +# Installation stuff +#### + +// expand all subvars in the config vars +foreach ($config_vars as $n => $var) { + for ($m = 1; $m <= count($config_vars); $m++) { + $var2 = $config_vars[$m]; + $$var = str_replace('$'.$var2, $$var2, $$var); + } + $$var = parse_dirname($$var); +} + + // temp dir stuff (separate for windows bugs) + if (!empty($temp_dir)) { + $_found = temp_dir($temp_dir); + } else { + $_found = temp_dir(); + } + if (!$_found) { + if (!WEBINSTALLER) { + print " + +****************************************************************************** +FATAL ERROR! We cannot initialize the temp directory. Please be sure to give +full write access to this directory and the install directory. + +"; + if (!empty($temp_dir)) { + print "'$temp_dir' was given."; + } + exit(); + + } else { // WEBINSTALLER + if (!is_dir($temp_dir)) { + $config_errors['temp_dir'] = 'FATAL ERROR! This directory does not exist and we can not create it. Create the directory manually or make sure we have full permission in its parent directory.'; + if (!WINDOWS) { + $config_errors['temp_dir'] .= '

You can grant this permission by logging on to the server and issuing the following command:
+mkdir '.dirname($temp_dir).' && chmod 0777 '.dirname($temp_dir).'

'; + } + } else { // is_dir(temp_dir) + $config_errors['temp_dir'] = 'FATAL ERROR! This directory exists, but we have no write permission in it.'; + if (!WINDOWS) { + $config_errors['temp_dir'] .= '

You can grant this permission by logging on to the server and issuing the following command:
+chmod 0777 '.$temp_dir.'

'; + } + } + } + } + if (@is_dir($ptmp)) { + chdir($ptmp); + } + + // check every dir, existence and permissions + foreach ($config_vars as $var) { + if (!preg_match('/_dir$/', $var) || $var == 'temp_dir') { + continue; + } + + $dir = $$var; + if (!@is_dir($dir)) { + if (!mkdir_p($dir)) { + if (!WEBINSTALLER) { + $root = WINDOWS ? 'administrator' : 'root'; + bail("Unable to create {$config_desc[$var]} $dir. +Run this script as $root or pick another location.\n"); + } else { // WEBINSTALLER + $config_errors[$var] = 'ERROR! This directory does not exist and we can not create it. Create the directory manually or make sure we have full permission in its parent directory.'; + if (!WINDOWS) { + $config_errors[$var] .= '

You can grant this permission by logging on to the server and issuing the following command:
+mkdir '.dirname($dir).' && chmod 0777 '.dirname($dir).'

'; + } + } + } + } + if (WEBINSTALLER && @is_dir($dir) && !is_writable($dir)) { + $config_errors[$var] = 'ERROR! This directory exists, but we have no write permission in it.'; + if (!WINDOWS) { + $config_errors[$var] .= '

You can grant this permission by logging on to the server and issuing the following command:
+chmod 0777 '.$dir.'

'; + } + } + } + + // check every file, existence and permissions + foreach ($config_vars as $var) { + if (!preg_match('/_file$/', $var)) { + continue; + } + + $file = $$var; + $dir = dirname($file); + if (!file_exists($file) && !is_writable($dir)) { + if (!WEBINSTALLER) { + $root = WINDOWS ? 'administrator' : 'root'; + bail("Unable to create {$config_desc[$var]} $file. +Run this script as $root or pick another location.\n"); + } else { // WEBINSTALLER + $config_errors[$var] = 'ERROR! This file does not exist and we can not create it. Make sure we have full permission in its parent directory.'; + if (!WINDOWS) { + $config_errors[$var] .= '

You can grant this permission by logging on to the server and issuing the following command:
+chmod 0777 '.$dir.'

'; + } + } + } elseif (WEBINSTALLER && file_exists($file) && !is_writable($file)) { + $config_errors[$var] = 'ERROR! This file exists, but we have no write permission on it.'; + if (!WINDOWS) { + $config_errors[$var] .= '

You can grant this permission by logging on to the server and issuing the following command:
+chmod 0777 '.$file.'

'; + } + } + } + +if (WEBINSTALLER) { + if ( isset($config_errors) && sizeof($config_errors) ) { + displayHTML('config'); + exit(); + } else { + if (isset($_SESSION['go-pear']['DHTML']) && $_SESSION['go-pear']['DHTML'] == true && $_GET['step'] == 'install') { + $_GET['step'] = 'preinstall'; + } + if ($_GET['step'] != 'install' && $_GET['step'] != 'install-progress') { + displayHTML($_GET['step']); + exit; + } + if ($_GET['step'] == 'install-progress') { + displayHTMLHeader(); + echo "Starting installation ...
"; + } + ob_start(); + } +} + +if (!WEBINSTALLER) { + $msg = "The following PEAR packages are bundled with PHP: " . + implode(', ', array_keys($pfc_packages)); + print "\n" . wordwrap($msg, 75) . ".\n"; + print "Would you like to install these as well? [Y/n] : "; + $install_pfc = !stristr(fgets($tty, 1024), "n"); + $install_optional_packages = array(); + print "\n"; +} + +#### +# Download +#### + +if (function_exists('set_include_path')) { + set_include_path($ptmp); +} else { + ini_set('include_path', $ptmp); +} + +if (!extension_loaded('zlib') && !WEBINSTALLER) { // In Web context we could be in multithread env which makes dl() end up with a fatal error. + if (WINDOWS) { + @dl('php_zlib.dll'); + } elseif (PHP_OS == 'HP-UX') { + @dl('zlib.sl'); + } elseif (PHP_OS == 'AIX') { + @dl('zlib.a'); + } else { + @dl('zlib.so'); + } +} +if (!extension_loaded('zlib')) { + $urltemplate = 'http://pear.php.net/get/%s?uncompress=yes'; + $have_gzip = null; +} else { + $urltemplate = 'http://pear.php.net/get/%s'; + $have_gzip = true; +} + +print "Loading zlib: ".($have_gzip ? 'ok' : 'failed')."\n"; + +if (!$have_gzip) { + print "Downloading uncompressed packages\n"; +}; + +if ($install_pfc) { + $to_install = array_merge($installer_packages, array_keys($pfc_packages)); +} else { + $to_install = $installer_packages; + + // webinstaller allows to choose pfc packages individually + foreach ($pfc_packages as $pkg => $desc) { + if (in_array($pkg, $install_optional_packages)) { + array_push($to_install, $pkg); + } + } +} + +// gopear_bundle usage +$local_dir = array(); +if (file_exists($gopear_bundle_dir) || is_dir($gopear_bundle_dir)) { + $dh = @opendir($gopear_bundle_dir); + + while($file = @readdir($dh)) { + if ($file == '.' || $file == '..' || !is_file($gopear_bundle_dir.'/'.$file)) { + continue; + } + $_pos = strpos($file, '-'); + if ($_pos === false) { + $local_dir[$file] = $file; + } else { + $local_dir[substr($file, 0, $_pos)] = $file; + } + } + closedir($dh); + unset($dh, $file, $_pos); +} + +print "\n".'Bootstrapping Installer...................'."\n"; +displayHTMLProgress($progress = 5); + +// Bootstrap needed ? +$nobootstrap = false; +if (is_dir($php_dir)) { + $nobootstrap = true; + foreach ($bootstrap_files as $file => $url) { + $nobootstrap &= is_file($php_dir.'/'.$file); + } +} + +if ($nobootstrap) { + print('Using previously install ... '); + if (function_exists('set_include_path')) { + set_include_path($php_dir); + } else { + ini_set('include_path', $php_dir); + } + include_once 'PEAR.php'; + print "ok\n"; +} else { + foreach($bootstrap_files as $name => $url) { + $file = basename($name); + $dir = dirname($name); + + print 'Bootstrapping '.$name.'............'; + displayHTMLProgress($progress += round(14 / count($bootstrap_files))); + if ($dir != '' && $dir != '.') { + mkdir($dir, 0700); + } + + if (in_array($file, $local_dir)) { + copy($gopear_bundle_dir.'/'.$file, $name); + echo '(local) '; + } else { + download_url($url, $name, $http_proxy); + echo '(remote) '; + } + include_once $name; + print "ok\n"; + } +} +unset($nobootstrap, $file, $url, $name, $dir); + +PEAR::setErrorHandling(PEAR_ERROR_DIE, "\n%s\n"); +print "\n".'Extracting installer..................'."\n"; +displayHTMLProgress($progress = 20); + +// Extract needed ? +$noextract = false; +if (is_dir($php_dir)) { + $noextract = @include_once 'PEAR/Registry.php'; + + if ($noextract) { + $registry = new PEAR_Registry($php_dir); + foreach ($bootstrap_pkgs as $pkg) { + $noextract &= $registry->packageExists($pkg); + } + } +} + +if ($noextract) { + print('Using previously installed installer ... '); + print "ok\n"; +} else { + $bootstrap_pkgs_tarballs = array(); + foreach ($bootstrap_pkgs as $pkg) { + $tarball = null; + if (isset($local_dir[$pkg])) { + echo str_pad("Using local package: $pkg", max(38,21+strlen($pkg)+4), '.'); + copy($gopear_bundle_dir.'/'.$local_dir[$pkg], $local_dir[$pkg]); + $tarball = $local_dir[$pkg]; + } else { + print str_pad("Downloading package: $pkg", max(38,21+strlen($pkg)+4), '.'); + $url = sprintf($urltemplate, $pkg); + $pkg = str_replace('-stable', '', $pkg); + $tarball = download_url($url, null, $http_proxy); + } + displayHTMLProgress($progress += round(19 / count($bootstrap_pkgs))); + + $fullpkg = substr($tarball, 0, strrpos($tarball, '.')); + $tar = &new Archive_Tar($tarball, $have_gzip); + if (!$tar->extractModify($ptmp, $fullpkg)) { + bail("Extraction for $fullpkg failed!\n"); + } + $bootstrap_pkgs_tarballs[$pkg] = $tarball; + print "ok\n"; + } +} +unset($noextract, $registry, $pkg, $tarball, $url, $fullpkg, $tar); + + +print "\n".'Preparing installer..................'."\n"; +displayHTMLProgress($progress = 40); + +// Default for sig_bin +putenv('PHP_PEAR_SIG_BIN=""'); +// Default for sig_keydir +putenv('PHP_PEAR_SIG_KEYDIR=""'); +putenv('PHP_PEAR_DOWNLOAD_DIR=' . $temp_dir . '/download'); +putenv('PHP_PEAR_TEMP_DIR=' . $temp_dir); + +include_once "PEAR/Config.php"; +include_once "PEAR/Command.php"; +include_once "PEAR/Registry.php"; + +if (WEBINSTALLER || isset($_SERVER['argv'][1]) && $_SERVER['argv'][1] == 'local') { + $config = &PEAR_Config::singleton($prefix."/pear.conf", ''); +} else { + $config = &PEAR_Config::singleton(); +} + + +$config->set('preferred_state', 'stable'); +foreach ($config_vars as $var) { + if (isset($$var) && $$var != '') { + $config->set($var, $$var); + } +} +$config->set('download_dir', $temp_dir . '/download'); +$config->set('temp_dir', $temp_dir); +$config->set('http_proxy', $http_proxy); +$config->store(); + +$registry = new PEAR_Registry($php_dir); +PEAR_Command::setFrontendType('CLI'); + +PEAR::staticPushErrorHandling(PEAR_ERROR_DIE); //fail silently +$ch_cmd = &PEAR_Command::factory('update-channels', $config); +$ch_cmd->run('update-channels', $options, array()); +PEAR::staticPopErrorHandling(); // reset error handling +unset($ch_cmd); + + +print "\n".'Installing selected packages..................'."\n"; +displayHTMLProgress($progress = 45); + +$install = &PEAR_Command::factory('install', $config); +foreach ($to_install as $pkg) { + $pkg_basename = substr($pkg, 0, strpos($pkg, '-')); + + if (in_array($pkg, $installer_packages)) { + $options = array('nodeps' => true); + } else { + $options = array('onlyreqdeps' => true); + } + if ($registry->packageExists($pkg) || $registry->packageExists($pkg_basename)) { + print(str_pad("Package: $pkg", max(50,9+strlen($pkg)+4), '.').' already installed ... ok'."\n"); + displayHTMLProgress($progress += round(50 / count($to_install))); + continue; + } + + $pkg_basename = substr($pkg, 0, strpos($pkg, '-')); + if (in_array($pkg_basename, $bootstrap_pkgs)) { + print(str_pad("Installing bootstrap package: $pkg_basename", max(50,30+strlen($pkg_basename)+4), '.')."..."); + displayHTMLProgress($progress += round(25 / count($to_install))); + $install->run('install', $options, array($bootstrap_pkgs_tarballs[$pkg_basename])); + } elseif (isset($local_dir[$pkg_basename])) { + print(str_pad("Installing local package: $pkg", max(50,26+strlen($pkg)+4), '.')."..."); + displayHTMLProgress($progress += round(25 / count($to_install))); + $install->run('install', $options, array($gopear_bundle_dir.'/'.$local_dir[$pkg_basename])); + } else { // no local copy + print(str_pad("Downloading and installing package: $pkg", max(50,36+strlen($pkg)+4), '.')."..."); + displayHTMLProgress($progress += round(25 / count($to_install))); + $install->run('install', $options, array($pkg)); + } + displayHTMLProgress($progress += round(25 / count($to_install))); +} +unset($pkg, $pkg_basename, $options, $bootstrap_pkgs_tarballs); + +/* TODO: Memory exhaustion in webinstaller : / (8Mb) +print "\n".'Making sure every package is at the latest version........'; +$install->run('upgrade-all', array('soft' => true), array()); +print "ok\n"; +*/ +unset($config, $registry, $install); +displayHTMLProgress($progress = 99); + + +// Base installation finished + +ini_restore("include_path"); + +if (!WEBINSTALLER) { + $sep = WINDOWS ? ';' : ':'; + $include_path = explode($sep, ini_get('include_path')); + if (WINDOWS) { + $found = false; + $t = strtolower($php_dir); + foreach($include_path as $path) { + if ($t==strtolower($path)) { + $found = true; + break; + } + } + } else { + $found = in_array($php_dir, $include_path); + } + if (!$found) { + print " +****************************************************************************** +WARNING! The include_path defined in the currently used php.ini does not +contain the PEAR PHP directory you just specified: +<$php_dir> +If the specified directory is also not in the include_path used by +your scripts, you will have problems getting any PEAR packages working. +"; + + if ( $php_ini = getPhpiniPath() ) { + print "\n\nWould you like to alter php.ini <$php_ini>? [Y/n] : "; + $alter_phpini = !stristr(fgets($tty, 1024), "n"); + if( $alter_phpini ) { + alterPhpIni($php_ini); + } else { + if (WINDOWS) { + print " +Please look over your php.ini file to make sure +$php_dir is in your include_path."; + } else { + print " +I will add a workaround for this in the 'pear' command to make sure +the installer works, but please look over your php.ini or Apache +configuration to make sure $php_dir is in your include_path. +"; + } + + } + } + + print " +Current include path : ".ini_get('include_path')." +Configured directory : $php_dir +Currently used php.ini (guess) : $php_ini +"; + + print "Press Enter to continue: "; + fgets($tty, 1024); + } + + $pear_cmd = $bin_dir . DIRECTORY_SEPARATOR . 'pear'; + $pear_cmd = WINDOWS ? strtolower($pear_cmd).'.bat' : $pear_cmd; + + // check that the installed pear and the one in tha path are the same (if any) + $pear_old = which(WINDOWS ? 'pear.bat' : 'pear', $bin_dir); + if ($pear_old && ($pear_old != $pear_cmd)) { + // check if it is a link or symlink + $islink = WINDOWS ? false : is_link($pear_old) ; + if ($islink && readlink($pear_old) != $pear_cmd) { + print "\n** WARNING! The link $pear_old does not point to the " . + "installed $pear_cmd\n"; + } elseif (is_writable($pear_old) && !is_dir($pear_old)) { + rename($pear_old, "{$pear_old}_old"); + print "\n** WARNING! Backed up old pear to {$pear_old}_old\n"; + } else { + print "\n** WARNING! Old version found at $pear_old, please remove it or ". + "be sure to use the new $pear_cmd command\n"; + } + } + + print "\nThe 'pear' command is now at your service at $pear_cmd\n"; + + // Alert the user if the pear cmd is not in PATH + $old_dir = $pear_old ? dirname($pear_old) : false; + if (!which('pear', $old_dir)) { + print " +** The 'pear' command is not currently in your PATH, so you need to +** use '$pear_cmd' until you have added +** '$bin_dir' to your PATH environment variable. + +"; + + print "Run it without parameters to see the available actions, try 'pear list' +to see what packages are installed, or 'pear help' for help. + +For more information about PEAR, see: + + http://pear.php.net/faq.php + http://pear.php.net/manual/ + +Thanks for using go-pear! + +"; + } +} + +if (WEBINSTALLER) { + print "\n".'Writing WebFrontend file ... '; + @unlink($webfrontend_file); //Delete old one + copy ( $doc_dir.DIRECTORY_SEPARATOR. + 'PEAR_Frontend_Web'.DIRECTORY_SEPARATOR. + 'docs'.DIRECTORY_SEPARATOR. + 'index.php.txt', + $webfrontend_file + ); + print "ok\n"; + + if ($_GET['step'] == 'install-progress') { + displayHTMLProgress($progress = 100); + ob_end_clean(); + displayHTMLInstallationSummary(); + displayHTMLFooter(); + } else { + $out = ob_get_contents(); + + $out = explode("\n", $out); + foreach($out as $line => $value) { + if (preg_match('/ok$/', $value)) { + $value = preg_replace('/(ok)$/', '\1', $value); + }; + if (preg_match('/^install ok:/', $value)) { + $value = preg_replace('/^(install ok:)/', '\1', $value); + }; + if (preg_match('/^Warning:/', $value)) { + $value = ''.$value.''; + }; + $out[$line] = $value; + }; + $out = nl2br(implode("\n",$out)); + ob_end_clean(); + + displayHTML('install', $out); + } + // Little hack, this will be fixed in PEAR later + if ( WINDOWS ) { + clearstatcache(); + @unlink($bin_dir.DIRECTORY_SEPARATOR.'.tmppear'); + } + exit; +} + +// Little hack, this will be fixed in PEAR later +if ( WINDOWS ) { + clearstatcache(); + @unlink($bin_dir.DIRECTORY_SEPARATOR.'.tmppear'); +} + +if (WINDOWS && !WEBINSTALLER) { + win32CreateRegEnv(); +} +// Set of functions following +/** + * Parse the given dirname + * eg. expands '~' etc + * + * @param string $dir directory, from input + * @return string parsed directory + */ +function parse_dirname($dir) +{ + if (!isset($_ENV['HOME'])) { + if (strpos($dir, '~') === 0) { + if (WEBINSTALLER) { + die('

Can\'t use the \'~\' symbol for homedir substitution, write the directory out in full.

'); + } else { + die('Can\'t use the \'~\' symbol for homedir substitution, write the directory out in full.'); + } + } + return $dir; + } + + $home_root = $_ENV['HOME']; + // first strip last slash, if available + if (substr($home_root, -1) == DIRECTORY_SEPARATOR) { + $home_root = substr($home_root, 0, -1); + } + if (strpos($dir, '~/') === 0) { + // eg ~/ = /home/tias/ + $dir = substr_replace($dir, $home_root, 0, 1); + } elseif (strpos($dir, '~') === 0) { + // eg ~tias/ = /home/tias/ + // then delete user-dir + $home_root = dirname($home_root) . DIRECTORY_SEPARATOR; + $dir = substr_replace($dir, $home_root, 0, 1); + } + + return $dir; +} + + +// {{{ download_url() + +function download_url($url, $destfile = null, $proxy = null) +{ + $use_suggested_filename = ($destfile === null); + if ($use_suggested_filename) { + $destfile = basename($url); + } + $tmp = parse_url($url); + if (empty($tmp['port'])) { + $tmp['port'] = 80; + } + if (empty($proxy)) { + $fp = fsockopen($tmp['host'], $tmp['port'], $errno, $errstr); + //print "\nconnecting to $tmp[host]:$tmp[port]\n"; + } else { + $tmp_proxy = parse_url($proxy); + $phost = $tmp_proxy['host']; + $pport = $tmp_proxy['port']; + $fp = fsockopen($phost, $pport, $errno, $errstr); + //print "\nconnecting to $phost:$pport\n"; + } + if (!$fp) { + bail("download of $url failed: $errstr ($errno)\n"); + // If valid URL but error, no CURL extentions installed + } + if (empty($proxy)) { + $path = $tmp['path']; + } else { + $path = "http://$tmp[host]:$tmp[port]$tmp[path]"; + } + if (isset($tmp['query'])) { + $path .= "?$tmp[query]"; + } + if (isset($tmp['fragment'])) { + $path .= "#$tmp[fragment]"; + } + $request = "GET $path HTTP/1.0\r\nHost: $tmp[host]:$tmp[port]\r\n". + "User-Agent: go-pear\r\n"; + + if (!empty($proxy) && $tmp_proxy['user'] != '') { + $request .= 'Proxy-Authorization: Basic ' . + base64_encode($tmp_proxy['user'] . ':' . $tmp_proxy['pass']) . "\r\n"; + } + $request .= "\r\n"; + fwrite($fp, $request); + $cdh = "content-disposition:"; + $cdhl = strlen($cdh); + $content_length = 0; + while ($line = fgets($fp, 2048)) { + if (trim($line) == '') { + break; + } + if (preg_match('/^Content-Length: (.*)$/i', $line, $matches)) { + $content_length = trim($matches[1]); + } + if ($use_suggested_filename && !strncasecmp($line, $cdh, $cdhl)) { + if (eregi('filename="([^"]+)"', $line, $matches)) { + $destfile = basename($matches[1]); + } + } + } + + displayHTMLSetDownload($destfile); + $wp = fopen($destfile, "wb"); + if (!$wp) { + bail("could not open $destfile for writing\n"); + } + $bytes_read = 0; + $progress = 0; + while ($data = fread($fp, 2048)) { + fwrite($wp, $data); + $bytes_read += strlen($data); + if ($content_length != 0 && floor($bytes_read * 10 / $content_length) != $progress) { + $progress = floor($bytes_read * 10 / $content_length); + displayHTMLDownloadProgress($progress * 10); + }; + } + displayHTMLDownloadProgress(100); + fclose($fp); + fclose($wp); + + displayHTMLSetDownload(''); + return $destfile; +} + +// }}} +// {{{ which() + +function which($program, $dont_search_in = false) +{ + if (WINDOWS) { + if ($_path=my_env('Path')) { + $dirs = explode(';', $_path); + } else { + $dirs = explode(';', my_env('PATH')); + } + foreach ($dirs as $i => $dir) { + $dirs[$i] = strtolower(realpath($dir)); + } + if ($dont_search_in) { + $dont_search_in = strtolower(realpath($dont_search_in)); + } + if ($dont_search_in && + ($key = array_search($dont_search_in, $dirs)) !== false) + { + unset($dirs[$key]); + } + + foreach ($dirs as $dir) { + $dir = str_replace('\\\\', '\\', $dir); + if (!strlen($dir)) { + continue; + } + if ($dir{strlen($dir) - 1} != '\\') { + $dir .= '\\'; + } + $tmp = $dir . $program; + $info = pathinfo($tmp); + if (in_array(strtolower($info['extension']), + array('exe', 'com', 'bat', 'cmd'))) { + if (file_exists($tmp)) { + return strtolower($tmp); + } + } elseif (file_exists($ret = $tmp . '.exe') || + file_exists($ret = $tmp . '.com') || + file_exists($ret = $tmp . '.bat') || + file_exists($ret = $tmp . '.cmd')) { + return strtolower($ret); + } + } + } else { + $dirs = explode(':', my_env('PATH')); + if ($dont_search_in && + ($key = array_search($dont_search_in, $dirs)) !== false) + { + unset($dirs[$key]); + } + foreach ($dirs as $dir) { + if (is_executable("$dir/$program")) { + return "$dir/$program"; + } + } + } + return false; +} + +// }}} +// {{{ bail() + +function bail($msg = '') +{ + global $ptmp, $origpwd; + if ($ptmp && is_dir($ptmp)) { + chdir($origpwd); + rm_rf($ptmp); + } + if ($msg && WEBINSTALLER) { + $msg = @ob_get_contents() ."\n\n". $msg; + @ob_end_clean(); + displayHTML('error', $msg); + exit; + }; + if ($msg && !WEBINSTALLER) { + die($msg); + } +} + +// }}} +// {{{ mkdir_p() + +function mkdir_p($dir, $mode = 0777) +{ + if (@is_dir($dir)) { + return true; + } + + $parent = dirname($dir); + $ok = true; + if (!@is_dir($parent) && $parent != $dir) { + $ok = mkdir_p(dirname($dir), $mode); + } + if ($ok) { + $ok = @mkdir($dir, $mode); + // This is handled in the caller function (eg. webfrontend or not) + //if (!$ok) { + // print "mkdir failed: <$dir>\n"; + //} + } + return $ok; +} + +// }}} +// {{{ rm_rf() + +function rm_rf($path) +{ + if (@is_dir($path) && is_writable($path)) { + $dp = opendir($path); + while ($ent = readdir($dp)) { + if ($ent == '.' || $ent == '..') { + continue; + } + $file = $path . DIRECTORY_SEPARATOR . $ent; + if (@is_dir($file)) { + rm_rf($file); + } elseif (is_writable($file)) { + unlink($file); + } else { + echo $file . "is not writable and cannot be removed. +Please fix the permission or select a new path.\n"; + } + } + closedir($dp); + return rmdir($path); + } else { + return @unlink($path); + } +} + +// }}} +// {{{ tmpdir() +/* + * Fixes for winXP/wrong tmp set by Urs Gehrig (urs@circle.ch) + */ +function temp_dir($default=false) +{ + global $ptmp, $prefix; + + if ($default) { + if (!@is_dir($default)) { + if (!mkdir_p($default)) { + return false; + } + } + + /* try it really, is_writable is buggy with openbasedir */ + $fh = @fopen(realpath($default) . "/test","wb"); + if ($fh) { + // desparately try to set temp dir any possible way, see bug #13167 + $ptmp = $_temp = $temp_dir = $default; + putenv('TMPDIR='.$default); + return true; + } else { + return false; + } + } + + $_temp = false; + if (WINDOWS){ + if ( my_env('TEMP') ) { + $_temp = my_env('TEMP'); + } elseif ( my_env('TMP') ) { + $_temp = my_env('TMP'); + } elseif ( my_env('windir') ) { + $_temp = my_env('windir') . '\temp'; + } elseif ( my_env('SystemRoot') ) { + $_temp = my_env('SystemRoot') . '\temp'; + } + + // handle ugly ENV var like \Temp instead of c:\Temp + $dirs = explode("\\", realpath($_temp)); + if(strpos($_temp, ":") != 1) { + unset($_temp); + $_dirs = array(); + foreach($dirs as $val) { + if((boolean)$val ) { + $_dirs[] = str_replace("/", "", $val); + } + } + unset($dirs); + $dirs = $_dirs; + array_unshift ($dirs, "c:" ); + $_temp = $dirs[0]; + for($i = 1;$i < count($dirs);$i++) { + $_temp .= "//" . $dirs[$i]; + } + } + $ptmp = $_temp; + } else { + $_temp = my_env('TMPDIR'); + if (!$_temp) { + if (is_writable('/tmp')) { + $_temp = '/tmp'; + } + } + } + + // If for some reason the user has no rights to access to + // the standard tempdir, we assume that he has the right + // to access his prefix and choose $prefix/tmp as tempdir + if (!$_temp || !is_writable($_temp)) { + print "System's Tempdir failed, trying to use \$prefix/tmp ..."; + $res = mkdir_p($prefix.'/tmp'); + if (!$res) { + bail('mkdir '.$prefix.'/tmp'.' ... failed'); + } + + $ptmp = $prefix . '/tmp'; + $_temp = tempnam($prefix.'/tmp', 'gope'); + + rm_rf($_temp); + mkdir_p($_temp, 0700); + $ok = @chdir($ptmp); + + if (!$ok) { // This should not happen, really ;) + bail('chdir '.$ptmp.' ... failed'); + } + + print "ok\n"; + + // Adjust TEMPDIR envvars + if (!isset($_ENV)) { + $_ENV = array(); + } + $_ENV['TMPDIR'] = $_ENV['TEMP'] = $prefix.'/tmp'; + } else { + $_temp = tempnam($_temp.'/tmp', 'gope'); + } + $temp_dir = $ptmp = $_temp; + return true; +} + +// }}} +// {{{ my_env() +/* +(cox) In my system PHP 4.2.1 (both cgi & cli) $_ENV is empty + but getenv() does work fine +*/ +function my_env($var) +{ + if (is_array($_ENV) && isset($_ENV[$var])) { + return $_ENV[$var]; + } + return getenv($var); +} + +// }}} +// {{{ detect_install_dirs() + +function detect_install_dirs($_prefix = null) { + global $temp_dir, $prefix, $bin_dir, $php_dir, $php_bin, $doc_dir, $data_dir, $test_dir; + if (WINDOWS) { + if ($_prefix === null) { + $prefix = getcwd(); + } else { + $prefix = $_prefix; + } + + if (!@is_dir($prefix)) { + if (@is_dir('c:\php5')) { + $prefix = 'c:\php5'; + } elseif (@is_dir('c:\php4')) { + $prefix = 'c:\php4'; + } elseif (@is_dir('c:\php')) { + $prefix = 'c:\php'; + } + } + + $bin_dir = '$prefix'; + $php_dir = '$prefix\pear'; + $doc_dir = '$php_dir\docs'; + $data_dir = '$php_dir\data'; + $test_dir = '$php_dir\tests'; + $temp_dir = '$prefix\temp'; + + /* + * Detects php.exe + */ + if( $t=getenv('PHP_PEAR_PHP_BIN') ){ + $php_bin = $t; + } elseif ($t=getenv('PHP_BIN') ) { + $php_bin = $t; + } elseif ( $t=which('php') ) { + $php_bin = $t; + } elseif ( is_file($prefix.'\cli\php.exe') ) { + $php_bin = $prefix.'\cli\php.exe'; + } elseif ( is_file($prefix.'\php.exe') ) { + $php_bin = $prefix.'\php.exe'; + } + if( $php_bin && !is_file($php_bin) ){ + $php_bin = ''; + } else { + if(!ereg(":",$php_bin)){ + $php_bin = getcwd().DIRECTORY_SEPARATOR.$php_bin; + } + } + if (!is_file($php_bin)) { + if (is_file('c:/php/cli/php.exe')) { + $php_bin = 'c:/php/cli/php.exe'; + } elseif (is_file('c:/php5/php.exe')) { + $php_bin = 'c:/php5/php.exe'; + } elseif (is_file('c:/php4/cli/php.exe')) { + $php_bin = 'c:/php4/cli/php.exe'; + } + } + } else { + if ($_prefix === null) { + #$prefix = dirname(PHP_BINDIR); + $prefix = dirname(__FILE__); + } else { + $prefix = $_prefix; + } + $bin_dir = '$prefix/bin'; + #$php_dir = '$prefix/share/pear'; + $php_dir = '$prefix/PEAR'; + $doc_dir = '$php_dir/docs'; + $data_dir = '$php_dir/data'; + $test_dir = '$php_dir/tests'; + $temp_dir = '$prefix/temp'; + + // check if the user has installed PHP with PHP or GNU layout + if (@is_dir("$prefix/lib/php/.registry")) { + $php_dir = '$prefix/lib/php'; + } elseif (@is_dir("$prefix/share/pear/lib/.registry")) { + $php_dir = '$prefix/share/pear/lib'; + $doc_dir = '$prefix/share/pear/docs'; + $data_dir = '$prefix/share/pear/data'; + $test_dir = '$prefix/share/pear/tests'; + } elseif (@is_dir("$prefix/share/php/.registry")) { + $php_dir = '$prefix/share/php'; + } + } +} + +// }}} +// {{{ displayHTMLHeader + +function displayHTMLHeader() +{ +?> + + + + PEAR :: Installer :: Go-PEAR + + + + + + + + + + + + + + + + + + + + + +
+ PEAR + +   + + Go-PEAR Installer +
+ Version  
+
+ + + + + + + + + +
+ + + + +
+


+ 'Welcome to Go-PEAR', + 'config' => 'Configuration', + 'preinstall' => 'Installation', + 'install' => 'Completed'); + $after_current = false; + + // Menu robustness (a bit low, but better then never) + if ($page == 'error') { + $_GET['last'] = $_GET['step']; + $after_current = true; + } elseif (!array_key_exists($page, $menus)) { + $page = 'Welcome'; + } + + foreach ($menus as $menu => $descr) { + print(''); + + if (!$after_current) { + $class = ''; + if ($page == $menu) { + $class = 'green'; + } + if (!isSet($_GET['last'])) { $_GET['last'] = $page; } + print(''.$descr.'
'); + + if ($_GET['last'] == $menu) { + $after_current = true; + } + } else { + print(''.$descr.'
'); + } + } + ?> + +

+
+ + + + +
+ + + + + + +
+ + + Error
+
+\1', $value); + } + if (preg_match('/failed$/', $value)) { + $value = preg_replace('/(failed)$/', '\1', $value); + } + if (preg_match('/^install ok:/', $value)) { + $value = preg_replace('/^(install ok:)/', '\1', $value); + } + if (preg_match('/^Warning:/', $value)) { + $value = ''.$value.''; + } + + echo nl2br($value); + } elseif ($page == 'Welcome') { +?> + Welcome to go-pear !
+

+ Go-pear will install Pear, its Web Frontend and all the needed files. This
+ frontend is your tool for PEAR installation and maintenance. +

+

+ Go-pear also lets you download and install the following optional PEAR
+ packages: . +

+ + Next >> + +
+ + Packages +

+ The following PEAR packages will be installed. You can select some optional
+ packages to be installed by go-pear too:
+

+ + + + + + + + '); + unset($GLOBALS['pfc_packages'][$frontend]); + + foreach ($GLOBALS['pfc_packages'] as $var => $descr) { + $checked = ''; + if (in_array($var, $GLOBALS['install_optional_packages'])) { $checked = ' checked'; } + printf('', + $var, + $checked, + $var, + $descr); + } + ?> +
 PackageDescription
(required)PEAR corePEAR Base System
(required)'.$frontend.''.$GLOBALS['pfc_packages'][$frontend].'
%s%s
+
+ + + Configuration +

+ Below is a suggested file layout for your new PEAR installation. +

+ + + + + $var) { + $error_class = ''; + if (is_array($GLOBALS['config_errors']) && array_key_exists($var, $GLOBALS['config_errors'])) { + // www_error for this var + $error_class = ' class="red"'; + } + + printf('', + $n, + $GLOBALS['config_desc'][$var], + $var, + $_SESSION['go-pear']['config'][$var], + $error_class); + + // prefix dir, check perm (uses GLOBALS: resolved subvars) + if ($n == 1 && is_dir($GLOBALS[$var]) && !is_writable($GLOBALS[$var])) { + $error = 'WARNING! No permission to create subdirectories in this prefix dir. Unless you fix this, the default configuration will not work.'; + if (!WINDOWS) { + $error .= '

You can grant this permission by logging on to the server and issuing the following command:
+chmod 0777 '.$GLOBALS[$var].'

'; + } + print(''); + } + + + if (is_array($GLOBALS['config_errors']) && array_key_exists($var, $GLOBALS['config_errors'])) { + // www_error for this var + print(''); + } + } +?> +
%d. %s
'.$error.'
'.$GLOBALS['config_errors'][$var].'
+

+
+ + + Optional: + +
    +

    +

  • HTTP proxy (host:port) + : +

    + +

    +

  • Compatibility-Mode for old non-DOM Browsers + +

    +
+ + +

+ + + + + +
+ + Warning: Your PHP version (4.1.1) might be imcompatible with go-pear due to a bug
+ in your PHP binary. If the installation crashes you might want to update your PHP version.
+
+
+

+ +
+ +

+ + + + + +
+ + Note: Installation might take some time, because go-pear has to
+ download all needed files from pear.php.net. Just be patient and wait for
+ the next page to load.
+
+
+

+ + +
+ + + Installation Complete - Summary
+ +

+ Installation in progress ...
+ (If the page stops loading before the end of the installation, then just reload it)

+ + + + + +
+ + + + + + + + + + + + + + + +
           0 %
+
+ + + + + + + + + + + + + + + + + +
           0 % 
+
+ +
+ +
+ + +
+
+ + + + ".$data; + } +?> +

+ Installation Completed ! +

+ + + + + + +
+ + Note: To use PEAR without any problems you need to add your
+ PEAR Installation path ()
+ to your include_path.
+
+ Using a .htaccess file or directly edit httpd.conf would be working solutions
+ for Apache running servers, too.
+
+
+
+ For more information about PEAR, see:
+ PEAR FAQ
+ PEAR Manual
+
+ Thanks for using go-pear!
+
+ + + + + + +
+ + Warning: Can not determine the URL of the freshly installed Web Frontend
+ (file: ).
+ Please access it manually ! +
+
+ + Start Web Frontend of the PEAR Installer >> + + Start Web Frontend of the PEAR Installer >> + array( + 'type' => 'gif', + 'data' => 'R0lGODlhEQATAMQAAAAAACqUACiTAC2WAC+YAzKZBTSaBsHgszOZADCYADmcB4TCZp3Ohtfrzd/v1+by4PD47DaaAz+fDUijF2WyOlCoHvT58VqtJPn893y+S/v9+f7//f3+/Pz9+////////ywAAAAAEQATAAAFkqAnjiR5NGXqcdpCoapnMVRdWbEHUROVVROYalHJTCaVAKWTcjAUGckgQY04SJAFMhJJIL5e4a5I6X6/gwlkRIwOzucAY9SYZBRvOCKheIwYFxR5enxCLhVeemAHbBQVg4SMIoCCinsKVyIOdlKKAhQcJFpGiWgFQiIYPxeJCQEEcykcDIgDAwYUkjEWB70NGykhADs=', + ), + 'pearlogo' => array( + 'type' => 'gif', + 'data' => 'R0lGODlhaAAyAMT/AMDAwP3+/TWaAvD47Pj89vz++zebBDmcBj6fDEekFluvKmu3PvX68ujz4XvBS8LgrNXqxeHw1ZnPaa/dgvv9+cLqj8LmltD2msnuls3xmszwmf7+/f///wAAAAAAAAAAACH5BAEAAAAALAAAAABoADIAQAX/ICCOZGmeaKqubOtWWjwJphLLgH1XUu//C1Jisfj9YLEKQnSY3GaixWQqQTkYHM4AMulNLJFC9pEwIW/odKU8cqTfsWoTTtcomU4ZjbR4ZP+AgYKCG0EiZ1AuiossEhwEXRMEg5SVWQ6MmZqKWD0QlqCUEHubpaYlExwRPRZioZZVp7KzKQoSDxANDLsNXA5simd2FcQYb4YAc2jEU80TmAAIztPCMcjKdg4OEsZJmwIWWQPQI4ikIwtoVQnddgrv8PFlCWgYCwkI+fp5dkvJ/IlUKMCy6tYrDhNIIKLFEAWCTxse+ABD4SClWA0zovAjcUJFi6EwahxZwoGqHhFA/4IqoICkyxQSKkbo0gDkuBXV4FRAJkRCnTgi2P28IcEfk5xpWppykFJVuScmEvDTEETAVJ6bEpypcADPkz3pvKVAICHChkC7siQ08zVqu4Q6hgIFEFZuEn/KMgRUkaBmAQs+cEHgIiHVH5EAFpIgW4+NT6LnaqhDwe/Ov7YOmWZp4MkiAWBIl0kAVsJWuzcYpdiNgddc0E8cKBAu/FElBwagMb88ZZKDRAkWJtkWhHh3wwUbKHQJN3wQAaXGR2LpArv5oFHRR34C7Mf6oLXZNfqBgNI7oOLhj1f8PaGpygHQ0xtP8MDVKwYTSKcgxr9/hS6/pCCAAg5M4B9/sWh1YP9/XSgQWRML/idBfKUc4IBET9lFjggKhDYZAELZJYEBI2BDB3ouNBEABwE8gAwiCcSYgAKqPdEVAG7scM8BPPZ4AIlM+OgjAgpMhRE24OVoBwsIFEGFA7ZkQQBWienWxmRa7XDjKZXhBdAeSmKQwgLuUVLICa6VEKIGcK2mQWoVZHCBXJblJUFkY06yAXlGsPIHBEYdYiWHb+WQBgaIJqqoHFNpgMGB7dT5ZQuG/WbBAIAUEEFNfwxAWpokTIXJAWdgoJ9kRFG2g5eDRpXSBpEIF0oEQFaZhDbaSFANRgqcJoEDRARLREtxOQpsPO906ZUeJgjQB6dZUPBAdwcF8KLXXRVQaKFcsRRLJ6vMiiCNKxRE8ECZKgUA3Va4arOAAqdGRWO7uMZH5AL05gvsjQbg6y4NCjQ1kw8TVGcbdoKGKx8j3bGH7nARBArqwi0gkFJBrZiXBQRbHoIgnhSjcEBKfD7c3HMhz+JIQSY3t8GGKW+SUhfUajxGzKd0IoHBNkNQK86ZYEqdzYA8AHQpqXRUm80oHs1CAgMoBxzRqvzs9CIKECC1JBp7enUpfXHApwVYNAfo16c4IrYPLVdSAJVob7IAtCBFQGHcs/RRdiUDPHA33oADEAIAOw==', + ), + 'note' => array( + 'type' => 'png', + 'data' => 'iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAAAAADFHGIkAAAAAmJLR0QAAKqNIzIAAAEESURBVHjaZZIhksMwDEV9voWFSwsLA0MLDf8VdARBUUNBQ1FBHcErZ5M0baXJjOPnb0vfLuMMn3H+lWMgBKL89A1Eq9Q9IrwB+gIOsnMPBR8giMclguQfBGS8x5xIoPQxnxqb4LL/eQ4l2AVNONP2ZshLCqJ3qqzWtT5pNgNnLU4OcNbuiqaLmFmHGhJ0TCMC99+f2wphlhaOYjuQVc0IIzLH2BRWfQoWsNSjct8AVop4rF3belTuVAb3MRj6kLrcTwtIy+g03V1vC57t1XrMzqfP5pln5yLTkk7+5UhstvOni1X3ixLEdf2c36+W0Q7kOb48hnSRLI/XdNPfX4kpMkgP5R+elfdkDPprQgAAAEN0RVh0U29mdHdhcmUAQCgjKUltYWdlTWFnaWNrIDQuMi44IDk5LzA4LzAxIGNyaXN0eUBteXN0aWMuZXMuZHVwb250LmNvbZG6IbgAAAAqdEVYdFNpZ25hdHVyZQAzYmQ3NDdjNWU0NTgwNzAwNmIwOTBkZDNlN2EyNmM0NBTTk/oAAAAOdEVYdFBhZ2UAMjR4MjQrMCswclsJMQAAAABJRU5ErkJggg==', + ), + ); + + Header('Content-Type: image/'.$images[$img]['type']); + echo base64_decode($images[$img]['data']); +}; + +// }}} +// {{{ displayHTMLProgress + +function displayHTMLProgress($progress) +{ + if (!(WEBINSTALLER && isset($_SESSION['go-pear']['DHTML']) && $_SESSION['go-pear']['DHTML'])) { + return; + }; + $msg = ob_get_contents(); + ob_end_clean(); + + $msg = explode("\n", $msg); + foreach($msg as $key => $value) { + if (preg_match('/ok$/', $value)) { + $value = preg_replace('/(ok)$/', '\1', $value); + }; + if (preg_match('/failed$/', $value)) { + $value = preg_replace('/(failed)$/', '\1', $value); + }; + if (preg_match('/^install ok:/', $value)) { + //$value = preg_replace('/^(install ok:)/', '\1', $value).'
'; + //$msg = array($value); // if install succeeded: don't show the irritatingly verbose pear installer + $msg = array('ok
'); + break; + }; + if (preg_match('/^Warning:/', $value)) { + $value = ''.$value.''; + }; + $msg[$key] = $value; + }; + $msg = implode('
', $msg); + + $msg.=''; + + echo $msg; + ob_start(); +}; + +// }}} +// {{{ displayHTMLDownloadProgress + +function displayHTMLDownloadProgress($progress) +{ + if (!(WEBINSTALLER && isset($_SESSION['go-pear']['DHTML']) && $_SESSION['go-pear']['DHTML'])) { + return; + }; + $msg = ob_get_contents(); + ob_end_clean(); + + echo ''; + + ob_start(); + echo $msg; +}; + +// }}} +// {{{ displayHTMLSetDownload + +function displayHTMLSetDownload($file) +{ + if (!(WEBINSTALLER && isset($_SESSION['go-pear']['DHTML']) && $_SESSION['go-pear']['DHTML'])) { + return; + }; + $msg = ob_get_contents(); + ob_end_clean(); + + if ($file != null && $file != '') { + echo ''; + } else { + echo ''; + } + + ob_start(); + echo $msg; +}; + +// }}} +// {{{ win32BrowseForFolder + +/* + * Create a vbs script to browse the getfolder dialog, called + * by cscript, if it's available. + * $label is the label text in the header of the dialog box + * + * TODO: + * - Do not show Control panel + * - Replace WSH with calls to w32 as soon as callbacks work + * @Author Pierrre-Alain Joye + */ +function win32BrowseForFolder($label) +{ + global $ptmp; + static $wshSaved=false; + static $cscript=''; +$wsh_browserfolder = 'Option Explicit +Dim ArgObj, var1, var2, sa, sFld +Set ArgObj = WScript.Arguments +Const BIF_EDITBOX = &H10 +Const BIF_NEWDIALOGSTYLE = &H40 +Const BIF_RETURNONLYFSDIRS = &H0001 +Const BIF_DONTGOBELOWDOMAIN = &H0002 +Const BIF_STATUSTEXT = &H0004 +Const BIF_RETURNFSANCESTORS = &H0008 +Const BIF_VALIDATE = &H0020 +Const BIF_BROWSEFORCOMPUTER = &H1000 +Const BIF_BROWSEFORPRINTER = &H2000 +Const BIF_BROWSEINCLUDEFILES = &H4000 +Const OFN_LONGNAMES = &H200000 +Const OFN_NOLONGNAMES = &H40000 +Const ssfDRIVES = &H11 +Const ssfNETWORK = &H12 +Set sa = CreateObject("Shell.Application") +var1=ArgObj(0) +Set sFld = sa.BrowseForFolder(0, var1, BIF_EDITBOX + BIF_VALIDATE + BIF_BROWSEINCLUDEFILES + BIF_RETURNFSANCESTORS+BIF_NEWDIALOGSTYLE , ssfDRIVES ) +if not sFld is nothing Then + if not left(sFld.items.item.path,1)=":" Then + WScript.Echo sFld.items.item.path + Else + WScript.Echo "invalid" + End If +Else + WScript.Echo "cancel" +End If +'; + if( !$wshSaved){ + $cscript = $ptmp.DIRECTORY_SEPARATOR."bf.vbs"; + $fh = fopen($cscript,"wb+"); + fwrite($fh,$wsh_browserfolder,strlen($wsh_browserfolder)); + fclose($fh); + $wshSaved = true; + } + exec('cscript '.$cscript.' "'.$label.'" //noLogo',$arPath); + if($arPath[0]=='' || $arPath[0]=='cancel'){ + return ''; + } elseif ($arPath[0]=='invalid') { + echo "Invalid Path.\n"; + return ''; + } + return $arPath[0]; +} + +// }}} +// {{{ win32CreateRegEnv + +/* + * Generates a registry addOn for Win32 platform + * This addon set PEAR environment variables + * @Author Pierrre-Alain Joye + */ +function win32CreateRegEnv() +{ + global $prefix, $bin_dir, $php_dir, $php_bin, $doc_dir, $data_dir, $test_dir, $temp_dir; + $nl = "\r\n"; + $reg ='REGEDIT4'.$nl. + '[HKEY_CURRENT_USER\Environment]'.$nl. + '"PHP_PEAR_SYSCONF_DIR"="'.addslashes($prefix).'"'.$nl. + '"PHP_PEAR_INSTALL_DIR"="'.addslashes($php_dir).'"'.$nl. + '"PHP_PEAR_DOC_DIR"="'.addslashes($doc_dir).'"'.$nl. + '"PHP_PEAR_BIN_DIR"="'.addslashes($bin_dir).'"'.$nl. + '"PHP_PEAR_DATA_DIR"="'.addslashes($data_dir).'"'.$nl. + '"PHP_PEAR_PHP_BIN"="'.addslashes($php_bin).'"'.$nl. + '"PHP_PEAR_TEST_DIR"="'.addslashes($test_dir).'"'.$nl; + + $fh = fopen($prefix.DIRECTORY_SEPARATOR.'PEAR_ENV.reg','wb'); + if($fh){ + fwrite($fh, $reg ,strlen($reg)); + fclose($fh); + echo " + +* WINDOWS ENVIRONMENT VARIABLES * +For convenience, a REG file is available under $prefix\\PEAR_ENV.reg . +This file creates ENV variables for the current user. + +Double-click this file to add it to the current user registry. + +"; + } +} + +// }}} +// {{{ win32DetectPHPSAPI + +/* + * Try to detect the kind of SAPI used by the + * the given php.exe. + * @Author Pierrre-Alain Joye + */ +function win32DetectPHPSAPI() +{ + global $php_bin,$php_sapi_name; + if (WEBINSTALLER) { + return $php_sapi_name; + } + if($php_bin!=''){ + exec($php_bin.' -v', $res); + if(is_array($res)) { + if( isset($res[0]) && strpos($res[0],"(cli)")) { + return 'cli'; + } + if( isset($res[0]) && strpos($res[0],"cgi")) { + return 'cgi'; + } else { + return 'unknown'; + } + } + } + return 'unknown'; +} + +// }}} +// {{{ getPhpiniPath + +/* + * Get the php.ini file used with the current + * process or with the given php.exe + * + * Horrible hack, but well ;) + * + * Not used yet, will add the support later + * @Author Pierre-Alain Joye + */ +function getPhpiniPath() +{ + $pathIni = get_cfg_var('cfg_file_path'); + if( $pathIni && is_file($pathIni) ){ + return $pathIni; + } + + // Oh well, we can keep this too :) + // I dunno if get_cfg_var() is safe on every OS + if (WINDOWS) { + // on Windows, we can be pretty sure that there is a php.ini + // file somewhere + do { + $php_ini = PHP_CONFIG_FILE_PATH . DIRECTORY_SEPARATOR . 'php.ini'; + if ( @file_exists($php_ini) ) break; + $php_ini = 'c:\winnt\php.ini'; + if ( @file_exists($php_ini) ) break; + $php_ini = 'c:\windows\php.ini'; + } while (false); + } else { + $php_ini = PHP_CONFIG_FILE_PATH . DIRECTORY_SEPARATOR . 'php.ini'; + } + + if( @is_file($php_ini) ){ + return $php_ini; + } + + // We re running in hackz&troubles :) + ob_implicit_flush(false); + ob_start(); + phpinfo(INFO_GENERAL); + $strInfo = ob_get_contents (); + ob_end_clean(); + ob_implicit_flush(true); + + if ( php_sapi_name() != 'cli' ) { + $strInfo = strip_tags($strInfo,''); + $arrayInfo = explode("", $strInfo ); + $cli = false; + } else { + $arrayInfo = explode("\n",$strInfo); + $cli = true; + } + + foreach($arrayInfo as $val){ + if ( strpos($val,"php.ini") ) { + if($cli){ + list(,$pathIni) = explode('=>',$val); + } else { + $pathIni = strip_tags(trim($val) ); + } + $pathIni = trim($pathIni); + if(is_file($pathIni)){ + return $pathIni; + } + } + } + + return false; +} + +// }}} +// {{{ alterPhpIni + +/* + * Not optimized, but seems to work, if some nice + * peardev will test it? :) + * + * @Author Pierre-Alain Joye + */ +function alterPhpIni($pathIni='') +{ + global $php_dir, $prefix; + + $iniSep = WINDOWS?';':':'; + + if( $pathIni=='' ){ + $pathIni = getphpinipath(); + } + + $arrayIni = file($pathIni); + $i=0; + $found=0; + + // Looks for each active include_path directives + foreach ( $arrayIni as $iniLine ) { + $iniLine = trim($iniLine); + $iniLine = str_replace(array("\n","\r"),array(),$iniLine); + if( preg_match("/^include_path/",$iniLine) ){ + $foundAt[] = $i; + $found++; + } + $i++; + } + + if ( $found ) { + $includeLine = $arrayIni[$foundAt[0]]; + list(,$currentPath)=explode('=',$includeLine); + + $currentPath = trim($currentPath); + if(substr($currentPath,0,1)=='"'){ + $currentPath = substr($currentPath,1,strlen($currentPath)-2); + } + + $arrayPath = explode($iniSep, $currentPath); + if( $arrayPath[0]=='.' ){ + $newPath[0] = '.'; + $newPath[1] = $php_dir; + array_shift($arrayPath); + } else { + $newPath[0] = $php_dir; + } + + foreach( $arrayPath as $path ){ + $newPath[]= $path; + } + } else { + $newPath[0] = '.'; + $newPath[1] = $php_dir; + + } + $nl = WINDOWS?"\r\n":"\n"; + $includepath = 'include_path="'.implode($iniSep,$newPath).'"'; + $newInclude = "$nl$nl;***** Added by go-pear$nl". + $includepath. + $nl.";*****". + $nl.$nl; + + $arrayIni[$foundAt[0]] = $newInclude; + + for( $i=1; $i<$found; $i++){ + $arrayIni[$foundAt[$i]]=';'.trim($arrayIni[$foundAt[$i]]); + } + + $newIni = implode("",$arrayIni); + if ( !($fh = @fopen($pathIni, "wb+")) ){ + $prefixIni = $prefix.DIRECTORY_SEPARATOR."php.ini-gopear"; + $fh = fopen($prefixIni, "wb+"); + if ( !$fh ) { + echo +" +****************************************************************************** +WARNING! I cannot write to $pathIni nor in $prefix/php.ini-gopear. Please +modify manually your php.ini by adding: + +$includepath + +"; + return false; + } else { + fwrite($fh, $newIni, strlen($newIni)); + fclose($fh); + echo +" +****************************************************************************** +WARNING! I cannot write to $pathIni, but I succesfully created a php.ini +under <$prefix/php.ini-gopear>. Please replace the file <$pathIni> with +<$prefixIni> or modify your php.ini by adding: + +$includepath + +"; + + } + } else { + fwrite($fh, $newIni, strlen($newIni)); + fclose($fh); + echo " +php.ini <$pathIni> include_path updated. +"; + } + return true; +} + +?> diff --git a/programming/php/php8/files/php-fpm.conf b/programming/php/php8/files/php-fpm.conf new file mode 100644 index 0000000000..3fcf87e388 --- /dev/null +++ b/programming/php/php8/files/php-fpm.conf @@ -0,0 +1,522 @@ +;;;;;;;;;;;;;;;;;;;;; +; FPM Configuration ; +;;;;;;;;;;;;;;;;;;;;; + +; All relative paths in this configuration file are relative to PHP's install +; prefix (/usr). This prefix can be dynamically changed by using the +; '-p' argument from the command line. + +; Include one or more files. If glob(3) exists, it is used to include a bunch of +; files from a glob(3) pattern. This directive can be used everywhere in the +; file. +; Relative path can also be used. They will be prefixed by: +; - the global prefix if it's been set (-p argument) +; - /usr otherwise +;include=etc/fpm.d/*.conf + +;;;;;;;;;;;;;;;;;; +; Global Options ; +;;;;;;;;;;;;;;;;;; + +[global] +; Pid file +; Note: the default prefix is /var +; Default Value: none +pid = /run/php-fpm.pid + +; Error log file +; If it's set to "syslog", log is sent to syslogd instead of being written +; in a local file. +; Note: the default prefix is /var +; Default Value: log/php-fpm.log +error_log = /var/log/php-fpm/php-fpm.log + +; syslog_facility is used to specify what type of program is logging the +; message. This lets syslogd specify that messages from different facilities +; will be handled differently. +; See syslog(3) for possible values (ex daemon equiv LOG_DAEMON) +; Default Value: daemon +;syslog.facility = daemon + +; syslog_ident is prepended to every message. If you have multiple FPM +; instances running on the same server, you can change the default value +; which must suit common needs. +; Default Value: php-fpm +;syslog.ident = php-fpm + +; Log level +; Possible Values: alert, error, warning, notice, debug +; Default Value: notice +;log_level = notice + +; If this number of child processes exit with SIGSEGV or SIGBUS within the time +; interval set by emergency_restart_interval then FPM will restart. A value +; of '0' means 'Off'. +; Default Value: 0 +;emergency_restart_threshold = 0 + +; Interval of time used by emergency_restart_interval to determine when +; a graceful restart will be initiated. This can be useful to work around +; accidental corruptions in an accelerator's shared memory. +; Available Units: s(econds), m(inutes), h(ours), or d(ays) +; Default Unit: seconds +; Default Value: 0 +;emergency_restart_interval = 0 + +; Time limit for child processes to wait for a reaction on signals from master. +; Available units: s(econds), m(inutes), h(ours), or d(ays) +; Default Unit: seconds +; Default Value: 0 +;process_control_timeout = 0 + +; The maximum number of processes FPM will fork. This has been design to control +; the global number of processes when using dynamic PM within a lot of pools. +; Use it with caution. +; Note: A value of 0 indicates no limit +; Default Value: 0 +; process.max = 128 + +; Specify the nice(2) priority to apply to the master process (only if set) +; The value can vary from -19 (highest priority) to 20 (lower priority) +; Note: - It will only work if the FPM master process is launched as root +; - The pool process will inherit the master process priority +; unless it specified otherwise +; Default Value: no set +; process.priority = -19 + +; Send FPM to background. Set to 'no' to keep FPM in foreground for debugging. +; Default Value: yes +daemonize = no + +; Set open file descriptor rlimit for the master process. +; Default Value: system defined value +;rlimit_files = 1024 + +; Set max core size rlimit for the master process. +; Possible Values: 'unlimited' or an integer greater or equal to 0 +; Default Value: system defined value +;rlimit_core = 0 + +; Specify the event mechanism FPM will use. The following is available: +; - select (any POSIX os) +; - poll (any POSIX os) +; - epoll (linux >= 2.5.44) +; - kqueue (FreeBSD >= 4.1, OpenBSD >= 2.9, NetBSD >= 2.0) +; - /dev/poll (Solaris >= 7) +; - port (Solaris >= 10) +; Default Value: not set (auto detection) +;events.mechanism = epoll + +; When FPM is build with systemd integration, specify the interval, +; in second, between health report notification to systemd. +; Set to 0 to disable. +; Available Units: s(econds), m(inutes), h(ours) +; Default Unit: seconds +; Default value: 10 +;systemd_interval = 10 + +;;;;;;;;;;;;;;;;;;;; +; Pool Definitions ; +;;;;;;;;;;;;;;;;;;;; + +; Multiple pools of child processes may be started with different listening +; ports and different management options. The name of the pool will be +; used in logs and stats. There is no limitation on the number of pools which +; FPM can handle. Your system will tell you anyway :) + +; Start a new pool named 'www'. +; the variable $pool can we used in any directive and will be replaced by the +; pool name ('www' here) +[www] + +; Per pool prefix +; It only applies on the following directives: +; - 'slowlog' +; - 'listen' (unixsocket) +; - 'chroot' +; - 'chdir' +; - 'php_values' +; - 'php_admin_values' +; When not set, the global prefix (or /usr) applies instead. +; Note: This directive can also be relative to the global prefix. +; Default Value: none +;prefix = /path/to/pools/$pool + +; Unix user/group of processes +; Note: The user is mandatory. If the group is not set, the default user's group +; will be used. +user = apache +group = apache + +; The address on which to accept FastCGI requests. +; Valid syntaxes are: +; 'ip.add.re.ss:port' - to listen on a TCP socket to a specific address on +; a specific port; +; 'port' - to listen on a TCP socket to all addresses on a +; specific port; +; '/path/to/unix/socket' - to listen on a unix socket. +; Note: This value is mandatory. +listen = 127.0.0.1:9000 + +; Set listen(2) backlog. +; Default Value: 128 (-1 on FreeBSD and OpenBSD) +;listen.backlog = 128 + +; Set permissions for unix socket, if one is used. In Linux, read/write +; permissions must be set in order to allow connections from a web server. Many +; BSD-derived systems allow connections regardless of permissions. +; Default Values: user and group are set as the running user +; mode is set to 0666 +;listen.owner = apache +;listen.group = apache +;listen.mode = 0666 + +; List of ipv4 addresses of FastCGI clients which are allowed to connect. +; Equivalent to the FCGI_WEB_SERVER_ADDRS environment variable in the original +; PHP FCGI (5.2.2+). Makes sense only with a tcp listening socket. Each address +; must be separated by a comma. If this value is left blank, connections will be +; accepted from any ip address. +; Default Value: any +;listen.allowed_clients = 127.0.0.1 + +; Specify the nice(2) priority to apply to the pool processes (only if set) +; The value can vary from -19 (highest priority) to 20 (lower priority) +; Note: - It will only work if the FPM master process is launched as root +; - The pool processes will inherit the master process priority +; unless it specified otherwise +; Default Value: no set +; priority = -19 + +; Choose how the process manager will control the number of child processes. +; Possible Values: +; static - a fixed number (pm.max_children) of child processes; +; dynamic - the number of child processes are set dynamically based on the +; following directives. With this process management, there will be +; always at least 1 children. +; pm.max_children - the maximum number of children that can +; be alive at the same time. +; pm.start_servers - the number of children created on startup. +; pm.min_spare_servers - the minimum number of children in 'idle' +; state (waiting to process). If the number +; of 'idle' processes is less than this +; number then some children will be created. +; pm.max_spare_servers - the maximum number of children in 'idle' +; state (waiting to process). If the number +; of 'idle' processes is greater than this +; number then some children will be killed. +; ondemand - no children are created at startup. Children will be forked when +; new requests will connect. The following parameter are used: +; pm.max_children - the maximum number of children that +; can be alive at the same time. +; pm.process_idle_timeout - The number of seconds after which +; an idle process will be killed. +; Note: This value is mandatory. +pm = dynamic + +; The number of child processes to be created when pm is set to 'static' and the +; maximum number of child processes when pm is set to 'dynamic' or 'ondemand'. +; This value sets the limit on the number of simultaneous requests that will be +; served. Equivalent to the ApacheMaxClients directive with mpm_prefork. +; Equivalent to the PHP_FCGI_CHILDREN environment variable in the original PHP +; CGI. The below defaults are based on a server without much resources. Don't +; forget to tweak pm.* to fit your needs. +; Note: Used when pm is set to 'static', 'dynamic' or 'ondemand' +; Note: This value is mandatory. +pm.max_children = 5 + +; The number of child processes created on startup. +; Note: Used only when pm is set to 'dynamic' +; Default Value: min_spare_servers + (max_spare_servers - min_spare_servers) / 2 +pm.start_servers = 2 + +; The desired minimum number of idle server processes. +; Note: Used only when pm is set to 'dynamic' +; Note: Mandatory when pm is set to 'dynamic' +pm.min_spare_servers = 1 + +; The desired maximum number of idle server processes. +; Note: Used only when pm is set to 'dynamic' +; Note: Mandatory when pm is set to 'dynamic' +pm.max_spare_servers = 3 + +; The number of seconds after which an idle process will be killed. +; Note: Used only when pm is set to 'ondemand' +; Default Value: 10s +;pm.process_idle_timeout = 10s; + +; The number of requests each child process should execute before respawning. +; This can be useful to work around memory leaks in 3rd party libraries. For +; endless request processing specify '0'. Equivalent to PHP_FCGI_MAX_REQUESTS. +; Default Value: 0 +;pm.max_requests = 500 + +; The URI to view the FPM status page. If this value is not set, no URI will be +; recognized as a status page. It shows the following informations: +; pool - the name of the pool; +; process manager - static, dynamic or ondemand; +; start time - the date and time FPM has started; +; start since - number of seconds since FPM has started; +; accepted conn - the number of request accepted by the pool; +; listen queue - the number of request in the queue of pending +; connections (see backlog in listen(2)); +; max listen queue - the maximum number of requests in the queue +; of pending connections since FPM has started; +; listen queue len - the size of the socket queue of pending connections; +; idle processes - the number of idle processes; +; active processes - the number of active processes; +; total processes - the number of idle + active processes; +; max active processes - the maximum number of active processes since FPM +; has started; +; max children reached - number of times, the process limit has been reached, +; when pm tries to start more children (works only for +; pm 'dynamic' and 'ondemand'); +; Value are updated in real time. +; Example output: +; pool: www +; process manager: static +; start time: 01/Jul/2011:17:53:49 +0200 +; start since: 62636 +; accepted conn: 190460 +; listen queue: 0 +; max listen queue: 1 +; listen queue len: 42 +; idle processes: 4 +; active processes: 11 +; total processes: 15 +; max active processes: 12 +; max children reached: 0 +; +; By default the status page output is formatted as text/plain. Passing either +; 'html', 'xml' or 'json' in the query string will return the corresponding +; output syntax. Example: +; http://www.foo.bar/status +; http://www.foo.bar/status?json +; http://www.foo.bar/status?html +; http://www.foo.bar/status?xml +; +; By default the status page only outputs short status. Passing 'full' in the +; query string will also return status for each pool process. +; Example: +; http://www.foo.bar/status?full +; http://www.foo.bar/status?json&full +; http://www.foo.bar/status?html&full +; http://www.foo.bar/status?xml&full +; The Full status returns for each process: +; pid - the PID of the process; +; state - the state of the process (Idle, Running, ...); +; start time - the date and time the process has started; +; start since - the number of seconds since the process has started; +; requests - the number of requests the process has served; +; request duration - the duration in µs of the requests; +; request method - the request method (GET, POST, ...); +; request URI - the request URI with the query string; +; content length - the content length of the request (only with POST); +; user - the user (PHP_AUTH_USER) (or '-' if not set); +; script - the main script called (or '-' if not set); +; last request cpu - the %cpu the last request consumed +; it's always 0 if the process is not in Idle state +; because CPU calculation is done when the request +; processing has terminated; +; last request memory - the max amount of memory the last request consumed +; it's always 0 if the process is not in Idle state +; because memory calculation is done when the request +; processing has terminated; +; If the process is in Idle state, then informations are related to the +; last request the process has served. Otherwise informations are related to +; the current request being served. +; Example output: +; ************************ +; pid: 31330 +; state: Running +; start time: 01/Jul/2011:17:53:49 +0200 +; start since: 63087 +; requests: 12808 +; request duration: 1250261 +; request method: GET +; request URI: /test_mem.php?N=10000 +; content length: 0 +; user: - +; script: /home/fat/web/docs/php/test_mem.php +; last request cpu: 0.00 +; last request memory: 0 +; +; Note: There is a real-time FPM status monitoring sample web page available +; It's available in: /usr/share/fpm/status.html +; +; Note: The value must start with a leading slash (/). The value can be +; anything, but it may not be a good idea to use the .php extension or it +; may conflict with a real PHP file. +; Default Value: not set +;pm.status_path = /status + +; The ping URI to call the monitoring page of FPM. If this value is not set, no +; URI will be recognized as a ping page. This could be used to test from outside +; that FPM is alive and responding, or to +; - create a graph of FPM availability (rrd or such); +; - remove a server from a group if it is not responding (load balancing); +; - trigger alerts for the operating team (24/7). +; Note: The value must start with a leading slash (/). The value can be +; anything, but it may not be a good idea to use the .php extension or it +; may conflict with a real PHP file. +; Default Value: not set +;ping.path = /ping + +; This directive may be used to customize the response of a ping request. The +; response is formatted as text/plain with a 200 response code. +; Default Value: pong +;ping.response = pong + +; The access log file +; Default: not set +;access.log = log/$pool.access.log + +; The access log format. +; The following syntax is allowed +; %%: the '%' character +; %C: %CPU used by the request +; it can accept the following format: +; - %{user}C for user CPU only +; - %{system}C for system CPU only +; - %{total}C for user + system CPU (default) +; %d: time taken to serve the request +; it can accept the following format: +; - %{seconds}d (default) +; - %{miliseconds}d +; - %{mili}d +; - %{microseconds}d +; - %{micro}d +; %e: an environment variable (same as $_ENV or $_SERVER) +; it must be associated with embraces to specify the name of the env +; variable. Some exemples: +; - server specifics like: %{REQUEST_METHOD}e or %{SERVER_PROTOCOL}e +; - HTTP headers like: %{HTTP_HOST}e or %{HTTP_USER_AGENT}e +; %f: script filename +; %l: content-length of the request (for POST request only) +; %m: request method +; %M: peak of memory allocated by PHP +; it can accept the following format: +; - %{bytes}M (default) +; - %{kilobytes}M +; - %{kilo}M +; - %{megabytes}M +; - %{mega}M +; %n: pool name +; %o: output header +; it must be associated with embraces to specify the name of the header: +; - %{Content-Type}o +; - %{X-Powered-By}o +; - %{Transfert-Encoding}o +; - .... +; %p: PID of the child that serviced the request +; %P: PID of the parent of the child that serviced the request +; %q: the query string +; %Q: the '?' character if query string exists +; %r: the request URI (without the query string, see %q and %Q) +; %R: remote IP address +; %s: status (response code) +; %t: server time the request was received +; it can accept a strftime(3) format: +; %d/%b/%Y:%H:%M:%S %z (default) +; %T: time the log has been written (the request has finished) +; it can accept a strftime(3) format: +; %d/%b/%Y:%H:%M:%S %z (default) +; %u: remote user +; +; Default: "%R - %u %t \"%m %r\" %s" +;access.format = "%R - %u %t \"%m %r%Q%q\" %s %f %{mili}d %{kilo}M %C%%" + +; The log file for slow requests +; Default Value: not set +; Note: slowlog is mandatory if request_slowlog_timeout is set +slowlog = /var/log/php-fpm/www-slow.log + +; The timeout for serving a single request after which a PHP backtrace will be +; dumped to the 'slowlog' file. A value of '0s' means 'off'. +; Available units: s(econds)(default), m(inutes), h(ours), or d(ays) +; Default Value: 0 +;request_slowlog_timeout = 0 + +; The timeout for serving a single request after which the worker process will +; be killed. This option should be used when the 'max_execution_time' ini option +; does not stop script execution for some reason. A value of '0' means 'off'. +; Available units: s(econds)(default), m(inutes), h(ours), or d(ays) +; Default Value: 0 +;request_terminate_timeout = 0 + +; Set open file descriptor rlimit. +; Default Value: system defined value +;rlimit_files = 1024 + +; Set max core size rlimit. +; Possible Values: 'unlimited' or an integer greater or equal to 0 +; Default Value: system defined value +;rlimit_core = 0 + +; Chroot to this directory at the start. This value must be defined as an +; absolute path. When this value is not set, chroot is not used. +; Note: you can prefix with '$prefix' to chroot to the pool prefix or one +; of its subdirectories. If the pool prefix is not set, the global prefix +; will be used instead. +; Note: chrooting is a great security feature and should be used whenever +; possible. However, all PHP paths will be relative to the chroot +; (error_log, sessions.save_path, ...). +; Default Value: not set +;chroot = + +; Chdir to this directory at the start. +; Note: relative path can be used. +; Default Value: current directory or / when chroot +;chdir = /var/www + +; Redirect worker stdout and stderr into main error log. If not set, stdout and +; stderr will be redirected to /dev/null according to FastCGI specs. +; Note: on highloaded environement, this can cause some delay in the page +; process time (several ms). +; Default Value: no +;catch_workers_output = yes + +; Limits the extensions of the main script FPM will allow to parse. This can +; prevent configuration mistakes on the web server side. You should only limit +; FPM to .php extensions to prevent malicious users to use other extensions to +; exectute php code. +; Note: set an empty value to allow all extensions. +; Default Value: .php +;security.limit_extensions = .php .php3 .php4 .php5 + +; Pass environment variables like LD_LIBRARY_PATH. All $VARIABLEs are taken from +; the current environment. +; Default Value: clean env +;env[HOSTNAME] = $HOSTNAME +;env[PATH] = /usr/local/bin:/usr/bin:/bin +;env[TMP] = /tmp +;env[TMPDIR] = /tmp +;env[TEMP] = /tmp + +; Additional php.ini defines, specific to this pool of workers. These settings +; overwrite the values previously defined in the php.ini. The directives are the +; same as the PHP SAPI: +; php_value/php_flag - you can set classic ini defines which can +; be overwritten from PHP call 'ini_set'. +; php_admin_value/php_admin_flag - these directives won't be overwritten by +; PHP call 'ini_set' +; For php_*flag, valid values are on, off, 1, 0, true, false, yes or no. + +; Defining 'extension' will load the corresponding shared extension from +; extension_dir. Defining 'disable_functions' or 'disable_classes' will not +; overwrite previously defined php.ini values, but will append the new value +; instead. + +; Note: path INI options can be relative and will be expanded with the prefix +; (pool, global or /usr) + +; Default Value: nothing is defined by default except the values in php.ini and +; specified at startup with the -d argument +;php_admin_value[sendmail_path] = /usr/sbin/sendmail -t -i -f www@my.domain.com +;php_flag[display_errors] = off +;php_admin_value[error_log] = /var/log/fpm-php.www.log +;php_admin_flag[log_errors] = on +;php_admin_value[memory_limit] = 32M + +; Set session path to a directory owned by process user +php_value[session.save_handler] = files +php_value[session.save_path] = /tmp diff --git a/programming/php/php8/files/php-imap-annotation+status-current.diff b/programming/php/php8/files/php-imap-annotation+status-current.diff new file mode 100644 index 0000000000..2da8d70fe4 --- /dev/null +++ b/programming/php/php8/files/php-imap-annotation+status-current.diff @@ -0,0 +1,302 @@ +diff -Naurp php-5.3.4RC1/ext/imap/php_imap.c php-5.3.4RC1.oden/ext/imap/php_imap.c +--- php-5.3.4RC1/ext/imap/php_imap.c 2010-11-18 16:22:22.000000000 +0100 ++++ php-5.3.4RC1.oden/ext/imap/php_imap.c 2010-11-22 10:01:42.538863104 +0100 +@@ -164,6 +164,22 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_imap_geta + ZEND_ARG_INFO(0, mailbox) + ZEND_END_ARG_INFO() + #endif ++#if defined(HAVE_IMAP2005) ++ZEND_BEGIN_ARG_INFO_EX(arginfo_imap_setannotation, 0, 0, 5) ++ ZEND_ARG_INFO(0, stream_id) ++ ZEND_ARG_INFO(0, mailbox) ++ ZEND_ARG_INFO(0, entry) ++ ZEND_ARG_INFO(0, attr) ++ ZEND_ARG_INFO(0, value) ++ZEND_END_ARG_INFO() ++ ++ZEND_BEGIN_ARG_INFO_EX(arginfo_imap_getannotation, 0, 0, 4) ++ ZEND_ARG_INFO(0, stream_id) ++ ZEND_ARG_INFO(0, mailbox) ++ ZEND_ARG_INFO(0, entry) ++ ZEND_ARG_INFO(0, attr) ++ZEND_END_ARG_INFO() ++#endif + + ZEND_BEGIN_ARG_INFO_EX(arginfo_imap_expunge, 0, 0, 1) + ZEND_ARG_INFO(0, stream_id) +@@ -408,6 +424,11 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_imap_stat + ZEND_ARG_INFO(0, options) + ZEND_END_ARG_INFO() + ++ZEND_BEGIN_ARG_INFO_EX(arginfo_imap_status_current, 0, 0, 2) ++ ZEND_ARG_INFO(0, stream_id) ++ ZEND_ARG_INFO(0, options) ++ZEND_END_ARG_INFO() ++ + ZEND_BEGIN_ARG_INFO_EX(arginfo_imap_bodystruct, 0, 0, 3) + ZEND_ARG_INFO(0, stream_id) + ZEND_ARG_INFO(0, msg_no) +@@ -507,6 +528,7 @@ const zend_function_entry imap_functions + PHP_FE(imap_binary, arginfo_imap_binary) + PHP_FE(imap_utf8, arginfo_imap_utf8) + PHP_FE(imap_status, arginfo_imap_status) ++ PHP_FE(imap_status_current, arginfo_imap_status_current) + PHP_FE(imap_mailboxmsginfo, arginfo_imap_mailboxmsginfo) + PHP_FE(imap_setflag_full, arginfo_imap_setflag_full) + PHP_FE(imap_clearflag_full, arginfo_imap_clearflag_full) +@@ -537,6 +559,10 @@ const zend_function_entry imap_functions + PHP_FE(imap_setacl, arginfo_imap_setacl) + PHP_FE(imap_getacl, arginfo_imap_getacl) + #endif ++#if defined(HAVE_IMAP2005) ++ PHP_FE(imap_setannotation, arginfo_imap_setannotation) ++ PHP_FE(imap_getannotation, arginfo_imap_getannotation) ++#endif + + PHP_FE(imap_mail, arginfo_imap_mail) + +@@ -798,6 +824,30 @@ void mail_getacl(MAILSTREAM *stream, cha + /* }}} */ + #endif + ++#if defined(HAVE_IMAP2005) ++/* {{{ mail_getannotation ++ * ++ * Mail GET_ANNOTATION callback ++ * Called via the mail_parameter function in c-client:src/c-client/mail.c ++ */ ++void mail_getannotation(MAILSTREAM *stream, ANNOTATION *alist) ++{ ++ ANNOTATION_VALUES *cur; ++ ++ TSRMLS_FETCH(); ++ ++ /* walk through the ANNOTATION_VALUES */ ++ ++ for(cur = alist->values; cur; cur = cur->next) { ++ if (cur->value) ++ add_assoc_stringl(IMAPG(imap_annotation_list), cur->attr, cur->value, strlen(cur->value), 1); ++ else ++ add_assoc_stringl(IMAPG(imap_annotation_list), cur->attr, "", 0, 1); ++ } ++} ++/* }}} */ ++#endif ++ + /* {{{ PHP_GINIT_FUNCTION + */ + static PHP_GINIT_FUNCTION(imap) +@@ -823,6 +873,7 @@ static PHP_GINIT_FUNCTION(imap) + #if defined(HAVE_IMAP2000) || defined(HAVE_IMAP2001) + imap_globals->quota_return = NIL; + imap_globals->imap_acl_list = NIL; ++ imap_globals->imap_annotation_list = NIL; + #endif + imap_globals->gets_stream = NIL; + } +@@ -1547,7 +1598,119 @@ PHP_FUNCTION(imap_getacl) + } + /* }}} */ + #endif /* HAVE_IMAP2000 || HAVE_IMAP2001 */ ++ ++#if defined(HAVE_IMAP2005) ++ ++/* {{{ proto bool imap_setannotation(resource stream_id, string mailbox, string entry, string attr, string value) ++ Sets an annotation for a given mailbox */ ++PHP_FUNCTION(imap_setannotation) ++{ ++ zval **streamind, **mailbox, **entry, **attr, **value; ++ pils *imap_le_struct; ++ long ret; ++ ++ // TODO: Use zend_parse_parameters here ++ if (ZEND_NUM_ARGS() != 5 || zend_get_parameters_ex(5, &streamind, &mailbox, &entry, &attr, &value) == FAILURE) { ++ ZEND_WRONG_PARAM_COUNT(); ++ } ++ ++ ZEND_FETCH_RESOURCE(imap_le_struct, pils *, streamind, -1, "imap", le_imap); ++ ++ convert_to_string_ex(mailbox); ++ convert_to_string_ex(entry); ++ convert_to_string_ex(attr); ++ convert_to_string_ex(value); ++ ++ // create annotation object ++ ANNOTATION *annotation = mail_newannotation(); ++ if (!annotation) ++ RETURN_FALSE; ++ annotation->values = mail_newannotationvalue(); ++ if (!annotation->values) { ++ mail_free_annotation(&annotation); ++ RETURN_FALSE; ++ } ++ ++ // fill in annotation values ++ annotation->mbox = Z_STRVAL_PP(mailbox); ++ annotation->entry = Z_STRVAL_PP(entry); ++ annotation->values->attr = Z_STRVAL_PP(attr); ++ annotation->values->value = Z_STRVAL_PP(value); ++ ++ ret = imap_setannotation(imap_le_struct->imap_stream, annotation); ++ ++ // make sure mail_free_annotation doesn't free our variables ++ annotation->mbox = NULL; ++ annotation->entry = NULL; ++ annotation->values->attr = NULL; ++ annotation->values->value = NULL; ++ mail_free_annotation(&annotation); ++ ++ RETURN_BOOL(ret); ++} ++/* }}} */ ++ ++/* {{{ proto array imap_getannotation(resource stream_id, string mailbox, string entry, string attr) ++ Gets the ACL for a given mailbox */ ++PHP_FUNCTION(imap_getannotation) ++{ ++ zval **streamind, **mailbox, **entry, **attr; ++ pils *imap_le_struct; ++ long ret; ++ ++ if(ZEND_NUM_ARGS() != 4 || zend_get_parameters_ex(4, &streamind, &mailbox, &entry, &attr) == FAILURE) { ++ ZEND_WRONG_PARAM_COUNT(); ++ } + ++ ZEND_FETCH_RESOURCE(imap_le_struct, pils *, streamind, -1, "imap", le_imap); ++ ++ convert_to_string_ex(mailbox); ++ convert_to_string_ex(entry); ++ convert_to_string_ex(attr); ++ ++ /* initializing the special array for the return values */ ++ if (array_init(return_value) == FAILURE) { ++ RETURN_FALSE; ++ } ++ ++ // fillup calling parameters ++ STRINGLIST *entries = mail_newstringlist(); ++ if (!entries) ++ RETURN_FALSE; ++ ++ STRINGLIST *cur = entries; ++ cur->text.data = (unsigned char *)cpystr(Z_STRVAL_PP(entry)); ++ cur->text.size = Z_STRLEN_PP(entry); ++ cur->next = NIL; ++ ++ STRINGLIST *attributes = mail_newstringlist(); ++ if (!attributes) ++ RETURN_FALSE; ++ cur = attributes; ++ cur->text.data = (unsigned char *)cpystr (Z_STRVAL_PP(attr)); ++ cur->text.size = Z_STRLEN_PP(attr); ++ cur->next = NIL; ++ ++ IMAPG(imap_annotation_list) = return_value; ++ ++ /* set the callback for the GET_ANNOTATION function */ ++ mail_parameters(NIL, SET_ANNOTATION, (void *) mail_getannotation); ++ ret = imap_getannotation(imap_le_struct->imap_stream, Z_STRVAL_PP(mailbox), entries, attributes); ++ ++ mail_free_stringlist(&entries); ++ mail_free_stringlist(&attributes); ++ ++ if (!ret) { ++ zval_dtor(return_value); ++ RETURN_FALSE; ++ } ++ ++ IMAPG(imap_annotation_list) = NIL; ++} ++/* }}} */ ++ ++#endif /* HAVE_IMAP2005 */ ++ + /* {{{ proto bool imap_expunge(resource stream_id) + Permanently delete all messages marked for deletion */ + PHP_FUNCTION(imap_expunge) +@@ -3190,6 +3353,42 @@ PHP_FUNCTION(imap_msgno) + } + /* }}} */ + ++/* {{{ proto object imap_status_current(resource stream_id, int options) ++ Get (cached) status info from current mailbox */ ++PHP_FUNCTION(imap_status_current) ++{ ++ zval **streamind, **pflags; ++ pils *imap_le_struct; ++ long flags = 0L; ++ ++ if (ZEND_NUM_ARGS() != 2 || zend_get_parameters_ex(2, &streamind, &pflags) == FAILURE) { ++ ZEND_WRONG_PARAM_COUNT(); ++ } ++ ++ ZEND_FETCH_RESOURCE(imap_le_struct, pils *, streamind, -1, "imap", le_imap); ++ ++ convert_to_long_ex(pflags); ++ flags = Z_LVAL_PP(pflags); ++ ++ if (object_init(return_value) == FAILURE) { ++ RETURN_FALSE; ++ } ++ ++ if (flags & SA_MESSAGES) { ++ add_property_long(return_value, "messages", imap_le_struct->imap_stream->nmsgs); ++ } ++ if (flags & SA_RECENT) { ++ add_property_long(return_value, "recent", imap_le_struct->imap_stream->recent); ++ } ++ if (flags & SA_UIDNEXT) { ++ add_property_long(return_value, "uidnext", imap_le_struct->imap_stream->uid_last+1); ++ } ++ if (flags & SA_UIDVALIDITY) { ++ add_property_long(return_value, "uidvalidity", imap_le_struct->imap_stream->uid_validity); ++ } ++} ++/* }}} */ ++ + /* {{{ proto object imap_status(resource stream_id, string mailbox, int options) + Get status info from a mailbox */ + PHP_FUNCTION(imap_status) +diff -Naurp php-5.3.4RC1/ext/imap/php_imap.h php-5.3.4RC1.oden/ext/imap/php_imap.h +--- php-5.3.4RC1/ext/imap/php_imap.h 2010-01-03 10:23:27.000000000 +0100 ++++ php-5.3.4RC1.oden/ext/imap/php_imap.h 2010-11-22 10:01:42.542862889 +0100 +@@ -153,6 +153,7 @@ PHP_FUNCTION(imap_lsub); + PHP_FUNCTION(imap_lsub_full); + PHP_FUNCTION(imap_create); + PHP_FUNCTION(imap_rename); ++PHP_FUNCTION(imap_status_current); + PHP_FUNCTION(imap_status); + PHP_FUNCTION(imap_bodystruct); + PHP_FUNCTION(imap_fetch_overview); +@@ -173,6 +174,9 @@ PHP_FUNCTION(imap_mime_header_decode); + PHP_FUNCTION(imap_thread); + PHP_FUNCTION(imap_timeout); + ++// TODO: Needs fixing in configure in ++#define HAVE_IMAP2005 1 ++ + #if defined(HAVE_IMAP2000) || defined(HAVE_IMAP2001) + PHP_FUNCTION(imap_get_quota); + PHP_FUNCTION(imap_get_quotaroot); +@@ -180,7 +184,10 @@ PHP_FUNCTION(imap_set_quota); + PHP_FUNCTION(imap_setacl); + PHP_FUNCTION(imap_getacl); + #endif +- ++#if defined(HAVE_IMAP2005) ++PHP_FUNCTION(imap_setannotation); ++PHP_FUNCTION(imap_getannotation); ++#endif + + ZEND_BEGIN_MODULE_GLOBALS(imap) + char *imap_user; +@@ -211,6 +218,9 @@ ZEND_BEGIN_MODULE_GLOBALS(imap) + zval **quota_return; + zval *imap_acl_list; + #endif ++#if defined(HAVE_IMAP2005) ++ zval *imap_annotation_list; ++#endif + /* php_stream for php_mail_gets() */ + php_stream *gets_stream; + ZEND_END_MODULE_GLOBALS(imap) diff --git a/programming/php/php8/files/php-imap-myrights.diff b/programming/php/php8/files/php-imap-myrights.diff new file mode 100644 index 0000000000..274a5f73da --- /dev/null +++ b/programming/php/php8/files/php-imap-myrights.diff @@ -0,0 +1,92 @@ +diff -Naurp php-5.3.4RC1/ext/imap/php_imap.c php-5.3.4RC1.oden/ext/imap/php_imap.c +--- php-5.3.4RC1/ext/imap/php_imap.c 2010-11-22 10:39:59.349863220 +0100 ++++ php-5.3.4RC1.oden/ext/imap/php_imap.c 2010-11-22 10:40:14.709956619 +0100 +@@ -163,6 +163,11 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_imap_geta + ZEND_ARG_INFO(0, stream_id) + ZEND_ARG_INFO(0, mailbox) + ZEND_END_ARG_INFO() ++ ++ZEND_BEGIN_ARG_INFO_EX(arginfo_imap_myrights, 0, 0, 2) ++ ZEND_ARG_INFO(0, stream_id) ++ ZEND_ARG_INFO(0, mailbox) ++ZEND_END_ARG_INFO() + #endif + #if defined(HAVE_IMAP2005) + ZEND_BEGIN_ARG_INFO_EX(arginfo_imap_setannotation, 0, 0, 5) +@@ -558,6 +563,7 @@ const zend_function_entry imap_functions + PHP_FE(imap_set_quota, arginfo_imap_set_quota) + PHP_FE(imap_setacl, arginfo_imap_setacl) + PHP_FE(imap_getacl, arginfo_imap_getacl) ++ PHP_FE(imap_myrights, arginfo_imap_myrights) + #endif + #if defined(HAVE_IMAP2005) + PHP_FE(imap_setannotation, arginfo_imap_setannotation) +@@ -822,6 +828,20 @@ void mail_getacl(MAILSTREAM *stream, cha + } + } + /* }}} */ ++ ++/* {{{ mail_myrights ++ * ++ * Mail MYRIGHTS callback ++ * Called via the mail_parameter function in c-client:src/c-client/mail.c ++ */ ++void mail_myrights(MAILSTREAM *stream, char *mailbox, char *rights) ++{ ++ TSRMLS_FETCH(); ++ ++ ZVAL_STRING(IMAPG(imap_acl_list), rights, 1); ++ ++} ++/* }}} */ + #endif + + #if defined(HAVE_IMAP2005) +@@ -1597,6 +1617,36 @@ PHP_FUNCTION(imap_getacl) + IMAPG(imap_acl_list) = NIL; + } + /* }}} */ ++ ++/* {{{ proto string imap_myrights(resource stream_id, string mailbox) ++ Gets my rights (ACL) for a given mailbox */ ++PHP_FUNCTION(imap_myrights) ++{ ++ zval **streamind, **mailbox; ++ pils *imap_le_struct; ++ ++ if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_ex(2, &streamind, &mailbox) == FAILURE) { ++ ZEND_WRONG_PARAM_COUNT(); ++ } ++ ++ ZEND_FETCH_RESOURCE(imap_le_struct, pils *, streamind, -1, "imap", le_imap); ++ ++ convert_to_string_ex(mailbox); ++ ++ IMAPG(imap_acl_list) = return_value; ++ ++ /* set the callback for the GET_ACL function */ ++ mail_parameters(NIL, SET_MYRIGHTS, (void *) mail_myrights); ++ if(!imap_myrights(imap_le_struct->imap_stream, Z_STRVAL_PP(mailbox))) { ++ php_error(E_WARNING, "c-client imap_myrights failed"); ++ zval_dtor(return_value); ++ RETURN_FALSE; ++ } ++ ++ IMAPG(imap_acl_list) = NIL; ++} ++/* }}} */ ++ + #endif /* HAVE_IMAP2000 || HAVE_IMAP2001 */ + + #if defined(HAVE_IMAP2005) +diff -Naurp php-5.3.4RC1/ext/imap/php_imap.h php-5.3.4RC1.oden/ext/imap/php_imap.h +--- php-5.3.4RC1/ext/imap/php_imap.h 2010-11-22 10:39:59.349863220 +0100 ++++ php-5.3.4RC1.oden/ext/imap/php_imap.h 2010-11-22 10:40:14.709956619 +0100 +@@ -183,6 +183,7 @@ PHP_FUNCTION(imap_get_quotaroot); + PHP_FUNCTION(imap_set_quota); + PHP_FUNCTION(imap_setacl); + PHP_FUNCTION(imap_getacl); ++PHP_FUNCTION(imap_myrights); + #endif + #if defined(HAVE_IMAP2005) + PHP_FUNCTION(imap_setannotation); diff --git a/programming/php/php8/files/php5-imap-symlink.diff b/programming/php/php8/files/php5-imap-symlink.diff new file mode 100644 index 0000000000..475c037557 --- /dev/null +++ b/programming/php/php8/files/php5-imap-symlink.diff @@ -0,0 +1,15 @@ +--- ext/imap/config.m4 2006-01-23 23:55:13.000000000 +0200 ++++ ext.orig/imap/config.m4 2006-01-23 23:56:08.000000000 +0200 +@@ -146,12 +146,6 @@ + AC_MSG_ERROR(Cannot find rfc822.h. Please check your c-client installation.) + fi + +- if test -r "$IMAP_DIR/c-client/c-client.a"; then +- ln -s "$IMAP_DIR/c-client/c-client.a" "$IMAP_DIR/c-client/libc-client.a" >/dev/null 2>&1 +- elif test -r "$IMAP_DIR/$PHP_LIBDIR/c-client.a"; then +- ln -s "$IMAP_DIR/$PHP_LIBDIR/c-client.a" "$IMAP_DIR/$PHP_LIBDIR/libc-client.a" >/dev/null 2>&1 +- fi +- + for lib in c-client4 c-client imap; do + IMAP_LIB=$lib + IMAP_LIB_CHK($PHP_LIBDIR) diff --git a/programming/php/php8/pspec.xml b/programming/php/php8/pspec.xml new file mode 100644 index 0000000000..35b14d513f --- /dev/null +++ b/programming/php/php8/pspec.xml @@ -0,0 +1,298 @@ + + + + + php8 + http://www.php.net + + Fatih Turgel + turgelfatih@gmail.com + + PHP + library + PHP7 is an HTML-embedded scripting language. The goal of the language is to allow web developers to write dynamically generated pages quickly + PHP7 is an HTML-embedded scripting language. Much of its syntax is borrowed from C, Java and Perl with a couple of unique PHP-specific features thrown in. The goal of the language is to allow web developers to write dynamically generated pages quickly. + https://www.php.net/distributions/php-8.3.13.tar.xz + + gd-devel + re2c + libzip-devel + harfbuzz-devel + apr-devel + apr-util-devel + apache + postfix + libxslt-devel + db-devel + mariadb-lib + libmcrypt-devel + mit-kerberos-devel + libc-client + postgresql-server + libjpeg-turbo-devel + zlib-devel + curl-devel + gdbm-devel + libpng-devel + freetype-devel + openssl-devel + sqlite-devel + oniguruma-devel + keyutils + + + db6.patch + + + + + php8-cli + + php-cli + + + php-common + gd + curl + zlib + bzip2 + libpng + libxslt + libxml2 + freetype + mariadb-lib + libmcrypt + mit-kerberos + postgresql-lib + openldap-client + libjpeg-turbo + oniguruma + sqlite + openssl + + + /etc/php/cli + /usr/bin + /usr/share/man + + + go-pear + + + + + php8-common + + php-common + + Common config files for PHP + + db + gd + pam + gdbm + mit-kerberos + + + + /usr/lib/php/modules + /usr/share/php7 + /etc/php/ext + + + + + php8-devel + + php-devel + + Development files for PHP + + php-common + + + /usr/bin/php-config + /usr/bin/phpize + /usr/include + /usr/lib/php/build + /usr/share/man/man1/php-config* + /usr/share/man/man1/phpize* + + + + + php8-pear + + php-pear + + Development files for PHP + + php-common + + + /etc/pear.conf + /usr/bin/pear + /usr/bin/go-pear + /usr/lib/php/PEAR/ + /usr/lib/php/Structures + /usr/lib/php/.lock + /usr/lib/php/peclcmd.php + /usr/lib/php/pearcmd.php + /usr/lib/php/System.php + /usr/lib/php/PEAR.php + /usr/lib/php/.filemap + /usr/lib/php/.registry/ + /usr/lib/php/Console/Getopt.php + /usr/lib/php/XML/Util.php + /usr/lib/php/Archive/Tar.php + /usr/lib/php/test/XML_Util + /usr/lib/php/test/Structures_Graph + /usr/lib/php/test/Console_Getopt + /usr/lib/php/.channels + /usr/lib/php/doc/ + /usr/lib/php/data/PEAR/ + /usr/lib/php/OS/Guess.php + + + + + mod_php8 + + mod_php + + server.web + + xz + pam + curl + zlib + bzip2 + libnsl + libpng + apache + libxml2 + freetype + libtool-ltdl + mariadb-lib + postgresql-lib + gd + libxslt + mit-kerberos + openldap-client + cyrus-sasl + harfbuzz + php-common + libmcrypt + libjpeg-turbo + + sqlite + openssl + e2fsprogs + oniguruma + + + /usr/lib/apache2/modules/libphp.so + /etc/apache2 + /etc/php/apache2 + + + 70_mod_php8.conf + + + + + php8-zip + + php-zip + + Zip extension for PHP + + php-common + pam + libzip + mit-kerberos + + + /usr/lib/php/modules/zip.so + /etc/php/cli/ext/10-php-zip.ini + /etc/php/ext/10-php-zip.ini + + + 10-php-zip.ini + + + + + php8-imap + + php-imap + + Module for PHP to enable IMAP support + + pam + openssl + e2fsprogs + php-common + libc-client + mit-kerberos + + + /usr/lib/php/modules/imap.so + /etc/php/ext/11-php-imap.ini + /etc/php/cli/ext/11-php-imap.ini + /etc/php/apache2/ext/11-php-imap.ini + + + 11-php-imap.ini + + + + php8-fpm + + php-fpm + + FPM for PHP + + libxslt + libmcrypt + php-common + libjpeg-turbo + postgresql-lib + openldap-client + + curl + zlib + bzip2 + sqlite + libxml2 + openssl + oniguruma + + + /usr/sbin/php-fpm + /usr/share/man/man8/php-fpm.8 + /etc/php/ext/php-fpm.conf + /etc/php-fpm.d/www.conf.default + /usr/share/fpm + /run + /var/log + + + php-fpm.conf + + + System.Service + + + + + + + 2024-10-25 + 8.3.13 + First release + Pisi Linux Community + admin@pisilinux.org + + + diff --git a/programming/php/php8/translations.xml b/programming/php/php8/translations.xml new file mode 100644 index 0000000000..49f78eca53 --- /dev/null +++ b/programming/php/php8/translations.xml @@ -0,0 +1,14 @@ + + + + php + Dinamik HTML sayfaları oluşturmak için kullanılan bir programlama dili + PHP7, dinamik HTML sayfaları oluşturmak için kullanılan bir programlama dilidir. Dil yapısının önemli bir kısmı C, Java ve Perl'den alınmıştır. Bu dilin amacı, web geliştiricilerinin kısa zamanda dinamik sayfalar oluşturmasına imkan vermektir. + PHP7 es un languaje interpretado que puede estar embebido en HTML. Muchas partes de su sintaxis fueron prestados de C, Java y Perl con algunas facilidades agregados únicas de PHP. El lenguaje permite a desarrolladores web escribir de manera sencilla páginas con contenido dinámico. + + + + php-common + PHP için genel yapılandırma dosyaları + +