您好,我使用PHP编写的xenforo遇到了问题
每次我尝试上传大于500MB的视频时,它似乎都失败了,并且我在错误日志中收到了此消息;
ErrorException: [E_WARNING] fopen(): Filename cannot be empty src/addons/XFMG/VideoInfo/Preparer.php:25
Generated by: xRated Nov 4, 2018 at 2:10 PM
Stack trace
#0 [internal function]: XF::handlePhpError(2, 'fopen(): Filena...', '/var/www/vhosts...', 25, Array)
#1 src/addons/XFMG/VideoInfo/Preparer.php(25): fopen('', 'rb')
#2 src/addons/XFMG/Attachment/Media.php(75): XFMG\VideoInfo\Preparer->__construct('')
#3 src/XF/Attachment/Manipulator.php(155): XFMG\Attachment\Media->validateAttachmentUpload(Object(XF\Http\Upload), Object(XF\Attachment\Manipulator))
#4 src/XF/Pub/Controller/Attachment.php(88): XF\Attachment\Manipulator->insertAttachmentFromUpload(Object(XF\Http\Upload), NULL)
#5 src/XF/Mvc/Dispatcher.php(249): XF\Pub\Controller\Attachment->actionUpload(Object(XF\Mvc\ParameterBag))
#6 src/XF/Mvc/Dispatcher.php(89): XF\Mvc\Dispatcher->dispatchClass('XF:Attachment', 'upload', 'json', Object(XF\Mvc\ParameterBag), '', Object(XF\Pub\Controller\Attachment), NULL)
#7 src/XF/Mvc/Dispatcher.php(41): XF\Mvc\Dispatcher->dispatchLoop(Object(XF\Mvc\RouteMatch))
#8 src/XF/App.php(1931): XF\Mvc\Dispatcher->run()
#9 src/XF.php(329): XF\App->run()
#10 index.php(13): XF::runApp('XF\\Pub\\App')
#11 {main}
array(4) {
["url"] => string(106) "/index.php?attachments/upload&type=xfmg_media&context[category_id]=7&hash=83094fdc73ae131e790282c8717b41b8"
["referrer"] => string(63) "https://example.com/index.php?media/categories/no-cat.7/add"
["_GET"] => array(4) {
["attachments/upload"] => string(0) ""
["type"] => string(10) "xfmg_media"
["context"] => array(1) {
["category_id"] => string(1) "7"
}
["hash"] => string(32) "83094fdc73ae131e790282c8717b41b8"
}
["_POST"] => array(11) {
["_xfToken"] => string(8) "********"
["_xfResponseType"] => string(4) "json"
["_xfWithData"] => string(1) "1"
["flowChunkNumber"] => string(1) "1"
["flowChunkSize"] => string(10) "4294967296"
["flowCurrentChunkSize"] => string(9) "624544156"
["flowTotalSize"] => string(9) "624544156"
["flowIdentifier"] => string(42) "624544156-xxfilenamexxmp4"
["flowFilename"] => string(33) "xxfilenamexx.mp4"
["flowRelativePath"] => string(33) "xxfienamexx"
["flowTotalChunks"] => string(1) "1"
}
}
我的php.inf设置为
内存限制15000 执行时间100000 输入时间100000 邮寄最大尺寸10000M 上传最大文件大小8000M
我不确定这是哪里出了错。
我在Google上研究了以下行“ ErrorException:[E_WARNING] fopen():文件名不能为空”,这似乎是tmp路径需要设置,在打开php.inf时它说如果没有定义的路径将使用临时路径。
答案 0 :(得分:-1)
压缩要插入的文件