找不到类“ SimpleXml”,EC2服务器问题

时间:2018-08-21 05:54:58

标签: amazon-ec2 laravel-5.4 simplexml

我的项目在EC2中,在删除任何s3文件时出现此错误。 (1/1)找不到FatalThrowableError类'SimpleXMLElement'

我在EC2中都安装了PHP 7.2,XML和SimpleXML。从s3删除时,我的本地服务器没有引发此错误。 这是代码库

public function delete($memory_id) {
    $memory = new Memory();
    $qaMemory = new MemoryAccess;       
    $memoryInfo = $memory->where('memory_id',$memory_id)->first();
    $qaMemory->where('user_id',Auth::user()->id)->where('memory_recall_datetime',$memoryInfo->recall_date)->first();
    $qaMemory->delete();
    if($memoryInfo->mime_type) {
        $path = $memoryInfo->memory_content;
        $pathArray = explode('/', $path);
        if(Storage::disk('s3')->exists(end($pathArray))) { // error occoured
            $isDeleted =  Storage::disk('s3')->delete(end($pathArray));
        } else {
            //echo "not found";
        }
    }
    $memory->delete();

    return redirect('home')->with('registration_success', 'Registration successful');
}

我在EC2上安装了SimpleXML软件包 这里是EC2上php7.2中加载的扩展的图片:

image

有人可以帮助我解决这个问题吗?

0 个答案:

没有答案