[google-appengine] Re: Google App Engine Flexible Environment tmp folder is not writable

2018-02-02 Thread Dhandapani Sattanathan
Yes Shaharia Azam, It is working fine now.

Thanks for your valuable reply. It solved the problem.

On Friday, February 2, 2018 at 5:03:57 PM UTC+5:30, Shaharia Azam wrote:
>
> So it's working good now?

-- 
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/7a136f61-6529-45c3-9925-dc9fa030d11c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[google-appengine] Re: Google App Engine Flexible Environment tmp folder is not writable

2018-02-02 Thread Shaharia Azam
So it's working good now?

-- 
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/4da4e226-43f6-46fc-bbff-e1312a7782ec%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [google-appengine] Re: Google App Engine Flexible Environment tmp folder is not writable

2018-02-02 Thread Shaharia Azam
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
>
> 
>
> 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
>>> 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
> 
> .
> 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.


[google-appengine] Re: Google App Engine Flexible Environment tmp folder is not writable

2018-02-01 Thread Dhandapani Sattanathan
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





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 
>> 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 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/83d57d65-4c29-46ef-8e0e-d933de0e8484%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[google-appengine] Re: Google App Engine Flexible Environment tmp folder is not writable

2018-02-01 Thread Shaharia Azam
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 
> 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 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/95a5664c-ec76-4b90-b50f-85ab3d536abd%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[google-appengine] Re: Google App Engine Flexible Environment tmp folder is not writable

2018-02-01 Thread 'Kenworth (Google Cloud Platform)' via Google App Engine
Directories for temporary files are documented on this mPDF Manual 
. 
Note that this library is not a Google product and we therefore can not 
support it due to our limited visibility. It is recommended to continue 
technical support for this tool on Stack Overflow 
 and/or on their official 
support forum 
. After 
a quick courtesy search I was able to discover this similar StackOverflow 
thread 

 
that offers multiple insights about a possible solution.

-- 
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/313e97ab-4ff3-42b9-acf0-7dfb3cfa1031%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.