怎么办?!:(

怎么办?!:(

装好了(我认为装好了)APACHE和PHP后,写了test.php
<?php phpinfo(); ?>
存在/usr/local/htdocs/php/php.test,
启动APACHE,后访问:http;//localhost/test.php
得到这样的结果:

Forbidden
You don't have permission to access /php/test.php on this server.

怎么办?      
chomod 755 test.php      
试试http://localhost/php/test.php       
chomod 755 test.php,
现在变这样了:
Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator, root@localhost.localdomain and inform them of the time the error occurred, and anything you might have done that may have caused the error.

More information about this error may be available in the server error log.

我在日志里找到错误信息是这个:
[Sat Jul 14 23:53:04 2001] [error] [client 127.0.0.1] Premature end of script headers: /usr/local/apache/htdocs/php/test.php

我要疯拉!!!
      
几种可能:1.Apache或者PHP并没有装好,出现内部错误。
2.Apache或PHP配置错误
3.Test.php脚本写得不对。      
可能是你的PHP脚本有错,检查一下。
不过,你可以先用phpinfo();函数看看PHP是否正常工作。      
[QUOTE]原文由 otto 发表
[B]chomod 755 test.php [/B][/QUOTE]

有不是cgi文件,chmod 644就可以了~~      
确认test.php里只有一行<? phpinfo() ?>

[已被 freeBSD 编辑过, 在 2001-07-15  16:15]      
只有一行phpinfo();
:(