So I am trying to write a PPT file using PHP in my Google Cloud App Engine.
The final code to write the file is
$xmlWriter = IOFactory::createWriter($phpPresentation, "PowerPoint2007");
$xmlWriter->save("php://output");
It is workng in my Localhost but when I deploy it to google cloud it gives the error ERR_INVALID_RESPONSE
in google chrome and File Not Found
in mozilla firefox.
When i accessed the logs it says
PHP Fatal error: Uncaught exception 'Exception' with message 'Could not close zip file vfs://root/temp/.//phppttmp569a45e921e8a8.63056743.' in /base/data/home/apps/s~frrolefrontend/mediascout:ms-080.390023055217794078/mediascout/ppt_export/src/PhpPresentation/Writer/PowerPoint2007.php:320
Stack trace:
#0 /base/data/home/apps/s~frrolefrontend/mediascout:ms-080.390023055217794078/mediascout/ppt_export/samples/Sample_Header.php(72): PhpOffice\PhpPresentation\Writer\PowerPoint2007->save('php://output')
#1 /base/data/home/apps/s~frrolefrontend/mediascout:ms-080.390023055217794078/mediascout/ppt_export/samples/scout_temp.php(381): write(Object(PhpOffice\PhpPresentation\PhpPresentation), 'scout_temp', Array)
#2 {main}
thrown in /base/data/home/apps/s~frrolefrontend/mediascout:ms-080.390023055217794078/mediascout/ppt_export/src/PhpPresentation/Writer/PowerPoint2007.php on line 320
After doing some research i found that Uncaught exception 'Exception' with message 'Could not close zip file
is because the directory is not writable.
Can you tell me how can i make a directory in App Engine Writable?