Skip to main content

Apache end of script issue

Comments

20 comments

  • Infopro
    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.
    0
  • Neil_948
    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.
    0
  • Infopro
    Do you have root access to this server? Can you log into WebHost Manager using root as your username?
    0
  • Neil_948
    Do you have root access to this server? Can you log into WebHost Manager using root as your username?

    yes Background info:- My own personal server. Root Access Global Access. O/S centos7.0. Cpanel v66.0.22
    0
  • Infopro
    Which EasyAppache Profile did you select when updating? WebHost Manager "Software "EasyApache 4
    0
  • Neil_948
    Which EasyAppache Profile did you select when updating? WebHost Manager "Software "EasyApache 4

    Apache 2.4 is the currently installed one
    0
  • Infopro
    They're all Apache 2.4. :)
    0
  • Neil_948
    They're all Apache 2.4. :)

    Sorry misread your question profile currently selected is:- All PHP Options + OpCache
    0
  • rpvw
    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 :

    ......... then call this file in your browser eg
    0
  • Neil_948
    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)
    0
  • rpvw
    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
    0
  • Neil_948
    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.
    0
  • rpvw
    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
    0
  • Neil_948
    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.
    0
  • Neil_948
    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:
    0
  • rpvw
    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.
    0
  • Neil_948
    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:-
    [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.
    0
  • rpvw
    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 with the actual user for that account.
    find /home//public_html/ -type f -exec chmod 644 {} \; find /home//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 :
    0
  • Neil_948
    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 with the actual user for that account.
    find /home//public_html/ -type f -exec chmod 644 {} \; find /home//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 :
    0
  • rpvw
    Thanks for the update. Glad you got it working :-D
    0

Please sign in to leave a comment.