Run a Perl script in PHP - Plesk 11

与世无争的帅哥 提交于 2019-12-25 00:29:02

问题


How can I run a a Perl script in every page of the server?

I put the code at /var/www/cgi-bin, now I need the correct the code to run it. Where should I place it.

I have added this code to the httpd.conf:

  • Action add-footer /cgi-bin/script.cgi
  • AddHandler add-footer .htm .htm

and on the site I have added the code script.

If the page is .html the code runs but is the page is PHP the code does not run.

I have tried this but is does not work, in works on HTML files but not in PHP

<Directory / >
  Options +ExecCGI
  AddHandler cgi-script .cgi .pl
  AddHandler application/x-httpd-php5 .php
  AddHandler application/x-httpd-php .html .htm
  AddHandler php-cgi .php 
  AddHandler cgi-script cgi pl
  AddHandler cgi-script .html
  AddHandler cgi-script .php

  Action add-footer /cgi-bin/script.cgi 
  AddHandler add-footer .html .htm .php php
</Directory>

回答1:


The way I was trying does not work with Dynamic Content it only work with Static Content.



来源:https://stackoverflow.com/questions/23940239/run-a-perl-script-in-php-plesk-11

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!