Advanced search  

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Pages: [1]   Go Down

Author Topic: Undefined index: HTTP_USER_AGENT in the bridge  (Read 8369 times)

0 Members and 1 Guest are viewing this topic.

anna.y

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 29
    • Toronto German Shepherd Dog Rescue
Undefined index: HTTP_USER_AGENT in the bridge
« on: September 20, 2005, 04:23:24 am »


I just noticed in IE a following notice on top of my Coppermine screen:  (I'm usually using FF so I don't know how long this line was there...)

Notice: Undefined index: HTTP_USER_AGENT in

xxxxxxx/httpdocs/gallery/bridge/smf.inc.php on line 159


This is the line 159:  $HTTP_USER_AGENT = substr($HTTP_SERVER_VARS['HTTP_USER_AGENT'], 0, 50);

I don't know how to define this missing Agent  or what to do about it/him/her...

My server seems to have some problems for the past couple of hours as well, so could this be server related?

Any help would be greatly appreciated

Anna
« Last Edit: September 20, 2005, 10:33:49 am by GauGau »
Logged

kegobeer

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 4637
  • Beer - it does a body good!
    • The Kazebeer Family Website
Re: Undefined index: HTTP_USER_AGENT in the bridge
« Reply #1 on: September 20, 2005, 04:25:43 am »

Turn off debug notices in config.  If you don't have them on, ask your host to turn off error notices in your php.ini file.
Logged
Do not send me a private message unless I ask for one.  Make your post public so everyone can benefit.

There are no stupid questions
But there are a LOT of inquisitive idiots

anna.y

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 29
    • Toronto German Shepherd Dog Rescue
Re: Undefined index: HTTP_USER_AGENT in the bridge
« Reply #2 on: September 20, 2005, 04:44:46 am »

Thank you kindly kegobeer...

It has been off in my configuration set all along.

If my host turns them off won't this prevent me from viewing the error notices when I do need them?

Can I simply remove safely this  line 159? Does this line serves any purpose in my setup?

Anna
Logged

kegobeer

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 4637
  • Beer - it does a body good!
    • The Kazebeer Family Website
Re: Undefined index: HTTP_USER_AGENT in the bridge
« Reply #3 on: September 20, 2005, 05:06:41 am »

Don't remove that line - it's best to leave it alone.  I visited your site and see no error message, so I guess your host fixed whatever they broke.

Regarding error notices: PHP strongly recommends setting display_errors = Off in php.ini, and using the error logging for production sites.  It's a security feature that some hosts choose to use and others choose not to use.  For most people this never becomes an issue, as major errors are displayed but the notices are not.

If the error message continue to pop up, I recommend contacting your host to see what's going on.  At that point you might want to ask your host what they have in error_reporting and ask them to remove the e_notice option.
Logged
Do not send me a private message unless I ask for one.  Make your post public so everyone can benefit.

There are no stupid questions
But there are a LOT of inquisitive idiots

anna.y

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 29
    • Toronto German Shepherd Dog Rescue
Re: Undefined index: HTTP_USER_AGENT in the bridge
« Reply #4 on: September 20, 2005, 06:22:00 am »

Thank you kegobeer for taking time to explain it.  It is greatly appreciated.

It is all very new to me and I want to make sure that all three SMF, Coppermine and Joomla are running smoothly  before I put them all together...

Thank you again

Anna
Logged
Pages: [1]   Go Up
 

Page created in 0.02 seconds with 15 queries.