Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

[Contribution] Header Tags Controller for Admin MS 2.2


Farrukh

Recommended Posts

Warning: file(/public_html/catalog/includes/languages/english/header_tags.php) [function.file]: failed to open stream: No such file or directory in C:\Program Files\xampp\htdocs\catalog\admin\header_tags_controller.php on line 255

 

 

Can anyone advise me how to get out of this one?

 

Graham

Link to comment
Share on other sites

  • Replies 4.6k
  • Created
  • Last Reply

Top Posters In This Topic

Warning: file(/public_html/catalog/includes/languages/english/header_tags.php) [function.file]: failed to open stream: No such file or directory in C:\Program Files\xampp\htdocs\catalog\admin\header_tags_controller.php on line 255

Graham

This error says you are running the application from C:\Program Files\xampp\htdocs\catalog\, but your configuration file (/catalog/admin/includes/configure.php) says your application is in: /public_html/.

 

you need to update your admin configure.php with the correct absolute file system path to your catalog:

define('DIR_FS_CATALOG', DIR_FS_DOCUMENT_ROOT . DIR_WS_CATALOG);

--or--

define('DIR_FS_CATALOG', 'C:\Program Files\xampp\htdocs\catalog\');

Link to comment
Share on other sites

Case A: Escape Character problems

Thought this was fixed. Sure you are using files from v2.5.6?

 

Case B, Case C

may be the effect of Case A's problem. This may be fixed with replacing /catalog/includes/languages/header_tags.php from the one in the package.

Link to comment
Share on other sites

OK, I just installed 2.5.6.

 

Am I missing something?

 

I go to admin, I click on Fill ALL Tags. and I have nothing.

 

My page source is this

 

<title></title>

<meta name="Description" content=""/>

<meta name="Keywords" content=""/>

 

Do I have to enter all these myself? I thought this would populate itself from the description already in the databse for the products. to make its own title, description and keywords.

 

Besides that point, if I go into one of my products I see information filled in inside the three new boxes for th product (in admin). So there is information there, but when I go to the product page on the catalog side.. nothing.

 

The admin is secure

The files mentioned in the readme were set to 666, I even tried 777 - no dice!

I replaced the files with backups and reinstalled the entire thing all over again. Same thing - Nothing

 

suggestions?

My Contributions

 

Henry Smith

Link to comment
Share on other sites

Mine work too until I installed the admin, which I will most likely remove now.

 

I got the blank pages too. The issue is the admin removes the \ from the what\'s new and cause everypage to go blank

 

I've also caught numerous spelling errors, file name, paths, etc.. Worked much better without the admin.

 

Hopefully it will as it did when I remove it too

My Contributions

 

Henry Smith

Link to comment
Share on other sites

Update:

 

Replaced the catalog file and it worked.

 

Ran the admin and it broke everything again (blank pages) - Remove the ' that the admin keeps taking the \ away from and I could access the pages but tag would generate dynamically.

 

Checked the DB, all fields filled in properly.

 

Remvoed the admin, replaced the catalog files again and all is well.

 

Do I really need the admin for anything?

 

The Contrib I already have installed, troubleshot and have working?

 

Admin Notes

Adsense

Auto copyright

Auto Login Secure

Black List

Catalog Product with Images

Conditions and Privacy

Create Account

Cron BDV

Down for Maintenance

Feedback Request

Froogle Data Feeder

Froogle Data Feed (Perl)

Great Categories

Hide Products For CG SPPC

Improved Invoices

Improved Order Number

Auto Remove

MD5 Master Password

NewsDesk

Order Editor

On The Fly Thumbnails w/GD Lib

Points Reward

Preset Order Comments

Quanity Min Per CG SPPC Price Break

Related Products

Secure Pay CVS

Separate Prices

Shipping Status

Show Price List for SPPC

Spiders

Super Tracker

Currency Updater

Watermarkiing

Welcome Email Pwd

Who's Online Enhancement

 

I've been around the block a few times with these files... :wacko:

My Contributions

 

Henry Smith

Link to comment
Share on other sites

I tried both suggestions and 'htdocs/catalog'... the best I get now is -

 

Warning: file(htdocs/catalog/includes/languages/english/header_tags.php) [function.file]: failed to open stream: No such file or directory in C:\Program Files\xampp\htdocs\catalog\admin\header_tags_controller.php on line 255

 

regards,

 

Graham

Link to comment
Share on other sites

Thought this was fixed. Sure you are using files from v2.5.6?

may be the effect of Case A's problem. This may be fixed with replacing /catalog/includes/languages/header_tags.php from the one in the package.

 

thats very odd. I verified again and I am using 2.5.6: Header Tags Controller v2.5.6 Complete.

I checked the archive and the files are the same.

 

header_tags_controller.php is dated 25.11.2005

header_tags_english.php is dated 20.12.2005

 

I reuploaded everything again and the effect is the same.

 

Thank you for your help!

Link to comment
Share on other sites

Do I really need the admin for anything?

no, the admin was written (long ago) for the convenience of those that don't like changing the files maually. Looks like this code is working differently on different servers. Very odd. v2.5.6 works on my servers, v2.5.5 works on Jack's servers. Someone might just have to completely rewrite that old file admin. :-"

 

for the slashes issue, try the /catalog/admin/header_tags_english.php from the v2.5.5. see if that works better on your server.

 

I've also caught numerous spelling errors, file name, paths, etc..

 

Thanks for sharing those with us... :rolleyes:

 

Checked the DB, all fields filled in properly.

If this is true, it should show up fine for all the product info pages. a corrupted /catalog/includes/languages/english/header_tags.php should not affect that.

Link to comment
Share on other sites

Warning: file(htdocs/catalog/includes/languages/english/header_tags.php) [function.file]: failed to open stream: No such file or directory in C:\Program Files\xampp\htdocs\catalog\admin\header_tags_controller.php on line 255

 

So when you tried this one in your /catalog/admin/includes/configure.php:

 

define('DIR_FS_CATALOG', 'C:\Program Files\xampp\htdocs\catalog\');

 

it gave you this error?

 

Warning: file(C:\Program Files\xampp\htdocs\catalog\includes/languages/english/header_tags.php) [function.file]: failed to open stream: No such file or directory in C:\Program Files\xampp\htdocs\catalog\admin\header_tags_controller.php on line 255

 

If you did get this error, make sure you put this file there: /catalog/includes/languages/english/header_tags.php from the package.

 

Are you running this from a non-server Windows machine? Just guessing since it seems to be running from the "C:\Program Files" directory. I have personally never tried to run osCommerce from an absolute path with a space in it. I have run it from windows servers though. You need to make sure all your paths are correct.

Edited by surfalot
Link to comment
Share on other sites

thats very odd. I verified again and I am using 2.5.6: Header Tags Controller v2.5.6 Complete.

I checked the archive and the files are the same.

 

try the /catalog/admin/header_tags_english.php from the v2.5.5. see if that works better on your server.

Link to comment
Share on other sites

I've been working on the addslashes problem. I think it may have to do with the server using, or not using, the magic quotes setting. If someone who has had this problem would try replacing this code in 2.5.6

	  $main['title'] = $_POST['main_title'];  //read in the knowns
  $main['desc'] = $_POST['main_desc'];
  $main['keyword'] = $_POST['main_keyword'];

with this code

	  if (!get_magic_quotes_gpc()) 
  {
	$main['title'] = addslashes($_POST['main_title']);  //read in the knowns
	$main['desc'] = addslashes($_POST['main_desc']);
	$main['keyword'] = addslashes($_POST['main_keyword']);
  }
  else
  {
	$main['title'] = $_POST['main_title']; //read in the knowns
	$main['desc'] = $_POST['main_desc'];
	$main['keyword'] = $_POST['main_keyword'];
  }

it might help isolate the problem.

 

Jack

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

I've been working on the addslashes problem. I think it may have to do with the server using, or not using, the magic quotes setting. If someone who has had this problem would try replacing this code in 2.5.6
	  $main['title'] = $_POST['main_title'];  //read in the knowns
  $main['desc'] = $_POST['main_desc'];
  $main['keyword'] = $_POST['main_keyword'];

with this code

	  if (!get_magic_quotes_gpc()) 
  {
	$main['title'] = addslashes($_POST['main_title']);  //read in the knowns
	$main['desc'] = addslashes($_POST['main_desc']);
	$main['keyword'] = addslashes($_POST['main_keyword']);
  }
  else
  {
	$main['title'] = $_POST['main_title']; //read in the knowns
	$main['desc'] = $_POST['main_desc'];
	$main['keyword'] = $_POST['main_keyword'];
  }

it might help isolate the problem.

 

Jack

 

Thank you for your replies. I tried the code, but it didnt change anything. I copied the header tags english and controler.php from 2.5.5 into the folder and it didn't change anything too.

 

I'll have a further look when I have time if I can find a solution

Link to comment
Share on other sites

Hi,

 

I tried all kind of things but the slashes stayed. I have the register globals patch installed and I think that it is related to this. Strange that nobody else had this problem so far?

 

I am sorry for the confusion.

 

Thanks

Link to comment
Share on other sites

I recently installed the latest version of this HTC contrib and it seems to be doing what I expected so far. I'm very pleased with it and my compliments to all of you that have added to the code and support over the years. Its great stuff. I do have a quick question for you all, if you do not mind.

 

I would like the chage the order of the words displayed in the title tag. Basically, I want the name of the site to always be first followed by either the category or product name. What I'm going for is a title tag that looks something like

 

<title>$SITE_NAME: $PRODUCT_NAME (or $CATEGORY_NAME)</title> (not actual PHP variables of course)

 

How can I change the display order and do so without overly complicating any future possible upgrades I might have to do? I'm sure I could do an ugly hack since I don't know the code well at all but what would be a clean and effective way of getting it to do what I want.

 

Thanks much all.

Link to comment
Share on other sites

You would need to edit the code in includes/header_tags.php. Wherever you see

$tags_array['title']=

change it to

$tags_array['title']= "Title of site '.

This is not recommended though and almost certainly lower your position in the SE listings.

 

Jack

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

I fixed the quotes/escaped string problem finally. It took me a while but the solution is not that complicated:

 

1) in functions/header_tags.php

 

Replaced in function GetMainArgument

this line $line = str_replace($arg, $arg2, $line);

with this line $line = ReplaceArg($line, $arg2);

 

2) in header_tags_english.php

 

After writing the file, I am setting $formActive=false; and I read in everything again. Now it shows up exactly as it is in the file.

Link to comment
Share on other sites

Hi,

 

Can someone help as I've had a read through through the posts but still cannot find anything to help.

 

I'm starting from a fresh install of 2.2 MS2 (051113) with the Register Globals V 1.4 contribution (as my host has globals off).

 

I've installed the Header Tags contribution V 2.5.6 and everything seems to work ok apart from the product_meta_description is not being polulated from the product_description when I use the fill tags in the admin control panel.

 

I can manually amend the entries in the product_meta_description and it works fine. However, as soon as I run the fill tags again this is overwritten with the product_name.

 

Default head_title, head_key and head_desc all working fine, as are the product_name and category_name it is only the product_description which doesn't seem to work.

 

Hope it's something really simple I've missed........

Link to comment
Share on other sites

I've installed the Header Tags contribution V 2.5.6 and everything seems to work ok apart from the product_meta_description is not being polulated from the product_description when I use the fill tags in the admin control panel.

this is the intended function. the main purpose of this contrib is to help with search engine ranks. The best optimized meta title, description and keywords for each item is simply the items name. That is assuming all the item's keywords are in the item's title. Adding the item's description to the meta description would most likely dilute your optimizing and not allow the best search rank you could get.

Link to comment
Share on other sites

this is the intended function. the main purpose of this contrib is to help with search engine ranks. The best optimized meta title, description and keywords for each item is simply the items name. That is assuming all the item's keywords are in the item's title. Adding the item's description to the meta description would most likely dilute your optimizing and not allow the best search rank you could get.

 

Hi surfalot,

 

Thanks very much for that (brilliant contribution by the way !).

 

It may be worth editing the readme_first.txt at para 4.

4) - Go to admin->Header Tags->Fill Tags, click on Fill All for both

Categories and Products and then click update.

 

This will autofill your title, meta desc and meta keywords

for all existing products and categories.

 

product meta_title with product_name

product meta_description with product_description

product meta_keyword with product_name

category meta_title with category_name

category meta_description with category_name

category meta_keywords with category_name

 

Thanks again for the great contribution and a quick answer.

Link to comment
Share on other sites

Hello,

 

Just installed V 2.5.6, but I get "page can't be found" when go to my store, in admin I'm able to see the Header Tags link and it works, it takes me to the Header Tags Controller page.

 

I did replace the index.php with a back up and the store works, I notice that when I change the code:

"<meta http-equiv="content-type" content="text/html; charset=<?php echo charset; ?>">

<title><?php echo title; ?></title>

to:

<?php

// BOF: webmakers.com ................

 

is when the shop stop working, not able to show home page, I get "page can't be found"

 

 

any comments will be greatly appreciated

 

thanks

Link to comment
Share on other sites

Hello,

 

Just installed V 2.5.6, but I get "page can't be found" when go to my store, in admin I'm able to see the Header Tags link and it works, it takes me to the Header Tags Controller page.

 

I did replace the index.php with a back up and the store works, I notice that when I change the code:

"<meta http-equiv="content-type" content="text/html; charset=<?php echo charset; ?>">

<title><?php echo title; ?></title>

to:

<?php

// BOF: webmakers.com ................

 

is when the shop stop working, not able to show home page, I get "page can't be found"

any comments will be greatly appreciated

 

thanks

 

 

Problem solved,

 

For some reason when fill tag updated from admin, the character "\" was not included before the " ' " what I did was deleted all the "what's new" phrases and avoid any world using the " ' "

Link to comment
Share on other sites

I have a store using CRELoaded which has the header tags controller installed, but you cannot access it via Admin as you would with a normal OSc site with the contribution added.

I have no complaints and it all works fine, but I would like to change the TITLE tag on the index.php page. This always defaults to the store name as seen in line 16 of header_tags.php

define('HEAD_TITLE_TAG_ALL', STORE_NAME);

 

I tried toggling line 21 of header_tags.php to off:

// index.php
define('HTTA_DEFAULT_ON','0'); // Include HEAD_TITLE_TAG_ALL in Title
define('HTKA_DEFAULT_ON','1'); // Include HEAD_KEY_TAG_ALL in Keywords
define('HTDA_DEFAULT_ON','1'); // Include HEAD_DESC_TAG_ALL in Description
define('HEAD_TITLE_TAG_DEFAULT', 'Pressure washers Karcher power washers steam cleaners');

 

in the hope that it would display the line you see above.

What am I doing wrong and how can I achieve this?

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