Python vs. PHP
PHP Everywhere 贴出一篇《Python never had a chance against PHP》的文章,这并不是在对 Python 进行挑衅,而是较为客观地对 PHP 和 Python 进行分析,认为在 Web 应用方面,Python 比不上 PHP:
PHP Everywhere 贴出一篇《Python never had a chance against PHP》的文章,这并不是在对 Python 进行挑衅,而是较为客观地对 PHP 和 Python 进行分析,认为在 Web 应用方面,Python 比不上 PHP:
via Slashdot: South Korean Gov't. Advocates Linux
from the alternatives-are-worse dept.[/i]
Anonymous Coward writes "Korea has now taken the plunge on the Linux operating system, and is now starting to advocate Linux for use in government and public sector applications. South Korea's Ministry of Information and Communications announced the move today, which will result in decreased Microsoft market share in the region." According to the article, Korea's Ministry of Information and Communication "will provide a total of 3 billion won (US$2.95 million) for government agencies which want to use the Linux and other open-source computer programs this year."韩国政府已经开始大力支持 Linux 及开源了,不知道中国什么时候才会有这种远见卓识……去年年末还因为北京政府采购失意事件闹得沸沸扬扬,虽然政府这方面支持力度不够,但国产软件也要争气才行呀,总之,各打五十大板!!要想发展,肯定不能让 M$ 牵着鼻子走,不管当前国产软件现状如何,政府还是需要加大支持力度的。
通过 Google 的搜索 http://www.google.com/search?q=inurl%3Adb.inc,可以找到很多网站的 db.inc 文件,而且点击浏览这些链接,竟然都可以看到源代码,狂汗!!下边列出了一些找到的结果:
[url]http://www.tecra.net/squizlib/db/db.inc[/url]
[url]http://www.pupesoft.com/2k/db.inc[/url]
通过如下几种方式中的任何一种均可避免出现这种安全漏洞:
* 最好的方法是将你所使用的库文件放到发布目录之外。
* 修改 Apache 设置,使其将 .inc 作为 PHP 代码解析:
AddType application/x-httpd-php .php .php3 .phtml .inc
* 为 *.inc 加上扩展名 .php,如 db.inc.php,这样默认作为 PHP 解析,也不会显示出源代码。
* 修改 Apache 设置,加上如下代码:
<Files ~ "\.inc$">
Order allow,deny
Deny from all
</Files>
PHP 入门是较为简单的,但是想要写出安全的 PHP 程序却不是那么容易的事。PHP 的安全非常重要, 一个缺乏安全考虑的 PHP 程序随时都可能成为服务器的入侵口。PHP Security Consortium 是我经常访问的站点,它专注于 PHP 安全的讨论,里边有很多文章都写得非常好,另外,它还开通了 mailing list,从 2005.4.1 开始每个月会发布一些与 PHP 安全相关的新文章、项目更新等等消息,对 PHP 安全感兴趣的均可前往订阅。