centos6.0,刚安装时自带apache,用可视化界面的“添加/删除软件”,安装php
然后重启apache,在/var/www/html里面复制个info.php(从windows xp里面直接复制):
<?php
phpinfo();
?>
但是访问该页面,会出现如下提示(去/etc/php.ini,把display_errors = Off改成display_errors = On):
Warning: Unknown: failed to open stream: Permission denied in Unknown on line 0 Fatal error: Unknown: Failed opening required '/var/www/html/a.php' (include_path='.:/usr/share/pear:/usr/share/php') in Unknown on line 0
原因是权限不足,随便改成777权限就可以了。
----------------------------------
来源:http://topic.csdn.net/u/20110525/12/835433e3-f4bf-408e-8983-f38cf4f63c1a.html