Articles of perl

CGI脚本不在PHP文件中运行

我在服务器中有一个名为script.cgi的CGI脚本,我已经将下面的代码添加到域vhost: Action add-footer /cgi-bin/script.cgi AddHandler add-footer .htm .html 我已经改变它: Action add-footer /cgi-bin/script.cgi AddHandler add-footer .htm .html .php 如果页面是HTML代码将运行,但如果页面是PHP的代码将不会运行。 有什么代码我需要添加到虚拟主机,使PHP文件可以运行这个脚本? ****编辑:**** 我想在服务器的每个可能的页面中“注入”HTML代码,这包括HTML和PHP文件。 该代码只适用于HTML文件,我不知道为什么。

RedHat – 无法安装Perl模块(CPAN)

我无法安装perl模块: [root@xxx]# cpan Module::Find […] CPAN: File::Temp loaded ok (v0.22) CPAN.pm: Going to build C/CR/CRENZ/Module-Find-0.12.tar.gz Checking if your kit is complete… Looks good CPAN::Meta::YAML 0.011 is not available at /usr/local/share/perl5/CPAN/Meta.pm line 613 Warning: No success on command[/usr/bin/perl Makefile.PL INSTALLDIRS=site] CRENZ/Module-Find-0.12.tar.gz /usr/bin/perl Makefile.PL INSTALLDIRS=site — NOT OK Running make test Make had some problems, won't test […]

Ubuntu升级,Perl版本打破ZImbra

这里有一个绑定,因为我昨天晚上听说了bash的bug,所以我决定升级所有的服务器,而不仅仅是软件包,而是完整的操作系统,它在我的所有服务器上运行良好,除了我的邮件服务器正在运行Ubuntu 12.04和我升级到14.04。 一切似乎正确运行,但当我试图让Zimbra服务运行,我得到以下内容: Socket的Perl API版本v5.14.0与/usr/share/perl/5.18/XSLoader.pm第92行中的v5.18.0不匹配。编译在/usr/lib/perl/5.18/Sys/Syslog.pm行中的require失败10. BEGIN失败 – 编译在/usr/lib/perl/5.18/Sys/Syslog.pm第10行中断。编译在/opt/zimbra/zimbramon/lib/Zimbra/Mon/Logger.pm第21行的require中失败。 BEGIN失败 – 编译在/opt/zimbra/zimbramon/lib/Zimbra/Mon/Logger.pm第21行中断。编译在/ opt / zimbra / bin / zmcontrol第27行的require中失败。BEGIN失败 – 编译在/ opt / zimbra / bin / zmcontrol第27行。 我有点猜测这是我的Perl版本的问题,所以我下载perlbrew,但是当我尝试将版本从5.18.0更改为5.14.0时,我得到以下内容: List :: Util的Perl API版本v5.14.0与/usr/share/perl/5.18/XSLoader.pm第92行中的v5.18.0不匹配。编译在/usr/local/share/perl/5.18.2中的require失败/App/perlbrew.pm第22行。BEGIN失败 – 编译在/usr/local/share/perl/5.18.2/App/perlbrew.pm第22行中断。编译在/ usr / local / bin / perlbrew第6行。BEGIN失败 – 在/ usr / local / bin / perlbrew第6行编译中止。 无法看到我的Zimbra版本,由zmcontrol -v导致我得到以下内容: Socket的Perl API版本v5.14.0与/usr/share/perl/5.18/XSLoader.pm第92行中的v5.18.0不匹配。编译在/usr/lib/perl/5.18/Sys/Syslog.pm行中的require失败10. BEGIN失败 […]

运行cron时出错:孙子#10010失败,退出状态2:1时间(s)

在最近几周里,我在debian 6服务器上多次看到这种types的错误。 我看到了不同的退出状态,1,2,25,255 Errors when running cron: grandchild #10010 failed with exit status 2: 1 Time(s) grandchild #10042 failed with exit status 2: 1 Time(s) grandchild #10062 failed with exit status 2: 1 Time(s) grandchild #10080 failed with exit status 2: 1 Time(s) 要么 Errors when running cron: grandchild #23015 failed with exit status 25: […]

为什么我的date命令改变了,如何恢复默认的?

在尝试安装Perl Power Tools后,我在RHEL 5.3中遇到问题。 一切工作正常,直到我尝试手动安装该软件包(服务器无法访问Internet)。 起初,每个使用awk的shell脚本都给出了错误,因此我删除了Perl Power Tools,并从服务器中configuration的本地存储库中重新安装了awk,并解决了该问题。 之后,cron作业开始给出命令date的错误。 当我执行“男人约会”时, DATE(1) User Contributed Perl Documentation DATE(1) Name: date Description: display or set date and time Author: Joshua Gross License: NAME date – display or set date and time perl v5.8.8 2014-12-18 DATE(1) (END) 但是默认的date命令应该给这个其他的输出: DATE(1) User Commands DATE(1) NAME date – print or set the […]

RKHunter报告:“找不到散列值”

每当我的cron作业运行检查时,我都会收到RKHunter警告。 我在FreeBSD 10.2上 这是我得到的警告: Warning: No hash value found for file '/usr/bin/perl' in the 'rkhunter.dat' file. 我已经尝试过rkhunter –propupd rkhunter –update和rkhunter –propupd但警告依然存在。 rkhunter –propupd [ Rootkit Hunter version 1.4.2 ] File updated: searched for 171 files, found 113, broken links 1 rkhunter –list perl揭示了这一点: Perl module installation status: perl command Installed File::stat Installed Getopt::Long Installed Crypt::RIPEMD160 […]

perl吸烟假包丢失(解决)

我不时收到虚假的数据包丢失。 这个时间持续大约一个月,你可以在图上看到它。 我们使用相同的fping命令进行检查,完全没有损失。 所以也许是主机限制或不能处理它的东西? 但为什么在一段时间后自行修复? 任何帮助将不胜感激! 问题:主要原因是某些主机ping通了Cisco交换机,它对这些数据包有规则

Apache – mod_perl:未知Authz提供者'访问'

我正在尝试在新的Linux环境中设置并运行一个旧的Web应用程序(编写于2010年)。 Apache服务器由于Unknown Authz provider access错误而未启动,这是由下面给出的configuration引起的。 <Directory /srv/webapp> Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch SetOutputFilter DEFLATE ExpiresActive On ExpiresDefault "3 Months" AuthType security::AuthCookieHandler AuthName Maxio PerlAuthenHandler security::AuthCookieHandler->authenticate PerlAuthzHandler security::AuthCookieHandler->authorize require access </Directory> 我找不到任何文档,或者任何定义access apache模块,但是security::AuthCookieHandler有 sub access { … … } 我明白,这是基于mod_perl的身份validation,但没有在此之前。 如果此身份validation被禁用,并且该应用程序在浏览器中加载,则Apache将启动。 所以问题是 是否require access应该从sub access获取返回值? 如果是这样,为什么sub accessconfiguration不可见? 如果不是这样,那么access是什么?

nginx + apache2代理传递,mod_perl不工作

我试图让mod_perl在Apache / 2.4.18(Ubuntu)上工作 。 这是我在Apache2中的主要域configuration文件: <Virtualhost 0.0.0.0:8181> ServerName test DocumentRoot /srv/www/test.pro/www ErrorLog /srv/www/test.pro/logs/error.log <Directory "/srv/www/test.pro/www"> Options MultiViews FollowSymLinks AllowOverride all Require all granted </Directory> ScriptAlias /cgi-bin /srv/www/test.pro/www/cgi-bin <Directory "/srv/www/test.pro/www/cgi-bin"> AddHandler cgi-script .cgi AllowOverride None Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch Require all granted SetHandler cgi-script </Directory> <Location /> LimitRequestBody 5242880 </Location> </VirtualHost> 这段代码可以工作,但不是用mod_perl。 所以,我正在做以下启用mod_perl : <Virtualhost 0.0.0.0:8181> […]

在新的Ubuntu 16.04服务器上无法安装WWW:Curl

我试图找出为什么我不能在我的新服务器上安装WWW :: Curl 。 我已经搞定了: apt-get install libcurl4-openssl-dev …接着: cpanm WWW::Curl 过了一会儿,我发现一个错误。 日志看起来像: cpanm (App::cpanminus) 1.7040 on perl 5.022001 built for x86_64-linux-gnu-thread-multi Work directory is /root/.cpanm/work/1496041822.25089 You have make /usr/bin/make You have LWP 6.15 You have /bin/tar: tar (GNU tar) 1.28 Copyright (C) 2014 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or […]