为 Magento 设置工作开发环境需要经过哪些步骤?
Magento 是一个基于 Zend Framework 的电子商务应用程序,由于缺乏文档,深入了解 Magento 有时并不那么容易。
当我收回一个项目时,我必须执行几个步骤才能使其正常工作:
- 从任何 CVS 中检查它
- 从生产服务器的最新转储(如果有)设置数据库设置
应用程序/etc/local.xml
- 替换数据库中的
web/secure/base_url
和web/unsecure/base_url
- 根据调整
.htaccess
设置在我的环境中 - 从配置示例设置errors/local.xml
- 允许
display_errors
显然,在我的开发工作流程的第一步,我想显示所有错误、所有异常、记录所有内容等 ?
我可能忘记了很多事情,这就是我的问题的原因,我想从答案中写出一种备忘单,以便在我想设置我的 Magento 开发环境时有步骤,为什么不写呢 一个脚本。
Magento is a e-commerce application based on Zend Framework, dive in Magento is sometimes not so easy due to the lack of documentation.
When I take back a project, I've to go through several step to get it working :
- Check it out from any CVS
- Set up the database from the most recent dump of the production server (if any)
- Set up the
app/etc/local.xml
- Replace
web/secure/base_url
andweb/unsecure/base_url
in database - Adjust
.htaccess
setting according to my environment - Set up errors/local.xml from config sample
- Allow
display_errors
Obviously, at the first step of my development work-flow, I want to display all errors, all exceptions, log every things, etc.
I may have forgot a lot of thing, here is the reason of my question, I'm looking to write kind of cheat sheet from the answer to have the step when I want to set up my Magento Development Environment, and why not write a script.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
作为清单的额外内容:
设置用于单元测试的引导文件或安装 PHPUnitTestSuite 扩展
As an extra for your checklist:
Setup bootstrapping files for unit testing or install PHPUnitTestSuite extension
您想要更多详细信息(sql 查询、使用的文件、按功能划分的请求时间。)和更多调试功能,请尝试以下操作:http://code.google.com/p/zfdebug/
我在积极的开发中使用它,它非常棒。
You want more details(sql query's, files used, time of request split up by function.) and more debug power try this : http://code.google.com/p/zfdebug/
I'm using it in active development and it's more than great.
您可能想查看我的之前的问题的一些答案。
希望这有帮助,
京东
You might want to review some of the answers to my earlier question.
Hope this helps,
JD
将 local.xml 文件添加到 /errors/ 文件夹,该文件夹设置要打印的错误输出。在 /errors/ 文件夹中查找示例。
备份您的数据库以便稍后返回到此状态。
将错误设置设置为
error_reporting(-1);
以显示每个错误,这也可以帮助您以正确的方式扩展 Magento,因为这样您只能使用其正确的签名来扩展原始 Magento 类。方法!查看 Magento 样板,它可以帮助您布局您的商店!
Add a local.xml file to the /errors/ folder which sets error output to print. Find a sample in the /errors/ folder.
Backup your db to go back later to this state.
Set the error settings to
error_reporting(-1);
to show every error, this helps you also to extend Magento in the correct way, because you then only can extend original Magento classes with the correct signature of its methods!Check out the Boilerplate for Magento, it helps you to layout your shop!