dongzizhi9903 2014-06-10 15:35
浏览 29
已采纳

谷歌app引擎php zip扩展

I am using Google app engine and I want to create a zip archive using the zip extension which is supported in the current version. The problem is that every time i call ZipArchive::close it returns false and ZipArchive::getStatusString returns "Failure to create temporary file: Read-only file system". I am creating the zip file in the cloud storage like this:

$zip = new ZipArchive();
$zip->open("gs://whatever/somethig.zip", ZipArchive::OVERWRITE); //returns true
$zip->addFromString('file.txt', "some random data"); //returns true
$zip->numFiles; // = 1
$zip->close(); // returns false
$zip->getStatusString(); //returns Failure to create temporary file: Read-only file system

and it should be writable, it actually is with file_set_content or whatever. I tried the same code with a couple of variations:

  1. already existing zip file;
  2. not existing zip file;
  3. ZipArchive::CREATE as a second parameter of the ZipArchive::open call
  4. Using ZipArchive::addFile to add the file from cloud storage

Maybe it tries to create a temporary file on some other place not on the cloud storage, but this thing that i'm doing is very common scenario and i doubt that this is an app engine bug, after all they claim that they support the zip extension here.

Does someone have some idea what can be the problem?

Thank you.

  • 写回答

1条回答 默认 最新

  • dongsi1944 2014-06-10 15:36
    关注

    Looks like a bug - can you open an issue in the issue tracker?

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥170 如图所示配置eNSP
  • ¥20 docker里部署springboot项目,访问不到扬声器
  • ¥15 netty整合springboot之后自动重连失效
  • ¥15 悬赏!微信开发者工具报错,求帮改
  • ¥20 wireshark抓不到vlan
  • ¥20 关于#stm32#的问题:需要指导自动酸碱滴定仪的原理图程序代码及仿真
  • ¥20 设计一款异域新娘的视频相亲软件需要哪些技术支持
  • ¥15 stata安慰剂检验作图但是真实值不出现在图上
  • ¥15 c程序不知道为什么得不到结果
  • ¥15 键盘指令混乱情况下的启动盘系统重装