首页 文章

Highcharts导出图像,内部服务器错误

提问于
浏览
0

http://signitysolutions.co.in/dev/php/loancalculator.php

我使用highcharts创建了一个图形,我需要导出到图像到服务器,这样我就可以在页面上创建图形和数据的PDF,我正在设置导出服务器,使用这个How to save an image of the chart on the server with highcharts?作为参考

当我点击图表下方的“保存图形图像”按钮时,出现Javascript错误,我不明白:

send                          jquery-1.7.1.js:8102
jQuery.extend.ajax            jquery-1.7.1.js:7580
(anonymous function)          loancalculator.php:749
jQuery.event.dispatch         jquery-1.7.1.js:3256
elemData.handle.eventHandle

谁能指导我在这里?

1 回答

  • 0

    发送到服务器时出错 . 查看“网络”面板,查看请求是什么,以及导致jQuery错误的服务器返回的内容 .

    图像创建在服务器上完成,jQuery向其发送组装图像所需的信息 . 显然,jQuery发送了请求,但服务器没有遵守 . 发生这种情况时,您需要的错误消息是服务器返回的错误消息 .

    例如,404错误表示您未安装必要的HighCharts服务器端组件 .

    诸如函数不存在之类的PHP错误可能表示您没有安装某些必需的软件(通常是GD2模块,libjpeg和/或ImageMagick) .

    最后,500内部服务器错误表明该内部服务器错误背后有另一个错误,可以在Web服务器的错误日志中找到它 . 例如,它可能是辅助插件目录中的一个 .htaccess 问题 .

    通常可以从托管服务提供商的控制面板检查/清除/下载共享主机上的Web服务器错误日志,或者如果您具有SSH访问权限,则可以直接从站点配置文件路径设置进行检查(检查 ErrorLog 条目);如果所有其他方法都失败了,通常可以在Unix / Linux系统上的 /var/log/apache... 中找到它 .

    您还可以检查导致错误的Web请求,并以可视方式检查它,以评估您是否没有这样的路径(您知道) . 这将表明存在安装问题 .

    最后,您可以检查该路径(/ dev / php / export),并修改其索引文件的来源以追踪错误 . 如果没有其他可能的调试,这是最后的努力:

    <?php
         // This is the index.php file that receives the POST
         print "<pre>"; print_r($_POST); die(); // DEBUG-ONE
         // The above line crashes the request, but should avoid the 500 Error
         // and show the POST information.
    
         ...some code from the original file...
    
         die("<pre>".date("Y-m-d H:i:s") . " No 500 Error so far");
         // After commenting the DEBUG-ONE, processing goes on and
         // should arrive here. If it doesn't, obviously the error
         // is between there and here.
         // etc.
    

相关问题