coppermine-gallery.com/forum

Support => cpg1.3.x Support => Older/other versions => cpg1.3 (BBS) Integration / Bridging => Topic started by: anna.y on September 20, 2005, 04:23:24 AM

Title: Undefined index: HTTP_USER_AGENT in the bridge
Post by: anna.y 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
Title: Re: Undefined index: HTTP_USER_AGENT in the bridge
Post by: kegobeer 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.
Title: Re: Undefined index: HTTP_USER_AGENT in the bridge
Post by: anna.y 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
Title: Re: Undefined index: HTTP_USER_AGENT in the bridge
Post by: kegobeer 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.
Title: Re: Undefined index: HTTP_USER_AGENT in the bridge
Post by: anna.y 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