Jump to content
lildog

Contribution Tracker

Recommended Posts

Did a fresh reintsall and it all works well (with newest contribution tracker update). I think what is missing in this package is an explanation to those who use it that it ONLY retrieves the updates from the most current posted updates, top 10 or so. So, if you are installing the package and adding your contributions and there was an update, say a week or so ago, it won't find it.

 

This will save a TON of work just knowing that. Perhaps the instructions should update saying this and instructing people to manually flag their contributions as they add them if they need update. Then moving forward it should work.

 

Although at the moment, its NOT finding a currently posted version of AutoBackup Database in Admin...hmmm. Strange.

Edited by carryG

Share this post


Link to post
Share on other sites

Phoecia

 

Sometimes the feed goes down. And contrib tracker can't connect to it. It happens once in awhile. I actually put a line of code that told me each time it was sucessful, just to be sure it was working. When you get this error try going to the feed URL, your browser probably won't be able to connect to it either.

 

lildog

Share this post


Link to post
Share on other sites

Thanks carry_g, that must have been lost in updates. The instructions originally told you to update all of your contributions then install contrib tracker. I will put that in. I will look into AutoBackup Database in Admin problem. No promises, I am not really a php pro, just kinda stumble through.

 

lildog

Share this post


Link to post
Share on other sites

Thanks for the reply, but it was not that. I checked the feed at the time and it was working ok.

I definitly get the error in the fopen and I think its because allow_url_fopen is turned off on my server.

I will look into it tomorrow to use curl to read the feed when a url is passed to the parse function

Share this post


Link to post
Share on other sites

Ok, looked more into it and sorted the problem. I noticed that you already implemented the curl method :)

I just had the FS_CATALOG problem already talked about in this thread.

 

Another thing though, the version of the contrib tracker is set to 1.4 on install...

Share this post


Link to post
Share on other sites

Ah well, and since I was into it, I fixed the display in the admin so it is compatible with Ms2 rc1. With the original from the last version, clikcing on a row would not move the focus to it.

so look for the lines

 

if ($HTTP_GET_VARS['search'] == '') {
  if ( (is_object($sInfo)) && ($admin_quer['contr_id'] == $sInfo->contr_id)) {
.....

 

and replace with

 

 if ($HTTP_GET_VARS['search'] == '') {
  if ( (is_object($sInfo)) && ($admin_quer['contr_id'] == $sInfo->contr_id)) {
	echo ' <tr id="defaultSelected" class="dataTableRowSelected" onmouseover="rowOverEffect(this)" onmouseout="rowOutEffect(this)" onclick="document.location.href=\'' . tep_href_link(FILENAME_CONTRIB_TRACKER, 'sID=' . $HTTP_GET_VARS['sID'] . '&action=edit') . '\'">' . "\n";
  } else {
	echo ' <tr class="dataTableRow" onmouseover="rowOverEffect(this)" onmouseout="rowOutEffect(this)" onclick="document.location.href=\'' . tep_href_link(FILENAME_CONTRIB_TRACKER, 'sID=' . $admin_quer['contr_id']) . '\'">' . "\n";
  }
  } else {
$searchresult_query_query_raw = "select contr_id from " . TABLE_CONTRIB_TRACKER . " order by " . $order_it_by . " ";
$searchresult_query_query = tep_db_query($searchresult_query_query_raw);
$searchresult_page= round($searchresult_query_query_numrows / MAX_DISPLAY_SEARCH_RESULTS)-1;

// INSERT CONTRIB NAMES INTO PAGE 
  if ( (is_object($sInfo)) && ($admin_quer['contr_id'] == $sInfo->contr_id)) {
	echo ' <tr id="defaultSelected" class="dataTableRowSelected" onmouseover="rowOverEffect(this)" onmouseout="rowOutEffect(this)" onclick="document.location.href=\'' . tep_href_link(FILENAME_CONTRIB_TRACKER, 'sID=' . $HTTP_GET_VARS['sID'] . '&action=edit') . '\'">' . "\n";
  } else {
	echo ' <tr class="dataTableRow" onmouseover="rowOverEffect(this)" onmouseout="rowOutEffect(this)" onclick="document.location.href=\'' . tep_href_link(FILENAME_CONTRIB_TRACKER, 'sID=' . $admin_quer['contr_id']) . '\'">' . "\n";
  }

 

You will also need to edit your admin/includes/stylesheet.css

 

.dataTableRowOver { background-color: #FFFFFF; cursor: pointer; cursor: auto; }

to

.dataTableRowOver { background-color: #FFFFFF; cursor: pointer; cursor: hand; }

Share this post


Link to post
Share on other sites

Phocea, I have not had a chance to implement your code fix, as soon as I do I will post an update. Did you fix your cannot open XML error? if so what did you do? When I removed my sucess message I get the xml error again.

 

lildog

Share this post


Link to post
Share on other sites

Anyone know how to put the cronjob in plesk under crontab?

 

I put this in command: php -q httpdocs/contrib_tracker.php

 

as well as variations showing /var/www/vhosts/mysite/httpdocs/contrib_tracker.php.

 

There are no errors showing but its not running, any suggestions?

Share this post


Link to post
Share on other sites

lildog ..this is what I did :

Ok, looked more into it and sorted the problem. I noticed that you already implemented the curl method :)

I just had the FS_CATALOG problem already talked about in this thread.

 

Another thing though, the version of the contrib tracker is set to 1.4 on install...

 

No rush for the other fix, its only cosmetic after all

Share this post


Link to post
Share on other sites
Anyone know how to put the cronjob in plesk under crontab?

 

I put this in command: php -q httpdocs/contrib_tracker.php

 

as well as variations showing /var/www/vhosts/mysite/httpdocs/contrib_tracker.php.

 

There are no errors showing but its not running, any suggestions?

 

 

THIS IS ERROR I AM SEEING: PHP Warning: require(includes/configure.php): failed to open stream: No such file or directory in /var/www/vhosts/MYSITE.com/httpdocs/includes/application_top.php on line 28 PHP Warning: require(includes/configure.php): failed to open stream: No such file or directory in /var/www/vhosts/MYSITE.com/httpdocs/includes/application_top.php on line 28 PHP Fatal error: require(): Failed opening required 'includes/configure.php' (include_path='.:.:.:') in /var/www/vhosts/MYSITE.com/httpdocs/includes/application_top.php on line 28

 

 

Line 28 = require('includes/configure.php');

Edited by carryG

Share this post


Link to post
Share on other sites

I am working on an update that includes Phocea's fixes and was wondering if anyone would like to be able access a link to the contributions support forum thread, I can never find them when I need them. Let me know.....

 

lildog

Share this post


Link to post
Share on other sites

I do not have fopen enable, but curl is.

 

When loading up the admin, I get the 'could not open XML input' error.

 

The rsscache directory has the correct permissions, and the paths in configure.php are all correct. I am using version 1.6.6b of the contribution.

 

Does anything special need to be done for curl to work?

 

Thanks

Share this post


Link to post
Share on other sites

The contribution was working yesterday, then I did some php.ini bullet-proofing on the server. One of these steps caused the error:

 

Contribution Tracker could not open XML input

 

disable_functions =exec,passthru,shell_exec,system,proc_open,popen,curl_exec,curl_multi_exec,parse

_ini_file,show_source

 

 

safe_mode = On

safe_mode_gid = Off

expose_php = Off

 

Will try to narrow it down today.

Edited by carryG

Share this post


Link to post
Share on other sites

I found out that in php.ini

 

changing allow_url_fopen = On

to

allow_url_fopen = Off (which is recommended as a security issue)

 

wrecks the contrib_tracker.php function.

 

Any suggestions on a workaround?

Share this post


Link to post
Share on other sites
anyone ever find out how to add cron job using plesk for this?

 

 

I even tried to do

php /var/www/vhosts/website/httpdocs/contrib_tracker.php cron

 

and

 

php -q /var/www/vhosts/website/httpdocs/contrib_tracker.php cron

 

Nether will work, the error I am getting is:

 

PHP Warning: require(includes/configure.php): failed to open stream: No such file or directory in /var/www/vhosts/website.com/httpdocs/includes/application_top.php on line 29 PHP Warning: require(includes/configure.php): failed to open stream: No such file or directory in /var/www/vhosts/website.com/httpdocs/includes/application_top.php on line 29 PHP Fatal error: require(): Failed opening required 'includes/configure.php' (include_path='.:.:.:') in /var/www/vhosts/website.com/httpdocs/includes/application_top.php on line 29

 

Any php wizards now what is stopping this cron job from working besides my skill?

Share this post


Link to post
Share on other sites

I am not sure if I added phoeca's fixes.....if not I will be posting another update soon. Oh, and add a link to the support threads.......

 

lildog

Share this post


Link to post
Share on other sites

carryG....Sorry I know almost nothing about cron so I can't help much. I have an online service that loads the page every so often.

 

What happens if you point your browser to catalog/contrib_tracker.php?

File permissions is my only guess.

 

lildog

Share this post


Link to post
Share on other sites

This is an old topic but the newest version will now check for updates farther than the latst 10 or so. Only manually though, you have to click a button.

 

 

Did a fresh reintsall and it all works well (with newest contribution tracker update). I think what is missing in this package is an explanation to those who use it that it ONLY retrieves the updates from the most current posted updates, top 10 or so. So, if you are installing the package and adding your contributions and there was an update, say a week or so ago, it won't find it.

 

This will save a TON of work just knowing that. Perhaps the instructions should update saying this and instructing people to manually flag their contributions as they add them if they need update. Then moving forward it should work.

 

Although at the moment, its NOT finding a currently posted version of AutoBackup Database in Admin...hmmm. Strange.

Share this post


Link to post
Share on other sites

You got me?!??@ It was recommended to me as a security issue to use fopen to transfer the page to your site then read it. I will look into it when I get the time.

 

lildog

 

 

 

I found out that in php.ini

 

changing allow_url_fopen = On

to

allow_url_fopen = Off (which is recommended as a security issue)

 

wrecks the contrib_tracker.php function.

 

Any suggestions on a workaround?

Share this post


Link to post
Share on other sites

Yup, having that set that way is a security issue, see http://phpsec.org/projects/phpsecinfo/test..._url_fopen.html

 

I tried to do a cron job but I guess this step is prevented. Haven't newest and latest release of contrib tracker, updated my cart with 4 pages of our mods (lol, whew!). Manually contrib_tracker works, but who wants to do that everyday?

 

Trying to find a way to do it - in house. How are you doing it, which site are you using to load it?

 

C

Share this post


Link to post
Share on other sites

carry,

I use uptime alal I think. There is a link in the install docs. It is kind of a cron job. You tell it your url to catalog/contrib tracker and it 'visits' the url at set intervals thus activating the update script. No muss no fuss. I think mine is set to every hours or something. I am right in the middle of building a new shop but will look into the security bug you mentioned when I get a chance. Thanks for all of your input too and I also appologize my tardy replies.

 

lildog

Share this post


Link to post
Share on other sites

I am working on one last update for now to add support thread urls in. Except for the security fix, is there anything that needs to be added in or is not working correctly? Any requests?

 

lildog

Share this post


Link to post
Share on other sites

carryg,

My previous post was wrong. cURL was recommended to me as a safer way to get remote data, and I believe it is even more safe the way contrib tracker does it, by writing a temp file to your server and reading that. Contrib tracker just uses url_fopen as a last resort. cURL is definitely prefered I agree. But I think I was getting requests from people that didn't have cURL so I added it in. I should probably add a note into the install docs that fopen is less safe. I would be open to suggestions if you have a fix. If you have cURL enabled I don't think fopen will/can be used.

 

lildog

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×