我在 Windows 系统上安装了 Python 2.7 和 Cheetah。以下是当我尝试将 cheetah.template 对象与 .tmpl 文件一起使用时遇到的错误。
from Cheetah.Template import Template
t = Template(file='home.tmpl')
C:\wamp\bin\Python27\lib\site-packages\Cheetah\Compiler.py:1509: UserWarning:
You don't have the C version of NameMapper installed! I'm disabling Cheetah's us
eStackFrames option as it is painfully slow with the Python version of NameMappe
r. You should get a copy of Cheetah with the compiled C version of NameMapper.
"\nYou don't have the C version of NameMapper installed! "
from Cheetah.Template import Template
t = Template(file='home.tmpl')
print t …
Run Code Online (Sandbox Code Playgroud) 我试图在我们分配的服务器空间扩展连接/请求超时.
我试图这样做的原因是,对于我的应用程序中的某些操作需要超过120秒,然后服务器不等待操作完成.它会在120秒后返回500内部服务器错误.
为了测试它,我将以下脚本放在服务器上:
<?php
sleep(119);
echo "TEST";
?>
Run Code Online (Sandbox Code Playgroud)
它将在119秒后返回TEST,返回浏览器.
但是当我放在脚本下面时:
<?php
sleep(121);
echo "TEST";
?>
Run Code Online (Sandbox Code Playgroud)
120秒后它将返回500内部服务器错误
我们在php.ini中设置了Max_execution_time = 360,但问题仍然存在.
我们安装了FastCGI的Apache.
我试图使用.htaccess将其扩展到360秒,因为这是我在共享主机中的唯一方法.
任何解决方案或建议?,提前致谢.