Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Reciprocal Links Checker


Recommended Posts

I have installed both the Links Manager For OSC v0.20and the Links Manager - Reciprocal Links Checker

 

When submitting the Check link button, I get the following error msg

Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in c:\myfilename\catalog\admin\checklinks.php on line 46
Sorry, no records were found!

 

I have about 132 links all in different categories. So there are links stored in the db.

 

Anyone know what this msg means. Newbie here. B) Here is my checklinks.php code

<?php
/*
 $Id: checklinks.php, v0.1 2003/06/22 Exp $

 Links Manager Checker for OSC v0.2

 osCommerce, Open Source E-Commerce Solutions
 http://www.oscommerce.com
 
 Addition to VJ's Links Manager Contribution
 Written by Graeme Conkie

 Released under the GNU General Public License
*/

 require('includes/application_top.php');


?>
<!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN">
<html <?php echo HTML_PARAMS; ?>>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=<?php echo CHARSET; ?>">
<title><?php echo 'Reciprocal Links Checker'; ?></title>
<link rel="stylesheet" type="text/css" href="includes/stylesheet.css">
<script language="javascript" src="includes/general.js"></script>

</head>
<body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0" bgcolor="#FFFFFF" onload="SetFocus();">
<!-- header //-->
<?php require(DIR_WS_INCLUDES . 'header.php'); ?>
<!-- header_eof //-->

<!-- body //-->
<table border="0" width="100%" cellspacing="2" cellpadding="2">
 <tr>
   <td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="1" cellpadding="1" class="columnLeft">
<!-- left_navigation //-->
<?php require(DIR_WS_INCLUDES . 'column_left.php'); ?>
<!-- left_navigation_eof //-->
   </table></td>
<!-- body_text //-->
   <td width="100%" valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="2">
<?php
       $links_query  = mysql_query('SELECT `link_category_id` , `link_id` , `link_title` , `link_url` , `link_description` , `link_contact` , `link_email` , `link_reciprocal` , `link_rating` , `link_date` , `link_status` FROM `exchange_links_links`');
     if ($row = mysql_fetch_array($links_query)) {


do {
 $found_the_link = "no";
 print $row["link_url"];
 print (" ");

       $url = $row["link_reciprocal"];
       $link_to_look_for = 'www.alive-jewellery.com';

if (file($url)) {
       $file = fopen($url,'r');
       
       $i = 0;
       do {
               $i++;
               $page_line[$i] = trim(fgets($file,4096));
       } while (!feof($file));
       fclose($file);
       for($x = 1; $x <= $i; $x++) {
               $test_line = ereg_replace($link_to_look_for,"test",$page_line[$x]);
               if ($test_line != $page_line[$x]) {
                       $found_the_link = "yes";
               }
       }

       if ($found_the_link == "yes") {
               echo "<font color=\"green\">Yes, they did link back to you</font><br>\n";
       }
       if ($found_the_link != "yes") {
               echo "<font color=\"red\">No, they did not link back to you</font><br>\n";
       }
 } else {
 print "URL NOT FOUND<br>";
 }
} while($row = mysql_fetch_array($links_query));

} else {print "Sorry, no records were found!";}

?>
   </td>
<!-- body_text_eof //-->
 </tr>
</table>
<!-- body_eof //-->

<!-- footer //-->
<?php require(DIR_WS_INCLUDES . 'footer.php'); ?>
<!-- footer_eof //-->
<br>
</body>
</html>
<?php require(DIR_WS_INCLUDES . 'application_bottom.php'); ?>

 

Thanks.

Mary-Ann

Chief Cook and Bottlewasher

Jack-of-All-Trades

Running 2.2MS2

Link to comment
Share on other sites

  • 3 weeks later...

have you tried the query without the enclosed tables apostrophes.

 

$links_query  = mysql_query('SELECT `link_category_id` , `link_id` , `link_title` , `link_url` , `link_description` , `link_contact` , `link_email` , `link_reciprocal` , `link_rating` , `link_date` , `link_status` FROM `exchange_links_links`');
    if ($row = mysql_fetch_array($links_query)) {

 

change to

 

$links_query  = mysql_query('SELECT link_category_id, link_id, link_title, link_url, link_description, link_contact, link_email, link_reciprocal, link_rating, link_date, link_status FROM exchange_links_links');
    if ($row = mysql_fetch_array($links_query)) {

No longer giving free advice. Please place deposit in meter slot provided.  Individual: [=] SME: [==] Corporation: [===]
If deposit does not fit one of the slots provided then you are asking too much! :P

Is your Osc dated try Phoenix  raising oscommerce from the ashes.

Link to comment
Share on other sites

or possibly that a TABLE requires to be named.

 

I do not have this links checker contribution installed so I do not know if there is a seperate table for the fields in which case if there was then you would expect something along the lines of "from TABLE_EXCHANGE_LINKS

 

As this is a reciprocal links checker then this may be a case of there not being a reciprocal link set up thus when the check is performed no record of a reciprocal link is found.

Edited by 241

No longer giving free advice. Please place deposit in meter slot provided.  Individual: [=] SME: [==] Corporation: [===]
If deposit does not fit one of the slots provided then you are asking too much! :P

Is your Osc dated try Phoenix  raising oscommerce from the ashes.

Link to comment
Share on other sites

have you tried the query without the enclosed tables apostrophes.

 

$links_query ?= mysql_query('SELECT `link_category_id` , `link_id` , `link_title` , `link_url` , `link_description` , `link_contact` , `link_email` , `link_reciprocal` , `link_rating` , `link_date` , `link_status` FROM `exchange_links_links`');
? ? if ($row = mysql_fetch_array($links_query)) {

 

change to

 

$links_query ?= mysql_query('SELECT link_category_id, link_id, link_title, link_url, link_description, link_contact, link_email, link_reciprocal, link_rating, link_date, link_status FROM exchange_links_links');
? ? if ($row = mysql_fetch_array($links_query)) {

The problem is that I don't have exchange_links_links on the latest contribution.. Maybe it was on an old one or I have something missing..

 

has anybody installed these latest two contribution?

Link to comment
Share on other sites

When I check links, I sometimes get that error, but I've found that it ONLY happens when the website that has linked to me has a cloaked domain name.....i.e., when the website owner has a domain name pointing to a personal hosting account, e.g. geocities or homestead, etc.

 

You know.... e.g.

 

the link is e.g. http://something.com , but their real domain is http://geocities.com/something.html

 

 

 

Therefore, the error may not be a database error.

Link to comment
Share on other sites

have you tried the query without the enclosed tables apostrophes.

 

$links_query ?= mysql_query('SELECT `link_category_id` , `link_id` , `link_title` , `link_url` , `link_description` , `link_contact` , `link_email` , `link_reciprocal` , `link_rating` , `link_date` , `link_status` FROM `exchange_links_links`');
? ? if ($row = mysql_fetch_array($links_query)) {

 

change to

 

$links_query ?= mysql_query('SELECT link_category_id, link_id, link_title, link_url, link_description, link_contact, link_email, link_reciprocal, link_rating, link_date, link_status FROM exchange_links_links');
? ? if ($row = mysql_fetch_array($links_query)) {

The problem is that I don't have exchange_links_links on the latest contribution.. Maybe it was on an old one or I have something missing..

 

has anybody installed these latest two contribution?

I have solved the problem.

 

if someone needs the solution. I will post it here tonight BST

 

Salvo

Link to comment
Share on other sites

  • 3 months later...

I have the Links Manager contrib (Links Manager for osC v1.00) installed and it has been working fine (I thought). I have been told by at least two people that when they go to my links page and try to submit a link - they are taken to the login page. Can someone please check whether this is the case. When I check it from both Mozilla and IE I don't get that.

 

This is my links page

 

==================================================

(I have decided to have another html links page directly off the main page (manual entry) as some websites only want to swop links if you have an html links page/search engine friendly pages. I will trade links with those websites that have a high PR ranking and at their request, put their links in the html link directory). Don't know if that's going to make much difference but hey, I am willing to accommodate anyone in this way if it makes them feel better/Google likes it. If you have any thoughts on this, please let me know.

Mary-Ann

Chief Cook and Bottlewasher

Jack-of-All-Trades

Running 2.2MS2

Link to comment
Share on other sites

  • 1 month later...

I have installed Links Manager and I have 2 problems with it. When I create a new category I get the error;

 

1

Warning: Cannot modify header information - headers already sent by (output started at /home/newyork/public_html/admin/link_categories.php:67) in /home/newyork/public_html/admin/includes/functions/general.php on line 18

 

It still adds the category and I can see it and use it but I can't figure out whats causing the error.

 

Also when I add a link it shows up on the links page but if you click on it it takes you to my main page. I suspect that something might be wrong in the redirect.php but I'm not familiar enough with php to figure it out.

 

One more thing, when you click the button to submit a link it takes you to the main page and the form for submitting a link is at the bottom of that page. I would have expected it to open a new page to display the form for submitting.

 

Thanks in advance for your help.

 

I would just like to say that I am amazed at the amount of help and cooperation that total stangers have given me on these forums. It amazes me everytime I ask for help. Maybe there is hope for the world after all. You guys rock!

Link to comment
Share on other sites

  • 3 weeks later...

The problem is that I don't have exchange_links_links on the latest contribution.. Maybe it was on an old one or I have something missing..

 

has anybody installed these latest two contribution?

I have solved the problem.

 

if someone needs the solution. I will post it here tonight BST

 

Salvo

 

 

Hello Salvo,

Could you please post the solution for this problem? I have been working for 2 days but I can't get the light.

thanks

far

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...