Oops, my fault. When adding that to the page, I accidentally stripped out a </script> tag. Fixed that, and now what I get is the include in text at the top of the page.
Any ideas?
Oops, my fault. When adding that to the page, I accidentally stripped out a </script> tag. Fixed that, and now what I get is the include in text at the top of the page.
Any ideas?
include("/your/path/to/file/axs.php")Originally Posted by Chris
at the top of the page in just plain text (but with the correct path filled in)
It's like the page is just reading it as text instead of some kind of include. I did make a file with the code at the top of this thread and called it axs.php
Well I don't know how IPB works on the backend, but with vbulletin I just copy the contents of the file and paste it directly into the php_include_start field of the admin template editor.
I assume that your include statements has <? ?> around it?
I'm guessing it's as Chris says, you forgot to enclose the statement in <? ... ?> .
Also remember to put a semicolon at the end of the include statement. The whole thing would look like this:
<?
include("/your/path/to/file/axs.php");
?>
And of course, you'll need to change "/your/path/to/file/axs.php" to the correct path to the file on your server.
I think you and Chris are guessing right. I'm a copy and paste PHP wizard, but I did wonder about that (since I've copied and pasted so much PHP) and tried adding <?path/axs.php but I closed it with a simple >.Originally Posted by Westech
I'll go try your code, and thank you!
Well, the good news is that putting in the correct code worked in that it no longer appears as a line of text.
The bad news is that it's not logging anything. I did switch my axs to log my visits and nothing. I changed the code back to the javascript and it started logging again.
I've double checked my paths. I had put the new axs.php file into the root directory. Should it go into the axs folder in the cgi-bin? I also tried chmodding the file to 777 (default was 644).
axs.php doesn't need to be 777, it isn't writing to itself.
make sure the log file patch is correct. If you put the axs.php file in the same directory has the log file you shouldn't (i think) have to include the full path, just "log.txt", so try that.
Hi Guys
I am using this php module with axs, to log
php forum hits, it seems bots are causing this error
8: Undefined index: HTTP_REFERER
Line ==>11: $AXSFrom = $_SERVER['HTTP_REFERER'];
also this error as well
8: Undefined index: axs_no_log
Line ==>3: if ($_COOKIE['axs_no_log'] != "1") {
is there something I can do to correct this?
I am using the exact code above
I didn't change anything.
Thanks
Sonny D
Last edited by Sonnyd; 06-20-2009 at 09:49 PM.
Problem Fixed
Changed first line to
if (isset($_COOKIE['axs_no_log']) && $_COOKIE['axs_no_log'] != "1") {
Replaced the following
Code:$AXSHTTP_USER_AGENT = $_SERVER['HTTP_USER_AGENT']; $AXSFrom = $_SERVER['HTTP_REFERER'];
With the following
Hope this helps someoneCode:if (isset($_SERVER['HTTP_REFERER'])) { $AXSFrom = $_SERVER['HTTP_REFERER']; } else { $AXSFrom = "User Agent did not provide this value"; }
SonnyD
Bookmarks