PHP Flex Environment - Copy function fails.

已查看 27 次
跳至第一个未读帖子

Thomas Valadez

未读,
2017年6月23日 17:34:592017/6/23
收件人 Google App Engine
Here is my code, it runs locally just fine but when I deploy it, I get a weird error.

$url_doc = $url;
    $temp_doc = __DIR__. '/../temp.doc';
    if (!copy($url_doc, $temp_doc)) {
      $content = "Couldn't copy the file....";
    }

Here is the error.
2017-06-23 21:21:36 default[20170623t151218]  [23-Jun-2017 21:21:36] WARNING: [pool app] child 36 said into stderr: "NOTICE: PHP message: PHP Warning:  copy(/app/app/../temp.doc):

How would I correct this?  I am running PHP flex environment on Google app engine. 

Thanks.

Takashi Matsuo

未读,
2017年6月23日 17:46:082017/6/23
收件人 Google App Engine

The document root (default /app) has stricter permission for security reason.
The easiest way is to use /tmp.
Maybe you can use sys_get_temp_dir for portability.

--
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-appengi...@googlegroups.com.
To post to this group, send email to google-a...@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/1ea767ed-dc75-41f4-b576-97e253e440b9%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
-- Takashi

Thomas Valadez

未读,
2017年6月23日 18:22:372017/6/23
收件人 google-a...@googlegroups.com
Can you point me to some documentation on this?

On Jun 23, 2017 3:46 PM, "'Takashi Matsuo' via Google App Engine" <google-a...@googlegroups.com> wrote:

The document root (default /app) has stricter permission for security reason.
The easiest way is to use /tmp.
Maybe you can use sys_get_temp_dir for portability.

On Fri, Jun 23, 2017 at 2:35 PM Thomas Valadez <thomv...@gmail.com> wrote:
Here is my code, it runs locally just fine but when I deploy it, I get a weird error.

$url_doc = $url;
    $temp_doc = __DIR__. '/../temp.doc';
    if (!copy($url_doc, $temp_doc)) {
      $content = "Couldn't copy the file....";
    }

Here is the error.
2017-06-23 21:21:36 default[20170623t151218]  [23-Jun-2017 21:21:36] WARNING: [pool app] child 36 said into stderr: "NOTICE: PHP message: PHP Warning:  copy(/app/app/../temp.doc):

How would I correct this?  I am running PHP flex environment on Google app engine. 

Thanks.

--
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+unsubscribe@googlegroups.com.
To post to this group, send email to google-appengine@googlegroups.com.
--
-- Takashi

--
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/hkKdzghA5e4/unsubscribe.
To unsubscribe from this group and all its topics, send an email to google-appengine+unsubscribe@googlegroups.com.
To post to this group, send email to google-appengine@googlegroups.com.

Thomas Valadez

未读,
2017年6月23日 18:41:072017/6/23
收件人 google-a...@googlegroups.com
haha nevermind... I am a noob. I found the link.

On Fri, Jun 23, 2017 at 4:22 PM, Thomas Valadez <thomv...@gmail.com> wrote:
Can you point me to some documentation on this?

Takashi Matsuo

未读,
2017年6月23日 19:08:102017/6/23
收件人 google-a...@googlegroups.com

Thanks for the feedback

The following documents

https://cloud.google.com/appengine/docs/flexible/php/runtime

should mention this. Do you mind giving feedback from that page(yes you can give us feedback directly from docs)?

Thanks!


On Fri, Jun 23, 2017, 3:40 PM Thomas Valadez <thomv...@gmail.com> wrote:
haha nevermind... I am a noob. I found the link.
On Fri, Jun 23, 2017 at 4:22 PM, Thomas Valadez <thomv...@gmail.com> wrote:
Can you point me to some documentation on this?
On Jun 23, 2017 3:46 PM, "'Takashi Matsuo' via Google App Engine" <google-a...@googlegroups.com> wrote:

The document root (default /app) has stricter permission for security reason.
The easiest way is to use /tmp.
Maybe you can use sys_get_temp_dir for portability.

On Fri, Jun 23, 2017 at 2:35 PM Thomas Valadez <thomv...@gmail.com> wrote:
Here is my code, it runs locally just fine but when I deploy it, I get a weird error.

$url_doc = $url;
    $temp_doc = __DIR__. '/../temp.doc';
    if (!copy($url_doc, $temp_doc)) {
      $content = "Couldn't copy the file....";
    }

Here is the error.
2017-06-23 21:21:36 default[20170623t151218]  [23-Jun-2017 21:21:36] WARNING: [pool app] child 36 said into stderr: "NOTICE: PHP message: PHP Warning:  copy(/app/app/../temp.doc):

How would I correct this?  I am running PHP flex environment on Google app engine. 

Thanks.

--
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-appengi...@googlegroups.com.
To post to this group, send email to google-a...@googlegroups.com.
--
-- Takashi

--
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/hkKdzghA5e4/unsubscribe.
To unsubscribe from this group and all its topics, send an email to google-appengi...@googlegroups.com.
To post to this group, send email to google-a...@googlegroups.com.

--
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-appengi...@googlegroups.com.
To post to this group, send email to google-a...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.
--
-- Takashi
回复全部
回复作者
转发
0 个新帖子