2006.11.10 Friday | 16:10

  PHP5 の PEAR ふるいむかし

既存PHP4 環境で PHP5共存の場合、cli 版 php の名前に注意

go-pear.bat (オリジナルの場合)
set PHP_BIN=php.exe
%PHP_BIN% -d output_buffering=0 PEAR\go-pear.phar
pause


go-pear.bat (共存の場合)
set PHP_BIN=C:\php\cli\php.exe
%PHP_BIN% -d output_buffering=0 PEAR\go-pear.phar
pause


cli 版で実行されずに、cgi 版で実行されると、max_execution_time の値が 30 の為、
処理途中でエラーになります。

go-pear.phar の中身が壊れているように見えますが、そうではありません。

__halt_compiler
(no version information, might be only in CVS)

__halt_compiler -- コンパイラの実行を中止する
説明
void __halt_compiler ( void )

この関数は、コンパイラの実行を中止します。これは、インストレーションファイルのような
データを PHP スクリプトに 埋め込んでいる場合に便利です。
データの開始位置(バイト値)は、定数 __COMPILER_HALT_OFFSET__ で定義されています。
これは ファイル内で __halt_compiler() が使用されている場合にのみ 存在します。


( よく解らない場合は こちら が詳しいサイトです )

以下、実行結果
X-Powered-By: PHP/5.1.6
Content-type: text/html


Are you installing a system-wide PEAR or a local copy?
(system|local) [system] :

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.

 1. Installation base ($prefix)   : C:\php\PEAR
 2. Binaries directory            : C:\php\PEAR
 3. PHP code directory ($php_dir) : C:\php\PEAR\pear
 4. Documentation directory       : C:\php\PEAR\pear\docs
 5. Data directory                : C:\php\PEAR\pear\data
 6. Tests directory               : C:\php\PEAR\pear\tests
 7. Name of configuration file    : C:\WINNT\pear.ini
 8. Path to CLI php.exe           : c"\php\cli

1-8, 'all' or Enter to continue:


パスが正常では無い場合は、番号入力してパス入力を行います。

以下が実行の続き

Beginning install...
Configuration written to C:\WINNT\pear.ini...
Initialized registry...
Preparing to install...
installing phar://go-pear.phar/PEAR/go-pear-tarballs/Archive_Tar-1.3.1.tar...
installing phar://go-pear.phar/PEAR/go-pear-tarballs/Console_Getopt-1.2.tar...
installing phar://go-pear.phar/PEAR/go-pear-tarballs/PEAR-1.4.9.tar...
WARNING: channel "pear.php.net" has updated its protocols, use "channel-update p
ear.php.net" to update
pear/PEAR can optionally use package "pear/XML_RPC" (version >= 1.4.0)
install ok: channel://pear.php.net/Archive_Tar-1.3.1
install ok: channel://pear.php.net/Console_Getopt-1.2
install ok: channel://pear.php.net/PEAR-1.4.9
PEAR: Optional feature webinstaller available (PEAR's web-based installer)
PEAR: Optional feature gtkinstaller available (PEAR's PHP-GTK-based installer)
PEAR: Optional feature gtk2installer available (PEAR's PHP-GTK2-based installer)

To install use "pear install pear/PEAR#featurename"

** WARNING! Old version found at C:\php\PEAR, please remove it or be sure to use
 the new c:\php\pear\pear.bat command

The 'pear' command is now at your service at c:\php\pear\pear.bat

** The 'pear' command is not currently in your PATH, so you need to
** use 'c:\php\pear\pear.bat' until you have added
** 'C:\php\PEAR' to your PATH environment variable.

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!



* WINDOWS ENVIRONMENT VARIABLES *
For convenience, a REG file is available under C:\php\PEAR\PEAR_ENV.reg .
This file creates ENV variables for the current user.

Double-click this file to add it to the current user registry.


以下はインストールサンプルです
C:\php\PEAR>pear install Net_SMTP
WARNING: channel "pear.php.net" has updated its protocols, use "channel-update p
ear.php.net" to update
Did not download optional dependencies: pear/Auth_SASL, use --alldeps to downloa
d automatically
pear/Net_SMTP can optionally use package "pear/Auth_SASL"
downloading Net_SMTP-1.2.8.tgz ...
Starting to download Net_SMTP-1.2.8.tgz (11,274 bytes)
.....done: 11,274 bytes
downloading Net_Socket-1.0.6.tgz ...
Starting to download Net_Socket-1.0.6.tgz (4,623 bytes)
...done: 4,623 bytes
install ok: channel://pear.php.net/Net_Socket-1.0.6
install ok: channel://pear.php.net/Net_SMTP-1.2.8


以下インストール可能なエントリ
pear remote-list(200./11/14 時点)

========================================
PACKAGE                                   VERSION
Auth_HTTP                                 2.1.6
Auth                                      1.4.2
Auth_SASL                                 1.0.2
LiveUser                                  0.16.12
Auth_PrefManager                          1.1.4
Auth_RADIUS                               1.0.5
Auth_PrefManager2                         2.0.0dev1
LiveUser_Admin                            0.3.9
Benchmark                                 1.2.6
Cache                                     1.5.5RC4
Cache_Lite                                1.7.2
Config                                    1.10.8
Console_Getopt                            1.2
System_Command                            1.0.5
Console_Table                             1.0.5
Console_Color                             1.0.0
Console_ProgressBar                       0.4.0beta
Console_Getargs                           1.3.3
DB_Pager                                  0.7
DB                                        1.7.6
MDB                                       1.3.0
DB_ado                                    1.3
DB_DataObject                             1.8.4
DBA                                       1.1
DBA_Relational                            0.19
DB_ldap                                   1.1.1
SQL_Parser                                0.5
DB_QueryTool                              1.0.3
MDB_QueryTool                             1.1.1
DB_ldap2                                  0.4
Gtk_MDB_Designer                          0.1
DB_NestedSet                              1.3.6
DB_DataObject_FormBuilder                 1.0.0RC5
MDB2                                      2.3.0
DB_Table                                  1.4.0
DB_Sqlite_Tools                           0.1.6
DB_odbtp                                  1.0.3
MDB2_Schema                               0.7.0
MDB2_Driver_mssql                         1.1.0
MDB2_Driver_sqlite                        1.3.0
MDB2_Driver_querysim                      0.6.0
MDB2_Driver_pgsql                         1.3.0
MDB2_Driver_oci8                          1.3.0
MDB2_Driver_mysqli                        1.3.0
MDB2_Driver_mysql                         1.3.0
MDB2_Driver_ibase                         1.3.0
MDB2_Driver_fbsql                         0.2.0
MDB2_Table                                -n/a-
Date                                      1.4.6
Calendar                                  0.5.3
Date_Holidays                             0.16.1
Crypt_CBC                                 0.4
Crypt_RC4                                 1.0.2
Crypt_Xtea                                1.1.0RC5
Message                                   0.6
Crypt_CHAP                                1.0.0
Crypt_HMAC                                1.0.1
Crypt_Blowfish                            1.1.0RC1
Crypt_RSA                                 1.2.0b
Crypt_XXTEA                               0.8.0
Event_Dispatcher                          1.0.0
Archive_Tar                               1.3.1
File_Passwd                               1.1.6
File_HtAccess                             1.1.0
Spreadsheet_Excel_Writer                  0.9.1
File_SMBPasswd                            1.0.2
Contact_Vcard_Parse                       1.31.0
Contact_Vcard_Build                       1.1.1
File_DICOM                                0.3
MP3_Id                                    1.2.0
File_Ogg                                  0.2.1
Archive_Zip                               0.1.1
File_IMC                                  0.3
Genealogy_Gedcom                          1.0.0
File_Gettext                              0.4.0
MP3_Playlist                              0.5.1alpha1
File_Fstab                                2.0.2
File_Bittorrent                           1.1.0RC1
File_PDF                                  0.1.0
File_DNS                                  0.0.8
Contact_AddressBook                       0.5.0
File_Archive                              1.5.3
File_Fortune                              0.9.0
MP3_IDv2                                  0.1.0
File_XSPF                                 0.2.1
File_MARC                                 0.1.0
OpenDocument                              -n/a-
File_Find                                 1.3.0
File                                      1.2.2
File_SearchReplace                        1.1.1
VFS                                       0.1.0
Gtk_VarDump                               0.2.0
Gtk_ScrollingLabel                        1.0.0
Gtk_FileDrop                              1.0.1
Gtk_Styled                                0.9.0beta1
Gtk2_VarDump                              0.2.0
Gtk2_ScrollingLabel                       0.4.1
Gtk2_FileDrop                             0.1.1
Gtk2_PHPConfig                            1.0.0RC1
Gtk2_IndexedComboBox                      0.2.0
Gtk2_EntryDialog                          0.1.0
Gtk2_ExceptionDump                        0.1.0
Pager                                     2.4.2
HTML_QuickForm                            3.2.7
HTML_Template_IT                          1.2.1
HTML_Template_PHPLIB                      1.3.1
HTML_Common                               1.2.3
HTML_Table                                1.7.5
HTML_TreeMenu                             1.2.0
HTML_Javascript                           1.1.1
HTML_Template_Flexy                       1.2.5
HTML_Crypt                                1.2.2
HTML_Select_Common                        1.1
Pager_Sliding                             1.6
HTML_Form                                 1.3.0
HTML_Template_Xipe                        1.7.6
HTML_Template_Sigma                       1.1.5
HTML_Page                                 2.0.0RC2
HTML_Select                               1.2.1
HTML_BBCodeParser                         1.1
HTML_CSS                                  1.0.0
HTML_Progress                             1.2.5
HTML_Menu                                 2.1.3
HTML_QuickForm_Controller                 1.0.7
HTML_Table_Matrix                         1.0.9
HTML_Page2                                0.5.0beta
HTML_Progress2                            2.1.0
HTML_Common2                              0.3.0
HTML_QuickForm_SelectFilter               1.0.0RC1
HTML_Safe                                 0.9.9beta
HTML_QuickForm_advmultiselect             1.2.0
HTML_AJAX                                 0.5.0
HTML_QuickForm_Livesearch                 0.3.2
HTML_QuickForm2                           -n/a-
HTML_QuickForm_Renderer_Tableless         0.4.2
HTML_QuickForm_DHTMLRulesTableless        0.2.1
HTML_TagCloud                             0.1.1
HTTP                                      1.4.0
HTTP_Upload                               0.9.1
HTTP_Request                              1.4.0
HTTP_Header                               1.2.0
HTTP_Session                              0.5.4
HTTP_WebDAV_Server                        1.0.0RC4
HTTP_Client                               1.1.0
HTTP_Server                               0.4.0
HTTP_Download                             1.1.1
HTTP_WebDAV_Client                        0.9.7
HTTP_Session2                             0.2.0
HTTP_SessionServer                        0.5.0
Image_Color                               1.0.2
Image_Remote                              1.0.1
Image_GraphViz                            1.2.1
Image_Transform                           0.9.0
Image_Barcode                             1.0.4
Image_GIS                                 1.1.1
Image_IPTC                                1.0.2
Image_Puzzle                              0.2.1
Image_Canvas                              0.3.0
Image_Graph                               0.7.2
Image_Text                                0.5.2beta2
Image_Tools                               0.4.0
Image_XBM                                 0.9.0RC1
Image_3D                                  0.4.0
Image_Color2                              0.1.4
Image_MonoBMP                             0.1.0
Image_WBMP                                0.1.0
Translation                               1.2.6pl1
I18N                                      0.8.6
Translation2                              2.0.0beta11
I18Nv2                                    0.11.4
I18N_UnicodeString                        0.2.1
Log                                       1.9.9
Net_NNTP                                  1.4.0RC1
Mail_IMAPv2                               0.2.0
Mail_Mime                                 1.3.1
Mail                                      1.1.14
Mail_Mbox                                 0.5.1
Mail_Queue                                1.1.3
Mail_IMAP                                 1.1.0RC2
Mail_mimeDecode                           -n/a-
Math_Basex                                0.3
Math_Vector                               0.6.2
Math_Stats                                0.9.0beta3
Math_Histogram                            0.9.0
Math_TrigOp                               1.0
Math_Complex                              0.8.5
Math_Integer                              0.8
Math_Fibonacci                            0.8
Math_Quaternion                           0.7.1
Math_Matrix                               0.8.5
Math_RPN                                  1.1.1
Math_Numerical_RootFinding                1.0.0
Math_BinaryUtils                          0.3.0
Math_Fraction                             0.4.0
Math_Finance                              1.0.0
Math_Polynomial                           0.1.0
Math_Derivative                           0.0.1
Math_BigInteger                           1.0.0RC1
Net_IRC                                   0.0.7
Net_CheckIP                               1.2.0
Net_IPv6                                  1.1.0RC2
Net_Ping                                  2.4.1
Net_Whois                                 1.0
Net_Portscan                              1.0.2
Net_POP3                                  1.3.6
Net_Curl                                  1.2.3
Net_URL                                   1.0.14
Net_Dig                                   0.1
Net_Geo                                   1.0.4
Net_DNS                                   1.0.0
Net_UserAgent_Detect                      2.2.0
Net_Socket                                1.0.6
Net_Sieve                                 1.1.5
Net_SMTP                                  1.2.8
Net_DIME                                  0.3
Net_IPv4                                  1.3.0
Net_FTP                                   1.3.2
Net_Dict                                  1.0.5
Net_Ident                                 1.1.0
Net_SmartIRC                              1.0.0
Net_Finger                                1.0.0
Net_UserAgent_Mobile                      0.29.0
Net_IMAP                                  1.0.3
Net_LMTP                                  1.0.1
Net_Server                                1.0.1
Net_Traceroute                            0.21
Net_LDAP                                  0.6.6
Net_Cyrus                                 0.3.1
Net_GameServerQuery                       0.2.0
Net_SMS                                   0.1.0
Net_DNSBL                                 1.2.0alpha1
Net_GeoIP                                 1.0.0RC1
Net_HL7                                   0.1.0
Net_IDNA                                  0.7.1
Net_Monitor                               0.2.4
Net_FTP2                                  -n/a-
Net_Wifi                                  0.2.0
Net_SMPP                                  0.4.4
Net_SMPP_Client                           0.3.2
Net_Growl                                 0.7.0
Net_CDDB                                  0.2.0
Net_MPD                                   0.2.0dev
Numbers_Roman                             1.0.1
Numbers_Words                             0.15.0
Payment_Clieop                            0.1.1
Payment_Process                           0.6.5
Payment_DTA                               1.2.0
PEAR                                      1.5.0a1
PEAR_Frontend_Gtk                         0.4.0
PEAR_Frontend_Web                         0.5.1
PEAR_Info                                 1.6.1
PEAR_PackageFileManager                   1.6.0b5
PEAR_ErrorStack                           -n/a-
PEAR_Delegator                            0.1.0
PEAR_PackageFileManager_GUI_Gtk           1.0.1
PEAR_RemoteInstaller                      0.3.0
PEAR_Frontend_Gtk2                        0.1.2
PEAR_Command_Packaging                    0.1.2
PEAR_PackageUpdate                        0.5.2
PEAR_PackageUpdate_Gtk2                   0.3.2
PEAR_PackageFileManager_Frontend          0.7.0
PEAR_PackageFileManager_Frontend_Web      0.6.0
PEAR_PackageUpdate_Web                    0.3.0
pearweb                                   1.0.0RC1
PHPDoc                                    0.1.0
Var_Dump                                  1.0.3
Inline_C                                  0.1
PHP_Parser                                0.1
PHP_CompatInfo                            1.4.0
PHP_Fork                                  0.3.0
PHP_Compat                                1.5.0
PHP_Beautifier                            0.1.11
PHP_Archive                               0.8.0
PHP_Shell                                 0.3.0
PHP_LexerGenerator                        0.3.0
PHP_ParserGenerator                       0.1.2
PHP_CodeSniffer                           0.2.0
PHP_Annotation                            -n/a-
FSM                                       1.2.4
QA_Peardoc_Coverage                       0.4.0
Science_Chemistry                         1.1.0
RDF                                       0.1.0alpha1
RDF_N3                                    0.1.0alpha1
RDF_NTriple                               0.1.0alpha1
RDF_RDQL                                  0.1.0alpha1
Stream_SHM                                1.0.0
Stream_Var                                1.0.0
Tree                                      0.2.4
Text_Statistics                           1.0
OLE                                       0.5
Games_Chess                               0.9.0
Structures_Graph                          1.0.1
Structures_DataGrid                       0.7.2
Structures_DataGrid_DataSource_Array      0.1.0
Structures_DataGrid_DataSource_CSV        0.1.3
Structures_DataGrid_DataSource_DataObject 0.1.0
Structures_DataGrid_DataSource_DB         0.1.0
Structures_DataGrid_DataSource_DBQuery    0.1.3
Structures_DataGrid_DataSource_DBTable    0.1.4
Structures_DataGrid_DataSource_MDB2       0.1.2
Structures_DataGrid_DataSource_RSS        0.1.0
Structures_DataGrid_DataSource_XML        0.1.1
Structures_DataGrid_Renderer_Console      0.1.0
Structures_DataGrid_Renderer_CSV          0.1.2
Structures_DataGrid_Renderer_HTMLSortForm 0.1.1
Structures_DataGrid_Renderer_HTMLTable    0.1.2
Structures_DataGrid_Renderer_Pager        0.1.0
Structures_DataGrid_Renderer_Smarty       0.1.2
Structures_DataGrid_Renderer_XLS          0.1.0
Structures_DataGrid_Renderer_XML          0.1.1
Structures_DataGrid_Renderer_XUL          0.1.1
Structures_BibTex                         0.2.0
Structures_Form                           0.8.0devel
Structures_Form_Gtk2                      0.8.0devel
Structures_DataGrid_DataSource_Excel      0.1.0
Structures_LinkedList                     0.1.0
System_ProcWatch                          0.4.2
System_Socket                             0.4.1
System_Mount                              1.0.0
System_WinDrives                          0.1.0
System_SharedMemory                       0.9.0RC1
System_Folders                            0.1.6
Testing_Selenium                          0.2.1
Text_Password                             1.1.0
Text_Wiki                                 1.2.0RC1
Text_Diff                                 0.2.1
Text_Highlighter                          0.6.9
Text_TeXHyphen                            0.1.0
Text_CAPTCHA                              0.1.6
Text_Huffman                              0.2.0
Text_Figlet                               0.8.1
Text_Wiki_BBCode                          0.0.3
Text_Wiki_Cowiki                          0.0.1
Text_Wiki_Doku                            0.0.1
Text_Wiki_Tiki                            0.0.1
Text_Wiki_Mediawiki                       0.1.0
Text_LanguageDetect                       0.2.0
Text_PathNavigator                        0.1.0dev1
Text_CAPTCHA_Numeral                      0.1.5
PhpDocumentor                             1.3.1
CodeGen_MySQL_UDF                         0.9.5dev
MIME_Type                                 1.0.0
Search_Mnogosearch                        0.1.1
ScriptReorganizer                         0.4.0
CodeGen                                   1.0.2
CodeGen_PECL                              1.0.3
CodeGen_MySQL                             -n/a-
CodeGen_MySQL_Plugin                      -n/a-
Validate                                  0.6.5
Validate_AT                               0.5.1
Validate_CA                               0.1.2
Validate_CH                               0.5.1
Validate_Finance_CreditCard               0.5.2
Validate_DE                               0.5.1
Validate_ES                               0.5.1
Validate_FR                               0.5.2
Validate_Finance                          0.5.3
Validate_ISPN                             0.6.0
Validate_NL                               0.5.1
Validate_PL                               0.5.1
Validate_UK                               0.5.2
Validate_US                               0.5.2
Validate_ZA                               0.2.1
Validate_ptBR                             0.5.4
Validate_BE                               0.1.3
Validate_AU                               0.1.0
Validate_DK                               0.1.1
Validate_IS                               0.2.0
Validate_AR                               0.0.1
Validate_IN                               0.1.0
Validate_NZ                               0.1.2
Validate_FI                               0.2.0
VersionControl_SVN                        0.3.0alpha1
XML_RPC                                   1.5.1
Services_Yahoo                            0.1.1
SOAP                                      0.9.4
SOAP_Interop                              0.8
UDDI                                      0.2.3
Services_ExchangeRates                    0.5.3
Services_Weather                          1.4.0
Services_Amazon                           0.7.0
Services_Google                           0.1.1
Services_Delicious                        0.5.0
Services_Ebay                             0.12.0
Services_Technorati                       0.6.6beta
Services_Trackback                        0.6.1
Services_Hatena                           0.1.1
Services_Pingback                         0.2.0dev2
Services_Webservice                       0.4.0
Services_DynDNS                           0.3.1
Services_OpenSearch                       0.1.0
Services_YouTube                          0.2.1
XML_fo2pdf                                0.98
XML_sql2xml                               0.3.2
XML_Tree                                  2.0.0RC2
XML_RSS                                   0.9.10
XML_Transformer                           1.1.0
XML_Parser                                1.2.7
XML_svg2image                             0.1
XML_CSSML                                 1.1.1
XML_XPath                                 1.2.3
XML_image2svg                             0.1
XML_XSLT_Wrapper                          0.2.1
XML_NITF                                  1.1.0
XML_HTMLSax                               2.1.2
XML_SaxFilters                            0.3.0
XML_SVG                                   1.0.1
XML_Serializer                            0.18.0
XML_Util                                  1.1.1
XML_RDDL                                  0.9
XML_DTD                                   0.4.2
XML_Statistics                            0.1
XML_Beautifier                            1.1
XML_FOAF                                  0.2
XML_XUL                                   0.8.2
XML_Wddx                                  1.0.1
XML_HTMLSax3                              3.0.0RC1
XML_FastCreate                            1.0.3
XML_MXML                                  0.3.0
XML_Indexing                              0.3.6
XML_Feed_Parser                           1.0.0RC2
XML_RPC2                                  0.0.7
XML_Query2XML                             0.8.0
XML_DB_eXist                              -n/a-