PDA

View Full Version : Link page errors



gypsyrose
11-07-2008, 05:24 PM
Here is my Link page http://www.leachholdingsltd.com/whimsicallawnandgardencenter/links.php I am trying to get the back link spider in the text description area. But every time I end up with syntax errors on line 21 extra... or it is at top of page above header. I would appreciate any help thanks.

P. S. I should probably mention this is in oscommerce.

pghcollectibles
11-07-2008, 08:09 PM
this was output before your html:

Error processing request<input type='hidden' name='userkey' value='AL-3696LE-WA'>
<!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN">

im not familiar with the page links.php in oscommerce
this is the top part of contact_us.php:

<?php
/*
$Id: contact_us.php 1739 2007-12-20 00:52:16Z hpdl $

osCommerce, Open Source E-Commerce Solutions
http://www.oscommerce.com

Copyright (c) 2003 osCommerce

Released under the GNU General Public License
*/

require('includes/application_top.php');

require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_CONTACT_US);

$error = false;
if (isset($HTTP_GET_VARS['action']) && ($HTTP_GET_VARS['action'] == 'send')) {
$name = tep_db_prepare_input($HTTP_POST_VARS['name']);
$email_address = tep_db_prepare_input($HTTP_POST_VARS['email']);
$enquiry = tep_db_prepare_input($HTTP_POST_VARS['enquiry']);

if (tep_validate_email($email_address)) {
tep_mail(STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS, EMAIL_SUBJECT, $enquiry, $name, $email_address);

tep_redirect(tep_href_link(FILENAME_CONTACT_US, 'action=success'));
} else {
$error = true;

$messageStack->add('contact', ENTRY_EMAIL_ADDRESS_CHECK_ERROR);
}
}

$breadcrumb->add(NAVBAR_TITLE, tep_href_link(FILENAME_CONTACT_US));
?>
<!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN">
could you post the code up to the doctype output from links.php please (the doctype output should be the first thing output)

gypsyrose
11-07-2008, 08:16 PM
There are two index files in oscommerce

This is index.php in the top catalog directory:

<?php

/*


$Id: contact_us.php 1739 2007-12-20 00:52:16Z hpdl $


osCommerce, Open Source E-Commerce Solutions

http://www.oscommerce.com



Copyright (c) 2003 osCommerce



Released under the GNU General Public License

*/



require('includes/application_top.php');



require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_LINKS);



$breadcrumb->add(NAVBAR_TITLE, tep_href_link(FILENAME_LINKS));

?>

<!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN">





This is index.php in the includes/english/ directory:

<?php
/*
$Id: links.php 1739 2007-12-20 00:52:16Z hpdl $

osCommerce, Open Source E-Commerce Solutions
http://www.oscommerce.com

Copyright (c) 2002 osCommerce

Released under the GNU General Public License
*/

define('NAVBAR_TITLE', 'Links');
define('HEADING_TITLE', 'Links');

define('TEXT_INFORMATION', '');

// # THE FOLLOWING BLOCK IS USED TO RETRIEVE AND DISPLAY LINK INFORMATION.
// # PLACE THIS ENTIRE BLOCK IN THE AREA YOU WANT THE DATA TO BE DISPLAYED.

// # BackLinkSpider user key:
$UserKey ="as-2345-99";

// # MODIFY THE VARIABLES BELOW:

// # The following variable defines how many links to display per page
$LinksPerPage = "25";

// # The following variable defines how many columns are used to display categories
$CategoryColumns = "2";

// # The following variable defines whether links are opened in a new window
// # (1 = Yes, 0 = No)
$OpenInNewWindow = "0";

// # DO NOT MODIFY ANYTHING ELSE BELOW THIS LINE!
// ----------------------------------------------

$QueryString = "script=php";
$QueryString .= "&UserKey=" .urlencode($UserKey);
$QueryString .= "&CategoryColumns=" .urlencode($CategoryColumns);
$QueryString .= "&LinksPerPage=" .urlencode($LinksPerPage);
$QueryString .= "&OpenInNewWindow=" .urlencode($OpenInNewWindow);
$QueryString .= "&siteid=6166" ;

foreach ($_GET as $key => $value) {
$value = urlencode(stripslashes($value));
$QueryString .= "&$key=$value";
}

// congfigure our headers
if(intval(ini_get('allow_url_fopen')) && function_exists('readfile')) {
if(!@readfile("http://www.backlinkspider.com/generate.links.php?".$QueryString)) {
echo "Error processing request";
}
}
elseif(intval(ini_get('allow_url_fopen')) && function_exists('file')) {
if(!($content = @file("http://www.backlinkspider.com/generate.links.php?".$QueryString))) {
echo "Error processing request";
}
else {
echo @join('', $content);
}
}
elseif(function_exists('curl_init')) {
$ch = curl_init ("http://www.backlinkspider.com/generate.links.php?".$QueryString);
curl_setopt ($ch, CURLOPT_HEADER, 0);
curl_exec ($ch);

if(curl_error($ch))
echo "Error processing request";

curl_close ($ch);
}
else {
echo "Your web hosting provider has disabled all functions for handling remote pages pages and as a result the BackLinkSpider software will not function on your web site.";
}
echo "<input type='hidden' name='userkey' value='".$UserKey."'>";
?>

pghcollectibles
11-07-2008, 08:26 PM
i didnt ask about the index page you posted your question about the link.php page (by the way that was a broken link in your post) i dont need the whole page's code just the top part up to where i said before.

it is most likely file public_html/whimsicallawnandgardencenter/links.php (if leachholdingsltd.com is your primary domain)

gypsyrose
11-07-2008, 08:29 PM
Those are the links page I just type wrong name. Sorry.:D

P. S. If I put their code in first links page, it messes up the entire right side boxes. If I put in second links page it appears at top of page.

pghcollectibles
11-07-2008, 08:43 PM
is FILENAME_LINKS defined in includes/filenames.php

gypsyrose
11-07-2008, 08:49 PM
Yes it is.

gypsyrose
11-07-2008, 08:52 PM
I fixed the link in original post.

Edit: Now it doesn't work again

pghcollectibles
11-07-2008, 10:00 PM
i see links now but they are being output from the same place. did you change some code? a couple things look wrong to me.

at first i would think this line:


<td class="main"><?php echo TEXT_INFORMATION; ?></td>
should be:


<td class="main"><?php require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_LINKS);?></td>
i dont think thats right however as these are defined in that file:

define('NAVBAR_TITLE', 'Links');
define('HEADING_TITLE', 'Links');
define('TEXT_INFORMATION', '');

and the first have been echoed already and the TEXT_INFORMATION is supposed to be there?

so then i notice TEXT_INFORMATION has the value of '' and so it truly does output nothing something is not in the right place.

i think there should be a pair of curly brackets for this condition:

if(curl_error($ch))

but im not positive where the ending bracket belongs

i went to the web site for backlinkspider and started the sign up process to get the directions...

remove the code you placed in the includes/english/ directory:



// # THE FOLLOWING BLOCK IS USED TO RETRIEVE AND DISPLAY LINK INFORMATION.
// # PLACE THIS ENTIRE BLOCK IN THE AREA YOU WANT THE DATA TO BE DISPLAYED.

// # BackLinkSpider user key:
$UserKey ="AL-3696LE-WA";

// # MODIFY THE VARIABLES BELOW:

// # The following variable defines how many links to display per page
$LinksPerPage = "25";

// # The following variable defines how many columns are used to display categories
$CategoryColumns = "2";

// # The following variable defines whether links are opened in a new window
// # (1 = Yes, 0 = No)
$OpenInNewWindow = "0";

// # DO NOT MODIFY ANYTHING ELSE BELOW THIS LINE!
// ----------------------------------------------

$QueryString = "script=php";
$QueryString .= "&UserKey=" .urlencode($UserKey);
$QueryString .= "&CategoryColumns=" .urlencode($CategoryColumns);
$QueryString .= "&LinksPerPage=" .urlencode($LinksPerPage);
$QueryString .= "&OpenInNewWindow=" .urlencode($OpenInNewWindow);
$QueryString .= "&siteid=6166" ;

foreach ($_GET as $key => $value) {
$value = urlencode(stripslashes($value));
$QueryString .= "&$key=$value";
}

// congfigure our headers
if(intval(ini_get('allow_url_fopen')) && function_exists('readfile')) {
if(!@readfile("http://www.backlinkspider.com/generate.links.php?".$QueryString)) {
echo "Error processing request";
}
}
elseif(intval(ini_get('allow_url_fopen')) && function_exists('file')) {
if(!($content = @file("http://www.backlinkspider.com/generate.links.php?".$QueryString))) {
echo "Error processing request";
}
else {
echo @join('', $content);
}
}
elseif(function_exists('curl_init')) {
$ch = curl_init ("http://www.backlinkspider.com/generate.links.php?".$QueryString);
curl_setopt ($ch, CURLOPT_HEADER, 0);
curl_exec ($ch);

if(curl_error($ch))
echo "Error processing request";

curl_close ($ch);
}
else {
echo "Your web hosting provider has disabled all functions for handling remote pages pages and as a result the BackLinkSpider software will not function on your web site.";
}
echo "<input type='hidden' name='userkey' value='".$UserKey."'>";
replace <?php echo TEXT_INFORMATION; ?>

from here:


<td class="main"><?php echo TEXT_INFORMATION; ?></td>
in your main links.php file with the code you just removed from the other file

wow that was rough. let me know if you need me to start over. i can say that over again step by step...

open both files in file manager,
highlight,
cut,
save changes,
highlight,
paste,
save changes.

gypsyrose
11-08-2008, 07:48 AM
Thank you!!!!!!!!!!! PGH you are the greatest!!!!!!!!!!;)