[英]Deploying Symfony 1.4 project
I have recently developed a project which is written using Symfony 1.4 which I installed through PEAR. 我最近开发了一个使用Symfony 1.4编写的项目,该项目是通过PEAR安装的。 In previous Symfony versions there used to be freeze and unfreeze functions to copy all the necessary files, but in this versions these functions are missing.
在之前的Symfony版本中,曾经有冻结和解冻功能来复制所有必需的文件,但在这个版本中缺少这些功能。 So my question is - what is the fastest way to deploy my project on a shared hosting?
所以我的问题是-在共享主机上部署项目的最快方法是什么?
Shared hosting is always a pain with Symfony. 共享托管对于Symfony始终是一个痛苦。 I haven't attempted it myself.
我自己没有尝试过。 But what you can do is just copy the lib folder from your symfony installation into your project lib folder and just point your projectConfiguration.php to where you put the symfony libs in your project.
但是,您可以做的只是将symfony安装目录中的lib文件夹复制到项目lib文件夹中,然后将projectConfiguration.php指向将symfony库放入项目的位置。
This just does the same thing as the freeze but manually. 这只是与冻结相同但手动完成。
In your config/ProjectConfiguration.class.php change the require_once statement for sfCoreAutoload class. 在您的config / ProjectConfiguration.class.php中,更改sfCoreAutoload类的require_once语句。 Make it search for symfony in lib/vendor/symfony :
使它在lib / vendor / symfony中搜索symfony :
require_once dirname(__FILE__) . '/../lib/vendor/symfony/lib/autoload/sfCoreAutoload.class.php';
Now you can do two things: 现在你可以做两件事:
@kuba, your statement in config/ProjectConfiguration.class.php has one 'lib' too many. @kuba,您在config / ProjectConfiguration.class.php中的语句有太多“ lib”。 It should be:
它应该是:
require_once dirname(__FILE__) . '/../lib/vendor/symfony/autoload/sfCoreAutoload.class.php';
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.