Undefined index: HTTP_USER_AGENT in the bridge Undefined index: HTTP_USER_AGENT in the bridge
 

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Main Menu

Undefined index: HTTP_USER_AGENT in the bridge

Started by anna.y, September 20, 2005, 04:23:24 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

anna.y


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

kegobeer

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

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

kegobeer

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

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