替换命令中的错误标志:'i'.sql

时间:2016-02-03 10:47:33

标签: php phing

在PHP中运行数据库迁移(通过Phing),我收到以下FAILED BUILD错误:

Unable to open /site/thewebsite.co.uk/data/migrate-web_site-sed: 1:   "s/[^a-z0-9]/-/gi": bad flag in substitute command: 'i'.sql for reading:

以及类似的几条警告:

[PHP Error] fopen(/site/thewebsite.co.uk/data/migrate-web_site-sed 1: "s/[^a-z0-9]/-/gi": bad flag in substitute command: 'i'.sql): failed to open stream: No such file or directory [line 224 of /site/thewebsite.co.uk/vendor/phing/phing/classes/phing/tasks/ext/dbdeploy/DbDeployTask.php]

有没有人有关于从哪里开始寻找解决方案和/或问题原因的想法?站点文件是从以前工作的存储库克隆的,据我所知,自从上一个工作副本被克隆以来,我的任何同事都没有更改DbDeployTask.php文件。我已经浏览了相关的.php文件,我看不出任何明显的问题。引用的代码部分看起来非常标准:

protected function createOutputFile($file, $undo = false)
{
    $fileHandle = fopen($file, "w+");
    $sql = $this->generateSql($undo);
    fwrite($fileHandle, $sql);
}

在deploy函数中调用createOutputFile:

protected function deploy()
{
    // create deploy outputfile
    $this->createOutputFile($this->outputFile, false);

    // create undo deploy outputfile
    $this->createOutputFile($this->undoOutputFile, true);
}

人们会在哪里建议寻找此问题的来源,以便我们的Apache服务器能够在此Macintosh上正确部署开发网站?

0 个答案:

没有答案