douhuangzhi0707 2016-02-03 10:47
浏览 24

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

Running a database migrate in PHP (via Phing), I'm getting the following FAILED BUILD error:

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:

as well as several warnings along similar lines:

[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]

Does anyone have ideas about where to start looking for a resolution and/or the cause of the problem? The site files were cloned from a previously working repository and to my knowledge the DbDeployTask.php file has not been changed by any of my co-workers since the last working copy was cloned. I've had a look through the relevant .php file and I can't see any obvious issues. The section of the code referenced looks pretty standard:

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

With createOutputFile called from within the deploy function:

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

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

Where would people advise looking for the source of this issue, so our Apache server is able to deploy the development website correctly on this Macintosh?

  • 写回答

0条回答 默认 最新

    报告相同问题?

    悬赏问题

    • ¥15 Vue3 大型图片数据拖动排序
    • ¥15 划分vlan后不通了
    • ¥15 GDI处理通道视频时总是带有白色锯齿
    • ¥20 用雷电模拟器安装百达屋apk一直闪退
    • ¥15 算能科技20240506咨询(拒绝大模型回答)
    • ¥15 自适应 AR 模型 参数估计Matlab程序
    • ¥100 角动量包络面如何用MATLAB绘制
    • ¥15 merge函数占用内存过大
    • ¥15 使用EMD去噪处理RML2016数据集时候的原理
    • ¥15 神经网络预测均方误差很小 但是图像上看着差别太大