So it's working now?

On Feb 2, 2018 11:49 AM, "Dhandapani Sattanathan" <
dhandapani.sattanat...@ssomens.com> wrote:

> Thanks, Kenworth & Shaharia Azam for your reply.
>
>
> I tried with sys_get_temp_dir() function in GAE Flexible Environment,
>
> I changed like index.php and Cache.php in Mpdf. Now /tmp writable in GAE
> FE.
>
> index.php
>
> <?php
>
>
> require_once 'mpdf/vendor/autoload.php';
> use Mpdf\Mpdf;
>
>
> $path=sys_get_temp_dir ();
> putenv('MPDF_TEMP_PATH='.$path);
>
>
> ?>
>
>
>
> I did modification in mpdf Cache.php
>
> public function __construct($basePath, $cleanupInterval = 3600)
>  {
>  $basePath=getenv('MPDF_TEMP_PATH');
>  if (!is_writable($basePath)
>  && is_writable(dirname($basePath))
>  && !file_exists($basePath)) {
>  mkdir($basePath, 0777, true);
>  }
>
>
>  if (!is_writable($basePath)) {
>  throw new \Mpdf\MpdfException(sprintf('Temporary files directory "%s" is
> not writable', $basePath));
>  }
>
>
>  $this->basePath = $basePath;
>  $this->cleanupInterval = $cleanupInterval;
>  }
>
>
>
>
> On Friday, February 2, 2018 at 5:15:28 AM UTC+5:30, Shaharia Azam wrote:
>>
>> Did you try changing the temporary path with "/tmp"? This "/tmp" should
>> be writable or use php sys_get_temp_dir() function in your GAE flexible
>> environment so you will get a temporary directory file location that is
>> writable.
>>
>>
>>
>> On Thursday, February 1, 2018 at 12:09:10 PM UTC+6, Dhandapani
>> Sattanathan wrote:
>>>
>>> Hi,
>>>
>>> I m using more than 1 years Google App engine Flexible Environment.
>>>
>>> My Application used mpdf API using PHP.The latest version of
>>> mpdf changed dynamically create temp folder for font creation and image.
>>>
>>> In my Development server This one working fine.
>>>
>>> But When I use Google App Engine Flexible environment, I got this error "PHP
>>> message: PHP Fatal error: Uncaught Mpdf\MpdfException: Temporary files
>>> directory "/app/web/mpdf/vendor/mpdf/mpdf/src/Config/../../tmp" is not
>>> writable in /app/web/mpdf/vendor/mpdf/mpdf/src/Cache.php:23"
>>>
>>> This is not mpdf issue. I dont know How to give write permission for
>>> this tmp folder in Google App engine Flexible Environment.
>>>
>>> You can see my sample here
>>> <https://docs.google.com/spreadsheets/d/1jSui9qTvjb6EUkfpOvxEc46c_7rbeAsHhr054jF2_Tg/edit#gid=0>with
>>> detailed log.
>>>
>>> Plz help me how to solve this?
>>>
>>> Is it possible can use the latest mpdf in GAE FE?
>>>
>>> Thanks,
>>> SN
>>>
>> --
> You received this message because you are subscribed to a topic in the
> Google Groups "Google App Engine" group.
> To unsubscribe from this topic, visit https://groups.google.com/d/
> topic/google-appengine/pDcWUk3qLFY/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> google-appengine+unsubscr...@googlegroups.com.
> To post to this group, send email to google-appengine@googlegroups.com.
> Visit this group at https://groups.google.com/group/google-appengine.
> To view this discussion on the web visit https://groups.google.com/d/
> msgid/google-appengine/83d57d65-4c29-46ef-8e0e-
> d933de0e8484%40googlegroups.com
> <https://groups.google.com/d/msgid/google-appengine/83d57d65-4c29-46ef-8e0e-d933de0e8484%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-appengine+unsubscr...@googlegroups.com.
To post to this group, send email to google-appengine@googlegroups.com.
Visit this group at https://groups.google.com/group/google-appengine.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-appengine/CA%2BzrJu_XUTVb1Ly%2BkRZdhA8JZPeCQvu7SU7-mdiUqKoMQxmikA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to