Neil_948

Member
Sep 15, 2017
11
0
1
Uk
cPanel Access Level
Root Administrator
Please could someone help me get my head around these error logs:-
Code:
Fri Sep 15 18:03:51.978010 2017] [mpm_worker:notice] [pid 28839:tid 140297470605440] AH00297: SIGUSR1 received.  Doing graceful restart
[Fri Sep 15 18:03:52.188419 2017] [mpm_worker:notice] [pid 28839:tid 140297470605440] AH00292: Apache/2.4.27 (cPanel) OpenSSL/1.0.2k mod_bwlimited/1.4 configured -- resuming normal operations
[Fri Sep 15 18:03:52.188470 2017] [core:notice] [pid 28839:tid 140297470605440] AH00094: Command line: '/usr/sbin/httpd'
[Fri Sep 15 18:11:38.817270 2017] [cgid:error] [pid 30253:tid 140297187096320] [client 185.69.145.145:22951] End of script output before headers: install.php
[Fri Sep 15 18:13:49.652258 2017] [cgid:error] [pid 30256:tid 140297170310912] [client 185.69.145.145:37266] End of script output before headers: update.php
[Fri Sep 15 18:17:01.554943 2017] [cgid:error] [pid 30255:tid 140297052813056] [client 185.69.145.145:44451] End of script output before headers: install.php
[Fri Sep 15 18:43:46.465794 2017] [cgid:error] [pid 30256:tid 140297119954688] [client 140.250.92.179:63233] AH01264: script not found or unable to stat: /var/www/html/hedwig.cgi
[Fri Sep 15 20:00:38.058208 2017] [mpm_worker:notice] [pid 28839:tid 140297470605440] AH00297: SIGUSR1 received.  Doing graceful restart
[Fri Sep 15 20:00:38.160441 2017] [mpm_worker:notice] [pid 28839:tid 140297470605440] AH00292: Apache/2.4.27 (cPanel) OpenSSL/1.0.2k mod_bwlimited/1.4 configured -- resuming normal operations
[Fri Sep 15 20:00:38.160477 2017] [core:notice] [pid 28839:tid 140297470605440] AH00094: Command line: '/usr/sbin/httpd'
What I have been doing is trying to install whmcs but get a general 500 error on output so managed to grab the error logs above via ssh.

Looking like apache issue hence why I am posting here (a standard index.html file does resolve on a 200).
 
Last edited by a moderator:

Neil_948

Member
Sep 15, 2017
11
0
1
Uk
cPanel Access Level
Root Administrator
Did your server pass the check the script runs before installation? You might try re-uploading the entire WHMCS directory again to be sure all files are present.
I have uploaded the files a number of times to ensure all the files are there intact, I am not getting to the pre-installation checks as I am presuming this is the what is causing the 500 internal server error.

It was originally just white screening until i realised that I had not installed .php as one of the handlers this is where I then started to get 500 server errors with no output logs in Cpanel admin or reseller area's.
 

rpvw

Well-Known Member
Jul 18, 2013
1,100
475
113
UK
cPanel Access Level
Root Administrator
Hi Neil,

Let's for a moment assume your WHMCS file-set has been uploaded without errors and with the correct file permissions etc etc.

In order to first of all, exclude the actual EA4 PHP extensions and configuration, I suggest you use the cPanel File manager for the account you are trying to install WHMCS and create a file (in the ~/public_html folder) called something like phpinfo.php and then open it for editing and paste the following code into the file :
Code:
<?php

// Show all information, defaults to INFO_ALL
phpinfo();

?>
......... then call this file in your browser eg http://yourdomainname.tld/phpinfo.php
You should get a report of all your PHP environment that you can check against the WHMCS requirements and correct/add/remove whatever may be necessary using the WHM >> Software >> EasyApache4 >> Customize UI

Hope this helps
 

Neil_948

Member
Sep 15, 2017
11
0
1
Uk
cPanel Access Level
Root Administrator
Thanks rpvw

ok, So this has now got interesting the fault seems to be with parsing .php extensions causing the 500.

As creating the phpinfo.php file returns the 500 error but .html, .xml. return the page and .ini returns forbidden so clearly Apache is working but php isn't.

Any ideas?

All folders are set to 0755 with exception to ones that are global which are set to 0777
All files are set to 0644 with exception to the configuration.php script which is 0777 (will be changed to 0644 after install)
 
Last edited:

rpvw

Well-Known Member
Jul 18, 2013
1,100
475
113
UK
cPanel Access Level
Root Administrator
First thing I would check is if there was anything in a htaccess file that might be causing you problems. (You could try and rename this to htaccess.bk for a moment and see if it makes any difference - don't forget to change it back after testing)

Next I would see if there were any clues in the cPanel and Apache error logs for that domain.

If nothing works, consider rebuilding EA4 with a pre-configured profile that is closest to the requirements you need for WHMCS - you can always add/remove/configure it later once you have proved that PHP is working for you.

Hope this helps
 

Neil_948

Member
Sep 15, 2017
11
0
1
Uk
cPanel Access Level
Root Administrator
First thing I would check is if there was anything in a htaccess file that might be causing you problems. (You could try and rename this to htaccess.bk for a moment and see if it makes any difference - don't forget to change it back after testing)

Next I would see if there were any clues in the cPanel and Apache error logs for that domain.

If nothing works, consider rebuilding EA4 with a pre-configured profile that is closest to the requirements you need for WHMCS - you can always add/remove/configure it later once you have proved that PHP is working for you.

Hope this helps
php is now working I didn't realise it needed to be enabled for reseller accounts within the config panel.

unfortunately though whmcs is now just white screening without any error logs so will try re-uploading all the files again.
 

rpvw

Well-Known Member
Jul 18, 2013
1,100
475
113
UK
cPanel Access Level
Root Administrator
Ah well ...... you have suddenly introduced a new dynamic I have no experience with - I don't have re-sellers and I don't know anything about setup or configuration for re-sellers.

Time for you to open a support ticket to the cPanel Gods, while I relax in the bottom of a bottle of Whiskey :-D
 

Neil_948

Member
Sep 15, 2017
11
0
1
Uk
cPanel Access Level
Root Administrator
Ah well ...... you have suddenly introduced a new dynamic I have no experience with - I don't have re-sellers and I don't know anything about setup or configuration for re-sellers.

Time for you to open a support ticket to the cPanel Gods, while I relax in the bottom of a bottle of Whiskey :-D
no problem rpvw,

looks like we have made some substantial progress as I have got new errors coming through now.
 

Neil_948

Member
Sep 15, 2017
11
0
1
Uk
cPanel Access Level
Root Administrator
So I have been quiet as I believed the issue actually may have been with how cPanel installed on the system to start with so I have re-formatted the hard drives and started all over again which does seem to have resolved at least one issue that previously I had to SSH to get any error logs this time i can pull them straight from apache error log. I have restored everything back to where i was previously but have come back up against the dreaded 500 internal server error with an output of [Sun Sep 17 09:46:09.129766 2017] [cgi:error] [pid 16713] [client xx.xxx.xx.xx:1025] AH01215: (13)Permission denied: exec of '/home/xxxxxxx/public_html/whmcs/index.php' failed: /home/neil948/public_html/whmcs/index.php, referer: https://xx.xxxxxxxxx.xx:2083/cpsess...ex.live.php?act=software&soft=144&tab=install

any ideas where to start looking.

(I have a feeling this has got to do with chmod)
 

rpvw

Well-Known Member
Jul 18, 2013
1,100
475
113
UK
cPanel Access Level
Root Administrator
I am really struggling with understanding why you are having such an issue getting a simple php script to run on your server. If every cPanel install had the same problems, these forums would be full of users screaming at cPanel, and they would be going broke (please tell us you aren't cPanel ? )

Anyway, I still suggest you open a support ticket to them, or at the very least post the full spec and versions of your server, and your EA4 configuration, and any other settings you have made, and what steps you have done to reproduce this issue, so the cPanel Gods can make an informed opinion as to what may be the problem.
 

Neil_948

Member
Sep 15, 2017
11
0
1
Uk
cPanel Access Level
Root Administrator
I am really struggling with understanding why you are having such an issue getting a simple php script to run on your server. If every cPanel install had the same problems, these forums would be full of users screaming at cPanel, and they would be going broke (please tell us you aren't cPanel ? )

Anyway, I still suggest you open a support ticket to them, or at the very least post the full spec and versions of your server, and your EA4 configuration, and any other settings you have made, and what steps you have done to reproduce this issue, so the cPanel Gods can make an informed opinion as to what may be the problem.
I am aware this is more like something that I have done rather than an actual issue with cPanel, I never intended to suggest otherwise and after more testing can confirm that this is nothing to do with parsing php as I have installed zencart in a sub directory and this parsed without issue showing full pages.

Apache logs are suggesting it could be a permission based issue:-

Code:
[Sun Sep 17 19:19:31.786671 2017] [cgi:error] [pid 27739] [client IP:1024] AH01215: (13)Permission denied: exec of '/home/user/public_html/index.php' failed: /home/user/public_html/index.php
[Sun Sep 17 19:17:49.369686 2017] [cgi:error] [pid 27636] [client IP:1024] AH01215: (13)Permission denied: exec of '/home/user/public_html/index.php' failed: /home/user/public_html/index.php
[Sun Sep 17 19:16:44.399634 2017] [cgi:error] [pid 27634] [client IP:1024] AH01215: (13)Permission denied: exec of '/home/user/public_html/index.php' failed: /home/user/public_html/index.php
[Sun Sep 17 19:16:19.557679 2017] [cgi:error] [pid 27638] [client IP:1024] AH01215: (13)Permission denied: exec of '/home/user/public_html/index.php' failed: /home/user/public_html/index.php
[Sun Sep 17 19:15:38.269483 2017] [cgi:error] [pid 27635] [client IP:1024] AH01215: (13)Permission denied: exec of '/home/user/public_html/index.php' failed: /home/user/public_html/index.php
The permissions are:-
Files 755
scripts 644
templates_c, downloads, and attachments 777.
 

rpvw

Well-Known Member
Jul 18, 2013
1,100
475
113
UK
cPanel Access Level
Root Administrator
My installation of WHMCS has ALL the folders at 0755 and ALL the files at 0644 with the exception of the configuration.php file that ends up being 0444 after the installation has completed.

Here is how I usually correct all permissions for a site: Run the following commands in a shell separately, replacing the <cpuser> with the actual user for that account.
Code:
find /home/<cpuser>/public_html/ -type f -exec chmod 644 {} \;

find /home/<cpuser>/public_html/* -type d -exec chmod 755 {} \;
And for good measure, you probably want the /public_html folder itself at 750


My WHMCS is running on PHP 7.0 using lsapi as the PHP handler (Cloudlinux) with FPM disabled.
I have also used suphp as the PHP Handlers previously without issues.

If you are using PHP + suEXEC, you may find this documentation helpful : Configure PHP and suEXEC - Version 66 Documentation - cPanel Documentation


Hope this helps.
 
Last edited:

Neil_948

Member
Sep 15, 2017
11
0
1
Uk
cPanel Access Level
Root Administrator
My installation of WHMCS has ALL the folders at 0755 and ALL the files at 0644 with the exception of the configuration.php file that ends up being 0444 after the installation has completed.

Here is how I usually correct all permissions for a site: Run the following commands in a shell separately, replacing the <cpuser> with the actual user for that account.
Code:
find /home/<cpuser>/public_html/ -type f -exec chmod 644 {} \;

find /home/<cpuser>/public_html/* -type d -exec chmod 755 {} \;
And for good measure, you probably want the /public_html folder itself at 750


My WHMCS is running on PHP 7.0 using lsapi as the PHP handler (Cloudlinux) with FPM disabled.
I have also used suphp as the PHP Handlers previously without issues.

If you are using PHP + suEXEC, you may find this documentation helpful : Configure PHP and suEXEC - Version 66 Documentation - cPanel Documentation


Hope this helps.
yeah certainly looks like that was the issue I went to the gods last night and that was the command the used on the SSH in his summary and everything started working instantly.