<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/">
  <channel>
    <title>Windows on php-tips.com</title>
    <link>https://php-tips.com/tags/windows/</link>
    <description>Recent content in Windows on php-tips.com</description>
    <generator>Hugo</generator>
    <language>ja</language>
    <lastBuildDate>Thu, 17 Jul 2008 20:47:03 +0900</lastBuildDate>
    <atom:link href="https://php-tips.com/tags/windows/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>OpenPNE Windows環境での画像アップロード処理をゴニョゴニョ</title>
      <link>https://php-tips.com/2008/07/17/openpne-windows%E7%92%B0%E5%A2%83%E3%81%A7%E3%81%AE%E7%94%BB%E5%83%8F%E3%82%A2%E3%83%83%E3%83%97%E3%83%AD%E3%83%BC%E3%83%89%E5%87%A6%E7%90%86%E3%82%92%E3%82%B4%E3%83%8B%E3%83%A7%E3%82%B4%E3%83%8B/</link>
      <pubDate>Thu, 17 Jul 2008 20:47:03 +0900</pubDate>
      <guid>https://php-tips.com/2008/07/17/openpne-windows%E7%92%B0%E5%A2%83%E3%81%A7%E3%81%AE%E7%94%BB%E5%83%8F%E3%82%A2%E3%83%83%E3%83%97%E3%83%AD%E3%83%BC%E3%83%89%E5%87%A6%E7%90%86%E3%82%92%E3%82%B4%E3%83%8B%E3%83%A7%E3%82%B4%E3%83%8B/</guid>
      <description>&lt;p&gt;Linux→WindowsへOpenPNEのサイトを移行させたのですが、画像のアップロードができなくなったのでその対処法のメモ。
#OpenPneバージョン2.8.2のお話。
とりあえず、画像のアップ処理を行っているところで、エラーメッセージをダンプ。
&lt;code&gt;Warning: filesize() [function.filesize]: &lt;em&gt;stat failed for C:/WINDOWS/TEMP&lt;/em&gt;（略&lt;/code&gt;
ということなので、テンポラリのディレクトリの権限が悪いんだろうなーと、妄想。
php.iniのupload_tmp_dirを弄るなりして、適切な権限のあるディレクトリをアップロード先に指定すればよいのでしょうが、リモートな環境のため弄ることもかなわず。
というわけで、OpenPNE/webapp/lib/db/image.phpのdb_image_insert_c_tmp_imageとdb_image_insert_c_image2の2つの関数内部にあるアップロードファイル読み込み処理を以下のように書き換え。
&lt;code&gt;&lt;/p&gt;</description>
    </item>
  </channel>
</rss>
