1. Please take a little time for this simple survey! Thank you for participating!
    Dismiss Notice
  2. Dear Pleskians, please read this carefully! New attachments and other rules Thank you!
    Dismiss Notice
  3. Dear Pleskians, I really hope that you will share your opinion in this Special topic for chatter about Plesk in the Clouds. Thank you!
    Dismiss Notice

webstats application/x-httpd-php

Discussion in 'Plesk for Linux - 8.x and Older' started by poobaah, Apr 3, 2005.

  1. poobaah

    poobaah Guest


    I have a rather very strange problem with webstat on all my hosted sites.

    I changed the file /etc/httpd/conf/httpd.conf by adding the line:

    AddType application/x-httpd-php .php .htm .html

    I did this to allow the parsing of php in html files, however when I try to access
    http://my_domain.com/plesk-stat/webstat it wants to download a file rather than displaying the stats.

    I am not sure if the 2 are related, but it is an annoying problem and after hours of googling I still am no closer to an answer.

    Any ideas would be greatly appreciated.

  2. poobaah

    poobaah Guest

    This seems to be a problem with mime types, although I am not sure how to resolve it.
  3. technicals

    technicals Guest

    I'm having the same problem.

    I'm having the same problem. None of the standard fixes are working. It's like PHP isn't picking up on the type... could this be some customization of apache or php, or maybe just a strange configuration?

    I'll be looking through the httpd.conf (and friends) and I'll let you know if find anything useful. This problem is very perplexing.
  4. poobaah

    poobaah Guest

    I also posted this problem as a ticket with the hosting company I use, and the techs at sw-soft ended up re-installing webalizer and simply removing the directive "AddType application/x-httpd-php .php .php3 .html" that I added to httpd.conf.

    In other words they put it back to the original setup. It seems I have to add the .php extension to any pages I want parsed as php. I guess this is more efficient anyway.

    Hope this helps.
  5. alfmanuel

    alfmanuel Guest

    A Better Way :)

    Probably this is what you mean.
    On my server I have many domains, i want to execute php's in the webstat directory, so add to the end of your httpd.conf
    (apache's conf, wherever it is)

    <Directory "/home/httpd/vhosts/*/statistics/webstat">
    Options Indexes MultiViews ExecCGI
    Order allow,deny
    Allow from all
    <IfModule sapi_apache2.c>
    php_admin_flag engine on
    php_admin_value open_basedir "/home/httpd/vhosts/"
    AddType application/x-httpd-php .html
  6. smosh

    smosh Guest

    Well, that's how it's supposed to work, but for some reason I can't pinpoint, PHP just isn't processing files with .html exensions, no matter what. In short, if the directive:

    AddType application/x-httpd-php .html

    is in there anywhere (regardless of context, so long as it's applied), the browser asks me to download the file (because the type is still application/x-httpd-php). When I do, I see php source. I understand how disgustingly wrong this is, but that's the behaviour. I can't find what's causing it.

    I suspect that either the PHP just doesn't care about the MIME type, or the apache2 config is so spaghettied that the PHP phase is long over by the time the directive is applied. The latter is the reason I haven't been able to really make sense of it.
  7. alfmanuel

    alfmanuel Guest

    hi there...

    that sound's funny. I'm working on SuSE 9.1 with Plesk 7.5.2 and it work's problem-less ;)

    Many of our sites (PHP coded pages) use the extension .html for seach engines like google, and also in webstat directory we need the php functions for our special scripts.

    If I have any idea how to solve this, i'll post it here.

    kind regards from Austria
  8. jkobilka

    jkobilka Guest

    I'm having the exact same problem on my server; the only problem is several of the sites we host use PHP in a number of .html documents, and I don't exactly have the option of converting everything to .php.

    I didn't really understand alfmanuel's suggestion... any more ideas? Hopefully this'll get bumped so someone will see it again...
  9. alfmanuel

    alfmanuel Guest

    hi there.

    mhm so the line is in your .htaccess file ?

    if that's all correct you have to tell apache that htaccess is allowed to configure this feature... ;)

    kind regards from austria