今天打算學(xué)習(xí)一下Yii,但是在安裝過程中出現(xiàn)了很多問題。
金牛網(wǎng)站制作公司哪家好,找創(chuàng)新互聯(lián)建站!從網(wǎng)頁設(shè)計(jì)、網(wǎng)站建設(shè)、微信開發(fā)、APP開發(fā)、響應(yīng)式網(wǎng)站開發(fā)等網(wǎng)站項(xiàng)目制作,到程序開發(fā),運(yùn)營維護(hù)。創(chuàng)新互聯(lián)建站于2013年成立到現(xiàn)在10年的時(shí)間,我們擁有了豐富的建站經(jīng)驗(yàn)和運(yùn)維經(jīng)驗(yàn),來保證我們的工作的順利進(jìn)行。專注于網(wǎng)站建設(shè)就選創(chuàng)新互聯(lián)建站。通過composer安裝:
composer global require "fxp/composer-asset-plugin:~1.1.1" composer create-project --prefer-dist yiisoft/yii2-app-basic basic
第一條命令安裝 Composer asset plugin,它是通過 Composer 管理 bower 和 npm 包所必須的,此命令全局生效,一勞永逸。 第二條命令會將 Yii 安裝在名為 basic
的目錄中,你也可以隨便選擇其他名稱。
但是在安裝過程中就報(bào)了一個(gè)異常如下:
[Symfony\Component\Process\Exception\RuntimeException] The Process class relies on proc_open, which is not available on your PHP installation.
解決方法:
在php.ini中,找到disable_functions選項(xiàng),看看后面是否有proc_open函數(shù)被禁用了,如果有的話,去掉即可。
希望對大家有所幫助。
然而刪除之后,又報(bào)了異常
[ErrorException] proc_get_status() has been disabled for security reasons
同樣道理,proc_get_status被禁用了,只要把proc_get_status刪了即可。
錯(cuò)誤還在繼續(xù)。。。
Could not fetch https://api.github.com/repos/jquery/jquery-dist, please create a GitHub OAuth token to go over the API rate limit Head to https://github.com/settings/tokens/new?scopes=repo&description=Composer+on+gcan+2017-07-12+0045 to retrieve a token. It will be stored in "/home/gcan/.config/composer/auth.json" for future use by Composer. Token (hidden): *****************************
在github的setting/Personal access tokens下面建立token,然后直接將token復(fù)制粘貼放到Token (hidden): ***后面即可。
回車后如果出現(xiàn)
Token stored successfully.
表示token驗(yàn)證成功。
下面是安裝進(jìn)程:
Installing yiisoft/yii2-app-basic (2.0.12) - Installing yiisoft/yii2-app-basic (2.0.12): Loading from cache Created project in basic Loading composer repositories with package information Updating dependencies (including require-dev) Could not fetch https://api.github.com/repos/jquery/jquery-dist, please create a GitHub OAuth token to go over the API rate limit Head to https://github.com/settings/tokens/new?scopes=repo&description=Composer+on+gcan+2017-07-12+0045 to retrieve a token. It will be stored in "/home/gcan/.config/composer/auth.json" for future use by Composer. Token (hidden): b47aa5ca176ba184674369be830bd3fe8daaf584 Token stored successfully. Package operations: 59 installs, 0 updates, 0 removals - Installing yiisoft/yii2-composer (2.0.5): Downloading (100%) - Installing swiftmailer/swiftmailer (v5.4.8): Downloading (100%) - Installing bower-asset/jquery (2.2.4): Downloading (100%) - Installing bower-asset/yii2-pjax (v2.0.6): Downloading (100%) - Installing bower-asset/punycode (v1.3.2): Downloading (100%) - Installing cebe/markdown (1.1.1): Downloading (100%) - Installing ezyang/htmlpurifier (v4.9.3): Downloading (100%) - Installing bower-asset/jquery.inputmask (3.3.7): Downloading (100%) - Installing yiisoft/yii2 (2.0.12): Downloading (100%) - Installing yiisoft/yii2-swiftmailer (2.0.7): Downloading (100%) - Installing bower-asset/bootstrap (v3.3.7): Downloading (100%) - Installing yiisoft/yii2-bootstrap (2.0.6): Downloading (100%) - Installing yiisoft/yii2-debug (2.0.9): Downloading (100%) - Installing bower-asset/typeahead.js (v0.11.1): Downloading (100%) - Installing phpspec/php-diff (v1.1.0): Downloading (100%) - Installing yiisoft/yii2-gii (2.0.5): Downloading (100%) - Installing fzaninotto/faker (v1.6.0): Downloading (100%) - Installing yiisoft/yii2-faker (2.0.3): Downloading (100%) - Installing psr/log (1.0.2): Downloading (100%) - Installing symfony/debug (v3.3.4): Downloading (100%) - Installing symfony/polyfill-mbstring (v1.4.0): Downloading (100%) - Installing symfony/console (v3.3.4): Downloading (100%) - Installing stecman/symfony-console-completion (0.7.0): Downloading (100%) - Installing sebastian/diff (1.4.3): Downloading (100%) - Installing sebastian/recursion-context (2.0.0): Downloading (100%) - Installing sebastian/exporter (2.0.0): Downloading (100%) - Installing sebastian/comparator (1.2.4): Downloading (100%) - Installing behat/gherkin (v4.4.5): Downloading (100%) - Installing symfony/dom-crawler (v3.3.4): Downloading (100%) - Installing symfony/css-selector (v3.3.4): Downloading (100%) - Installing symfony/browser-kit (v3.3.4): Downloading (100%) - Installing symfony/yaml (v3.3.4): Downloading (100%) - Installing symfony/event-dispatcher (v3.3.4): Downloading (100%) - Installing symfony/finder (v3.3.4): Downloading (100%) - Installing psr/http-message (1.0.1): Downloading (100%) - Installing guzzlehttp/psr7 (1.4.2): Downloading (100%) - Installing doctrine/instantiator (1.0.5): Downloading (100%) - Installing phpunit/php-text-template (1.2.1): Downloading (100%) - Installing phpunit/phpunit-mock-objects (3.4.4): Downloading (100%) - Installing sebastian/version (2.0.1): Downloading (100%) - Installing sebastian/code-unit-reverse-lookup (1.0.1): Downloading (100%) - Installing phpunit/php-token-stream (1.4.11): Downloading (100%) - Installing phpunit/php-file-iterator (1.4.2): Downloading (100%) - Installing sebastian/environment (2.0.0): Downloading (100%) - Installing phpunit/php-code-coverage (4.0.8): Downloading (100%) - Installing sebastian/resource-operations (1.0.0): Downloading (100%) - Installing sebastian/global-state (1.1.1): Downloading (100%) - Installing phpunit/php-timer (1.0.9): Downloading (100%) - Installing webmozart/assert (1.2.0): Downloading (100%) - Installing phpdocumentor/reflection-common (1.0): Downloading (100%) - Installing phpdocumentor/type-resolver (0.2.1): Downloading (100%) - Installing phpdocumentor/reflection-docblock (3.1.1): Downloading (100%) - Installing phpspec/prophecy (v1.7.0): Downloading (100%) - Installing myclabs/deep-copy (1.6.1): Downloading (100%) - Installing sebastian/object-enumerator (2.0.1): Downloading (100%) - Installing phpunit/phpunit (5.7.21): Downloading (100%) - Installing codeception/base (2.3.4): Downloading (100%) - Installing codeception/verify (0.3.3): Downloading (100%) - Installing codeception/specify (0.4.6): Downloading (100%) symfony/console suggests installing symfony/filesystem () symfony/console suggests installing symfony/process () symfony/browser-kit suggests installing symfony/process () symfony/event-dispatcher suggests installing symfony/dependency-injection () symfony/event-dispatcher suggests installing symfony/http-kernel () phpunit/php-code-coverage suggests installing ext-xdebug (^2.5.1) sebastian/global-state suggests installing ext-uopz (*) phpunit/phpunit suggests installing phpunit/php-invoker (~1.1) phpunit/phpunit suggests installing ext-xdebug (*) codeception/base suggests installing flow/jsonpath (For using JSONPath in REST module) codeception/base suggests installing phpseclib/phpseclib (for SFTP option in FTP Module) codeception/base suggests installing league/factory-muffin (For DataFactory module) codeception/base suggests installing league/factory-muffin-faker (For Faker support in DataFactory module) codeception/base suggests installing symfony/phpunit-bridge (For phpunit-bridge support) Writing lock file Generating autoload files > yii\composer\Installer::postCreateProject chmod('runtime', 0777)...done. chmod('web/assets', 0777)...done. chmod('yii', 0755)...done.
當(dāng)訪問http://localhost/basic/web/index.php時(shí),如果能正常顯示附件頁面,說明Yii成功安裝了
另外有需要云服務(wù)器可以了解下創(chuàng)新互聯(lián)cdcxhl.cn,海內(nèi)外云服務(wù)器15元起步,三天無理由+7*72小時(shí)售后在線,公司持有idc許可證,提供“云服務(wù)器、裸金屬服務(wù)器、高防服務(wù)器、香港服務(wù)器、美國服務(wù)器、虛擬主機(jī)、免備案服務(wù)器”等云主機(jī)租用服務(wù)以及企業(yè)上云的綜合解決方案,具有“安全穩(wěn)定、簡單易用、服務(wù)可用性高、性價(jià)比高”等特點(diǎn)與優(yōu)勢,專為企業(yè)上云打造定制,能夠滿足用戶豐富、多元化的應(yīng)用場景需求。
當(dāng)前題目:Yii安裝時(shí)會出現(xiàn)的問題-創(chuàng)新互聯(lián)
瀏覽地址:http://jinyejixie.com/article12/decgdc.html
成都網(wǎng)站建設(shè)公司_創(chuàng)新互聯(lián),為您提供靜態(tài)網(wǎng)站、關(guān)鍵詞優(yōu)化、網(wǎng)站設(shè)計(jì)、網(wǎng)頁設(shè)計(jì)公司、用戶體驗(yàn)、小程序開發(fā)
聲明:本網(wǎng)站發(fā)布的內(nèi)容(圖片、視頻和文字)以用戶投稿、用戶轉(zhuǎn)載內(nèi)容為主,如果涉及侵權(quán)請盡快告知,我們將會在第一時(shí)間刪除。文章觀點(diǎn)不代表本網(wǎng)站立場,如需處理請聯(lián)系客服。電話:028-86922220;郵箱:631063699@qq.com。內(nèi)容未經(jīng)允許不得轉(zhuǎn)載,或轉(zhuǎn)載時(shí)需注明來源: 創(chuàng)新互聯(lián)
猜你還喜歡下面的內(nèi)容