Windows xampp上的奏鸣曲安装

时间:2014-10-11 12:56:41

标签: php symfony xampp sonata

我想在Windows 8 xampp上安装奏鸣曲。

我使用comand php composer.phar create-project sonata-project / sandbox:2.3.x-dev,下载后我收到错误。我发现错误对我来说是2行:

bin \ load.data.php中的

  1. rm -rf ./app/cache/*

    我可以发表评论

  2. -d memory_limit=1024M -d max_execution_time=600 ./app/console doctrine:fixtures:load --verbose --env=dev --no-debug

    如果我在php.ini中将内存限制增加到1024m并将时间增加到600并删除该部分,我仍会收到此错误:

    Executing : C:\Users\Felek\Desktop\xampp\php\php.exe ./app/console doctrine:fix
    tures:load --verbose --env=dev --no-debug
    Careful, database will be purged. Do you want to continue Y/N ?
    
    [RuntimeException]
    Aborted
    
    Exception trace:
    () at C:\Users\Felek\Desktop\xampp\htdocs\sonata\sandbox\vendor\symfony\symfony
    \src\Symfony\Component\Console\Helper\DialogHelper.php:115
    Symfony\Component\Console\Helper\DialogHelper->ask() at C:\Users\Felek\Desktop\
    xampp\htdocs\sonata\sandbox\vendor\symfony\symfony\src\Symfony\Component\Console
    \Helper\DialogHelper.php:242
    Symfony\Component\Console\Helper\DialogHelper->askConfirmation() at C:\Users\Fe
    lek\Desktop\xampp\htdocs\sonata\sandbox\vendor\doctrine\doctrine-fixtures-bundle
    \Doctrine\Bundle\FixturesBundle\Command\LoadDataFixturesDoctrineCommand.php:73
    Doctrine\Bundle\FixturesBundle\Command\LoadDataFixturesDoctrineCommand->execute
    () at C:\Users\Felek\Desktop\xampp\htdocs\sonata\sandbox\vendor\symfony\symfony\
    src\Symfony\Component\Console\Command\Command.php:252
    Symfony\Component\Console\Command\Command->run() at C:\Users\Felek\Desktop\xamp
    p\htdocs\sonata\sandbox\vendor\symfony\symfony\src\Symfony\Component\Console\App
    lication.php:896
    Symfony\Component\Console\Application->doRunCommand() at C:\Users\Felek\Desktop
    \xampp\htdocs\sonata\sandbox\vendor\symfony\symfony\src\Symfony\Component\Consol
    e\Application.php:193
    Symfony\Component\Console\Application->doRun() at C:\Users\Felek\Desktop\xampp\
    htdocs\sonata\sandbox\vendor\symfony\symfony\src\Symfony\Bundle\FrameworkBundle\
    Console\Application.php:96
    Symfony\Bundle\FrameworkBundle\Console\Application->doRun() at C:\Users\Felek\D
    esktop\xampp\htdocs\sonata\sandbox\vendor\symfony\symfony\src\Symfony\Component\
    Console\Application.php:124
    Symfony\Component\Console\Application->run() at C:\Users\Felek\Desktop\xampp\ht
    docs\sonata\sandbox\app\console:34
    
    doctrine:fixtures:load [--fixtures[="..."]] [--append] [--em="..."] [--purge-wit
    h-truncate]
    
    An error occurs when running a command! 
    

    我尝试删除并重新安装数据库而没有任何结果。我该怎么做才能解决这个错误?

1 个答案:

答案 0 :(得分:0)

我设法找到了解决方案。首先,我打开脚本并更改一行:

$bin . '  -d memory_limit=1024M -d max_execution_time=600 ./app/console doctrine:fixtures:load --verbose -env=dev --no-debug',

为:

$bin . '  -d memory_limit=1024M -d max_execution_time=600 ./app/console doctrine:fixtures:load --verbose --no-interaction --env=dev --no-debug',

添加 - 无互动解决了问题。

我也尝试过

php -d memory_limit=1024M -d max_execution_time=600 ./app/console doctrine:fixtures:load --verbose -env=dev --no-debug
首先在控制台中

然后我得到一些错误,然后提示缺少fileinfo扩展名。它不一定总是如此,但值得检查。

我必须在php.ini文件中取消注释 extension = php_fileinfo.dll 。 (与php.exe位于同一文件夹中的文件夹,而不是apache文件夹。)