Apache错误与一个PHP文件,而不是另一个相同的


apache error with one php file and not another yet identical

我在一个特定的文件上遇到了一些服务器500错误的问题,这个文件在本地工作得很好,直到我把它上传到主机。

因此将文件简化为php得到的那么简单。代码是:

 <?php
  echo "hello,hello";
 ?>

当它被称为test4.php时,它给出了500错误。然后当我将它重命名为test5.php它工作,test6.php失败

两个相同文件的转储-一个有效,一个无效:

 [~/www/]# hexdump test5.php
0000000 3f3c 6870 0a70 6365 6f68 2220 6568 6c6c
0000010 2c6f 6568 6c6c 226f 0a3b 3e3f 000a     
000001d
 [~/www/]# hexdump test4.php
0000000 3f3c 6870 0a70 6365 6f68 2220 6568 6c6c
0000010 2c6f 6568 6c6c 226f 0a3b 3e3f 000a     
000001d

test7.php作品

test11.php失败

testtest.php失败

cp test5.php

cp dent.php

cp test11.php testtest.php -工作-以前没有

cp test7.php to vest7.php

enter code here

关于这里可能发生的事情有什么线索吗?下面是一些其他细节。非常感谢凯文

[~/www/]# httpd -version
/usr/sbin/httpd: line 61: ulimit: open files: cannot modify limit: Operation not permitted
/usr/sbin/httpd: line 62: ulimit: open files: cannot modify limit: Operation not permitted
/usr/sbin/httpd: line 63: ulimit: open files: cannot modify limit: Operation not permitted
Server version: Apache/2.2.27 (Unix)
Server built:   May 16 2014 07:50:36
Cpanel::Easy::Apache v3.24.18 rev9999 +cloudlinux

Remote Address:xx.xx.xx.xxx:443
Request URL:https://www.server.net/dm/test4.php
Request Method:GET
Status Code:500 Internal Server Error
Request Headersview source
Accept:text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8
Accept-Encoding:gzip,deflate,sdch
Accept-Language:en-US,en;q=0.8
Connection:keep-alive
Host:www.server.net
User-Agent:Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/38.0.2124.3 Safari/537.36
Response Headersview source
Connection:close
Content-Length:657
Content-Type:text/html; charset=iso-8859-1
Date:Tue, 19 Aug 2014 21:16:09 GMT
Server:Apache
    contents of .htaccess (http_s modified to h_t_t_p_s for posting purposes)

     <IfModule mod_rewrite.c>
        RewriteEngine On
        RewriteCond %{HTTPS} off
        RewriteRule (.*) h_t_t_p_s://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
    </IfModule>
AddHandler application/x-httpd-php53 .php .php5 .php4 .php3

我想我应该为此责备自己,或者,充其量,坦白。

-rw-rw-r--  1 theuser theuser   29 Aug 20 04:08 test22.php
-rw-r--r--  1 theuser theuser   29 Aug 17 07:59 test2.php

我一定是在0664年烫了头发,然后把它复制了。我在把另一个盒子里的文件转移到这个盒子里。当我查了一下烫发号码,把它们从664改成了644时,我就明白了。我不会再犯那样的错误了。

凯文