500 Internal Server error with php file

jamesdriank

Member
Mar 15, 2013
5
0
1
cPanel Access Level
Root Administrator
HI,
I have been reviewing all my server and in principle everything is correct or I can not find the fault. I have reviewed the forum and I have not found in principle solution to my failure.

My problem is a file of the contact form that is in the directory example.com/assets/contact.php

Every time I run the form from the web, I link to that contact.php but I get an error

"500 Internal Server Error

The server encountered an internal error or misconfiguration and was unable to complete your request .... "

I downloaded the apache log from the domain and it shows me this bug:
Code:
"
80.173.xxx.xxx- - [24/Jan/2019:18:59:10 +0100] "GET /assets/contact.php HTTP/1.1" 404 - "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:64.0) Gecko/20100101 Firefox/64.0"
80.173.xxx.xxx- - [24/Jan/2019:18:59:10 +0100] "GET /assets/contact.php HTTP/1.1" 404 - "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:64.0) Gecko/20100101 Firefox/64.0"
80.173.xxx.xxx- - [24/Jan/2019:18:59:11 +0100] "GET /assets/contact.php HTTP/1.1" 404 - "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:64.0) Gecko/20100101 Firefox/64.0"
80.173.xxx.xxx- - [24/Jan/2019:19:01:08 +0100] "GET /assets/contact.php HTTP/1.1" 404 - "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:64.0) Gecko/20100101 Firefox/64.0"
80.173.xxx.xxx- - [24/Jan/2019:19:01:17 +0100] "GET /assets/contact.php HTTP/1.1" 404 - "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:64.0) Gecko/20100101 Firefox/64.0"
80.173.xxx.xxx- - [24/Jan/2019:19:01:18 +0100] "GET /assets/contact.php HTTP/1.1" 404 - "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:64.0) Gecko/20100101 Firefox/64.0"
I tried to create new htaccess file in case it was the problem and that is not the problem

I have tried up to 777 permissions and there is no way to boot.

The web is created in html all under a template and in a normal web server it works and in my dedicated server it does not

Let's see if you can help me. Thank you
 
Last edited by a moderator:

cPanelLauren

Product Owner II
Staff member
Nov 14, 2017
13,266
1,301
363
Houston
Hello @jamesdriank

You profile indicates you're a root administrator, because of this I assume you have root access to the server and can login via SSH. If so can, I'd advice you to find the corresponding error in the apache error log and let us know what is output:

Code:
/etc/apache2/logs/error_log
 

jamesdriank

Member
Mar 15, 2013
5
0
1
cPanel Access Level
Root Administrator
Hello @jamesdriank

You profile indicates you're a root administrator, because of this I assume you have root access to the server and can login via SSH. If so can, I'd advice you to find the corresponding error in the apache error log and let us know what is output:

Code:
/etc/apache2/logs/error_log
Hello, it does not let me access as root,

[[email protected] ~]# /etc/apache2/logs/error_log
-bash: /etc/apache2/logs/error_log: Permission denied

[[email protected] ~]# -bash: /etc/apache2/logs/error_log: Permission denied
-bash: -bash:: command not found


I have opened the file with the vi editor and it gives me that data:

[Sun Jan 20 03:23:31.922571 2019] [:error] [pid 25273:tid 47363621357312] [client xx.xx.xx.83:38534] File does not exist: /var/www/html/xmlrpc.php
[Sun Jan 20 03:23:32.132008 2019] [:error] [pid 25303:tid 47363693479680] [client xx.xx.xx.126:32975] File does not exist: /var/www/html/xmlrpc.php
[Sun Jan 20 03:23:32.480146 2019] [:error] [pid 25304:tid 47363621357312] [client xx.xx.xx.189:46682] File does not exist: /var/www/html/xmlrpc.php
[Sun Jan 20 03:23:34.722736 2019] [:error] [pid 25273:tid 47363623458560] [client xx.xx.xx.38:59926] File does not exist: /var/www/html/xmlrpc.php
[Sun Jan 20 03:23:36.428389 2019] [:error] [pid 25303:tid 47363695580928] [client xx.xx.xx.189:50043] File does not exist: /var/www/html/xmlrpc.php
[Sun Jan 20 03:23:36.598938 2019] [:error] [pid 25304:tid 47363623458560] [client xx.xx.xx.126:59860] File does not exist: /var/www/html/xmlrpc.php
[Sun Jan 20 03:23:37.383584 2019] [:error] [pid 25273:tid 47363693479680] [client xx.xx.xx.138:41110] File does not exist: /var/www/html/xmlrpc.php
[Sun Jan 20 03:23:39.390716 2019] [:error] [pid 25303:tid 47363697682176] [client xx.xx.xx.230:56868] File does not exist: /var/www/html/xmlrpc.php
[Sun Jan 20 03:23:39.512697 2019] [:error] [pid 25304:tid 47363693479680] [client xx.xx.xx.210:48992] File does not exist: /var/www/html/xmlrpc.php
[Sun Jan 20 03:23:40.072711 2019] [:error] [pid 25273:tid 47363695580928] [client xx.xx.xx.189:48734] File does not exist: /var/www/html/xmlrpc.php
[Sun Jan 20 03:23:41.626997 2019] [:error] [pid 25303:tid 47363699783424] [client xx.xx.xx.198:53209] File does not exist: /var/www/html/xmlrpc.php
[Sun Jan 20 03:23:41.852993 2019] [:error] [pid 25304:tid 47363695580928] [client xx.xx.xx.83:51071] File does not exist: /var/www/html/xmlrpc.php
[Sun Jan 20 03:23:43.314656 2019] [:error] [pid 25273:tid 47363697682176] [client xx.xx.xx.198:58499] File does not exist: /var/www/html/xmlrpc.php
[Sun Jan 20 03:23:45.949688 2019] [:error] [pid 25303:tid 47363701884672] [client xx.xx.xx.83:58241] File does not exist: /var/www/html/xmlrpc.php
[Sun Jan 20 03:23:46.003163 2019] [:error] [pid 25304:tid 47363697682176] [client xx.xx.xx.126:49898] File does not exist: /var/www/html/xmlrpc.php
[Sun Jan 20 03:23:46.125023 2019] [:error] [pid 25273:tid 47363699783424] [client xx.xx.xx.189:55765] File does not exist: /var/www/html/xmlrpc.php
[Sun Jan 20 03:23:47.098367 2019] [:error] [pid 25303:tid 47363703985920] [client xx.xx.xx.189:41987] File does not exist: /var/www/html/xmlrpc.php
[Sun Jan 20 03:23:47.502328 2019] [:error] [pid 25304:tid 47363699783424] [client xx.xx.xx.198:47106] File does not exist: /var/www/html/xmlrpc.php
[Sun Jan 20 03:23:50.774468 2019] [:error] [pid 25273:tid 47363701884672] [client xx.xx.xx.203:53542] File does not exist: /var/www/html/xmlrpc.php

Thanks
 

cPanelLauren

Product Owner II
Staff member
Nov 14, 2017
13,266
1,301
363
Houston
Hello @jamesdriank


Try this right after the 500 error occurs:

Code:
tail -100 /etc/apache2/logs/error_log
I have no way to know whether or not the errors you're seeing there are related to the issue. As far as i can see it's not going to be related to a 500 error.


Thanks!
 

jamesdriank

Member
Mar 15, 2013
5
0
1
cPanel Access Level
Root Administrator
This is the log with apache when have inserted the code of your propose

Code:
[[email protected] ~]# tail -100 /etc/apache2/logs/error_log
[removed duplicates]                                                                                                                         client IP :36603] File does not exist: /var/www/html/xmlrpc.php
[Mon Jan 28 20:24:17.984099 2019] [:error] [pid 17936:tid 47269336024832] [clien                                                                                                                                             t IP:58864] File does not exist: /var/www/html/xmlrpc.php
 
Last edited by a moderator: