PDA

View Full Version : .htaccess, php value, auto_append_file



Speedy_B
06-08-2008, 12:17 PM
Hello,
I have search all over the internet for this problem. Everybody has this problem....but no solutions yet.
I have bbclone installed on my server. Now instead of adding the count code to each webpage, they offer the following code to be placed inside the .htaccess file so that each page on the server is counted with each hit:

<FilesMatch "\.(php)$">
php_value auto_append_file "/home2/*******/public_html/bbclone/count.php"
</FilesMatch>
<FilesMatch "\.(html?)$">
php_value auto_append_file "/home2/*******/public_html/bbclone/count.php"
</FilesMatch>

Thus this counts all php and html pages. Once saved, I get that awful 500 (server has made a boo boo) error. :eek: If I comment it out..no error.
Is that coding wrong?

RDM
06-08-2008, 12:47 PM
You can't have the php_value auto_append_file in the htaccess file on hostmonster.

The only way to do this is edit the php.ini file.

Speedy_B
06-08-2008, 12:59 PM
Thanks
I saw the
auto_amend_file=
in the php.ini
So how can I add the block of code to the php.ini file so that every html and php page on the server is counted?
BTW...the count.php code is:

<?php
define("_BBCLONE_DIR", "bbclone/");
define("COUNTER", _BBCLONE_DIR."mark_page.php");
if (is_readable(COUNTER)) include_once(COUNTER);
?>

If I add

auto_amend_file= "/home2/*******/public_html/bbclone/count.php";
wouldn't that just count php pages?