【问题标题】:phpjasper fail execute from web pagephpjasper 无法从网页执行
【发布时间】:2021-12-21 10:00:45
【问题描述】:

我可以在本地环境中创建报告。但是当部署到服务器时,从 jrxml 创建 pdf 失败。

带有错误信息:

Type: PHPJasper\Exception\ErrorCommandExecutable
Message: Your report has an error and couldn 't be processed!\ Try to output the command using the function `output();` and run it manually in the console
Filename: /var/www/html/myapp/vendor/geekcom/phpjasper/src/PHPJasper.php

我遵循错误消息。

它的输出:

./jasperstarter --locale id process "/var/www/html/myapp/archives/reports/jrxml/default/invoices.jrxml" -o "/var/www/html/myapp/archives/reports/output/330200006/103/" -f pdf -t json --data-file /var/www/html/myapp/archives/reports/output/330200006/103/invoices_data.json --json-query data

在控制台中手动运行输出。并成功创建pdf。

任何帮助为什么从网页执行时失败?

所有者和组的输出目录都是apache,权限是777

环境:

  • 操作系统:centos 7
  • PHP:7.4.2
  • PHP 框架:Codeigniter 3.11
  • geekcom/phpjasper:“^3.3.1”

【问题讨论】:

  • 是apache无权使用内存setsebool -P httpd_execmem 1作为它的SO造成的

标签: php jasper-reports


【解决方案1】:

是apache无权使用内存造成的 setsebool -P httpd_execmem 1this answer

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2018-02-19
    • 2011-08-17
    • 2012-11-07
    • 2018-12-09
    • 1970-01-01
    • 1970-01-01
    • 2016-03-19
    • 1970-01-01
    相关资源
    最近更新 更多