windows上使用pear安装php扩展
在windows上使用pear安装php扩展
相关网站:
http://www.php.net
http://pear.php.net
http://pear2.php.net
http://pecl.php.net
pear2需要使用sqlite3
执行命令:
1、php D:\php\php5.3.5\pyrus.phar install D:\php\php5.3.5\ext\libevent-0.0.4.tgz
Pyrus version 2.0.0a3 SHA-1: BE7EA9D171AE3873F1BBAF692EEE9165BB14BD5D
Using PEAR installation found at D:\php\php5.3.5\ext
Downloading pecl.php.net/libevent
PEAR2\Pyrus\Registry\Exception: Error: package pecl.php.net/libevent could not b
e installed in registry: Unable to execute statement: constraint failed
Exception: Unable to execute statement: constraint failed
2、php D:\php\php5.3.5\pyrus.phar -v install pecl/libevent
Pyrus version 2.0.0a3 SHA-1: BE7EA9D171AE3873F1BBAF692EEE9165BB14BD5D
Using PEAR installation found at D:\wamp\bin\php\php5.3.5\ext
PEAR2\Pyrus\Installer\Exception: Dependency validation failed for some packages
to install, installation aborted
PEAR2\Pyrus\Package\Dependency\Set\Exception: Unable to find a compatible relea
se for pecl.php.net/libevent
3、php D:\php\php5.3.5\pyrus.phar -v install pecl/libevent-0.0.4
Pyrus version 2.0.0a3 SHA-1: BE7EA9D171AE3873F1BBAF692EEE9165BB14BD5D
Using PEAR installation found at D:\php\php5.3.5\ext
Downloading pecl.php.net/libevent
Connected...
Mime-type: application/octet-stream
[================>
[================================================================>
[===============================================================================
PHP Warning: rmdir(D:\php\php5.3.5\ext\.journal-src): Permission denie
d in phar://D:/wamp/bin/php/php5.3.5/pyrus.phar/PEAR2_Pyrus-2.0.0a3/php/PEAR2/Py
rus/Filesystem.php on line 103
PHP Stack trace:
PHP 1. {main}() D:\php\php5.3.5\pyrus.phar:0
PHP 2. PEAR2\Pyrus\ScriptFrontend\Commands->run() D:\php\php5.3.5\pyr
us.phar:52
PHP 3. PEAR2\Pyrus\ScriptFrontend\Commands->install() phar://D:/wamp/bin/php/p
hp5.3.5/pyrus.phar/PEAR2_Pyrus-2.0.0a3/php/PEAR2/Pyrus/ScriptFrontend/Commands.p
hp:284
PHP 4. PEAR2\Pyrus\Installer::commit() phar://D:/wamp/bin/php/php5.3.5/pyrus.p
har/PEAR2_Pyrus-2.0.0a3/php/PEAR2/Pyrus/ScriptFrontend/Commands.php:491
PHP 5. PEAR2\Pyrus\Installer->install() phar://D:/wamp/bin/php/php5.3.5/pyrus.
phar/PEAR2_Pyrus-2.0.0a3/php/PEAR2/Pyrus/Installer.php:313
PHP 6. PEAR2\Pyrus\AtomicFileTransaction::getTransactionObject() phar://D:/wam
p/bin/php/php5.3.5/pyrus.phar/PEAR2_Pyrus-2.0.0a3/php/PEAR2/Pyrus/Installer.php:
465
PHP 7. PEAR2\Pyrus\AtomicFileTransaction\Manager->getTransaction() phar://D:/w
amp/bin/php/php5.3.5/pyrus.phar/PEAR2_Pyrus-2.0.0a3/php/PEAR2/Pyrus/AtomicFileTr
ansaction.php:71
PHP 8. PEAR2\Pyrus\AtomicFileTransaction\Transaction->__construct() phar://D:/
wamp/bin/php/php5.3.5/pyrus.phar/PEAR2_Pyrus-2.0.0a3/php/PEAR2/Pyrus/AtomicFileT
ransaction/Manager.php:67
PHP 9. PEAR2\Pyrus\AtomicFileTransaction\Transaction->begin() phar://D:/wamp/b
in/php/php5.3.5/pyrus.phar/PEAR2_Pyrus-2.0.0a3/php/PEAR2/Pyrus/AtomicFileTransac
tion/Transaction.php:37
PHP 10. PEAR2\Pyrus\AtomicFileTransaction\Transaction\TwoStage->begin() phar://
D:/wamp/bin/php/php5.3.5/pyrus.phar/PEAR2_Pyrus-2.0.0a3/php/PEAR2/Pyrus/AtomicFi
leTransaction/Transaction.php:60
PHP 11. PEAR2\Pyrus\AtomicFileTransaction\Transaction\Base->begin() phar://D:/w
amp/bin/php/php5.3.5/pyrus.phar/PEAR2_Pyrus-2.0.0a3/php/PEAR2/Pyrus/AtomicFileTr
ansaction/Transaction/TwoStage.php:49
PHP 12. PEAR2\Pyrus\Filesystem::rmrf() phar://D:/wamp/bin/php/php5.3.5/pyrus.ph
ar/PEAR2_Pyrus-2.0.0a3/php/PEAR2/Pyrus/AtomicFileTransaction/Transaction/Base.ph
p:91
PHP 13. rmdir() phar://D:/wamp/bin/php/php5.3.5/pyrus.phar/PEAR2_Pyrus-2.0.0a3/
php/PEAR2/Pyrus/Filesystem.php:103
Warning: rmdir(D:\php\php5.3.5\ext\.journal-src): Permission denied in
phar://D:/wamp/bin/php/php5.3.5/pyrus.phar/PEAR2_Pyrus-2.0.0a3/php/PEAR2/Pyrus/F
ilesystem.php on line 103
Call Stack:
0.1306 1507856 1. {main}() D:\php\php5.3.5\pyrus.phar:0
0.1884 3129712 2. PEAR2\Pyrus\ScriptFrontend\Commands->run() D:\wamp\bi
n\php\php5.3.5\pyrus.phar:52
0.3137 5680856 3. PEAR2\Pyrus\ScriptFrontend\Commands->install() phar:/
/D:/wamp/bin/php/php5.3.5/pyrus.phar/PEAR2_Pyrus-2.0.0a3/php/PEAR2/Pyrus/ScriptF
rontend/Commands.php:284
0.3496 7156424 4. PEAR2\Pyrus\Installer::commit() phar://D:/wamp/bin/ph
p/php5.3.5/pyrus.phar/PEAR2_Pyrus-2.0.0a3/php/PEAR2/Pyrus/ScriptFrontend/Command
s.php:491
2.6276 10275160 5. PEAR2\Pyrus\Installer->install() phar://D:/wamp/bin/p
hp/php5.3.5/pyrus.phar/PEAR2_Pyrus-2.0.0a3/php/PEAR2/Pyrus/Installer.php:313
2.6295 10278280 6. PEAR2\Pyrus\AtomicFileTransaction::getTransactionObje
ct() phar://D:/wamp/bin/php/php5.3.5/pyrus.phar/PEAR2_Pyrus-2.0.0a3/php/PEAR2/Py
rus/Installer.php:465
2.6295 10278280 7. PEAR2\Pyrus\AtomicFileTransaction\Manager->getTransac
tion() phar://D:/wamp/bin/php/php5.3.5/pyrus.phar/PEAR2_Pyrus-2.0.0a3/php/PEAR2/
Pyrus/AtomicFileTransaction.php:71
2.6338 10484696 8. PEAR2\Pyrus\AtomicFileTransaction\Transaction->__cons
truct() phar://D:/wamp/bin/php/php5.3.5/pyrus.phar/PEAR2_Pyrus-2.0.0a3/php/PEAR2
/Pyrus/AtomicFileTransaction/Manager.php:67
2.6345 10485016 9. PEAR2\Pyrus\AtomicFileTransaction\Transaction->begin(
) phar://D:/wamp/bin/php/php5.3.5/pyrus.phar/PEAR2_Pyrus-2.0.0a3/php/PEAR2/Pyrus
/AtomicFileTransaction/Transaction.php:37
2.6345 10485016 10. PEAR2\Pyrus\AtomicFileTransaction\Transaction\TwoStag
e->begin() phar://D:/wamp/bin/php/php5.3.5/pyrus.phar/PEAR2_Pyrus-2.0.0a3/php/PE
AR2/Pyrus/AtomicFileTransaction/Transaction.php:60
2.6352 10485016 11. PEAR2\Pyrus\AtomicFileTransaction\Transaction\Base->b
egin() phar://D:/wamp/bin/php/php5.3.5/pyrus.phar/PEAR2_Pyrus-2.0.0a3/php/PEAR2/
Pyrus/AtomicFileTransaction/Transaction/TwoStage.php:49
2.6357 10484968 12. PEAR2\Pyrus\Filesystem::rmrf() phar://D:/wamp/bin/php
/php5.3.5/pyrus.phar/PEAR2_Pyrus-2.0.0a3/php/PEAR2/Pyrus/AtomicFileTransaction/T
ransaction/Base.php:91
2.6369 10486400 13. rmdir() phar://D:/wamp/bin/php/php5.3.5/pyrus.phar/PE
AR2_Pyrus-2.0.0a3/php/PEAR2/Pyrus/Filesystem.php:103
PHP Warning: rmdir(D:\php\php5.3.5\ext\.journal-src): Permission denie
d in phar://D:/wamp/bin/php/php5.3.5/pyrus.phar/PEAR2_Pyrus-2.0.0a3/php/PEAR2/Py
rus/Filesystem.php on line 103
PHP Stack trace:
PHP 1. {main}() D:\php\php5.3.5\pyrus.phar:0
PHP 2. PEAR2\Pyrus\ScriptFrontend\Commands->run() D:\php\php5.3.5\pyr
us.phar:52
PHP 3. PEAR2\Pyrus\ScriptFrontend\Commands->install() phar://D:/wamp/bin/php/p
hp5.3.5/pyrus.phar/PEAR2_Pyrus-2.0.0a3/php/PEAR2/Pyrus/ScriptFrontend/Commands.p
hp:284
PHP 4. PEAR2\Pyrus\Installer::commit() phar://D:/wamp/bin/php/php5.3.5/pyrus.p
har/PEAR2_Pyrus-2.0.0a3/php/PEAR2/Pyrus/ScriptFrontend/Commands.php:491
PHP 5. PEAR2\Pyrus\Installer->install() phar://D:/wamp/bin/php/php5.3.5/pyrus.
phar/PEAR2_Pyrus-2.0.0a3/php/PEAR2/Pyrus/Installer.php:313
PHP 6. PEAR2\Pyrus\AtomicFileTransaction::getTransactionObject() phar://D:/wam
p/bin/php/php5.3.5/pyrus.phar/PEAR2_Pyrus-2.0.0a3/php/PEAR2/Pyrus/Installer.php:
465
PHP 7. PEAR2\Pyrus\AtomicFileTransaction\Manager->getTransaction() phar://D:/w
amp/bin/php/php5.3.5/pyrus.phar/PEAR2_Pyrus-2.0.0a3/php/PEAR2/Pyrus/AtomicFileTr
ansaction.php:71
PHP 8. PEAR2\Pyrus\AtomicFileTransaction\Transaction->__construct() phar://D:/
wamp/bin/php/php5.3.5/pyrus.phar/PEAR2_Pyrus-2.0.0a3/php/PEAR2/Pyrus/AtomicFileT
ransaction/Manager.php:67
PHP 9. PEAR2\Pyrus\AtomicFileTransaction\Transaction\Base->rollback() phar://D
:/wamp/bin/php/php5.3.5/pyrus.phar/PEAR2_Pyrus-2.0.0a3/php/PEAR2/Pyrus/AtomicFil
eTransaction/Transaction.php:40
PHP 10. PEAR2\Pyrus\Filesystem::rmrf() phar://D:/wamp/bin/php/php5.3.5/pyrus.ph
ar/PEAR2_Pyrus-2.0.0a3/php/PEAR2/Pyrus/AtomicFileTransaction/Transaction/Base.ph
p:118
PHP 11. rmdir() phar://D:/wamp/bin/php/php5.3.5/pyrus.phar/PEAR2_Pyrus-2.0.0a3/
php/PEAR2/Pyrus/Filesystem.php:103
Warning: rmdir(D:\php\php5.3.5\ext\.journal-src): Permission denied in
phar://D:/wamp/bin/php/php5.3.5/pyrus.phar/PEAR2_Pyrus-2.0.0a3/php/PEAR2/Pyrus/F
ilesystem.php on line 103
Call Stack:
0.1306 1507856 1. {main}() D:\php\php5.3.5\pyrus.phar:0
0.1884 3129712 2. PEAR2\Pyrus\ScriptFrontend\Commands->run() D:\wamp\bi
n\php\php5.3.5\pyrus.phar:52
0.3137 5680856 3. PEAR2\Pyrus\ScriptFrontend\Commands->install() phar:/
/D:/wamp/bin/php/php5.3.5/pyrus.phar/PEAR2_Pyrus-2.0.0a3/php/PEAR2/Pyrus/ScriptF
rontend/Commands.php:284
0.3496 7156424 4. PEAR2\Pyrus\Installer::commit() phar://D:/wamp/bin/ph
p/php5.3.5/pyrus.phar/PEAR2_Pyrus-2.0.0a3/php/PEAR2/Pyrus/ScriptFrontend/Command
s.php:491
2.6276 10275160 5. PEAR2\Pyrus\Installer->install() phar://D:/wamp/bin/p
hp/php5.3.5/pyrus.phar/PEAR2_Pyrus-2.0.0a3/php/PEAR2/Pyrus/Installer.php:313
2.6295 10278280 6. PEAR2\Pyrus\AtomicFileTransaction::getTransactionObje
ct() phar://D:/wamp/bin/php/php5.3.5/pyrus.phar/PEAR2_Pyrus-2.0.0a3/php/PEAR2/Py
rus/Installer.php:465
2.6295 10278280 7. PEAR2\Pyrus\AtomicFileTransaction\Manager->getTransac
tion() phar://D:/wamp/bin/php/php5.3.5/pyrus.phar/PEAR2_Pyrus-2.0.0a3/php/PEAR2/
Pyrus/AtomicFileTransaction.php:71
2.6338 10484696 8. PEAR2\Pyrus\AtomicFileTransaction\Transaction->__cons
truct() phar://D:/wamp/bin/php/php5.3.5/pyrus.phar/PEAR2_Pyrus-2.0.0a3/php/PEAR2
/Pyrus/AtomicFileTransaction/Manager.php:67
2.7068 10504272 9. PEAR2\Pyrus\AtomicFileTransaction\Transaction\Base->r
ollback() phar://D:/wamp/bin/php/php5.3.5/pyrus.phar/PEAR2_Pyrus-2.0.0a3/php/PEA
R2/Pyrus/AtomicFileTransaction/Transaction.php:40
2.7069 10504224 10. PEAR2\Pyrus\Filesystem::rmrf() phar://D:/wamp/bin/php
/php5.3.5/pyrus.phar/PEAR2_Pyrus-2.0.0a3/php/PEAR2/Pyrus/AtomicFileTransaction/T
ransaction/Base.php:118
2.7078 10505656 11. rmdir() phar://D:/wamp/bin/php/php5.3.5/pyrus.phar/PE
AR2_Pyrus-2.0.0a3/php/PEAR2/Pyrus/Filesystem.php:103
PEAR2\Pyrus\Installer\Exception: Installation failed
PEAR2\Pyrus\AtomicFileTransaction\MultiException: Unable to begin transaction
PEAR2\Pyrus\IOException: Unable to fully remove D:\php\php5.3.5\ext\.
journal-src
PEAR2\Pyrus\AtomicFileTransaction\RuntimeException: Cannot rollback - not in
a transaction
需要清除相关的文件夹cache、.configsnapshots、.journal-docs、.journal-src、downloads
之后报错:
D:\php\php5.3.5\ext>php D:\php\php5.3.5\pyrus.phar -v install
pecl/libevent-0.0.4
Pyrus version 2.0.0a3 SHA-1: BE7EA9D171AE3873F1BBAF692EEE9165BB14BD5D
Using PEAR installation found at D:\wamp\bin\php\php5.3.5\ext
Downloading pecl.php.net/libevent
Connected...
Mime-type: application/octet-stream
[================>
[================================================>
[==========================================================================>
PEAR2\Pyrus\Registry\Exception: Error: package pecl.php.net/libevent could not b
e installed in registry: Unable to execute statement: constraint failed
Exception: Unable to execute statement: constraint failed
和使用本地文件安装报错是一样的,应该sql语句执行的过程中出现了错误,但是如何显示错误的sql语句呢?
打开.pear2registry但是有很多乱码

PHPタイプは、コードの品質と読みやすさを向上させるためのプロンプトがあります。 1)スカラータイプのヒント:php7.0であるため、基本データ型は、int、floatなどの関数パラメーターで指定できます。 3)ユニオンタイプのプロンプト:PHP8.0であるため、関数パラメーターまたは戻り値で複数のタイプを指定することができます。 4)Nullable Typeプロンプト:null値を含めることができ、null値を返す可能性のある機能を処理できます。

PHPでは、クローンキーワードを使用してオブジェクトのコピーを作成し、\ _ \ _クローンマジックメソッドを使用してクローン動作をカスタマイズします。 1.クローンキーワードを使用して浅いコピーを作成し、オブジェクトのプロパティをクローン化しますが、オブジェクトのプロパティはクローニングしません。 2。\ _ \ _クローン法は、浅いコピーの問題を避けるために、ネストされたオブジェクトを深くコピーできます。 3.クローニングにおける円形の参照とパフォーマンスの問題を避けるために注意し、クローニング操作を最適化して効率を向上させます。

PHPはWeb開発およびコンテンツ管理システムに適しており、Pythonはデータサイエンス、機械学習、自動化スクリプトに適しています。 1.PHPは、高速でスケーラブルなWebサイトとアプリケーションの構築においてうまく機能し、WordPressなどのCMSで一般的に使用されます。 2。Pythonは、NumpyやTensorflowなどの豊富なライブラリを使用して、データサイエンスと機械学習の分野で驚くほどパフォーマンスを発揮しています。

HTTPキャッシュヘッダーの主要なプレーヤーには、キャッシュコントロール、ETAG、およびラスト修飾が含まれます。 1.Cache-Controlは、キャッシュポリシーを制御するために使用されます。例:キャッシュコントロール:Max-Age = 3600、public。 2。ETAGは、一意の識別子を介してリソースの変更を検証します。例:ETAG: "686897696A7C876B7E"。 3. Last-Modifiedは、リソースの最後の変更時間を示しています。

PHPでは、Password_hashとpassword_verify関数を使用して安全なパスワードハッシュを実装する必要があり、MD5またはSHA1を使用しないでください。 1)password_hashセキュリティを強化するために、塩値を含むハッシュを生成します。 2)password_verifyハッシュ値を比較して、パスワードを確認し、セキュリティを確保します。 3)MD5とSHA1は脆弱であり、塩の値が不足しており、最新のパスワードセキュリティには適していません。

PHPは、動的なWeb開発およびサーバー側のアプリケーションに使用されるサーバー側のスクリプト言語です。 1.PHPは、編集を必要とせず、迅速な発展に適した解釈言語です。 2。PHPコードはHTMLに組み込まれているため、Webページの開発が簡単になりました。 3。PHPプロセスサーバー側のロジック、HTML出力を生成し、ユーザーの相互作用とデータ処理をサポートします。 4。PHPは、データベースと対話し、プロセスフォームの送信、サーバー側のタスクを実行できます。

PHPは過去数十年にわたってネットワークを形成しており、Web開発において重要な役割を果たし続けます。 1)PHPは1994年に発信され、MySQLとのシームレスな統合により、開発者にとって最初の選択肢となっています。 2)コア関数には、動的なコンテンツの生成とデータベースとの統合が含まれ、ウェブサイトをリアルタイムで更新し、パーソナライズされた方法で表示できるようにします。 3)PHPの幅広いアプリケーションとエコシステムは、長期的な影響を促進していますが、バージョンの更新とセキュリティの課題にも直面しています。 4)PHP7のリリースなど、近年のパフォーマンスの改善により、現代の言語と競合できるようになりました。 5)将来的には、PHPはコンテナ化やマイクロサービスなどの新しい課題に対処する必要がありますが、その柔軟性とアクティブなコミュニティにより適応性があります。

PHPの中心的な利点には、学習の容易さ、強力なWeb開発サポート、豊富なライブラリとフレームワーク、高性能とスケーラビリティ、クロスプラットフォームの互換性、費用対効果が含まれます。 1)初心者に適した学習と使用が簡単。 2)Webサーバーとの適切な統合および複数のデータベースをサポートします。 3)Laravelなどの強力なフレームワークを持っています。 4)最適化を通じて高性能を達成できます。 5)複数のオペレーティングシステムをサポートします。 6)開発コストを削減するためのオープンソース。


ホットAIツール

Undresser.AI Undress
リアルなヌード写真を作成する AI 搭載アプリ

AI Clothes Remover
写真から衣服を削除するオンライン AI ツール。

Undress AI Tool
脱衣画像を無料で

Clothoff.io
AI衣類リムーバー

AI Hentai Generator
AIヘンタイを無料で生成します。

人気の記事

ホットツール

SublimeText3 英語版
推奨: Win バージョン、コードプロンプトをサポート!

mPDF
mPDF は、UTF-8 でエンコードされた HTML から PDF ファイルを生成できる PHP ライブラリです。オリジナルの作者である Ian Back は、Web サイトから「オンザフライ」で PDF ファイルを出力し、さまざまな言語を処理するために mPDF を作成しました。 HTML2FPDF などのオリジナルのスクリプトよりも遅く、Unicode フォントを使用すると生成されるファイルが大きくなりますが、CSS スタイルなどをサポートし、多くの機能強化が施されています。 RTL (アラビア語とヘブライ語) や CJK (中国語、日本語、韓国語) を含むほぼすべての言語をサポートします。ネストされたブロックレベル要素 (P、DIV など) をサポートします。

MinGW - Minimalist GNU for Windows
このプロジェクトは osdn.net/projects/mingw に移行中です。引き続きそこでフォローしていただけます。 MinGW: GNU Compiler Collection (GCC) のネイティブ Windows ポートであり、ネイティブ Windows アプリケーションを構築するための自由に配布可能なインポート ライブラリとヘッダー ファイルであり、C99 機能をサポートする MSVC ランタイムの拡張機能が含まれています。すべての MinGW ソフトウェアは 64 ビット Windows プラットフォームで実行できます。

SublimeText3 中国語版
中国語版、とても使いやすい

SublimeText3 Mac版
神レベルのコード編集ソフト(SublimeText3)
