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.

XML as PHP

Discussion in 'Migrate to cPanel' started by PHPEcono, Sep 26, 2011.

  1. PHPEcono

    PHPEcono Active Member

    Joined:
    Apr 3, 2006
    Messages:
    29
    Likes Received:
    0
    Trophy Points:
    0
    Hey guys i recently migrated 304 websites from my plesk server (Apache 2.2.3, PHP 5.1.6) to my Cpanel server (Apache 2.0.64, PHP 4.4.7 & PHP 5.2.9) and i got a strange error with a few website that use to work fine ... What i understand is that those websites has flash plugins using XML files to load in the data. Now the problem is that the webmasters used an htaccess hack to rander the XML files as if it was a PHP file using this line of code:

    AddType application/x-httpd-php .php .xml

    The problem is that for some reason this line of code stoped working and the PHP is put up in clear texte inside the XML file causing the flash plugin to crash.
    At first i thought it was a missing apache module. So i installed Mime Magic but that did not change a thing.

    An other weird thing abbout this is that the line AddType code is not returning a server error 500 ...

    I tryed upgrading to apache 2.2 even thought it's not recomended with PHP4 and that also did not change a thing.

    /http://youproud.com/config.xml See the PHP?

    Any help would be appreciated. Tx :)
     
    #1 PHPEcono, Sep 26, 2011
    Last edited: Sep 26, 2011
  2. JeffP.

    JeffP. Well-Known Member

    Joined:
    Sep 28, 2010
    Messages:
    164
    Likes Received:
    10
    Trophy Points:
    18
    Hi PHPEcono,

    Please try using "AddHandler" instead, and since you're using PHP 5, please try specifying that as well. I believe the line would look like this:

    Code:
    AddHandler application/x-httpd-php5 .php .xml
    I apologize for the delayed response. Please let us know if this helps.

    Thanks!
     

Share This Page