【问题标题】:CKEditor integration with Wiris PHP plugin: open_basedir restrictionCKEditor 与 Wiris PHP 插件的集成:open_basedir 限制
【发布时间】:2014-04-30 07:39:12
【问题描述】:

根据 Wiris 指南。

  1. 授予 Web 服务器用户对 ckeditor/plugins/ckeditor_wiris/integration 中包含的 PHP 文件的执行权限。
    → 我的设置:文件夹“集成”:755。此文件夹内的所有文件:754
  2. 将 ckeditor/plugins/ckeditor_wiris/cache 和 ckeditor/plugins/ckeditor_wiris/formulas 目录的写入权限授予 Web 服务器用户。这些文件夹将用于存储公式 MathML 代码和时间图像。
    → 我对这些文件夹的设置:775

但是,我在尝试打开 Wiris“数学弹出窗口”时收到以下警告,并且无法正常打开。

警告:is_file():open_basedir 限制生效。文件(/home/my_user_name/public_html/ckeditor/plugins/ckeditor_wiris/integration/../../../../../../../../lib/moodlelib.php)不在允许的路径: (/home/my_user_name:/usr/lib/php:/tmp) 在 /home/my_user_name/public_html/ckeditor/plugins/ckeditor_wiris/integration/bootstrap.php 第 39 行

警告:is_file():open_basedir 限制生效。文件(/home/my_user_name/public_html/ckeditor/plugins/ckeditor_wiris/integration/../../../../../../lib/moodlelib.php)不在允许的路径内: (/home/my_user_name:/usr/lib/php:/tmp) 在 /home/my_user_name/public_html/ckeditor/plugins/ckeditor_wiris/integration/bootstrap.php 第 39 行

我的权限是否正确?这些警告是否与文件/文件夹权限有关?我正在使用www.serversfree.com webhosting 进行测试。

【问题讨论】:

    标签: php ckeditor wiris


    【解决方案1】:

    您的安装似乎存在问题。请查看插件测试页面: <url>/ckeditor/plugins/ckeditor_wiris/integration/test.php。那里不应该有任何错误。请查看http://www.wiris.com/plugins/docs/ckeditor 的安装说明。

    【讨论】:

    • 测试页面显示一切正常,但“创建随机图像”会导致错误。安装指南没有详细说明 INI 文件中需要修复或更改的内容。
    • 请在再次运行 test.php 页面时检查您的服务器错误日志,并将您看到的任何错误发布或发送给我们。您应该启用 allow_url_fopen=On 或 CURL 扩展。如果您有allow_url_fopen=Off,请检查您的 php.ini 中的 disable_functions 中是否没有 CURL 相关函数。您的缓存目录(ckeditor_wiris/cache)中是否存在文件“392b9defa8cb3eaf2f8fec0cf3993738.png”?
    • 非常感谢 WIRIS 团队。暂时我决定在您的演示页面上使用 ckeditor,解决了我的目的。
    • 不客气!请随时通过 support@wiris.com 与我们联系。
    • test .php 给我内部服务器错误我该怎么办?请帮忙。
    【解决方案2】:

    谢谢,以上答案对第一步有所帮助。但是,现在当我在 Wiris 窗口中键入一个方程式并“接受”时,CKEditor 中不会显示等效图像。发送回 CKEditor 窗口的公式 URL 似乎存在“问题”。以下是CKEditor中图片的链接(否则“formula=392b9defa8cb3eaf2f8fec0cf3993738.png”部分是正确的)

    /ckeditor//plugins/ckeditor_wiris/integration/showimage.php?        formula=392b9defa8cb3eaf2f8fec0cf3993738.png**<!-- www.serversfree.com Analytics Code --><script src="http://www.serversfree.com"></script><noscript><a title="Free hosting servers" href="http://www.serversfree.com">Free servers</a><a title="Free websites hosting server" href="http://www.serversfree.com">Free websites hosting server</a><a title="Free hosting server features" href="http://www.serversfree.com/server-features/">Free server features</a><a title="Free hosting" href="http://www.bugs3.com">Free hosting</a><a title="Page rank" href="http://www.1pagerank.com">Page rank</a></noscript><script type="text/javascript">  var _gaq = _gaq || [];  _gaq.push(['_setAccount', 'UA-24425628-3']);  _gaq.push(['_setDomainName', window.location.host]);  _gaq.push(['_setAllowLinker', true]);  _gaq.push(['_trackPageview']);  (function() {    var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;    ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);  })();</script><script type="text/javascript" src="http://www.bugs3.com/ganalytics.js"></script><!-- End Of Analytics Code -->
    

    【讨论】:

      【解决方案3】:

      您的权限是正确的。这些警告与/integration/bootstrap.php 文件中的额外检查有关,它检查工作目录上方几个级别的目录,并且由于服务器中的 open_basedir 限制,您不允许这样做。这个问题将在我们的下一个插件版本中修复。要取消警告,只需注释整个bootstrap.php 文件或在&lt;?php 之后添加return true;

      编辑:此问题目前已在我们的最新版本中得到修复。

      【讨论】:

        【解决方案4】:

        请授予 777 对名为 cacheformulas

        的文件夹的权限

        内部路径

        ckeditor4/plugins/ckeditor_wiris

        【讨论】:

        • 使用权限777 应该是最后的手段,因为它会使您的系统对入侵者开放。建议将相应的用户添加到适当的组中。
        猜你喜欢
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2012-08-16
        • 2010-09-18
        • 2021-01-20
        • 2013-01-06
        • 1970-01-01
        相关资源
        最近更新 更多