首頁 後端開發 php教程 WINDOWS下PHP 的pear DB的安装(本地环境:PHP5.4.15+Apache+mysql)_PHP教程

WINDOWS下PHP 的pear DB的安装(本地环境:PHP5.4.15+Apache+mysql)_PHP教程

Jul 13, 2016 am 10:36 AM
aspnet 軟體程式設計

<span 因为需要安装phpunit,要先装pear,网上的教程大多数是以双击go-pear.bat开始,但是我安装的php文件夹里压根没有这个文件。
</span><br 经过几次搜索之后终于找到了办法。
</span><br 解决步骤如下:
</span><br 1.下载下面连接的文件go-pear.phar。放到PHP的安装文件下(D:\www\php54)
</span><br http://pear.php.net/go-pear.phar
</span><br 2.执行php go-pear.phar
</span><span (Windows上执行的时候因为有UAC的问题所以需要以管理员权限运行CMD。</span><span XP下以管理员权限运行CMD的方法:在C:/systerm32文件夹下,右键cmd,运行方式》选择管理员运行)<br />打开cmd,</span>
登入後複製

C:\Documents and Settings\sun>d:

C:\Documents and Settings\sun>cd D:\www\php54   //以此方式进入到 go-pear.phar存放路径              

D:\www\php54>php go-pear.phar               //安装go-pear.phar

Are you installing a system-wide PEAR or a local copy?
  //此处输入local

   //此处输入yes,之后一路回车键

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)                   : D:\www\php54
 2. Temporary directory for processing            : D:\www\php54\tmp
 3. Temporary directory for downloads             : D:\www\php54\tmp
 4. Binaries directory                            : D:\www\php54
 5. PHP code directory ($php_dir)                 : D:\www\php54\pear
 6. Documentation directory                       : D:\www\php54\docs
 7. Data directory                                : D:\www\php54\data
 8. User-modifiable configuration files directory : D:\www\php54\cfg
 9. Public Web Files directory                    : D:\www\php54\www
10. Tests directory                               : D:\www\php54\tests
11. Name of configuration file                    : D:\www\php54\pear.ini
12. Path to CLI php.exe                           : D:\www\php54

1-12, 'all' or Enter to continue:
Beginning install...
Configuration written to D:\www\php54\pear.ini...
Initialized registry...
Preparing to install...
installing phar://D:/www/php54/go-pear.phar/PEAR/go-pear-tarballs/Archive_Tar-1.
3.11.tar...
installing phar://D:/www/php54/go-pear.phar/PEAR/go-pear-tarballs/Console_Getopt
-1.3.1.tar...
installing phar://D:/www/php54/go-pear.phar/PEAR/go-pear-tarballs/PEAR-1.9.4.tar
...
installing phar://D:/www/php54/go-pear.phar/PEAR/go-pear-tarballs/Structures_Gra
ph-1.0.4.tar...
installing phar://D:/www/php54/go-pear.phar/PEAR/go-pear-tarballs/XML_Util-1.2.1
.tar...
install ok: channel://pear.php.net/Archive_Tar-1.3.11
install ok: channel://pear.php.net/Console_Getopt-1.3.1
install ok: channel://pear.php.net/Structures_Graph-1.0.4
install ok: channel://pear.php.net/XML_Util-1.2.1
install ok: channel://pear.php.net/PEAR-1.9.4
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)

PEAR: To install optional features use "pear install pear/PEAR#featurename"

******************************************************************************
WARNING!  The include_path defined in the currently used php.ini does not
contain the PEAR PHP directory you just specified:

If the specified directory is also not in the include_path used by
your scripts, you will have problems getting any PEAR packages working.


? [Y/n] : y

php.ini include_path updated.

Current include path           : .;C:\php\pear
Configured directory           : D:\www\php54\pear
Currently used php.ini (guess) : D:\www\php54\php.ini
Press Enter to continue:

** WARNING! Old version found at D:\www\php54, please remove it or be sure to us
e the new d:\www\php54\pear.bat command

The 'pear' command is now at your service at d:\www\php54\pear.bat

** The 'pear' command is not currently in your PATH, so you need to
** use 'd:\www\php54\pear.bat' until you have added
** 'D:\www\php54' 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!


pear list
INSTALLED PACKAGES, CHANNEL PEAR.PHP.NET:
=========================================
PACKAGE          VERSION STATE
Archive_Tar      1.3.11  stable
Console_Getopt   1.3.1   stable
PEAR             1.9.4   stable
Structures_Graph 1.0.4   stable
XML_Util         1.2.1   stable

pear install DB //安装DB库

www.bkjia.comtruehttp://www.bkjia.com/PHPjc/738530.htmlTechArticle打开cmd, C:\Documents and Settings\sund: C:\Documents and Settings\suncd D:\www\php54 //以此方式进入到 go-pear.phar存放路径 D:\www\php54php go-pear.phar //安装go-p...
本網站聲明
本文內容由網友自願投稿,版權歸原作者所有。本站不承擔相應的法律責任。如發現涉嫌抄襲或侵權的內容,請聯絡admin@php.cn

熱AI工具

Undresser.AI Undress

Undresser.AI Undress

人工智慧驅動的應用程序,用於創建逼真的裸體照片

AI Clothes Remover

AI Clothes Remover

用於從照片中去除衣服的線上人工智慧工具。

Undress AI Tool

Undress AI Tool

免費脫衣圖片

Clothoff.io

Clothoff.io

AI脫衣器

Video Face Swap

Video Face Swap

使用我們完全免費的人工智慧換臉工具,輕鬆在任何影片中換臉!

熱工具

記事本++7.3.1

記事本++7.3.1

好用且免費的程式碼編輯器

SublimeText3漢化版

SublimeText3漢化版

中文版,非常好用

禪工作室 13.0.1

禪工作室 13.0.1

強大的PHP整合開發環境

Dreamweaver CS6

Dreamweaver CS6

視覺化網頁開發工具

SublimeText3 Mac版

SublimeText3 Mac版

神級程式碼編輯軟體(SublimeText3)

熱門話題

Java教學
1655
14
CakePHP 教程
1413
52
Laravel 教程
1306
25
PHP教程
1252
29
C# 教程
1226
24
Vue.js與ASP.NET的結合,實現Web應用的效能最佳化與擴充的技巧與建議 Vue.js與ASP.NET的結合,實現Web應用的效能最佳化與擴充的技巧與建議 Jul 29, 2023 pm 05:19 PM

Vue.js與ASP.NET的結合,實現Web應用的效能最佳化和擴展的技巧和建議隨著Web應用的快速發展,效能最佳化成為開發者不可或缺的重要任務。 Vue.js作為一個流行的前端框架,與ASP.NET的結合可以幫助我們實現更好的效能最佳化和擴充。本文將會介紹一些技巧和建議,並提供一些程式碼範例。一、減少HTTP請求HTTP請求的數量直接影響Web應用程式的載入速度。透過

生成式AI將在十個方面改變軟體開發 生成式AI將在十個方面改變軟體開發 Mar 11, 2024 pm 12:10 PM

譯者|陳峻審校|重樓上世紀90年代,當人們提起軟體程式設計時,通常意味著選擇一個編輯器,將程式碼檢入CVS或SVN程式碼庫,然後將程式碼編譯成可執行檔。與之對應的Eclipse和VisualStudio等整合開發環境(IDE)可以將程式設計、開發、文件、建置、測試、部署等步驟納入到一個完整的軟體開發生命週期(SDLC)中,從而提高了開發人員的工作效率。近年來,流行的雲端運算和DevSecOps自動化工具提升了開發者的綜合能力,使得更多的企業能夠更輕鬆地開發、部署和維護軟體應用。如今,生成式AI作為下一代開

ASP.NET程式中的MySQL連線池使用及最佳化技巧 ASP.NET程式中的MySQL連線池使用及最佳化技巧 Jun 30, 2023 pm 11:54 PM

如何在ASP.NET程式中正確使用和最佳化MySQL連線池?引言:MySQL是一種廣泛使用的資料庫管理系統,它具有高效能、可靠性和易用性的特性。在ASP.NET開發中,使用MySQL資料庫進行資料儲存是常見的需求。為了提高資料庫連接的效率和效能,我們需要正確地使用和最佳化MySQL連接池。本文將介紹在ASP.NET程式中如何正確使用和最佳化MySQL連接池的方法。

如何在ASP.NET程式中重連MySQL連線? 如何在ASP.NET程式中重連MySQL連線? Jun 29, 2023 pm 02:21 PM

如何在ASP.NET程式中重連MySQL連線?在ASP.NET開發中,使用MySQL資料庫是非常常見的。然而,由於網路或資料庫伺服器的原因,有時會導致資料庫連線中斷或逾時。在這種情況下,為了確保程式的穩定性和可靠性,我們需要在連線中斷後重新建立連線。本文將介紹如何在ASP.NET程式中實作重連MySQL連線的方法。引用必要的命名空間首先,在程式碼檔案的頭部引用

Vue.js與ASP.NET的結合,實現企業級應用的開發與部署 Vue.js與ASP.NET的結合,實現企業級應用的開發與部署 Jul 29, 2023 pm 02:37 PM

Vue.js與ASP.NET的結合,實現企業級應用的開發和部署在當今快速發展的互聯網技術領域,企業級應用的開發和部署變得越來越重要。 Vue.js和ASP.NET是兩個在前端和後端開發中廣泛使用的技術,將它們結合起來可以為企業級應用的開發和部署帶來許多優勢。本文將透過程式碼範例介紹如何使用Vue.js和ASP.NET進行企業級應用的開發和部署。首先,我們需要安裝

如何在ASP.NET程式中正確設定和使用MySQL連線池? 如何在ASP.NET程式中正確設定和使用MySQL連線池? Jun 29, 2023 pm 12:56 PM

如何在ASP.NET程式中正確設定和使用MySQL連線池?隨著互聯網的發展和資料量的增加,對資料庫的存取和連接需求也不斷增加。為了提高資料庫的效能和穩定性,連接池成為了一個必備的技術。本文主要介紹如何在ASP.NET程式中正確配置和使用MySQL連接池,以提高資料庫的效率和回應速度。一、連接池的概念和作用連接池是一種重複使用資料庫連接的技術,在程式初始

ASP.NET中使用並最佳化MySQL連線池的事務效能 ASP.NET中使用並最佳化MySQL連線池的事務效能 Jun 30, 2023 pm 12:12 PM

如何在ASP.NET程式中正確使用並最佳化MySQL連線池的事務效能?在ASP.NET程式中,資料庫事務是非常重要的一環。事務可以確保資料庫的一致性和完整性,同時也可以提供更好的效能。而在使用MySQL資料庫時,利用連線池來管理連線資源和最佳化效能是不可或缺的。首先,讓我們簡單了解一下MySQL連接池的概念。連接池是一組連接的緩衝池,透過預先初始化一定數量的數

使用Visual Studio在Linux上進行ASP.NET開發的建議配置 使用Visual Studio在Linux上進行ASP.NET開發的建議配置 Jul 06, 2023 pm 08:45 PM

使用VisualStudio在Linux上進行ASP.NET開發的建議配置概述:隨著開源軟體的發展和Linux作業系統的普及,越來越多的開發者開始在Linux上進行ASP.NET開發。而作為一款功能強大的開發工具,VisualStudio在Windows平台上一直佔有主導地位。本文將介紹如何在Linux上設定VisualStudio來進行ASP.NE

See all articles