无法将 symfony 项目部署到共享托管 Web 服务器

发布于 2024-09-27 14:47:58 字数 178 浏览 2 评论 0原文

我正在使用 Symfony 1.4 来创建我的项目。我尝试使用 symfony 书中第 16 章中给出的命令和方法来部署项目。但我无法将我的 symfony 项目从本地计算机部署到 Web 服务器。我可以直接复制粘贴我的 symfony 项目到我的网络服务器吗?那行得通吗?或者还有其他方法吗?? 注意:我使用 Propel 作为 ORM。

i am using Symfony 1.4, to create my project. i have tried to deploy project using the command and methods given in chapter-16 in symfony book. but i am not able to deploy my symfony project from my local computer to web server. Can i directly copy paste my symfony project to my web server?? will that work?? or is there any other method??
NOTE: i am using Propel as ORM.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

软的没边 2024-10-04 14:47:58

您最好的选择是:
1. gzip 压缩整个项目
2.使用mysqldump之类的工具导出数据库中的所有数据
3.上传文件到服务器
4. 将数据库转储导入到您的服务器数据库
5.解压你的项目

一些注意事项:
1. 由于共享托管环境,您可能会遇到安全问题,因为服务器上的其他主机可以访问您的 php 文件 请参阅 这里

2. 希望您的主机允许 SSH 访问您的服务器帐户,在这种情况下管理 symfony 项目会容易得多。

3. 如果您无法通过 SSH 访问您的帐户,则必须将文件上传到服务器而不对其进行 gzip 压缩,并且由于 symfony 创建的文件数量较多,这需要很长时间。

4. 如果可能的话,将除 web 文件夹之外的所有 symfony 文件放在 public_html 文件夹之外。

Your best option is:
1. gzip up the entire project
2. export all the data from the database using something like mysqldump
3. upload the files to the server
4. import the database dump into your server database
5. unzip your project

A couple notes:
1. Due to the shared hosting environment, you may have security issues due to other hosts on the server gaining access to your php files See here.

2. Hopefully your host allows SSH access to your server account, administering a symfony project is MUCH easier when this is the case.

3. If you don't have SSH access to your account you will have to upload the files to the server without gzipping them and this takes a LONG time due to the number of files symfony creates.

4. If possible place all your symfony files except for the web folder outside the public_html folder.

錯遇了你 2024-10-04 14:47:58

当我必须部署某些东西时,我会这样做:

检查生产服务器上的要求(php5、mysql4 等)是否与我的应用程序匹配。
更改配置文件以反映生产服务器。
使用 ftp 将所有内容上传到服务器。

您的问题很神秘,您应该真正指定您遇到的错误类型。

When I have to deploy something I do this:

Check if the requirement (php5, mysql4 etc) on the production server matches my application.
Change the configuration files to reflect the production server.
Upload everything to the server using ftp.

Your question is cryptic, you should really specify what kind of error you are getting.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文