Php orm:schema工具:创建-拒绝访问
我正试图将条令添加到现有的定制php应用程序中。我面临的第一个问题是: 当你想跑的时候Php orm:schema工具:创建-拒绝访问,php,mysql,doctrine-orm,Php,Mysql,Doctrine Orm,我正试图将条令添加到现有的定制php应用程序中。我面临的第一个问题是: 当你想跑的时候 $ php vendor/bin/doctrine orm:schema-tool:create 我的访问被拒绝 下面是我正在使用的cli-config.php文件: <?php use Doctrine\ORM\EntityManager; use Doctrine\ORM\Tools\Console\ConsoleRunner; use Doctrine\ORM\Tools\Setup; re
$ php vendor/bin/doctrine orm:schema-tool:create
我的访问被拒绝
下面是我正在使用的cli-config.php文件:
<?php
use Doctrine\ORM\EntityManager;
use Doctrine\ORM\Tools\Console\ConsoleRunner;
use Doctrine\ORM\Tools\Setup;
require_once "vendor/autoload.php";
$modelsPath = realpath(__DIR__.'/../model');
$config = Setup::createAnnotationMetadataConfiguration(array($modelsPath), true);
// database configuration parameters
$conn = array(
'driver' => 'pdo_mysql',
'host' => 'localhost',
'user' => 'root',
'password' => '',
'dbname' => 'database',
);
return ConsoleRunner::createHelperSet(EntityManager::create($conn, $config));
我的问题与此类似,但服务器(也是Ubuntu)在Vagrant上运行。执行PHPvendor/bin/doctrine
ORM:schema工具:create
时给出:
1. Access denied (filesystem) or
2. Connection refused [MySQL] or
3. File not found [MySQL]
解决方案是使用ssh连接到vagrant机器并从那里执行。使用chmod+x vendor/bin/doctor
操作系统进行尝试?到目前为止遵循的安装过程?我的意思是/usr/bin/env php-r“echo'hello world';“
-你能运行吗?你能手动运行/vendor/doctor/orm/bin/doctor
吗?是的,我能:doctor命令行界面版本2.4.2