精通
英语
和
开源
,
擅长
开发
与
培训
,
胸怀四海
第一信赖
锐英源精品原创文章,禁止转载和任何形式的非法内容使用,违者必究
On certain Mac OS X builds mod_perl doesn’t seem to able to print() anything to the client. That’s because STDOUT is not tied to the Apache module. Most likely some core module on Mac OS X untie’s/re-tie’s STDOUT after mod_perl had it tied. The workaround is to add:
在某些Mac OS X上构建mod_perl似乎不能够print()任何东西到客户端。这是因为STDOUT不是与Apache模块相关联的。在Mac OS X上最有可能的一些核心模块 untie’s/re-tie’s STDOUT 在mod_perl之后已经绑定。解决方法是添加:
PerlHeaderParserHandler "sub { tie *STDOUT, ’Apache’ unless tied *STDOUT; }"
Another solution is not to use un unqualified print(), but $r->print(), for example replace: 另一个解决方案是不要使用不合格的print(),而是使用$r->print(),例如替换:
print "Hello";
with: 和:
$r->print("Hello");
If you don’t have $r, you can obtain it with: 如果你没有$r,您可以获取它:
my $r = Apache->request;
If you build mod_perl and mod_php in the same binary, you might get Segmentation fault followed by this error: 如果你在相同的二进制文件编译mod_perl和mod_php,你可能会得到一个分段错误:
exit signal Segmentation fault (11)
The solution is to not rely on PHP’s built-in MySQL support, and instead build mod_php with your local MySQL support files by adding --with mysql=/path/to/mysql during ./configure. 解决方案是不依赖于PHP的内置MySQL支持,而是使用本地的MySQL建立mod_php,通过添加--with-mysql=/path/to/mysql during ./configure.支持文件。
Under mod_perl you may receive a warning or an error in the error_log which specifies /dev/null as the source file, and line 0 as an line number where the printing of the message was triggered. This is absolutely normal if the code is executed from within a handler, because there is no actual file associated with the handler. Therefore $0 is set to /dev/null and that’s what you see.
在mod_perl您可能会收到在其指定的/ dev/ null作为源文件的error_log警告或错误,并且0行作为行号打印触发消息。如果代码在一个处理程序执行这绝对是正常,因为没有与处理器相关联的实际文件。因此$0被设置为你所看到的/ dev / null,。
If you have some of the processes segfault when using XML::Parser you should use 当使用XML::解析器,如果你有一些流程出现分段错误,你应该使用
--disable-rule=EXPATduring the Apache configuration step. 在Apache配置步骤。