我在我的LAMP服务器上的项目中使用PHP-OpenCV。当我向我的项目提出请求时,它就会失败:/
//OpenCV functions
use function CV\imread;
use function CV\DNN\{readNetFromCaffe,blobFromImage};
$image = imread("images/avatar.jpg");
$gender_net = readNetFromCaffe('models/age_gender/gender_net_definitions/deploy.prototxt', 'models/age_gender/gender_net.caffemodel');
$blob = blobFromImage($image, 1.0, $size = new Size(300, 300), $mean = new Scalar(104, 177, 123), $swapRB = false, $crop = false);
$gender_net->setInput($blob, '');
$result = $gender_net->forward();
var_dump($result);
当我更改readNetFromCaffe
函数参数时,它可以正常工作,但是当我在参数中读取此文件时,会出现错误,我将其写入上述代码框。
所以问题不在我的代码上,我想我的服务器上的某些权限不正确。或其他我不知道的东西。
此错误可能是什么原因?我该怎么解决?
有人有主意吗?
error.log 文件:
[core:notice] [pid 16892] AH00051: child pid 23226 exit signal Aborted (6), possible coredump in /etc/apache2
[core:notice] [pid 16892] AH00051: child pid 23269 exit signal Aborted (6), possible coredump in /etc/apache2
[core:notice] [pid 16892] AH00051: child pid 23091 exit signal Aborted (6), possible coredump in /etc/apache2
[core:notice] [pid 16892] AH00051: child pid 23099 exit signal Aborted (6), possible coredump in /etc/apache2
[core:notice] [pid 16892] AH00051: child pid 23306 exit signal Aborted (6), possible coredump in /etc/apache2
[core:notice] [pid 16892] AH00051: child pid 23319 exit signal Aborted (6), possible coredump in /etc/apache2