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.

SOLVED PHP Handlers

Discussion in 'EasyApache' started by ateks, Dec 7, 2016.

Tags:
  1. ateks

    ateks Registered

    Joined:
    Jun 16, 2014
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    I've previously been processing CSS and SVG files with PHP to add variables. This was all working great when I was using EasyApache3 and PHP 5.6. I had the following code in a .htaccess file and it worked nicely: AddHandler application/x-httpd-php5 .css .svg

    Now I've updated to EasyApache4 and decided to use PHP 7.0. I've added the following code to the same .htaccess file but it doesn't work: AddHandler application/x-httpd-php70 .css .svg

    How can I get my CSS and SVG files to be handled by PHP as before? Thanks
     
  2. rpvw

    rpvw Well-Known Member

    Joined:
    Jul 18, 2013
    Messages:
    329
    Likes Received:
    94
    Trophy Points:
    28
    Location:
    Spain
    cPanel Access Level:
    Root Administrator
    You could try the following:
    Code:
    AddHandler application/x-httpd-ea-php70 .css .svg
     
    cPanelMichael and ateks like this.
  3. ateks

    ateks Registered

    Joined:
    Jun 16, 2014
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    Well... what can I say. You're a genius! It works like a charm. Thank you very much!
     
  4. rpvw

    rpvw Well-Known Member

    Joined:
    Jul 18, 2013
    Messages:
    329
    Likes Received:
    94
    Trophy Points:
    28
    Location:
    Spain
    cPanel Access Level:
    Root Administrator
    Your very welcome :-D
     
  5. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    38,658
    Likes Received:
    1,425
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Hello,

    I'm happy to see the issue is now resolved.

    Thanks!
     
Loading...

Share This Page