Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Error 1054 - Unknown column 'http_referer' in 'field list'


moo22

Recommended Posts

I was doing some work on the my site today, uploaded the product_info.php file and I am receiving this message in my browser

 

1054 - Unknown column 'http_referer' in 'field list'

 

insert into whos_online (customer_id, full_name, session_id, ip_address, time_entry, time_last_click, last_page_url, http_referer) values ('0', 'Guest', '85c19eb389188911c9caae831ec1ac7e', '81.154.255.191', '1175436691', '1175436691', '/', '')

 

[TEP STOP]

 

Does anyone know what the cause of this is and how to resolve it?

Link to comment
Share on other sites

Come to think of it I don't actually recall uploading any changes and the error suddenly seems to have appeared.

 

I a bit of a newbie with OS Commerce so that's why it took me by surprise.

Link to comment
Share on other sites

The http_referrer is installed with the Who's Online Contribution (different from the one included with osCommerce). If you didn't install that particular contribution then most likely whatever changes you made had the contribution built into them and you didn't make the necessary changes to the database.

Link to comment
Share on other sites

Mmmm.....

 

I've just been told it could well be the database that has crashed. Problem is I didn't do the initial installation of the site and as such I'm stuck on that side of it

 

The http_referrer is installed with the Who's Online Contribution (different from the one included with osCommerce). If you didn't install that particular contribution then most likely whatever changes you made had the contribution built into them and you didn't make the necessary changes to the database.
Link to comment
Share on other sites

nah, it wouldn't be a database crash. of course it could be a problem if you had the who's online contribution installed previously and now that field is missing from the table. More then likely though you made a change with a contribution and either missed a step or the contribution creator had the who's online contribution installed and when they uploaded the contribution they left the wrong code in there.

 

If it was database problems you would have more then just one field in one table giving you errors ;)...

Link to comment
Share on other sites

That's the thing though, I haven't installed any contributions at all so I'm not sure as to why it has happened as the site has been functioning fine for the past few months and all of a sudden today the error occurred

 

nah, it wouldn't be a database crash. of course it could be a problem if you had the who's online contribution installed previously and now that field is missing from the table. More then likely though you made a change with a contribution and either missed a step or the contribution creator had the who's online contribution installed and when they uploaded the contribution they left the wrong code in there.

 

If it was database problems you would have more then just one field in one table giving you errors ;)...

Link to comment
Share on other sites

I was altering the layout of the product_info.php file and that's it really. No PHP at all as I wouldn't know where to begin

 

What were you doing exactly? Something in the code changed and like my mother used to tell me it didn't do it on its own :)
Link to comment
Share on other sites

Then I am not sure. Something definitely changed though. You have two choices, as I don't believe at all it is a database issue.

 

1. Edit your includes/functions/whos_online.php file and delete http_referer and user_agent from this line:

 

	 tep_db_query("insert into " . TABLE_WHOS_ONLINE . " (customer_id, full_name, session_id, ip_address, time_entry, time_last_click, last_page_url, http_referer, user_agent)

 

2. Download the who's online contribution and walk through the steps of installing it. It is actually fairly simple to do.

 

The problem with option 1 is you will need to modify the code in the admin area as well. I would recommend just following the second option.

Link to comment
Share on other sites

I'm going to have a look at it tomorrow although another error was thrown up after reuploading the site:

 

1054 - Unknown column 'customers_selected_template' in 'field list'

 

select customers_selected_template as template_selected from customers where customers_id = '0'

 

[TEP STOP]

 

A friend has suggested the same thing in that a contribution seems to have been added, although not to my knowledge :-(

 

Then I am not sure. Something definitely changed though. You have two choices, as I don't believe at all it is a database issue.

 

1. Edit your includes/functions/whos_online.php file and delete http_referer and user_agent from this line:

 

	 tep_db_query("insert into " . TABLE_WHOS_ONLINE . " (customer_id, full_name, session_id, ip_address, time_entry, time_last_click, last_page_url, http_referer, user_agent)

 

2. Download the who's online contribution and walk through the steps of installing it. It is actually fairly simple to do.

 

The problem with option 1 is you will need to modify the code in the admin area as well. I would recommend just following the second option.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...