Skip to main content

Apache shows php code instead of executing

Comments

5 comments

  • web-project
    If you do use cPanel you need to select either Apache (php mod) or PHP CGi to process the php files.
    0
  • MarioMerlo
    If you do use cPanel you need to select either Apache (php mod) or PHP CGi to process the php files.

    I use the WHM, it's the global interface of cpanel. I have the ExecCGI activated on the Apache Global Configuration... but nothing changes. All the websites on the Virtual Server shows the code, instead of executing the PHP.
    0
  • Infopro
    I have a VPS with WMH, and today, I don't know why, all the websites I have on that VPS are showing the PHP code

    Assuming you do not have access to run EasyApache 4 yourself, you should probably speak with your WebHost about this. If you do have root access to go here: WebHost Manager "Software "EasyApache 4 You might want to select one of the Available Profiles listed and rebuild Apache properly. Sounds to me like someone did and it didn't go well or was configured incorrectly.
    0
  • MarioMerlo
    Assuming you do not have access to run EasyApache 4 yourself, you should probably speak with your WebHost about this. If you do have root access to go here: WebHost Manager "Software "EasyApache 4 You might want to select one of the Available Profiles listed and rebuild Apache properly. Sounds to me like someone did and it didn't go well or was configured incorrectly.

    Thanks for your answer. I do have access to the EasyApache 4. I've rebuilted the Apache, but it has given me an error: The "/usr/sbin/httpd" command (process 12513) reported error number 1 when it ended. Configuration problem detected on line 249 of file /etc/apache2/conf/httpd.conf.work.DWZumbio: : Syntax error on line 32 of /etc/apache2/conf.d/modsec2.conf: Syntax error on line 27 of /etc/apache2/conf.d/modsec/modsec2.cpanel.conf: Could not open configuration file /etc/apache2/conf.d/modsec_vendor_configs/OWASP3/crs-setup.conf: No such file or directory Any clues?
    0
  • Infopro
    Are the websites back up? Is modsec installed properly?
    0

Please sign in to leave a comment.