Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Apache shows php code instead of executing

Discussion in 'General Discussion' started by MarioMerlo, Jan 9, 2018.

  1. MarioMerlo

    MarioMerlo Registered

    Joined:
    Jan 9, 2018
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Argentina
    cPanel Access Level:
    Reseller Owner
    Hi, I'm new at this.

    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, instead of executing it. Any Ideas?
    Thanks.
     
  2. web-project

    web-project Well-Known Member

    Joined:
    Nov 23, 2007
    Messages:
    52
    Likes Received:
    4
    Trophy Points:
    58
    If you do use cPanel you need to select either Apache (php mod) or PHP CGi to process the php files.
     
  3. MarioMerlo

    MarioMerlo Registered

    Joined:
    Jan 9, 2018
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Argentina
    cPanel Access Level:
    Reseller Owner
    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.
     
  4. Infopro

    Infopro cPanel Sr. Product Evangelist
    Staff Member

    Joined:
    May 20, 2003
    Messages:
    16,007
    Likes Received:
    340
    Trophy Points:
    433
    Location:
    Pennsylvania
    cPanel Access Level:
    Root Administrator
    Twitter:
    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.
     
  5. MarioMerlo

    MarioMerlo Registered

    Joined:
    Jan 9, 2018
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Argentina
    cPanel Access Level:
    Reseller Owner

    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?
     
  6. Infopro

    Infopro cPanel Sr. Product Evangelist
    Staff Member

    Joined:
    May 20, 2003
    Messages:
    16,007
    Likes Received:
    340
    Trophy Points:
    433
    Location:
    Pennsylvania
    cPanel Access Level:
    Root Administrator
    Twitter:
    Are the websites back up? Is modsec installed properly?
     
Loading...

Share This Page