[英]PHP Symfony Build All Propel Fails - 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$
该死的,经过一番思考,我回答了自己的问题:
我在OSX 10.6上使用Xampp。 问题是它执行了错误的php二进制文件。
$ php symfony propel:insert-sql
会调用/usr/bin/
的php二进制文件而不是
/Applications/xampp/xamppfiles/bin/
这是我首先想要的
命令$ php运行错误的PHP(OSX的默认PHP)。
要解决这个问题我:
进入/usr/bin
命名
php to php_old
phpize to phpize_old
php-config to php-config_old
然后,制作符号链接:
sudo ln -s /Applications/XAMPP/xamppfiles/bin/php-config php-config
sudo ln -s /Applications/XAMPP/xamppfiles/bin/php php
sudo ln -s /Applications/XAMPP/xamppfiles/bin/phpize phpize
希望这对别人卡住有用!
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.