4
3

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

EC-CUBE 新規ページが[500 Internal Server Error]となってしまう問題

Last updated at Posted at 2014-08-28

EC-CUBEバージョン 2.13.1 です。

/user_data へ出力されるファイルのパーミッションに問題あり。

666の実行権限なしで「PHP」ファイルが生成されていた。

★生成する箇所を編集

 ↓ ↓ ↓

/data/class/helper/SC_Helper_FileManager.php
    public function sfWriteFile($filename, $value)
    {
        if (!is_dir(dirname($filename))) {
            SC_Utils_Ex::recursiveMkdir(dirname($filename), 0777);
        }
        $fp = fopen($filename,'w');
        if ($fp === false) {
            return false;
        }
        if (fwrite($fp, $value) === false) {
            return false;
        }
        chmod($filename, 0755); //★ココ
        return fclose($fp);;
    }

上記「★ココ」の行(パーミッションを変更処理)を追記
331 行目あたり。

4
3
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
4
3

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?