apache错误与一个PHP文件而不是另一个相同

时间:2014-08-19 21:48:03

标签: php apache

我遇到了一些问题,特定文件上的服务器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 dent.php - 作品

cp dent.php zephod.php - 作品

cp dent.php test11.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

1 个答案:

答案 0 :(得分:0)

我想我应该为此做好准备,或者最好是为此而努力。

-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时,便士掉了下来。 不会再犯这个错误了。

凯文