Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Contribution Tracker


lildog

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
Link to comment
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

Link to comment
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

Link to comment
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

Link to comment
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...

Link to comment
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; }

Link to comment
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

Link to comment
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?

Link to comment
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

Link to comment
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
Link to comment
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

Link to comment
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

Link to comment
Share on other sites

  • 1 month later...

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
Link to comment
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?

Link to comment
Share on other sites

  • 1 month later...
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?

Link to comment
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

Link to comment
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.

Link to comment
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?

Link to comment
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

Link to comment
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

Link to comment
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

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...