We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 33023
    • 9 Posts
    初めまして。
    今回modxをインストールMaxiGalleryを使用したいと思っているのですが、
    Parse error: syntax error, unexpected ’;’, expecting T_PAAMAYIM_NEKUDOTAYIM or ’(’ in サーバー/manager/includes/document.parser.class.inc.php(766) : eval()’d code on line 69
    とでてきてしまい、解説等にあるマネージャーボタンがでてきません。
    いろいろとさぐっては見たのですが、原因がつかめません。
    現在利用しているのは、ModxもMaxiGalleryも最新版でサーバーはロリポップです。
    どうぞご協力ください。
      • 19033
      • 892 Posts
      こんにちは。今、ちょうどmaxigallery の解説を書いているところです。
      お役に立てればいいのですが。。

      どのようなドキュメント構成で、どのようにスニペットコールを
      書きましたでしょうか。

      MODxは0.9.6 Maxigallery は0.5.2ですね。

      また、ページの中で、maxigalleryコールのみを書いた場合は
      どうでしょうか。つまり、テンプレートなどを使わずにblank を選択し、
      例えば以下のように書いた場合です。
      <html>
      <head>
      </head>
      <body>
      [[MaxiGallery]]
       </body>
      </html>
      


        • 33023
        • 9 Posts
        ご返答ありがとうございます。
        MEGUさんより提示されました、ソースで試しましたが同じエラーが出ます。
        スニペットコールはいろいろ試しましたが、現在は[[MaxiGallery]]のままです。
        エラーコードの(766)を最初バーミッションのことかと思い、
        document.parser.class.inc.phpを766に変えたらマネージャーボタンは一度
        表示されたのですが、これは違うなとおもい現在はデフォルトのバーミッションに
        戻しています。
          • 6158
          • 224 Posts
          "maxigallery.txt" をスニペットとして保存されていると思いますが、どう書
          かれているのか見せてもらえますか? (4/13)

          というのは、

          Quote from: yamatech at Jun 22, 2007, 09:35 PM

          Parse error: syntax error, unexpected ’;’, expecting T_PAAMAYIM_NEKUDOTAYIM
          or ’(’ in サーバー/manager/includes/document.parser.class.inc.php(766) : eval()’d code on line 69

          上のメッセージによると、"maxigallery.txt" の 69 行目辺りでプログラムに
          とって不適切な記述がある様子だからです。

          T_PAAMAYIM_NEKUDOTAYIM というのは "::" のことで、"::" か "(" が抜けてい
          るなどの、文法的におかしな記述があると言っています。

          後、「in サーバー/manager/includes/document.parser.class.inc.php」の
          "サーバー" と言う語が気になりました。見た時、「メッセージって、
          localhost や 127.0.0.1 じゃなくてサーバーという日本語の書き方で出てくる
          かな?」と違和感を感じました。通常どうだったのか覚えてないので不確かで
          すが。
            • 19033
            • 892 Posts
            こんにちは。まずご報告を。。

            さくらインターネット(MYSQL4.0.27 / php4.4.4)において
            MODx096 + maxigallery052 を動かしてみました。
            正常動作しています。

            ロリポップの環境について書かれていましたが、
            ファイルやフォルダのパーミッションなどは関係ないでしょうか?
            http://lolipop.jp/?mode=manual&state=hp&state2=cgi
              • 33023
              • 9 Posts
              MEGU様

              コードは
              <?php
              //////////////////////////////////////////////////////////////////////////////////////////////////
              //
              // PASTE THE CONTENTS OF THIS FILE INTO MODx WHEN INSTALLING THIS SNIPPET
              //
              // Snippet Name: MaxiGallery
              // Short Description: Advanced imagegallery snippet
              // Version: 0.5.2
              // Author: doze &amp;amp;lt;[email protected]&amp;amp;gt;
              //
              // Note:
              // -----
              // You can use this snippet in anyway you want. Modify it’s code, lend some parts of it or whatever you want to do with it.
              // If you are going to make changes to some other files that this snippet uses, make sure you keep the author informations intact at the code.
              //
              // Copyright &amp;amp;amp; Licencing:
              // ----------------------
              // GNU General Public License (GPL) (http://www.gnu.org/copyleft/gpl.html)
              //
              // Extra Credits:
              // --------------
              //
              // Originally based on etoGal v1.1 beta by Frank Siegert &amp;amp;lt;[email protected]&amp;amp;gt;
              // and Mike Finley &amp;amp;lt;[email protected]&amp;amp;gt; http://www.efikim.co.uk/ (GPL)
              //
              // PhpConcept Library - Zip Module 2.5 by Vincent Blavet (LGPL)
              // http://www.phpconcept.net
              //
              // Thumbnail and Watermarking (v1.48) is based on a class made by Emilio Rodriguez (GPL)
              // &amp;amp;lt;[email protected]&amp;amp;gt; http://www.phpclasses.org/
              //
              // Dropshadow (v2.0.0) and Imagemask (v1.0.0) effects are based on work done by Andrew Collington (GPL)
              // &amp;amp;lt;[email protected]&amp;amp;gt; http://php.amnuts.com/
              //
              // Slidebox v0.4.1 feature is a based on Slidebox by Olivier Ramonat (LGPL)
              // &amp;amp;lt;[email protected]&amp;amp;gt; http://olivier.ramonat.free.fr/slidebox/
              //
              // Lightbox v2.0 feature is based on work of Lokesh Dhakar (Creative Commons Attribution 2.5 License)
              // &amp;amp;lt;[email protected]&amp;amp;gt; http://www.huddletogether.com/
              //
              // Slimbox 1.31 (MIT Licence)
              // Christophe Beyls (http://www.digitalia.be)
              //
              // JonDesign’s SmoothGallery v1.0.1 (GPL)
              // &amp;amp;lt;[email protected]&amp;amp;gt; http://smoothgallery.jondesign.net/
              //
              // Miscallaneous code is also contributed by the following people:
              // Marc (http://modxcms.com/forums/index.php?action=profile;u=3024)
              // Mark Kaplan (http://www.modxcms.com/mark-kaplan.html)
              // Jason Coward (http://www.modxcms.com/jason-coward.html)
              // Armand Pondman (http://projects.zerobarrier.nl/modx/)
              // Susan Sottwell (http://www.sottwell.com)
              // Nimja (http://modxcms.com/forums/index.php?action=profile;u=9097)
              // Al B (http://www.e-mediacreation.co.uk)
              // Dimitri Hilverda (http://modxcms.com/forums/index.php?action=profile;u=35)
              // Brian Stanback (http://modxcms.com/forums/index.php?action=profile;u=8967)
              //
              // Snippet documentation:
              // ----------------------
              // See the documentation at MODx wiki:
              // http://wiki.modxcms.com/index.php/MaxiGallery
              //
              ///////////////////////////////////////////////////////////////////////////////////////////////////

              ////// Setting(s)
              /////////////////////////////////////////////////////////////////////////////////
              //
              // Path where the galleries will be stored (you have to create it and make it writeable!)
              $path_to_galleries=&amp;amp;quot;assets/galleries/&amp;amp;quot;; // [ path ]
              //
              // Path where MaxiGallery is installed
              define(MAXIGALLERY_PATH, &amp;amp;quot;assets/snippets/maxigallery/&amp;amp;quot;);
              //
              //include snippet file
              $output = &amp;amp;quot;&amp;amp;quot;;
              include($modx-&amp;amp;gt;config[’base_path’].MAXIGALLERY_PATH.’maxigallery.php’);
              //
              ///////////////////////////////////////////////////////////////////////////////////////////////////

              return $output;
              ?>

              となっております。txtをコピーペーストし、使用しています。
              前述のサーバーとは、本当は自分のサーバー名がかかれています(lolipop〜ってなかんじです)
              そこを単純に日本語でサーバーというように明記しただけです。まぎらわしくてみんません。
              maxigalleryの方にエラーがあるのですか。
              うーん。ちょっと私もみてみます。。。
              ちなみに、ロリポップサーバーの設定は大丈夫っぽいです。。
                • 6158
                • 224 Posts
                見たいのはここだけですが、変換されてしまってますね。
                読み解くのが面倒。
                本当はどう書かれているんでしょうね。

                Quote from: yamatech at Jun 24, 2007, 04:02 AM

                ////// Setting(s)
                /////////////////////////////////////////////////////////////////////////////////
                //
                // Path where the galleries will be stored (you have to create it and make it writeable!)
                $path_to_galleries=&amp;amp;quot;assets/galleries/&amp;amp;quot;; // [ path ]
                //
                // Path where MaxiGallery is installed
                define(MAXIGALLERY_PATH, &amp;amp;quot;assets/snippets/maxigallery/&amp;amp;quot;);
                //
                //include snippet file
                $output = &amp;amp;quot;&amp;amp;quot;;
                include($modx-&amp;amp;gt;config[’base_path’].MAXIGALLERY_PATH.’maxigallery.php’);
                //
                ///////////////////////////////////////////////////////////////////////////////////////////////////

                素のテキストは以下のようになっています。

                <?php
                ////// Setting(s) 
                /////////////////////////////////////////////////////////////////////////////////
                //
                // Path where the galleries will be stored (you have to create it and make it writeable!)
                $path_to_galleries="assets/galleries/"; // [ path ]
                //
                // Path where MaxiGallery is installed
                define(MAXIGALLERY_PATH, "assets/snippets/maxigallery/");
                //
                //include snippet file
                $output = "";
                include($modx->config['base_path'].MAXIGALLERY_PATH.'maxigallery.php');
                //
                ///////////////////////////////////////////////////////////////////////////////////////////////////
                ?>
                


                Windows 環境ですが、MaxiGallery - Instructions の指示通り、

                (1) サーバー側の assets に assets/galleries ディレクトリをコピー
                (2) そのパーティションを 777 に変更
                (3) サーバー側の snippets に snippets/maxigallery ディレクトリをコピー
                (4) maxigallery.txt の内容を MaxiGallery スニペットとして保存
                (5) ドキュメントに [[MaxiGallery]] として呼び出す
                (6) [Manage pictures] ボタンが出てきた。

                  • 19033
                  • 892 Posts
                  ああ。なるほど。

                  もしかして、webサイト制作ツール(等)でmaxigallery.txtを開きましたか?
                  その時、コードの一部がエンティティ(&quot;とか)に変換されてしまったのではないでしょうか。

                  custarさんのご指摘されている、例えば、
                  $path_to_galleries=&amp;quot;assets/galleries/&amp;quot;; // [ path ]

                  などですね。

                  これは他のCMSを導入するときにも言えると思うのですが、
                  コードを編集するときは、windowsなら、メモ帳などのような
                  エディタを利用しないとこういう現象が起こるようです。
                  テキストエディタは、QXでもPeggyでも。。
                  慣れているのがあればそれでよろしいと思います。

                  ということで、もう一度、元の「Maxgallery.txt」をテキストエディタで開いて、
                  確認してみてください。コードが正しいことを確認できたら、スニペットとして
                  コードを貼り付け直してみてください。

                  動くと良いですね wink
                    • 33023
                    • 9 Posts
                    custar様
                    MEGU様
                    どうもありがとうございます。
                    当方mac os10.3環境で、safariだとマネージャーページがエラーでるので、netscapeで操作していました。
                    どうやら、macのnetscapeだと、どのようなやり方をしても(たとえコードと手動入力しても)
                    "とは表示されず&quot;となってしまうようです。
                    そのため、コードを正しく認識できないようです。
                    そこでfirefoxで試してみると特に何の操作することもなくボタンが表示されました。
                    しかし、また問題発生です。
                    ボタンをおしても画面のリロードがかかるのみでなにも反応がありません。
                    まいりました。。。
                    windows環境で試した方がよさそうですね。
                    結果でましたら参考までにまた書きます。
                      • 19033
                      • 892 Posts
                      参考のために確認させて頂ければ、と思うのですが。。

                      それでは例えば、管理画面のリソースのコードを入力する領域に、
                      正しいコードを貼り付けても、保存の段階で、「"」などがエンティティに変換
                      されてしまうということなんでしょうか。。?(そして次に開くと「&quot;」)になっている。。?
                      それはちょっと困りましたね。。

                      何か対策がないのでしょうか。。それって、日本語の環境の問題じゃないですよね。。

                      ちなみに、上手く動かないときは、エラーログを出力しているなら、なにか出ているかも知れないですよ。