PHP Symfony 构建所有 Propel 失败 - MySQL
我刚刚建立了一个全新的 Symfony 1.4 项目并设计了架构,但不幸的是我无法构建架构。
我在使用 symfony 命令 php symfony propel:build --all --no-confirmation
时遇到了一些问题。
不幸的是,它留下了一个相当神秘的错误消息 php symfony propel:build --all --no-confirmation
有谁知道导致此错误的原因以及如何纠正它?谷歌找到了一些我无法理解的波兰网站(即使有翻译)!
非常感谢!
完整错误:
>> schema putting /Applications/XAMPP/xamppfiles/htdocs/swingers/config/generated-schema.xml
>> propel Running "insert-sql" phing task
Execution of target "insert-sql" failed for the following reason: /Applications/XAMPP/xamppfiles/htdocs/swingers/lib/vendor/symfony/lib/plugins/sfPropelPlugin/lib/vendor/propel-generator/build-propel.xml:272:1: [wrapped: SQLSTATE[HY000] [2002] No such file or directory]
[phing] /Applications/XAMPP/xamppfiles/htdocs/swingers/lib/vendor/symfony/lib/plugins/sfPropelPlugin/lib/vendor/propel-generator/build-propel.xml:272:1: [wrapped: SQLSTATE[HY000] [2002] No such file or directory]
Some problems occurred when executing the task:
build-propel.xml:272:1: [wrapped: SQLSTATE[HY000] [2002] No such file or directory]
If the exception message is not clear enough, read the output of the task for
more information
>> file- /Applications/XAMPP/xamppfiles/htdocs/swingers/config/generated-schema.xml
PezCuckowMBP:swingers pezcuckow$
I have just set up a completely new Symfony 1.4 project and designed the schema but unfortunately I can't build the schema.
I having some trouble with the symfony command php symfony propel:build --all --no-confirmation
.
Unfortunately it leaves a rather cryptic error message php symfony propel:build --all --no-confirmation
does anyone know what is causing this error and how to correct it? Google turns up some polish websites that (even with translate) I cannot understand!
Many thanks!
Full Error:
>> schema putting /Applications/XAMPP/xamppfiles/htdocs/swingers/config/generated-schema.xml
>> propel Running "insert-sql" phing task
Execution of target "insert-sql" failed for the following reason: /Applications/XAMPP/xamppfiles/htdocs/swingers/lib/vendor/symfony/lib/plugins/sfPropelPlugin/lib/vendor/propel-generator/build-propel.xml:272:1: [wrapped: SQLSTATE[HY000] [2002] No such file or directory]
[phing] /Applications/XAMPP/xamppfiles/htdocs/swingers/lib/vendor/symfony/lib/plugins/sfPropelPlugin/lib/vendor/propel-generator/build-propel.xml:272:1: [wrapped: SQLSTATE[HY000] [2002] No such file or directory]
Some problems occurred when executing the task:
build-propel.xml:272:1: [wrapped: SQLSTATE[HY000] [2002] No such file or directory]
If the exception message is not clear enough, read the output of the task for
more information
>> file- /Applications/XAMPP/xamppfiles/htdocs/swingers/config/generated-schema.xml
PezCuckowMBP:swingers pezcuckow$
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
该死的,经过更多思考,我已经回答了我自己的问题:
我在 OSX 10.6 上使用 Xampp。问题是它执行了错误的 php 二进制文件。
会调用
/usr/bin/
中的 php 二进制文件,而不是/Applications/xampp/xamppfiles/bin/
中的二进制文件,这是我首先想要的命令 $ php 运行了错误的 PHP(OSX 的默认 PHP)。
为了解决这个问题,我:
进入
/usr/bin
并重命名然后,创建符号链接:
希望这对其他人有用!
Damn, I've answered my own question after some more thought:
I am using Xampp on OSX 10.6. The problem is it was executing the wrong php binary.
would call the php binary in
/usr/bin/
not the one in/Applications/xampp/xamppfiles/bin/
which is what I wanted in the first placeThe command $ php is running the wrong PHP (OSX's default PHP).
To resolve this problem I:
Went in
/usr/bin
and renamedThen, make symbolic link:
Hope this is of use to someone else stuck!