Jump to content
FWR Media

ULTIMATE Seo Urls 5 - by FWR Media

Recommended Posts

Hello,

 

I suppose I "solved" my issue. My provider disabled .htaccess in that particular webpack (webpack M Hosteurope - webpack L does have the required feature).

 

I was quite sure that it worked before (on my other webspace), but that was about 2years ago so things might have changed at hosteurope.

 

I will my client suggest to upgrade the webpack to L.

 

Thanks for the answers ;)

bye

Share this post


Link to post
Share on other sites

Hello again ;)

 

yesterday I installed (after upgrading to webpack L at Hosteurope) Ultimate SEO URLs 2.2d5 and everything worked fine.

 

But as I wanted to keep it up to date I installed today ULTIMATE Seo Urls 5 - by FWR Media but this contrib does not work for me. Everytime I leave the index.php I get a 404 error ( categories and products pages).

 

As said before I sure that it is all installed properly, I followed the upgrade doc exactly, the installer ran without errors, all files are uploaded an the old files are deleted.

 

My .htaccess file looks like this (shop runs at www.my-shop.de):

 

Options +FollowSymLinks
RewriteEngine On 
RewriteBase /

RewriteRule ^(.*)-p-([0-9]+).html$ product_info.php?products_id=$2&%{QUERY_STRING}
RewriteRule ^(.*)-c-([0-9_]+).html$ index.php?cPath=$2&%{QUERY_STRING}
RewriteRule ^(.*)-m-([0-9]+).html$ index.php?manufacturers_id=$2&%{QUERY_STRING}
RewriteRule ^(.*)-pi-([0-9]+).html$ popup_image.php?pID=$2&%{QUERY_STRING}
RewriteRule ^(.*)-pr-([0-9]+).html$ product_reviews.php?products_id=$2&%{QUERY_STRING}
RewriteRule ^(.*)-pri-([0-9]+).html$ product_reviews_info.php?products_id=$2&%{QUERY_STRING}
# Articles contribution
RewriteRule ^(.*)-t-([0-9_]+).html$ articles.php?tPath=$2&%{QUERY_STRING}
RewriteRule ^(.*)-a-([0-9]+).html$ article_info.php?articles_id=$2&%{QUERY_STRING}
# Information pages
RewriteRule ^(.*)-i-([0-9]+).html$ information.php?info_id=$2&%{QUERY_STRING}
# Links contribution
RewriteRule ^(.*)-links-([0-9_]+).html$ links.php?lPath=$2&%{QUERY_STRING}
# Newsdesk contribution
RewriteRule ^(.*)-n-([0-9]+).html$ newsdesk_info.php?newsdesk_id=$2&%{QUERY_STRING}
RewriteRule ^(.*)-nc-([0-9]+).html$ newsdesk_index.php?newsPath=$2&%{QUERY_STRING}
RewriteRule ^(.*)-nri-([0-9]+).html$ newsdesk_reviews_info.php?newsdesk_id=$2&%{QUERY_STRING}
RewriteRule ^(.*)-nra-([0-9]+).html$ newsdesk_reviews_article.php?newsdesk_id=$2&%{QUERY_STRING}

 

As before I dont´t have any idea right now what to do. Well, I sure could downgrade to 2.2

But that is the option I´d like to choose last.

 

Thanks for your ideas ;)

 

best wishes

Share this post


Link to post
Share on other sites

Hello again ;)

 

yesterday I installed (after upgrading to webpack L at Hosteurope) Ultimate SEO URLs 2.2d5 and everything worked fine.

 

But as I wanted to keep it up to date I installed today ULTIMATE Seo Urls 5 - by FWR Media but this contrib does not work for me. Everytime I leave the index.php I get a 404 error ( categories and products pages).

 

As said before I sure that it is all installed properly, I followed the upgrade doc exactly, the installer ran without errors, all files are uploaded an the old files are deleted.

 

My .htaccess file looks like this (shop runs at www.my-shop.de):

 

Options +FollowSymLinks
RewriteEngine On 
RewriteBase /

RewriteRule ^(.*)-p-([0-9]+).html$ product_info.php?products_id=$2&%{QUERY_STRING}
RewriteRule ^(.*)-c-([0-9_]+).html$ index.php?cPath=$2&%{QUERY_STRING}
RewriteRule ^(.*)-m-([0-9]+).html$ index.php?manufacturers_id=$2&%{QUERY_STRING}
RewriteRule ^(.*)-pi-([0-9]+).html$ popup_image.php?pID=$2&%{QUERY_STRING}
RewriteRule ^(.*)-pr-([0-9]+).html$ product_reviews.php?products_id=$2&%{QUERY_STRING}
RewriteRule ^(.*)-pri-([0-9]+).html$ product_reviews_info.php?products_id=$2&%{QUERY_STRING}
# Articles contribution
RewriteRule ^(.*)-t-([0-9_]+).html$ articles.php?tPath=$2&%{QUERY_STRING}
RewriteRule ^(.*)-a-([0-9]+).html$ article_info.php?articles_id=$2&%{QUERY_STRING}
# Information pages
RewriteRule ^(.*)-i-([0-9]+).html$ information.php?info_id=$2&%{QUERY_STRING}
# Links contribution
RewriteRule ^(.*)-links-([0-9_]+).html$ links.php?lPath=$2&%{QUERY_STRING}
# Newsdesk contribution
RewriteRule ^(.*)-n-([0-9]+).html$ newsdesk_info.php?newsdesk_id=$2&%{QUERY_STRING}
RewriteRule ^(.*)-nc-([0-9]+).html$ newsdesk_index.php?newsPath=$2&%{QUERY_STRING}
RewriteRule ^(.*)-nri-([0-9]+).html$ newsdesk_reviews_info.php?newsdesk_id=$2&%{QUERY_STRING}
RewriteRule ^(.*)-nra-([0-9]+).html$ newsdesk_reviews_article.php?newsdesk_id=$2&%{QUERY_STRING}

 

As before I dont´t have any idea right now what to do. Well, I sure could downgrade to 2.2

But that is the option I´d like to choose last.

 

Thanks for your ideas ;)

 

best wishes

Share this post


Link to post
Share on other sites

Hello again ;)

 

yesterday I installed (after upgrading to webpack L at Hosteurope) Ultimate SEO URLs 2.2d5 and everything worked fine.

 

But as I wanted to keep it up to date I installed today ULTIMATE Seo Urls 5 - by FWR Media but this contrib does not work for me. Everytime I leave the index.php I get a 404 error ( categories and products pages).

 

As said before I sure that it is all installed properly, I followed the upgrade doc exactly, the installer ran without errors, all files are uploaded an the old files are deleted.

 

My .htaccess file looks like this (shop runs at www.my-shop.de):

 

As before I dont´t have any idea right now what to do. Well, I sure could downgrade to 2.2

But that is the option I´d like to choose last.

 

Thanks for your ideas ;)

 

best wishes

 

404 errors are caused by incorrect .htaccess or hosting settings, I don't believe that version2 works when this doesn't as the .htaccess and server settings needed are identical.

 

it's very simple whichever the contribution

 

www.mysite.de/my-great-product-p-32.html does NOT exist it therefore without .htaccess RewriteRules causes 404 not found.

 

If .htaccess and the server are set up correctly my-great-product-p-32.html is converted to product_info.php?products_id=32 which of course DOES work.

Edited by FWR Media

Share this post


Link to post
Share on other sites

Uhm, You don´t believe it worked?

 

Sorry, but it did actually. ;)

Edited by tosam

Share this post


Link to post
Share on other sites

Right, I just found a "solution".

 

in the file html_output.php the line ~17 is :

 

include_once DIR_WS_MODULES . 'ultimate_seo_urls5' . DIRECTORY_SEPARATOR . 'classes' . DIRECTORY_SEPARATOR . 'usu.php';

 

As I never saw a definition for DIRECTORY_SEPARATOR I changed the line to

 

include_once DIR_WS_MODULES . 'ultimate_seo_urls5/classes/usu.php';

 

so now it works.

 

Bye

Share this post


Link to post
Share on other sites

Right, I just found a "solution".

 

in the file html_output.php the line ~17 is :

 

include_once DIR_WS_MODULES . 'ultimate_seo_urls5' . DIRECTORY_SEPARATOR . 'classes' . DIRECTORY_SEPARATOR . 'usu.php';

 

As I never saw a definition for DIRECTORY_SEPARATOR I changed the line to

 

include_once DIR_WS_MODULES . 'ultimate_seo_urls5/classes/usu.php';

 

so now it works.

 

Bye

 

Lol absolute rubbish.

Share this post


Link to post
Share on other sites

Yes, "Google Base Froogle Data Feeder v1.00 - http://addons.oscommerce.com/info/4513"

 

graeme

 

Graeme,

 

I installed that exact contribution with no success. Did you alter it at all? Are you using standard or re-write? I believe Jack_mcs, the author of the version mention that the mod was not compatible with USU5.


plasma.jpg

Share this post


Link to post
Share on other sites

Robert,

 

I was able to modify Jack_mcs Google Feeder v2.4 to work with USU5. I was hoping you would be willing to verify / test this so that others can use it as well. Here's what I did. I moved the location to the main catalog. Included a require for application_top. Removed all the Ultimate URS by Chemo if/then code. Altered the top part of the query to remove concat productURL. Then used an osC tep_href_link in the output section.

 

Before: googlefeeder.php

<?php
// Title: Google Base / Froogle Data Feeder 1.03
// Author: Calvin K
// Contact: calvink@conceptulanetworking.com
//	Organization: Conceptual Networking
// Last Update: 07/15/09 by Jack_mcs at oscommerce-solution.com


/*************** BEGIN MASTER SETTINGS ******************/

define('SEO_ENABLED','true');	//Change to 'false' to disable if Ultimate SEO URLs is not installed
define('FEEDNAME', 'your-outfile.txt'); 	//from your googlebase account
define('DOMAIN_NAME', 'www.yourwebsite.com'); //your correct domain name (don't include www unless it is used)
define('FTP_USERNAME', 'googleFTP-username'); //created from within your googlebase account
define('FTP_PASSWORD', 'googleFTP-password'); //created from within your googlebase account
define('FTP_ENABLED', '1'); 	//set to 0 to disable
define('CONVERT_CURRENCY', '0'); //set to 0 to disable - only needed if a feed in a difference currecny is required
define('CURRENCY_TYPE', 'USD'); //(eg. USD, EUR, GBP)
define('DEFAULT_LANGUAGE', 1); //Change this to the id of your language. BY default 1 is english

define('OPTIONS_ENABLED', 1);
define('OPTIONS_ENABLED_AGE_RANGE', 0);
define('OPTIONS_ENABLED_BRAND', 0);
define('OPTIONS_ENABLED_CONDITION', 1);
define('OPTIONS_ENABLED_CURRENCY', 0);
define('OPTIONS_ENABLED_FEED_LANGUAGE', 0);
define('OPTIONS_ENABLED_FEED_MANUFACTURE_ID', 0);
define('OPTIONS_ENABLED_FEED_QUANTITY', 0);
define('OPTIONS_ENABLED_MADE_IN', 0);
define('OPTIONS_ENABLED_MANUFACTURER', 0);
define('OPTIONS_ENABLED_PAYMENT_ACCEPTED', 0);
define('OPTIONS_ENABLED_PRODUCT_TYPE', 0);
define('OPTIONS_ENABLED_SHIPPING', 0);
define('OPTIONS_ENABLED_UPC', 0);
define('OPTIONS_ENABLED_WEIGHT', 0);

//the following only matter if the matching option is enabled above. 
define('OPTIONS_AGE_RANGE', '0-9');
define('OPTIONS_BRAND', '');
define('OPTIONS_CONDITION', 'New'); //possible entries are New, Refurbished, Used
define('OPTIONS_DEFAULT_CURRENCY', 'USD');
define('OPTIONS_DEFAULT_FEED_LANGUAGE', 'en');
define('OPTIONS_LOWEST_SHIPPING', ''); //this is not binary. Custom Code is required to provide the shipping cost per product. ###needs to be an array for per product.
define('OPTIONS_MADE_IN', 'USA');
define('OPTIONS_PAYMENT_ACCEPTED_METHODS', ''); //Acceptable values: cash, check, GoogleCheckout, Visa, MasterCard, AmericanExpress, Discover, wiretransfer
define('OPTIONS_WEIGHT_ACCEPTED_METHODS', 'lb'); //Valid units include lb, pound, oz, ounce, g, gram, kg, kilogram.

/*************** END MASTER SETTINGS ******************/ 

/*************** NO EDITS NEEDED BELOW THIS LINE *****************/

require_once('../includes/configure.php');

if (! function_exists("tep_not_null"))
{
function tep_not_null($value) {
if (is_array($value)) {
	if (sizeof($value) > 0) {
	return true;
	} else {
	return false;
	}
} else {
	if (($value != '') && (strtolower($value) != 'null') && (strlen(trim($value)) > 0)) {
	return true;
	} else {
	return false;
	}
}
}
}

if(SEO_ENABLED=='true'){
//********************
// Modification for SEO
// Since the ultimate SEO was only installed on the public side, we will include our files from there.
require_once('../includes/filenames.php');
require_once('../includes/database_tables.php');

include_once('../' .DIR_WS_CLASSES . 'seo.class.php');
$seo_urls = new SEO_URL(DEFAULT_LANGUAGE);

function tep_href_link($page = '', $parameters = '', $connection = 'NONSSL', $add_session_id = true, $search_engine_safe = true) {
	global $seo_urls;
	return $seo_urls->href_link($page, $parameters, $connection, $add_session_id);
}
}

//********************
// Start TIMER
// -----------
$stimer = explode( ' ', microtime() );
$stimer = $stimer[1] + $stimer[0];
// -----------


$OutFile = "../feeds/" . FEEDNAME; 
$destination_file = FEEDNAME; 
$source_file = $OutFile;
$imageURL = 'http://' . DOMAIN_NAME . '/images/';
if(SEO_ENABLED=='true'){
$productURL = 'product_info.php'; // ***** Revised for SEO
$productParam = "products_id="; // ***** Added for SEO
}else{
$productURL = 'http://' . DOMAIN_NAME . '/product_info.php?products_id=';
}

$already_sent = array();
$taxRate = 0; //default = 0 (e.g. for 17.5% tax use "$taxRate = 17.5;")
$taxCalc = ($taxRate/100) + 1; //Do not edit

if(CONVERT_CURRENCY)
{
if(SEO_ENABLED=='true'){
	$productParam="currency=" . CURRENCY_TYPE . "&products_id=";
}else{
	$productURL = "http://" . DOMAIN_NAME . "/product_info.php?currency=" . CURRENCY_TYPE . "&products_id="; //where CURRENCY_TYPE is your currency type (eg. USD, EUR, GBP)
}
}

$feed_exp_date = date('Y-m-d', time() + 2592000 );

if (!($link=mysql_connect(DB_SERVER,DB_SERVER_USERNAME,DB_SERVER_PASSWORD)))
{
echo "Error when connecting itself to the data base";
exit();
}
if (!mysql_select_db( DB_DATABASE , $link ))
{
echo "Error the data base does not exist";
exit();
}

$sql = "
SELECT concat( '" . $productURL . "' ,products.products_id) AS product_url,
products_model AS prodModel,
manufacturers.manufacturers_name AS mfgName,
manufacturers.manufacturers_id,
products.products_id AS id,
products_description.products_name AS name,
products_description.products_description AS description,
products.products_quantity AS quantity,
products.products_status AS prodStatus,
products.products_weight AS prodWeight,
FORMAT( IFNULL(specials.specials_new_products_price, products.products_price) * " . $taxCalc . ",2) AS price,
CONCAT( '" . $imageURL . "' ,products.products_image) AS image_url,
products_to_categories.categories_id AS prodCatID,
categories.parent_id AS catParentID,
categories_description.categories_name AS catName
FROM (categories,
categories_description,
products,
products_description,
products_to_categories)

left join manufacturers on ( manufacturers.manufacturers_id = products.manufacturers_id )
left join specials on ( specials.products_id = products.products_id AND ( ( (specials.expires_date > CURRENT_DATE) OR (specials.expires_date is NULL) OR (specials.expires_date = 0) ) AND ( specials.status = 1 ) ) )

WHERE products.products_id=products_description.products_id
AND products.products_id=products_to_categories.products_id
AND products_to_categories.categories_id=categories.categories_id
AND categories.categories_id=categories_description.categories_id
ORDER BY
products.products_id ASC
";


$catInfo = "
SELECT
categories.categories_id AS curCatID,
categories.parent_id AS parentCatID,
categories_description.categories_name AS catName
FROM
categories,
categories_description
WHERE categories.categories_id = categories_description.categories_id
";

function findCat($curID, $catTempPar, $catTempDes, $catIndex)
{
if( (isset($catTempPar[$curID])) && ($catTempPar[$curID] != 0) )
{
	if(isset($catIndex[$catTempPar[$curID]]))
	{
		$temp=$catIndex[$catTempPar[$curID]];
	}
	else
	{
		$catIndex = findCat($catTempPar[$curID], $catTempPar, $catTempDes, $catIndex);
		$temp = $catIndex[$catTempPar[$curID]];
	}
}
if( (isset($catTempPar[$curID])) && (isset($catTempDes[$curID])) && ($catTempPar[$curID] == 0) )
{
	$catIndex[$curID] = $catTempDes[$curID];
}
else
{
	$catIndex[$curID] = $temp . ", " . $catTempDes[$curID];
}
return $catIndex;

}

$catIndex = array();
$catTempDes = array();
$catTempPar = array();
$processCat = mysql_query( $catInfo )or die( $FunctionName . ": SQL error " . mysql_error() . "| catInfo = " . htmlentities($catInfo) );
while ( $catRow = mysql_fetch_object( $processCat ) )
{
$catKey = $catRow->curCatID;
$catName = $catRow->catName;
$catParID = $catRow->parentCatID;
if($catName != "")
{
	$catTempDes[$catKey]=$catName;
	$catTempPar[$catKey]=$catParID;
}
}

foreach($catTempDes as $curID=>$des) //don't need the $des
{
$catIndex = findCat($curID, $catTempPar, $catTempDes, $catIndex);
}

$_strip_search = array(
"![\t ]+$|^[\t ]+!m", // remove leading/trailing space chars
'%[\r\n]+%m'); // remove CRs and newlines
$_strip_replace = array(
'',
' ');
$_cleaner_array = array(">" => "> ", "®" => "", "®" => "", "™" => "", "™" => "", "\t" => "", "	" => "");

if ( file_exists( $OutFile ) )
unlink( $OutFile );

$output = "link\ttitle\tdescription\texpiration_date\tprice\timage_link\tproduct_type\tid";

//create optional section
if(OPTIONS_ENABLED == 1)
{
if(OPTIONS_ENABLED_AGE_RANGE == 1)
	$output .= "\tage_range";
if(OPTIONS_ENABLED_BRAND == 1)
	$output .= "\tbrand";
if(OPTIONS_ENABLED_CONDITION == 1)
	$output .= "\tcondition";
if(OPTIONS_ENABLED_CURRENCY == 1)
	$output .= "\tcurrency";
if(OPTIONS_ENABLED_FEED_LANGUAGE == 1)
	$output .= "\tlanguage";
if(OPTIONS_ENABLED_FEED_MANUFACTURER_ID == 1)
	$output .= "\tmanufacturer_id";
if(OPTIONS_ENABLED_FEED_QUANTITY == 1)
	$output .= "\tquantity";
if(OPTIONS_ENABLED_MADE_IN == 1)
	$output .= "\tmade_in";
if(OPTIONS_ENABLED_MANUFACTURER == 1)
	$output .= "\tmanufacturer";
if(OPTIONS_ENABLED_PAYMENT_ACCEPTED == 1)
	$output .= "\tpayment_accepted";
if(OPTIONS_ENABLED_PRODUCT_TYPE == 1)
	$output .= "\tproduct_type";
if(OPTIONS_ENABLED_SHIPPING == 1)
	$output .= "\tshipping";
if(OPTIONS_ENABLED_UPC == 1)
	$output .= "\tupc";
if(OPTIONS_ENABLED_WEIGHT == 1)
	$output .= "\tweight";
}
$output .= "\n";


$result=mysql_query( $sql )or die( $FunctionName . ": SQL error " . mysql_error() . "| sql = " . htmlentities($sql) );

//Currency Information
if(CONVERT_CURRENCY)
{
$sql3 = "
SELECT
currencies.value AS curUSD
FROM
currencies
WHERE currencies.code = '" . CURRENCY_TYPE . "'";

$result3=mysql_query( $sql3 )or die( $FunctionName . ": SQL error " . mysql_error() . "| sql3 = " . htmlentities($sql3) );
$row3 = mysql_fetch_object( $result3 );
}

$loop_counter = 0;

while( $row = mysql_fetch_object( $result ) )
{
if (isset($already_sent[$row->id])) continue; // if we've sent this one, skip the rest of the while loop

if( $row->prodStatus == 1 || (OPTIONS_ENABLED == 1 && $quantity == 1) )
{
	if (CONVERT_CURRENCY)
	{
		$row->price = ereg_replace("[^.0-9]", "", $row->price);
		$row->price = $row->price * $row3->curUSD;
		$row->price = number_format($row->price, 2, '.', ',');
	}

if(SEO_ENABLED=='true'){
	$output .= tep_href_link($productURL,$productParam . $row->id) . "\t" .
	preg_replace($_strip_search, $_strip_replace, strip_tags( strtr($row->name, $_cleaner_array) ) ) . "\t" .
	preg_replace($_strip_search, $_strip_replace, strip_tags( strtr($row->description, $_cleaner_array) ) ) . "\t" .
	$feed_exp_date . "\t" .
	$row->price . "\t" .
	$row->image_url . "\t" .
	$catIndex[$row->prodCatID] . "\t" .
	$row->id;
}else{
			$output .= $row->product_url . "\t" .
			preg_replace($_strip_search, $_strip_replace, strip_tags( strtr($row->name, $_cleaner_array) ) ) . "\t" .
			preg_replace($_strip_search, $_strip_replace, strip_tags( strtr($row->description, $_cleaner_array) ) ) . "\t" .
			$feed_exp_date . "\t" .
			$row->price . "\t" .
			$row->image_url . "\t" .
			$catIndex[$row->prodCatID] . "\t" .
			$row->id;
}

//optional values section
if(OPTIONS_ENABLED == 1)
{
	if(OPTIONS_ENABLED_AGE_RANGE == 1)
		$output .= " \t " . OPTIONS_AGE_RANGE;
	if(OPTIONS_ENABLED_BRAND == 1)
		$output .= " \t " . OPTIONS_BRAND;
	if(OPTIONS_ENABLED_CONDITION == 1)
		$output .= " \t " . OPTIONS_CONDITION;
	if(OPTIONS_ENABLED_CURRENCY == 1)
		$output .= " \t " . OPTIONS_DEFAULT_CURRENCY;
	if(OPTIONS_ENABLED_FEED_LANGUAGE == 1)
		$output .= " \t " . OPTIONS_DEFAULT_FFEED_LANGUAGE;
	if(OPTIONS_ENABLED_FEED_MANUFACTURER_ID == 1)
		$output .= " \t " . $row->prodModel;
	if(OPTIONS_ENABLED_FEED_QUANTITY == 1)
		$output .= " \t " . $row->quantity;
	if(OPTIONS_ENABLED_MADE_IN == 1)	
		$output .= " \t " . OPTIONS_MADE_IN; 
	if(OPTIONS_ENABLED_MANUFACTURER == 1)
		$output .= " \t " . $row->mfgName;
	if(OPTIONS_ENABLED_PAYMENT_ACCEPTED == 1)
		$output .= " \t " . OPTIONS_PAYMENT_ACCEPTED_METHODS;
	if(OPTIONS_ENABLED_PRODUCT_TYPE == 1)
	{
		$catNameTemp = strtolower($catName);
		$output .= " \t " . $row->catName;
	}
	if(OPTIONS_ENABLED_SHIPPING == 1)
		$output .= " \t " . OPTIONS_LOWEST_SHIPPING;
	if(OPTIONS_ENABLED_UPC == 1)
		$output .= " \t " . "Not Supported";
	if(OPTIONS_ENABLED_WEIGHT == 1)
		$output .= " \t " . $row->prodWeight . ' ' .OPTIONS_WEIGHT_ACCEPTED_METHODS;
}
$output .= " \n";
}
$already_sent[$row->id] = 1;


$loop_counter++;
if ($loop_counter>750) {
$fp = fopen( $OutFile , "a" );
$fout = fwrite( $fp , $output );
fclose( $fp );
$loop_counter = 0;
$output = "";
}
}

$fp = fopen( $OutFile , "a" );
$fout = fwrite( $fp , $output );
fclose( $fp );
echo "File completed: <a href=\"" . $OutFile . "\" target=\"_blank\">" . $destination_file . "</a><br>\n";
chmod($OutFile, 0777);


//Start FTP

function ftp_file( $ftpservername, $ftpusername, $ftppassword, $ftpsourcefile, $ftpdirectory, $ftpdestinationfile )
{
// set up basic connection
$conn_id = ftp_connect($ftpservername);
if ( $conn_id == false )
{
echo "FTP open connection failed to $ftpservername <BR>\n" ;
return false;
}

// login with username and password
$login_result = ftp_login($conn_id, $ftpusername, $ftppassword);

// check connection
if ((!$conn_id) || (!$login_result)) {
echo "FTP connection has failed!<BR>\n";
echo "Attempted to connect to " . $ftpservername . " for user " . $ftpusername . "<BR>\n";
return false;
} else {
echo "Connected to " . $ftpservername . ", for user " . $ftpusername . "<BR>\n";
}

if ( strlen( $ftpdirectory ) > 0 )
{
if (ftp_chdir($conn_id, $ftpdirectory )) {
echo "Current directory is now: " . ftp_pwd($conn_id) . "<BR>\n";
} else {
echo "Couldn't change directory on $ftpservername<BR>\n";
return false;
}
}

ftp_pasv ( $conn_id, true ) ;
// upload the file
$upload = ftp_put( $conn_id, $ftpdestinationfile, $ftpsourcefile, FTP_ASCII );

// check upload status
if (!$upload) {
echo "$ftpservername: FTP upload has failed!<BR>\n";
return false;
} else {
echo "Uploaded " . $ftpsourcefile . " to " . $ftpservername . " as " . $ftpdestinationfile . "<BR>\n";
}

// close the FTP stream
ftp_close($conn_id);

return true;
}

if (FTP_ENABLED)
ftp_file( "uploads.google.com", FTP_USERNAME, FTP_PASSWORD, $source_file, "", $destination_file);

//End FTP


// End TIMER
// ---------
$etimer = explode( ' ', microtime() );
$etimer = $etimer[1] + $etimer[0];
echo '<p style="margin:auto; text-align:center">';
printf( "Script timer: <b>%f</b> seconds.", ($etimer-$stimer) );
echo '</p>';
// ---------

?>

 

After: googlefeeder.php

<?php
// Title: Google Base / Froogle Data Feeder 1.03
// Author: Calvin K
// Contact: calvink@conceptulanetworking.com
//	Organization: Conceptual Networking
// Last Update: 07/15/09 by Jack_mcs at oscommerce-solution.com

require('includes/application_top.php');

/*************** BEGIN MASTER SETTINGS ******************/

define('FEEDNAME', 'your-outfile.txt'); 	//from your googlebase account
define('DOMAIN_NAME', 'www.13thgreen.com'); //your correct domain name (don't include www unless it is used)
define('FTP_USERNAME', 'googleFTP-username'); //created from within your googlebase account
define('FTP_PASSWORD', 'googleFTP-password'); //created from within your googlebase account
define('FTP_ENABLED', '0'); 	//set to 0 to disable
define('CONVERT_CURRENCY', '0'); //set to 0 to disable - only needed if a feed in a difference currecny is required
define('CURRENCY_TYPE', 'USD'); //(eg. USD, EUR, GBP)
define('DEFAULT_LANGUAGE', 1); //Change this to the id of your language. BY default 1 is english

define('OPTIONS_ENABLED', 1);
define('OPTIONS_ENABLED_AGE_RANGE', 0);
define('OPTIONS_ENABLED_BRAND', 0);
define('OPTIONS_ENABLED_CONDITION', 1);
define('OPTIONS_ENABLED_CURRENCY', 0);
define('OPTIONS_ENABLED_FEED_LANGUAGE', 0);
define('OPTIONS_ENABLED_FEED_MANUFACTURE_ID', 0);
define('OPTIONS_ENABLED_FEED_QUANTITY', 0);
define('OPTIONS_ENABLED_MADE_IN', 0);
define('OPTIONS_ENABLED_MANUFACTURER', 0);
define('OPTIONS_ENABLED_PAYMENT_ACCEPTED', 0);
define('OPTIONS_ENABLED_PRODUCT_TYPE', 0);
define('OPTIONS_ENABLED_SHIPPING', 0);
define('OPTIONS_ENABLED_UPC', 0);
define('OPTIONS_ENABLED_WEIGHT', 0);

//the following only matter if the matching option is enabled above. 
define('OPTIONS_AGE_RANGE', '0-9');
define('OPTIONS_BRAND', '');
define('OPTIONS_CONDITION', 'New'); //possible entries are New, Refurbished, Used
define('OPTIONS_DEFAULT_CURRENCY', 'USD');
define('OPTIONS_DEFAULT_FEED_LANGUAGE', 'en');
define('OPTIONS_LOWEST_SHIPPING', ''); //this is not binary. Custom Code is required to provide the shipping cost per product. ###needs to be an array for per product.
define('OPTIONS_MADE_IN', 'USA');
define('OPTIONS_PAYMENT_ACCEPTED_METHODS', ''); //Acceptable values: cash, check, GoogleCheckout, Visa, MasterCard, AmericanExpress, Discover, wiretransfer
define('OPTIONS_WEIGHT_ACCEPTED_METHODS', 'lb'); //Valid units include lb, pound, oz, ounce, g, gram, kg, kilogram.

/*************** END MASTER SETTINGS ******************/ 

/*************** NO EDITS NEEDED BELOW THIS LINE *****************/

require_once('includes/configure.php');

if (! function_exists("tep_not_null"))
{
function tep_not_null($value) {
if (is_array($value)) {
	if (sizeof($value) > 0) {
	return true;
	} else {
	return false;
	}
} else {
	if (($value != '') && (strtolower($value) != 'null') && (strlen(trim($value)) > 0)) {
	return true;
	} else {
	return false;
	}
}
}
}	

//********************
// Start TIMER
// -----------
$stimer = explode( ' ', microtime() );
$stimer = $stimer[1] + $stimer[0];
// -----------


$OutFile = "feeds/" . FEEDNAME; 
$destination_file = FEEDNAME; 
$source_file = $OutFile;
$imageURL = 'http://' . DOMAIN_NAME . '/images/';
$already_sent = array();
$taxRate = 0; //default = 0 (e.g. for 17.5% tax use "$taxRate = 17.5;")
$taxCalc = ($taxRate/100) + 1; //Do not edit
$feed_exp_date = date('Y-m-d', time() + 2592000 );

if (!($link=mysql_connect(DB_SERVER,DB_SERVER_USERNAME,DB_SERVER_PASSWORD)))
{
echo "Error when connecting itself to the data base";
exit();
}
if (!mysql_select_db( DB_DATABASE , $link ))
{
echo "Error the data base does not exist";
exit();
}

// 32 Degrees - Removed productURL from query. 
$sql = "
SELECT products.products_id AS pID,
products_model AS prodModel,
manufacturers.manufacturers_name AS mfgName,
manufacturers.manufacturers_id,
products.products_id AS id,
products_description.products_name AS name,
products_description.products_description AS description,
products.products_quantity AS quantity,
products.products_status AS prodStatus,
products.products_weight AS prodWeight,
FORMAT( IFNULL(specials.specials_new_products_price, products.products_price) * " . $taxCalc . ",2) AS price,
CONCAT( '" . $imageURL . "' ,products.products_image) AS image_url,
products_to_categories.categories_id AS prodCatID,
categories.parent_id AS catParentID,
categories_description.categories_name AS catName
FROM (categories,
categories_description,
products,
products_description,
products_to_categories)

left join manufacturers on ( manufacturers.manufacturers_id = products.manufacturers_id )
left join specials on ( specials.products_id = products.products_id AND ( ( (specials.expires_date > CURRENT_DATE) OR (specials.expires_date is NULL) OR (specials.expires_date = 0) ) AND ( specials.status = 1 ) ) )

WHERE products.products_id=products_description.products_id
AND products.products_id=products_to_categories.products_id
AND products_to_categories.categories_id=categories.categories_id
AND categories.categories_id=categories_description.categories_id
ORDER BY
products.products_id ASC
";


$catInfo = "
SELECT
categories.categories_id AS curCatID,
categories.parent_id AS parentCatID,
categories_description.categories_name AS catName
FROM
categories,
categories_description
WHERE categories.categories_id = categories_description.categories_id
";

function findCat($curID, $catTempPar, $catTempDes, $catIndex)
{
if( (isset($catTempPar[$curID])) && ($catTempPar[$curID] != 0) )
{
	if(isset($catIndex[$catTempPar[$curID]]))
	{
		$temp=$catIndex[$catTempPar[$curID]];
	}
	else
	{
		$catIndex = findCat($catTempPar[$curID], $catTempPar, $catTempDes, $catIndex);
		$temp = $catIndex[$catTempPar[$curID]];
	}
}
if( (isset($catTempPar[$curID])) && (isset($catTempDes[$curID])) && ($catTempPar[$curID] == 0) )
{
	$catIndex[$curID] = $catTempDes[$curID];
}
else
{
	$catIndex[$curID] = $temp . ", " . $catTempDes[$curID];
}
return $catIndex;

}

$catIndex = array();
$catTempDes = array();
$catTempPar = array();
$processCat = mysql_query( $catInfo )or die( $FunctionName . ": SQL error " . mysql_error() . "| catInfo = " . htmlentities($catInfo) );
while ( $catRow = mysql_fetch_object( $processCat ) )
{
$catKey = $catRow->curCatID;
$catName = $catRow->catName;
$catParID = $catRow->parentCatID;
if($catName != "")
{
	$catTempDes[$catKey]=$catName;
	$catTempPar[$catKey]=$catParID;
}
}

foreach($catTempDes as $curID=>$des) //don't need the $des
{
$catIndex = findCat($curID, $catTempPar, $catTempDes, $catIndex);
}

$_strip_search = array(
"![\t ]+$|^[\t ]+!m", // remove leading/trailing space chars
'%[\r\n]+%m'); // remove CRs and newlines
$_strip_replace = array(
'',
' ');
$_cleaner_array = array(">" => "> ", "®" => "", "®" => "", "™" => "", "™" => "", "\t" => "", "	" => "");

if ( file_exists( $OutFile ) )
unlink( $OutFile );

$output = "link\ttitle\tdescription\texpiration_date\tprice\timage_link\tproduct_type\tid";

//create optional section
if(OPTIONS_ENABLED == 1)
{
if(OPTIONS_ENABLED_AGE_RANGE == 1)
	$output .= "\tage_range";
if(OPTIONS_ENABLED_BRAND == 1)
	$output .= "\tbrand";
if(OPTIONS_ENABLED_CONDITION == 1)
	$output .= "\tcondition";
if(OPTIONS_ENABLED_CURRENCY == 1)
	$output .= "\tcurrency";
if(OPTIONS_ENABLED_FEED_LANGUAGE == 1)
	$output .= "\tlanguage";
if(OPTIONS_ENABLED_FEED_MANUFACTURER_ID == 1)
	$output .= "\tmanufacturer_id";
if(OPTIONS_ENABLED_FEED_QUANTITY == 1)
	$output .= "\tquantity";
if(OPTIONS_ENABLED_MADE_IN == 1)
	$output .= "\tmade_in";
if(OPTIONS_ENABLED_MANUFACTURER == 1)
	$output .= "\tmanufacturer";
if(OPTIONS_ENABLED_PAYMENT_ACCEPTED == 1)
	$output .= "\tpayment_accepted";
if(OPTIONS_ENABLED_PRODUCT_TYPE == 1)
	$output .= "\tproduct_type";
if(OPTIONS_ENABLED_SHIPPING == 1)
	$output .= "\tshipping";
if(OPTIONS_ENABLED_UPC == 1)
	$output .= "\tupc";
if(OPTIONS_ENABLED_WEIGHT == 1)
	$output .= "\tweight";
}
$output .= "\n";


$result=mysql_query( $sql )or die( $FunctionName . ": SQL error " . mysql_error() . "| sql = " . htmlentities($sql) );

//Currency Information
if(CONVERT_CURRENCY)
{
$sql3 = "
SELECT
currencies.value AS curUSD
FROM
currencies
WHERE currencies.code = '" . CURRENCY_TYPE . "'";

$result3=mysql_query( $sql3 )or die( $FunctionName . ": SQL error " . mysql_error() . "| sql3 = " . htmlentities($sql3) );
$row3 = mysql_fetch_object( $result3 );
}

$loop_counter = 0;

while( $row = mysql_fetch_object( $result ) )
{
if (isset($already_sent[$row->id])) continue; // if we've sent this one, skip the rest of the while loop

if( $row->prodStatus == 1 || (OPTIONS_ENABLED == 1 && $quantity == 1) )
{
	if (CONVERT_CURRENCY)
	{
		$row->price = ereg_replace("[^.0-9]", "", $row->price);
		$row->price = $row->price * $row3->curUSD;
		$row->price = number_format($row->price, 2, '.', ',');
	}

		$output .= tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $row->pID) . "\t" . // 32 Degrees - Coverted link to use osC fuction
			preg_replace($_strip_search, $_strip_replace, strip_tags( strtr($row->name, $_cleaner_array) ) ) . "\t" .
			preg_replace($_strip_search, $_strip_replace, strip_tags( strtr($row->description, $_cleaner_array) ) ) . "\t" .
			$feed_exp_date . "\t" .
			$row->price . "\t" .
			$row->image_url . "\t" .
			$catIndex[$row->prodCatID] . "\t" .
			$row->id;

//optional values section
if(OPTIONS_ENABLED == 1)
{
	if(OPTIONS_ENABLED_AGE_RANGE == 1)
		$output .= " \t " . OPTIONS_AGE_RANGE;
	if(OPTIONS_ENABLED_BRAND == 1)
		$output .= " \t " . OPTIONS_BRAND;
	if(OPTIONS_ENABLED_CONDITION == 1)
		$output .= " \t " . OPTIONS_CONDITION;
	if(OPTIONS_ENABLED_CURRENCY == 1)
		$output .= " \t " . OPTIONS_DEFAULT_CURRENCY;
	if(OPTIONS_ENABLED_FEED_LANGUAGE == 1)
		$output .= " \t " . OPTIONS_DEFAULT_FFEED_LANGUAGE;
	if(OPTIONS_ENABLED_FEED_MANUFACTURER_ID == 1)
		$output .= " \t " . $row->prodModel;
	if(OPTIONS_ENABLED_FEED_QUANTITY == 1)
		$output .= " \t " . $row->quantity;
	if(OPTIONS_ENABLED_MADE_IN == 1)	
		$output .= " \t " . OPTIONS_MADE_IN; 
	if(OPTIONS_ENABLED_MANUFACTURER == 1)
		$output .= " \t " . $row->mfgName;
	if(OPTIONS_ENABLED_PAYMENT_ACCEPTED == 1)
		$output .= " \t " . OPTIONS_PAYMENT_ACCEPTED_METHODS;
	if(OPTIONS_ENABLED_PRODUCT_TYPE == 1)
	{
		$catNameTemp = strtolower($catName);
		$output .= " \t " . $row->catName;
	}
	if(OPTIONS_ENABLED_SHIPPING == 1)
		$output .= " \t " . OPTIONS_LOWEST_SHIPPING;
	if(OPTIONS_ENABLED_UPC == 1)
		$output .= " \t " . "Not Supported";
	if(OPTIONS_ENABLED_WEIGHT == 1)
		$output .= " \t " . $row->prodWeight . ' ' .OPTIONS_WEIGHT_ACCEPTED_METHODS;
}
$output .= " \n";
}
$already_sent[$row->id] = 1;


$loop_counter++;
if ($loop_counter>750) {
$fp = fopen( $OutFile , "a" );
$fout = fwrite( $fp , $output );
fclose( $fp );
$loop_counter = 0;
$output = "";
}
}

$fp = fopen( $OutFile , "a" );
$fout = fwrite( $fp , $output );
fclose( $fp );
echo "File completed: <a href=\"" . $OutFile . "\" target=\"_blank\">" . $destination_file . "</a><br>\n";
chmod($OutFile, 0777);


//Start FTP

function ftp_file( $ftpservername, $ftpusername, $ftppassword, $ftpsourcefile, $ftpdirectory, $ftpdestinationfile )
{
// set up basic connection
$conn_id = ftp_connect($ftpservername);
if ( $conn_id == false )
{
echo "FTP open connection failed to $ftpservername <BR>\n" ;
return false;
}

// login with username and password
$login_result = ftp_login($conn_id, $ftpusername, $ftppassword);

// check connection
if ((!$conn_id) || (!$login_result)) {
echo "FTP connection has failed!<BR>\n";
echo "Attempted to connect to " . $ftpservername . " for user " . $ftpusername . "<BR>\n";
return false;
} else {
echo "Connected to " . $ftpservername . ", for user " . $ftpusername . "<BR>\n";
}

if ( strlen( $ftpdirectory ) > 0 )
{
if (ftp_chdir($conn_id, $ftpdirectory )) {
echo "Current directory is now: " . ftp_pwd($conn_id) . "<BR>\n";
} else {
echo "Couldn't change directory on $ftpservername<BR>\n";
return false;
}
}

ftp_pasv ( $conn_id, true ) ;
// upload the file
$upload = ftp_put( $conn_id, $ftpdestinationfile, $ftpsourcefile, FTP_ASCII );

// check upload status
if (!$upload) {
echo "$ftpservername: FTP upload has failed!<BR>\n";
return false;
} else {
echo "Uploaded " . $ftpsourcefile . " to " . $ftpservername . " as " . $ftpdestinationfile . "<BR>\n";
}

// close the FTP stream
ftp_close($conn_id);

return true;
}

if (FTP_ENABLED)
ftp_file( "uploads.google.com", FTP_USERNAME, FTP_PASSWORD, $source_file, "", $destination_file);

//End FTP


// End TIMER
// ---------
$etimer = explode( ' ', microtime() );
$etimer = $etimer[1] + $etimer[0];
echo '<p style="margin:auto; text-align:center">';
printf( "Script timer: <b>%f</b> seconds.", ($etimer-$stimer) );
echo '</p>';
// ---------

?>

 

Test URL:

http://www.13thgreen.com/googlefeeder.php

 

* Due to my lack of expierence, I removed this from the original code because I was not quite sure how to incorpoate it.

if(CONVERT_CURRENCY)
{
if(SEO_ENABLED=='true'){
	$productParam="currency=" . CURRENCY_TYPE . "&products_id=";
}else{
	$productURL = "http://" . DOMAIN_NAME . "/product_info.php?currency=" . CURRENCY_TYPE . "&products_id="; //where CURRENCY_TYPE is your currency type (eg. USD, EUR, GBP)
}
}

 

I think if your using USD and not converting you would be fine.

 

What do you think?


plasma.jpg

Share this post


Link to post
Share on other sites

Please!!!!!! don't post pages of code especially when they have nothing at all to do with this contibution. There will be people using this support topic to find if there are any issues with /usu5 and they'll have to scroll 1/2 a mile passed your pasted code to find anything remotely related.

 

Please bear in mind that this contribution is USU5 .. the addons are extras.

 

Jack_mcs, the author of the version mention that the mod was not compatible with USU5.

 

I can't believe Jack_mcs would have said that because it's laughable. If it uses tep_href_link() USU5 works .. end of story, If it doesn't use tep_href_link() then it is bad code as that is the standard osCommerce function.

Edited by FWR Media

Share this post


Link to post
Share on other sites

Robert,

 

I was able to modify Jack_mcs Google Feeder v2.4 to work with USU5. I was hoping you would be willing to verify / test this so that others can use it as well. Here's what I did. I moved the location to the main catalog. Included a require for application_top. Removed all the Ultimate URS by Chemo if/then code. Altered the top part of the query to remove concat productURL. Then used an osC tep_href_link in the output section.

 

I do appreciate you trying to get these contributions to work correctly when used with USU5 but it would be better to post a new contribution in the appropriate place ( in this case Google Feeder v2.4 ) stating [tep_href_link compatible] or [uSU5 compatible] or something.

 

Having looked at your code changes .. yes it has removed the hardcoded crap and should work just fine with any uri creating contribution .. nice.

 

you should always include application_bottom.php too btw

 

include_once DIR_WS_INCLUDES . 'application_bottom.php';

Edited by FWR Media

Share this post


Link to post
Share on other sites

Robert,

 

I apologize for that, I did realize it would take a large part of the page. I think I have stretched my interpretation of how related it is. I'll keep future posts more on topic. I recant what I said about Jack_mcs. I checked the post and verified what he said. http://forums.oscommerce.com/topic/71088-automatically-send-data-feed-to-froogle/page__view__findpost__p__1454180


plasma.jpg

Share this post


Link to post
Share on other sites

I have been using SEO URLs 5 for a couple months now and I just starting getting this warning.

Warning: unlink(/home/handheld/public_html/store/includes/modules/ultimate_seo_urls5/cache/1_usucache.cache) [function.unlink]: Permission denied in /home/handheld/public_html/store/includes/modules/ultimate_seo_urls5/classes/Usu_Cache_FileSystem.php on line 57

I can't seem to figure out what the issue is.

Anyone have any ideas?

-Jason

***EDIT***

I changed the file permissions of the cache files and clicked a few links now everything seems fine. I wonder if when I moved the site a few weeks ago if the permissions were changed??? Could this be it or is this change completely unrelated. What are the permissions of the files in the cache folder supposed to be anyway?

***EDIT***

Edited by jsalis

I run a completely customized osC2.2 RC1 shop with mostly custom modifications that replicate the features of many contributions available except in a way that the data is more easily synced with Quickbooks on a continuous basis.

Share this post


Link to post
Share on other sites

Hi Michelle

 

If you get a parse error adding this contribution then you have simply added code incorrectly when copying and pasting.

 

there is only one modification to admin/includes/functions/general.php which is to add a single function to the very bottom so it is actually rather difficult to make a mistake here .. have a look at the code you added against the instructions, I would bet you left off the final } at the bottom.

 

Thank you, I will try again. I had to revert back to my back-up and restore everything... don't like error pages hanging out there.

 

Also I have noticed you making reference to it being in to root directory or /catalog. My shop is in the /catalog part of the world if this makes any difference.

 

Thank you again and I will redo the upload.

 

Michelle

Share this post


Link to post
Share on other sites

Graeme,

 

I installed that exact contribution with no success. Did you alter it at all? Are you using standard or re-write? I believe Jack_mcs, the author of the version mention that the mod was not compatible with USU5.

 

I installed "Google Base Froogle Data Feeder v1.00" straight out of the box using rewrite. I should add that I have installed over 130 other contributions and made dozens of other mods. Incompatibilities do crop up occasionaly, maybe this is the reverse, a compatibility?.

graeme

Edited by graeme john

Share this post


Link to post
Share on other sites

:angry:

 

It worked for me, even if I found inside the the /classes/usu.php file more of those "DIRECTORY_SEPARATOR" .

How do you explain that it worked suddendly after I changed the described line?

 

I´m not that dumb and the absolute noob, I´m modding oscommerce shops since quite a while.

I know the changes are a little strange but it worked.

 

I can not understand the way people are talking in this forum.

Share this post


Link to post
Share on other sites

I have been using SEO URLs 5 for a couple months now and I just starting getting this warning.

Warning: unlink(/home/handheld/public_html/store/includes/modules/ultimate_seo_urls5/cache/1_usucache.cache) [function.unlink]: Permission denied in /home/handheld/public_html/store/includes/modules/ultimate_seo_urls5/classes/Usu_Cache_FileSystem.php on line 57

I can't seem to figure out what the issue is.

Anyone have any ideas?

-Jason

***EDIT***

I changed the file permissions of the cache files and clicked a few links now everything seems fine. I wonder if when I moved the site a few weeks ago if the permissions were changed??? Could this be it or is this change completely unrelated. What are the permissions of the files in the cache folder supposed to be anyway?

***EDIT***

 

Yes when you moved the site the permissions of the files or folder changed obviously, they need to be writeable, either 0777 or 0755 dependent on the server.

Share this post


Link to post
Share on other sites

:angry:

 

It worked for me, even if I found inside the the /classes/usu.php file more of those "DIRECTORY_SEPARATOR" .

How do you explain that it worked suddendly after I changed the described line?

 

I´m not that dumb and the absolute noob, I´m modding oscommerce shops since quite a while.

I know the changes are a little strange but it worked.

 

I can not understand the way people are talking in this forum.

 

Well if DIRECTORY_SEPARATOR is not available on your server then you have a very odd set up.

 

Having said this, DIRECTORY_SEPARATOR is actually not necessary for interoperability this constant can always be replaced with / whether WinDoze or *nix.

 

I had thought this constant to be always available, if it is not then apologies for my previous comment.

Share this post


Link to post
Share on other sites

Thank you, I will try again. I had to revert back to my back-up and restore everything... don't like error pages hanging out there.

 

Just try to be really careful when you copy and paste, it is very easy to miss off the last brace }.

 

Also I have noticed you making reference to it being in to root directory or /catalog. My shop is in the /catalog part of the world if this makes any difference.

 

If you access your site like www.mysite.com/catalog/ the the RewriteBase needs to be set to match .. the instructions are clear on this.

Share this post


Link to post
Share on other sites

You have to be running PHP5.2+ to run USU5, which version are you on?

 

Hello Robert,

 

I am having this exact problem. the only difference is that my Cpanel shows that I have PHP 5.2.8 as well as MySQL 5.0.81 on a Linux OS. Would you have any insight on this?

 

 

Thanks

Share this post


Link to post
Share on other sites

Hello Robert,

 

I am having this exact problem. the only difference is that my Cpanel shows that I have PHP 5.2.8 as well as MySQL 5.0.81 on a Linux OS. Would you have any insight on this?

 

 

Thanks

 

I have no insight because you haven't mentioned the problem!

 

[edit]Looked back a few posts and found ...[/edit]

 

I think you mean the following error..

Parse error: syntax error, unexpected T_STRING, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}'

 

If so this means that the server is not running PHP5 whatever cPanel may say, look in the admin panel ..

admin > Tools > Server Info

 

PHP version will be right at the top.

Edited by FWR Media

Share this post


Link to post
Share on other sites

I have no insight because you haven't mentioned the problem!

 

[edit]Looked back a few posts and found ...[/edit]

 

I think you mean the following error..

 

 

If so this means that the server is not running PHP5 whatever cPanel may say, look in the admin panel ..

admin > Tools > Server Info

 

PHP version will be right at the top.

 

Sorry... I thought I quoted but must have messed it up. I was speaking about that parse error and will have to speak with my hosting company about the php version.

 

Thanks much.

Share this post


Link to post
Share on other sites

Hi Robert,

 

I've had the contribution running for a few weeks now and it's working great :)

 

Today I noticed some errors in the php error_log file on our server.

 

Looking at the logs it appears to be a problem if the cPath specified contains non-numeric characters.

 

[07-Nov-2009 17:12:30] PHP Warning: Usu_Categories Incorrect cPath presented: 67robotstxt in /home/whitebee/public_html/includes/modules/ultimate_seo_urls5/modules/Usu_Categories.php on line 153

[07-Nov-2009 17:12:30] PHP Warning: Cannot modify header information - headers already sent by (output started at /home/whitebee/public_html/includes/modules/ultimate_seo_urls5/modules/Usu_Categories.php:153) in /home/whitebee/public_html/includes/modules/ultimate_seo_urls5/classes/Usu_Validator.php on line 252

[07-Nov-2009 17:12:30] PHP Warning: Cannot modify header information - headers already sent by (output started at /home/whitebee/public_html/includes/modules/ultimate_seo_urls5/modules/Usu_Categories.php:153) in /home/whitebee/public_html/includes/modules/ultimate_seo_urls5/includes/notfound_404.php on line 22

 

This is from the servers access log.

 

65.55.207.123 - - [07/Nov/2009:17:12:30 -0600] "GET /index.php?cPath=67/robots.txt HTTP/1.1" 200 1532 "-" "msnbot/2.0b (+http://search.msn.com/msnbot.htm)"

 

I realise these are not valid URLs, but wondered if there's a way this error could be fixed?

 

Kind regards

Scott

Share this post


Link to post
Share on other sites

 

65.55.207.123 - - [07/Nov/2009:17:12:30 -0600] "GET /index.php?cPath=67/robots.txt HTTP/1.1" 200 1532 "-" "msnbot/2.0b (+http://search.msn.com/msnbot.htm)"

 

I realise these are not valid URLs, but wondered if there's a way this error could be fixed?

 

Kind regards

Scott

 

Hi Scott

 

Well it is not an error to be fixed to be honest .. MSN has tried to access robots.txt via an odd and incorrect querystring.

 

Usu_Categories.php is currently set to trigger an E_USER_WARNING if cPath is passed an invalid parameter, and in this case, it is invalid, therefore the E_USER_WARNING is output.

 

I suppose if you wanted to suppress this error you could replace . .

 

       trigger_error( __CLASS__ . ' Incorrect ' . self::DEPENDENCY . ' presented: ' . $valuepair[1], E_USER_WARNING );
      return false;

 

With ..

 

       if ( false === headers_sent() ) {
        session_write_close();
        header("HTTP/1.0 404 Not Found");
        include_once usu::$usuPath . 'includes' . DIRECTORY_SEPARATOR . 'notfound_404.php';
        exit;
      }
      //trigger_error( __CLASS__ . ' Incorrect ' . self::DEPENDENCY . ' presented: ' . $valuepair[1], E_USER_WARNING );
      return false;

Edited by FWR Media

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

×