简体   繁体   English

手动安装 cakephp 3,没有作曲家

[英]installing cakephp 3 manually, without composer

I need to install CakePHP 3 in an old-fashioned upload-unzip-run way.我需要以老式的上传-解压缩-运行方式安装 CakePHP 3。

The archive I've downloaded from cakephp/cakephp/tags does not contain the default folders like webroot , Model etc., which means it's not complete.我从cakephp/cakephp/tags下载的存档不包含webrootModel等默认文件夹,这意味着它不完整。

The official documentation does not cover this.官方文档没有涵盖这一点。 Here's a relevant Github issue I found, but the person ends up still using Composer.这是我发现的一个相关的 Github 问题,但该人最终仍在使用 Composer。

There's also cakephp/app and it seems to include those missing files, but it's not mentioned in cakephp/cakephp 's composer.json, and even if I download it I've no idea how to merge the packages.还有cakephp/app ,它似乎包含了那些丢失的文件,但是cakephp/cakephp的 composer.json 中没有提到它,即使我下载了它,我也不知道如何合并包。

Packaged app ( cakephp/app ) releases that include all dependencies (framework ( cakephp/cakephp ), standard CakePHP plugins ( cakephp/debugkit , cakephp/bake , etc), required third party libraries) can be found on GitHub.可以在 GitHub 上找到包含所有依赖项(框架 ( cakephp/cakephp )、标准 CakePHP 插件( cakephp/debugkitcakephp/bake等)、所需的第三方库等)的打包应用 ( cakephp/app ) 版本。

https://github.com/cakephp/cakephp/releases https://github.com/cakephp/cakephp/releases

It's the download with the small package symbol, named like cake-3-xx.zip .它是带有小包符号的下载,命名为cake-3-xx.zip

However, it isn't a good idea to ditch the dependency manager, as keeping the code base and the autoloader up to date will be rather tedious, and, no offense, I have my doubts that you'll be able to handle this properly if you don't even know how to stitch the app and cake packages together.但是,放弃依赖管理器并不是一个好主意,因为保持代码库和自动加载器是最新的会相当乏味,而且,无意冒犯,我怀疑你是否能够正确处理这个问题如果您甚至不知道如何将应用程序和蛋糕包拼接在一起。

You can install CakePhp 3 without Composer .您可以在没有Composer的情况下安装CakePhp 3

You need minimum requirements to install CakePhp 3 and CakePhp 3 boilerplate ( fresh copy of Cakephp 3 ).您需要最低要求才能安装 CakePhp 3 和 CakePhp 3样板(Cakephp 3 的新副本)。

You can download CakePhp 3 boilerplate from github.您可以从 github 下载 CakePhp 3 样板。

Requirements要求

Server服务器

  1. HTTP Server. HTTP 服务器。 For example: Apache.例如:阿帕奇。 Having mod_rewrite is preferred,but by no means required.有 mod_rewrite 是首选,但绝不是必需的。
  2. PHP 5.4.16 or greater. PHP 5.4.16 或更高版本。
  3. mbstring extension mbstring 扩展名
  4. intl extension国际扩展

Database :数据库:

  1. MySQL (5.1.10 or greater) MySQL(5.1.10 或更高版本)
  2. PostgreSQL PostgreSQL
  3. Microsoft SQL Server (2008 or higher) Microsoft SQL Server(2008 或更高版本)
  4. SQLite 3 SQLite 3

All built-in drivers require PDO .所有内置驱动程序都需要PDO You should make sure you have the correct PDO extensions installed.您应该确保安装了正确的PDO扩展。

CakePhp 3 Boilerplate: CakePhp 3 样板文件:

Repository Home存储库主页

https://github.com/cakephp/cakephp/releases https://github.com/cakephp/cakephp/releases

CakePhp 3.1.4 https://github.com/cakephp/cakephp/releases/download/3.1.4/cakephp-3-1-4.zip CakePhp 3.0.15 https://github.com/cakephp/cakephp/releases/download/3.0.15/cakephp-3-0-15.zip CakePhp 3.1.4 https://github.com/cakephp/cakephp/releases/download/3.1.4/cakephp-3-1-4.zip CakePhp 3.0.15 https://github.com/cakephp/cakephp/releases /download/3.0.15/cakephp-3-0-15.zip

Download one repository and unzip where you wanted to install it.下载一个存储库并将其解压缩到您要安装的位置。

You may get one error like ( you may not get error if you are lucky!)您可能会收到一个错误,例如(如果幸运的话,您可能不会收到错误!)

Fatal Error 
Cake\Error\FatalErrorException
Error: Class 'Cake\Mailer\Email' not found 
File D:\xampp\htdocs\practice\cakephp\cakephp-3-1-4\config\bootstrap.php 
Line: 138 

Then you have to comment two line in config/bootstrap.php然后你必须在 config/bootstrap.php 中注释两行

//Email::configTransport(Configure::consume('EmailTransport'));
//Email::config(Configure::consume('Email'));

And finally you got CakePhp 3 installed.最后你安装了 CakePhp 3。

[I am also new in CakePhp 3.So Please inform me if there are any wrong in my given process.] [我也是 CakePhp 3 的新手,所以如果我给定的过程有任何错误,请告诉我。]

Thanks谢谢

Use Composer.使用作曲家。

Install Composer locally, follow the Cake installation instructions, then upload the created folders to the target webhost.在本地安装 Composer,按照 Cake 安装说明,然后将创建的文件夹上传到目标 webhost。

Easy, For CakePHP 3.x you can just download the release you want from here https://github.com/cakephp/cakephp/releases (eg. https://github.com/cakephp/cakephp/releases/tag/3.3.16 ).很简单,对于 CakePHP 3.x,你可以从这里下载你想要的版本https://github.com/cakephp/cakephp/releases (例如https://github.com/cakephp/cakephp/releases/tag/3.3 .16 )。

For a complete installation select the first download link (.zip)如需完整安装,请选择第一个下载链接 (.zip)

the other links are just for the src其他链接仅适用于 src

只需运行此命令即可获得CakePHP 3.10.0的克隆

git clone -b 3.x git://github.com/cakephp/cakephp.git
Try simple steps
1. Download XAMPP Server.
2. Install XAMPP server.
3. Go to ..\xampp\php\php.ini and open. 
4. Add this line (extension=php_intl.dll) or if exist uncomment.
5. Download Composer setup from https://github.com/composer/windows-setup/releases/
6. Install composer and give php.exe file in path
7. Open cmd and check now php version using command php -v. if its showing php version its means its working.
8. Now open cmd and cd  on xampp\htdocs folder & run command composer create-project --prefer-dist cakephp/app app_name
9. Finished folder created in htdocs.

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM